diff --git a/assets/Basic.vue_vue_type_script_setup_true_lang-Bm_AZiZR.js b/assets/Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js similarity index 90% rename from assets/Basic.vue_vue_type_script_setup_true_lang-Bm_AZiZR.js rename to assets/Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js index 1dd7237c8c885a0033a22bdf35ead3b165c388b5..eb38f18c27ad9e56b0e74b0ee43c1fdda1cade52 100644 --- a/assets/Basic.vue_vue_type_script_setup_true_lang-Bm_AZiZR.js +++ b/assets/Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js @@ -1 +1 @@ -import{d as c,cf as d,cg as f,e as s,w as p,bm as v,cd as x,o as h,c as y,a3 as _}from"./index-CKmiAjHk.js";const w=c({__name:"Basic",props:{modelValue:{default:""},modelModifiers:{}},emits:d(["submit"],["update:modelValue"]),setup(n,{emit:u}){const r=u,e=f(n,"modelValue"),a=s(),o=s("auto");function i(t){t.code==="Enter"&&!t.shiftKey&&(t.preventDefault(),r("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 as c,cf as d,cg as f,e as s,w as p,bm as v,cd as x,o as h,c as y,a3 as _}from"./index-WDP_Z4A8.js";const w=c({__name:"Basic",props:{modelValue:{default:""},modelModifiers:{}},emits:d(["submit"],["update:modelValue"]),setup(n,{emit:u}){const r=u,e=f(n,"modelValue"),a=s(),o=s("auto");function i(t){t.code==="Enter"&&!t.shiftKey&&(t.preventDefault(),r("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-BlSfmRlS.js b/assets/CardDetailDialog-BlSfmRlS.js new file mode 100644 index 0000000000000000000000000000000000000000..bd74fc6f6bb848072e8f4d747517edb6515bb3f9 --- /dev/null +++ b/assets/CardDetailDialog-BlSfmRlS.js @@ -0,0 +1 @@ +import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js";import"./index-WDP_Z4A8.js";import"./index-DeGbjSQn.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import"./airi-card-Cgw9OiDq.js";import"./consciousness-CI5ipeHX.js";import"./providers-7GsMyC_3.js";import"./index-LHmcipjy.js";import"./speech-DRmXCXwq.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";export{o as default}; diff --git a/assets/CardDetailDialog-DjMm_Dzp.js b/assets/CardDetailDialog-DjMm_Dzp.js deleted file mode 100644 index e20144c34f023dd98b803086763d9f09e8113723..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-DjMm_Dzp.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-DY8OXi6T.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DXbcrybA.js";import"./index-CKmiAjHk.js";import"./index-qrRTaw2W.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import"./airi-card-COXfZI0a.js";import"./consciousness-C2QUWl48.js";import"./providers-bTtvV6aX.js";import"./index-LHmcipjy.js";import"./speech-CRLeR9Bl.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";export{o as default}; diff --git a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DY8OXi6T.js b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js similarity index 94% rename from assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DY8OXi6T.js rename to assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js index 5662029e52c5b2baa12517690758d6870acc1d17..6ed125be1558e8d91982088f619ab2ab9e7d13a3 100644 --- a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DY8OXi6T.js +++ b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js @@ -1 +1 @@ -import{a as O,_ as E}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DXbcrybA.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as U,$ as q,a0 as F,f as x,e as $,c as l,o as n,c6 as f,b as m,u as o,bl as k,a as e,W as v,ch as u,Y as i,X as L,c7 as D}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as R}from"./airi-card-COXfZI0a.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{n as W,I as X,$ as Y,P as G,B as J}from"./index-qrRTaw2W.js";const K={key:0,class:"w-full flex flex-col gap-5"},Q={flex:"~ col","gap-3":""},Z={flex:"~ row","items-center":"","justify-between":""},ee={flex:"~ row","items-center":"","gap-2":""},te={key:0,class:"flex items-center gap-1 rounded-full bg-primary-100 px-2 py-0.5 text-xs text-primary-600 font-medium dark:bg-primary-900/40 dark:text-primary-400"},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":""},$e={truncate:"","font-medium":""},Le={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"},Oe=U({__name:"CardDetailDialog",props:{modelValue:{type:Boolean},cardId:null},emits:["update:modelValue"],setup(B,{emit:A}){const b=B,M=A,{t:d}=q(),w=R(),{removeCard:N}=w,{activeCardId:S}=F(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=$(!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 _=$(!1);function z(){a.value&&(N(b.cardId),M("update:modelValue",!1)),_.value=!1}const V=$(""),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(W),{open:B.modelValue,"onUpdate:open":t[0]||(t[0]=r=>M("update:modelValue",r))},{default:k(()=>[m(o(X),null,{default:k(()=>[m(o(Y),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm"}),m(o(G),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 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",K,[e("div",Q,[e("div",Z,[e("div",null,[e("div",ee,[m(o(J),{"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(O),{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:L({"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,D(H.value,r=>(n(),l("button",{key:r.id,class:L(["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:L(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,D(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",$e,i(y.value.voice??"default"),1)])])])):v("",!0)])])):(n(),l("div",Le,[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(E,{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{Oe as _}; +import{a as O,_ as E}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as U,$ as q,a0 as F,f as x,e as $,c as l,o as n,c6 as f,b as m,u as o,bl as k,a as e,W as v,ch as u,Y as i,X as L,c7 as D}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as R}from"./airi-card-Cgw9OiDq.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{n as W,I as X,$ as Y,P as G,B as J}from"./index-DeGbjSQn.js";const K={key:0,class:"w-full flex flex-col gap-5"},Q={flex:"~ col","gap-3":""},Z={flex:"~ row","items-center":"","justify-between":""},ee={flex:"~ row","items-center":"","gap-2":""},te={key:0,class:"flex items-center gap-1 rounded-full bg-primary-100 px-2 py-0.5 text-xs text-primary-600 font-medium dark:bg-primary-900/40 dark:text-primary-400"},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":""},$e={truncate:"","font-medium":""},Le={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"},Oe=U({__name:"CardDetailDialog",props:{modelValue:{type:Boolean},cardId:null},emits:["update:modelValue"],setup(B,{emit:A}){const b=B,M=A,{t:d}=q(),w=R(),{removeCard:N}=w,{activeCardId:S}=F(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=$(!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 _=$(!1);function z(){a.value&&(N(b.cardId),M("update:modelValue",!1)),_.value=!1}const V=$(""),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(W),{open:B.modelValue,"onUpdate:open":t[0]||(t[0]=r=>M("update:modelValue",r))},{default:k(()=>[m(o(X),null,{default:k(()=>[m(o(Y),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm"}),m(o(G),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 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",K,[e("div",Q,[e("div",Z,[e("div",null,[e("div",ee,[m(o(J),{"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(O),{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:L({"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,D(H.value,r=>(n(),l("button",{key:r.id,class:L(["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:L(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,D(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",$e,i(y.value.voice??"default"),1)])])])):v("",!0)])])):(n(),l("div",Le,[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(E,{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{Oe as _}; diff --git a/assets/CardListItem-BKoV0-r8.js b/assets/CardListItem-BKoV0-r8.js deleted file mode 100644 index 9431e6218b3ab48af5faade24627dd6b96428fbf..0000000000000000000000000000000000000000 --- a/assets/CardListItem-BKoV0-r8.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardListItem.vue_vue_type_script_setup_true_lang-CcH5wkMP.js";import"./index-CKmiAjHk.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/CardListItem-D2jkRHPP.js b/assets/CardListItem-D2jkRHPP.js new file mode 100644 index 0000000000000000000000000000000000000000..4bd24efa9913f745254e734cd253347642444884 --- /dev/null +++ b/assets/CardListItem-D2jkRHPP.js @@ -0,0 +1 @@ +import{_ as o}from"./CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js";import"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/CardListItem.vue_vue_type_script_setup_true_lang-CcH5wkMP.js b/assets/CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js similarity index 95% rename from assets/CardListItem.vue_vue_type_script_setup_true_lang-CcH5wkMP.js rename to assets/CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js index 62cc7b9995d442f9f9846bcce838607859eee670..87e702c31d6e9ea15c344e69088cf4c4e2d1230a 100644 --- a/assets/CardListItem.vue_vue_type_script_setup_true_lang-CcH5wkMP.js +++ b/assets/CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js @@ -1 +1 @@ -import{d as M,e as s,T as R,c as p,o as d,bh as W,a3 as F,c2 as H,bk as I,bl as N,a as t,W as v,Y as l,ck as k,X as h,u as V}from"./index-CKmiAjHk.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";const D=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 $(c){if(!o.value)return;const u=o.value,b=u.getBoundingClientRect(),_=c.clientX-b.left,C=c.clientY-b.top,z=u.offsetWidth,B=u.offsetHeight,f=Math.abs(Math.floor(100/z*_)-100),m=Math.abs(Math.floor(100/B*C)-100),x=50+(f-50)/1.5,g=50+(m-50)/1.5,X=50+(f-50)/7,Y=50+(m-50)/7,P=(x-50)/1.5*.2*n.intensity,S=(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(${S}deg) rotateY(${P}deg) scale3d(${1+.015*n.intensity}, ${1+.015*n.intensity}, ${1+.015*n.intensity})`,e.value=`${x}% ${g}%`,i.value=`${X}% ${Y}%`,y.value=j}function w(){a.value="perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",e.value="50% 50%",i.value="50% 50%",y.value=.5}return R(()=>{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:F({transform:a.value,"--effect-intensity":r.intensity}),onMousemove:$,onMouseleave:w},[W(c.$slots,"default",{},void 0,!0)],36))}}),E=H(D,[["__scopeId","data-v-895421da"]]),L={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"},O={"z-1":"",flex:"","items-start":"","justify-between":"","gap-2":""},T={"flex-1":"",truncate:"","text-lg":"","font-thin":""},q={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},G={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400"},J={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},K={flex:"","items-center":"","gap-1.5":""},Q={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"],se=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(),I(V(E),{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: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:N(()=>[t("div",L,[t("div",O,[t("h3",T,l(r.name),1),r.isActive?(d(),p("div",q,e[3]||(e[3]=[t("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):v("",!0)]),r.description?(d(),p("p",G,l(r.description),1)):v("",!0),t("div",J,[t("div",null,"v"+l(r.version),1),t("div",K,[t("div",Q,[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{se as _}; +import{d as M,e as s,T as R,c as p,o as d,bh as W,a3 as F,c2 as H,bk as I,bl as N,a as t,W as v,Y as l,ck as k,X as h,u as V}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";const D=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 $(c){if(!o.value)return;const u=o.value,b=u.getBoundingClientRect(),_=c.clientX-b.left,C=c.clientY-b.top,z=u.offsetWidth,B=u.offsetHeight,f=Math.abs(Math.floor(100/z*_)-100),m=Math.abs(Math.floor(100/B*C)-100),x=50+(f-50)/1.5,g=50+(m-50)/1.5,X=50+(f-50)/7,Y=50+(m-50)/7,P=(x-50)/1.5*.2*n.intensity,S=(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(${S}deg) rotateY(${P}deg) scale3d(${1+.015*n.intensity}, ${1+.015*n.intensity}, ${1+.015*n.intensity})`,e.value=`${x}% ${g}%`,i.value=`${X}% ${Y}%`,y.value=j}function w(){a.value="perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",e.value="50% 50%",i.value="50% 50%",y.value=.5}return R(()=>{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:F({transform:a.value,"--effect-intensity":r.intensity}),onMousemove:$,onMouseleave:w},[W(c.$slots,"default",{},void 0,!0)],36))}}),E=H(D,[["__scopeId","data-v-895421da"]]),L={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"},O={"z-1":"",flex:"","items-start":"","justify-between":"","gap-2":""},T={"flex-1":"",truncate:"","text-lg":"","font-thin":""},q={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},G={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400"},J={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},K={flex:"","items-center":"","gap-1.5":""},Q={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"],se=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(),I(V(E),{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: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:N(()=>[t("div",L,[t("div",O,[t("h3",T,l(r.name),1),r.isActive?(d(),p("div",q,e[3]||(e[3]=[t("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):v("",!0)]),r.description?(d(),p("p",G,l(r.description),1)):v("",!0),t("div",J,[t("div",null,"v"+l(r.version),1),t("div",K,[t("div",Q,[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{se as _}; diff --git a/assets/CheckBar.vue_vue_type_script_setup_true_lang-BreKm1Zw.js b/assets/CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js similarity index 94% rename from assets/CheckBar.vue_vue_type_script_setup_true_lang-BreKm1Zw.js rename to assets/CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js index 1c8dbc2045d1ea1914b17df1345ffdceafdb162c..b38f5c17c6f9cfa1d047b3210fe1885efb44f68d 100644 --- a/assets/CheckBar.vue_vue_type_script_setup_true_lang-BreKm1Zw.js +++ b/assets/CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js @@ -1 +1 @@ -import{d as r,cf as c,cg as m,c as a,o as n,bm as f,a as i,b as h,bn as k,ch as b,W as v,Y as s,cm as x,bl as p,X as d}from"./index-CKmiAjHk.js";const y={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"},V=["aria-checked"],g={key:0,text:"sm neutral-500"},w=r({__name:"CheckBar",props:c({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=m(e,"modelValue");return(l,o)=>(n(),a("label",y,[f(i("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>t.value=u),"aria-checked":t.value,type:"checkbox",hidden:""},null,8,V),[[k,t.value]]),i("div",null,[b(s(l.$t(e.text))+" ",1),e.description?(n(),a("div",g,s(l.$t(e.description)),1)):v("",!0)]),h(x,{name:"slide-away",mode:"out-in"},{default:p(()=>[t.value?(n(),a("div",{key:0,class:d(e.iconOn),transition:"all ease-in-out duration-250"},null,2)):(n(),a("div",{key:1,class:d(e.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}});export{w as _}; +import{d as r,cf as c,cg as m,c as a,o as n,bm as f,a as i,b as h,bn as k,ch as b,W as v,Y as s,cm as x,bl as p,X as d}from"./index-WDP_Z4A8.js";const y={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"},V=["aria-checked"],g={key:0,text:"sm neutral-500"},w=r({__name:"CheckBar",props:c({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=m(e,"modelValue");return(l,o)=>(n(),a("label",y,[f(i("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>t.value=u),"aria-checked":t.value,type:"checkbox",hidden:""},null,8,V),[[k,t.value]]),i("div",null,[b(s(l.$t(e.text))+" ",1),e.description?(n(),a("div",g,s(l.$t(e.description)),1)):v("",!0)]),h(x,{name:"slide-away",mode:"out-in"},{default:p(()=>[t.value?(n(),a("div",{key:0,class:d(e.iconOn),transition:"all ease-in-out duration-250"},null,2)):(n(),a("div",{key:1,class:d(e.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}});export{w as _}; diff --git a/assets/Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js b/assets/Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js similarity index 82% rename from assets/Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js rename to assets/Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js index be128882c23186107b4bbe6df35f163164c819f7..cc1b5d8ff1081c305e539030a3f448a714e08f3b 100644 --- a/assets/Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js +++ b/assets/Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js @@ -1 +1 @@ -import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{d as p,cf as m,cg as c,bK as f,c as b,o as v,bh as r,b as V,a as s,ch as g,Y as u,cu as i,cv as y,u as k,bl as x,W as C,ci as B}from"./index-CKmiAjHk.js";const _={op50:""},P=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=c(o,"modelValue");f(()=>{t.default!=null&&(e.value=!!t.default)});function n(l){return e.value=l,l}return(l,a)=>(v(),b("div",null,[r(l.$slots,"trigger",i(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:a[0]||(a[0]=N=>e.value=!e.value)},[s("span",null,u(t.label??"Collapsable"),1),a[1]||(a[1]=g()),s("span",_,u(e.value?"▲":"▼"),1)])]),V(k(d),null,{default:x(()=>[e.value?r(l.$slots,"default",i(B({key:0},{visible:e.value,setVisible:n}))):C("",!0)]),_:3})]))}});export{P as _}; +import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{d as p,cf as m,cg as c,bK as f,c as b,o as v,bh as r,b as V,a as s,ch as g,Y as u,cu as i,cv as y,u as k,bl as x,W as C,ci as B}from"./index-WDP_Z4A8.js";const _={op50:""},P=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=c(o,"modelValue");f(()=>{t.default!=null&&(e.value=!!t.default)});function n(l){return e.value=l,l}return(l,a)=>(v(),b("div",null,[r(l.$slots,"trigger",i(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:a[0]||(a[0]=N=>e.value=!e.value)},[s("span",null,u(t.label??"Collapsable"),1),a[1]||(a[1]=g()),s("span",_,u(e.value?"▲":"▼"),1)])]),V(k(d),null,{default:x(()=>[e.value?r(l.$slots,"default",i(B({key:0},{visible:e.value,setVisible:n}))):C("",!0)]),_:3})]))}});export{P as _}; diff --git a/assets/ColorPalette.vue_vue_type_script_setup_true_lang-nn7hoVat.js b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js similarity index 84% rename from assets/ColorPalette.vue_vue_type_script_setup_true_lang-nn7hoVat.js rename to assets/ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js index 53f689a1ce09a35a32c3954aa486e88792924762..d38d4e9e6974ef0f6b41eff2181159f20317085f 100644 --- a/assets/ColorPalette.vue_vue_type_script_setup_true_lang-nn7hoVat.js +++ b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js @@ -1 +1 @@ -import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import{d,bk as m,o as i,bl as l,a as s,X as u,bh as k,ch as f,Y as g,bj as y,c,W as C,c6 as h,c7 as v,b as n,u as e,a3 as x,cs as w}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{W as S,j as $,q as B,U as E,G as V,H as j}from"./index-qrRTaw2W.js";const z=["onClick"],F={flex:"","gap-1.5":""},G=d({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(r,p)=>(i(),m(b,{default:t.expand},{trigger:l(o=>[s("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)},[s("div",F,[s("div",{class:u(t.icon),"size-6":""},null,2),f(" "+g(t.title),1)]),s("div",{"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-250",class:u({"rotate-180":o.visible})},null,2)],8,z)]),default:l(()=>[s("div",{grid:"","gap-4":"","p-4":"",class:u(t.innerClass)},[k(r.$slots,"default")],2)]),_:3},8,["default"]))}}),H={key:0,flex:"","gap-2":""},O=d({__name:"ColorPalette",props:{colors:null},setup(t){const r=y();return(p,o)=>t.colors.length?(i(),c("div",H,[(i(!0),c(h,null,v(t.colors,({hex:a,name:_})=>(i(),m(e(j),{key:a||"default"},{default:l(()=>[n(e(S),null,{default:l(()=>[n(e($),{transition:"all ease-in-out duration-250","size-6":"","cursor-pointer":"","rounded-full":"","bg-primary-500":"",style:x(a?{background:a}:{"--theme-colors-hue":e(w)}),class:u(e(r).isColorSelectedForPrimary(a)?"scale-150 mx-1":"hover:scale-110"),onClick:N=>e(r).applyPrimaryColorFrom(a)},null,8,["style","class","onClick"]),n(e(B),null,{default:l(()=>[n(e(E),{bg:"white dark:neutral-800","rounded-lg":"","px-3":"","py-1.5":"","text-sm":"","shadow-md":""},{default:l(()=>[f(g(_)+" ",1),n(e(V),{"fill-white":"","dark:fill-neutral-800":""})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):C("",!0)}});export{G as _,O as a}; +import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import{d,bk as m,o as i,bl as l,a as s,X as u,bh as k,ch as f,Y as g,bj as y,c,W as C,c6 as h,c7 as v,b as n,u as e,a3 as x,cs as w}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{W as S,j as $,q as B,U as E,G as V,H as j}from"./index-DeGbjSQn.js";const z=["onClick"],F={flex:"","gap-1.5":""},G=d({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(r,p)=>(i(),m(b,{default:t.expand},{trigger:l(o=>[s("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)},[s("div",F,[s("div",{class:u(t.icon),"size-6":""},null,2),f(" "+g(t.title),1)]),s("div",{"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-250",class:u({"rotate-180":o.visible})},null,2)],8,z)]),default:l(()=>[s("div",{grid:"","gap-4":"","p-4":"",class:u(t.innerClass)},[k(r.$slots,"default")],2)]),_:3},8,["default"]))}}),H={key:0,flex:"","gap-2":""},O=d({__name:"ColorPalette",props:{colors:null},setup(t){const r=y();return(p,o)=>t.colors.length?(i(),c("div",H,[(i(!0),c(h,null,v(t.colors,({hex:a,name:_})=>(i(),m(e(j),{key:a||"default"},{default:l(()=>[n(e(S),null,{default:l(()=>[n(e($),{transition:"all ease-in-out duration-250","size-6":"","cursor-pointer":"","rounded-full":"","bg-primary-500":"",style:x(a?{background:a}:{"--theme-colors-hue":e(w)}),class:u(e(r).isColorSelectedForPrimary(a)?"scale-150 mx-1":"hover:scale-110"),onClick:N=>e(r).applyPrimaryColorFrom(a)},null,8,["style","class","onClick"]),n(e(B),null,{default:l(()=>[n(e(E),{bg:"white dark:neutral-800","rounded-lg":"","px-3":"","py-1.5":"","text-sm":"","shadow-md":""},{default:l(()=>[f(g(_)+" ",1),n(e(V),{"fill-white":"","dark:fill-neutral-800":""})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):C("",!0)}});export{G as _,O as a}; diff --git a/assets/DeleteCardDialog-BGXyTZBa.js b/assets/DeleteCardDialog-BGXyTZBa.js deleted file mode 100644 index ca0ec49c2ebf13a6d356a3ebd22a2be2437fd932..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-BGXyTZBa.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DXbcrybA.js";import"./index-CKmiAjHk.js";import"./index-qrRTaw2W.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/DeleteCardDialog-CzcmecCM.js b/assets/DeleteCardDialog-CzcmecCM.js new file mode 100644 index 0000000000000000000000000000000000000000..4021f8ae6c48f9395f1a0be33b79b903a92b0496 --- /dev/null +++ b/assets/DeleteCardDialog-CzcmecCM.js @@ -0,0 +1 @@ +import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js";import"./index-WDP_Z4A8.js";import"./index-DeGbjSQn.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DXbcrybA.js b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js similarity index 96% rename from assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DXbcrybA.js rename to assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js index b45fbeb4ea8acca276aa757fdfe244ab54918018..0c3cdb4ec54829df95df3820d86598e97b470609 100644 --- a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DXbcrybA.js +++ b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js @@ -1 +1 @@ -import{d as y,f as g,c as d,o as r,X as p,a as m,W as h,bh as _,Y as i,$ as w,bk as C,bl as n,b as t,u as e,ch as k}from"./index-CKmiAjHk.js";import{A as V,k as B,O as N,V as z,F as D,M as $,N as O,T as S}from"./index-qrRTaw2W.js";const T=["disabled"],j={class:"flex flex-row items-center justify-center gap-2"},A={key:0,class:"i-lucide:loader-circle animate-spin"},F={key:2},x=y({__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=g(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 focus:ring-primary-500/50 dark:focus:ring-primary-400/50 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 focus:ring-neutral-300/50 dark:focus:ring-neutral-600/50 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 focus:ring-red-600/50 dark:focus:ring-red-500/50 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=g(()=>["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"]);return(b,f)=>(r(),d("button",{disabled:l.value,class:p(u.value)},[m("div",j,[a.loading?(r(),d("div",A)):a.icon?(r(),d("div",{key:1,class:p(a.icon)},null,2)):h("",!0),a.label?(r(),d("span",F,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),I={class:"flex flex-row justify-end gap-3"},H=y({__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)=>(r(),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-100 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-100 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(()=>[k(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[k(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",I,[t(e($),{"as-child":""},{default:n(()=>[t(e(x),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(x),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{H as _,x as a}; +import{d as y,f as g,c as d,o as r,X as p,a as m,W as h,bh as _,Y as i,$ as w,bk as C,bl as n,b as t,u as e,ch as k}from"./index-WDP_Z4A8.js";import{A as V,k as B,O as N,V as z,F as D,M as $,N as O,T as S}from"./index-DeGbjSQn.js";const T=["disabled"],j={class:"flex flex-row items-center justify-center gap-2"},A={key:0,class:"i-lucide:loader-circle animate-spin"},F={key:2},x=y({__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=g(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 focus:ring-primary-500/50 dark:focus:ring-primary-400/50 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 focus:ring-neutral-300/50 dark:focus:ring-neutral-600/50 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 focus:ring-red-600/50 dark:focus:ring-red-500/50 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=g(()=>["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"]);return(b,f)=>(r(),d("button",{disabled:l.value,class:p(u.value)},[m("div",j,[a.loading?(r(),d("div",A)):a.icon?(r(),d("div",{key:1,class:p(a.icon)},null,2)):h("",!0),a.label?(r(),d("span",F,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),I={class:"flex flex-row justify-end gap-3"},H=y({__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)=>(r(),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-100 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-100 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(()=>[k(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[k(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",I,[t(e($),{"as-child":""},{default:n(()=>[t(e(x),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(x),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{H as _,x as a}; diff --git a/assets/FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js b/assets/FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js similarity index 81% rename from assets/FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js rename to assets/FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js index 7af6aa1e3cb5916c159ccf26c8762cf19f436a08..3c6e87e1ac9531c57422dc83bc2e9c345a90e74c 100644 --- a/assets/FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js +++ b/assets/FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js @@ -1 +1 @@ -import{_ as c}from"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";import{d as u,cf as i,cg as p,c as o,o as d,a as l,b as m,ch as _,W as x,Y as n,X as f}from"./index-CKmiAjHk.js";const V={"max-w-full":""},h={flex:"~ col gap-4"},y={class:"flex items-center gap-1 text-sm font-medium"},v={key:0,class:"text-red-500"},g={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},B=u({__name:"FieldInput",props:i({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",y,[_(n(e.label)+" ",1),e.required!==!1?(d(),o("span",v,"*")):x("",!0)]),l("div",g,n(e.description),1)]),m(c,{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{B as _}; +import{_ as c}from"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import{d as u,cf as i,cg as p,c as o,o as d,a as l,b as m,ch as _,W as x,Y as n,X as f}from"./index-WDP_Z4A8.js";const V={"max-w-full":""},h={flex:"~ col gap-4"},y={class:"flex items-center gap-1 text-sm font-medium"},v={key:0,class:"text-red-500"},g={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},B=u({__name:"FieldInput",props:i({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",y,[_(n(e.label)+" ",1),e.required!==!1?(d(),o("span",v,"*")):x("",!0)]),l("div",g,n(e.description),1)]),m(c,{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{B as _}; diff --git a/assets/FieldRange.vue_vue_type_script_setup_true_lang-5-FhMpNA.js b/assets/FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js similarity index 98% rename from assets/FieldRange.vue_vue_type_script_setup_true_lang-5-FhMpNA.js rename to assets/FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js index 551627a60781e0796c3bf83ee37d0a540f4c7610..e76ee26bd87884d5bc328432dfdd64b0591a375a 100644 --- a/assets/FieldRange.vue_vue_type_script_setup_true_lang-5-FhMpNA.js +++ b/assets/FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js @@ -1 +1 @@ -import{d as c,c as g,o as d,a3 as M,bh as w,c2 as B,e as V,a8 as E,T as P,U as O,a as f,bk as b,bl as _,b as $,c6 as R,cE as N,ci as k,cF as D,cB as S,u as i,cA as L,cN as U,f as v,d1 as j,cx as z,d2 as H,w as K,c7 as Y,bq as G,d3 as W,W as X,c_ as J,ck as Q,cg as C,cf as q,Y as x,bm as Z,cd as ee}from"./index-CKmiAjHk.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";const te=c({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,a)=>(d(),g("div",{class:"volumed",style:M({perspective:`${t.perspective}px`,transform:t.transform})},[w(e.$slots,"default",{},void 0,!0)],4))}}),ae=B(te,[["__scopeId","data-v-568551bc"]]),ne=c({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const a=t,o=V(1),l=V(0);let r=0;const n=E(()=>a.friction),u=E(()=>a.baseSpeed),m=E(()=>a.momentumFactor);function h(s){r||(r=s);const y=s-r;r=s,o.value=u.value+(o.value-u.value)*n.value,l.value+=o.value*y,requestAnimationFrame(h)}function p(s){const y=Math.sqrt(s.movementX**2+s.movementY**2);o.value+=y*m.value}return P(()=>{window.addEventListener("mousemove",p),requestAnimationFrame(h)}),O(()=>{window.removeEventListener("mousemove",p)}),e({momentum:o,currentValue:l}),(s,y)=>w(s.$slots,"default",{momentum:o.value,currentValue:l.value})}}),le=c({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,a)=>(d(),g("div",{class:"test-dummy-flat",style:M({width:`${t.size}px`,height:`${t.size}px`})},a[0]||(a[0]=[f("div",{class:"marker"},null,-1)]),4))}}),oe=B(le,[["__scopeId","data-v-b4ef37ac"]]),Re=c({__name:"TestDummyMarker",setup(t){return(e,a)=>(d(),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:M({transform:`rotate(${o}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});function T(t){return t?t.flatMap(e=>e.type===R?T(e.children):[e]):[]}const re=c({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:a}){return()=>{var m;if(!a.default)return null;const o=T(a.default()),l=o.findIndex(h=>h.type!==N);if(l===-1)return o;const r=o[l];(m=r.props)==null||delete m.ref;const n=r.props?k(e,r.props):e,u=D({...r,props:{}},n);return o.length===1?u:(o[l]=u,o)}}}),se=["area","img","input"],A=c({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:a}){const o=t.asChild?"template":t.as;return typeof o=="string"&&se.includes(o)?()=>S(o,e):o!=="template"?()=>S(t.as,e,{default:a.default}):()=>S(re,e,{default:a.default})}}),ue=c({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,a)=>(d(),b(i(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:_(()=>[w(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function ie(t,e){const a=`${t}Context`,o=Symbol(a);return[n=>{const u=L(o,n);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}\``}`)},n=>(U(o,n),n)]}function I(){const t=z(),e=V(),a=v(()=>{var n,u;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:j(e)}),o=Object.assign({},t.exposed),l={};for(const n in t.props)Object.defineProperty(l,n,{enumerable:!0,configurable:!0,get:()=>t.props[n]});if(Object.keys(o).length>0)for(const n in o)Object.defineProperty(l,n,{enumerable:!0,configurable:!0,get:()=>o[n]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(n){e.value=n,n&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:a}}function de(){const t=V(),e=v(()=>{var a,o;return["#text","#comment"].includes((a=t.value)==null?void 0:a.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:j(t)});return{primitiveElement:t,currentElement:e}}function ce(t){return v(()=>{var e;return H(t)?!!((e=j(t))!=null&&e.closest("form")):!0})}const F=c({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:a,currentElement:o}=de(),l=v(()=>e.checked??e.value);return K(l,(r,n)=>{if(!o.value)return;const u=o.value,m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"value").set;if(p&&r!==n){const s=new Event("input",{bubbles:!0}),y=new Event("change",{bubbles:!0});p.call(u,r),u.dispatchEvent(s),u.dispatchEvent(y)}}),(r,n)=>(d(),b(ue,k({ref_key:"primitiveElement",ref:a},{...e,...r.$attrs},{as:"input"}),null,16))}}),me=c({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,a=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(([n,u])=>({name:`[${e.name}][${r}][${n}]`,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)=>a.value?(d(),b(F,k({key:l.name},{...e,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(d(!0),g(R,{key:1},Y(o.value,n=>(d(),b(F,k({key:n.name,ref_for:!0},{...e,...l.$attrs},{name:n.name,value:n.value}),null,16,["name","value"]))),128))}}),[pe,fe]=ie("SwitchRoot"),ve=c({__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 a=t,o=e,{disabled:l}=G(a),r=W(a,"modelValue",o,{defaultValue:a.defaultValue,passive:a.modelValue===void 0});function n(){l.value||(r.value=!r.value)}const{forwardRef:u,currentElement:m}=I(),h=ce(m),p=v(()=>{var s;return a.id&&m.value?(s=document.querySelector(`[for="${a.id}"]`))==null?void 0:s.innerText:void 0});return fe({modelValue:r,toggleCheck:n,disabled:l}),(s,y)=>(d(),b(i(A),k(s.$attrs,{id:s.id,ref:i(u),role:"switch",type:s.as==="button"?"button":void 0,value:s.value,"aria-label":s.$attrs["aria-label"]||p.value,"aria-checked":i(r),"aria-required":s.required,"data-state":i(r)?"checked":"unchecked","data-disabled":i(l)?"":void 0,"as-child":s.asChild,as:s.as,disabled:i(l),onClick:n,onKeydown:J(Q(n,["prevent"]),["enter"])}),{default:_(()=>[w(s.$slots,"default",{modelValue:i(r)}),i(h)&&s.name?(d(),b(i(me),{key:0,type:"checkbox",name:s.name,disabled:i(l),required:s.required,value:s.value,checked:!!i(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=c({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=pe();return I(),(a,o)=>{var l;return d(),b(i(A),{"data-state":(l=i(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":i(e).disabled.value?"":void 0,"as-child":a.asChild,as:a.as},{default:_(()=>[w(a.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),ye=c({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=C(t,"modelValue");return(a,o)=>(d(),b(i(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:_(()=>[$(i(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"},Te=c({__name:"FieldCheckbox",props:q({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=C(t,"modelValue");return(o,l)=>(d(),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:a.value,"onUpdate:modelValue":l[0]||(l[0]=r=>a.value=r)},null,8,["modelValue"])])]))}}),$e=["min","max","step"],ke=c({__name:"Range",props:q({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,a=C(t,"modelValue"),o=v(()=>e.min*1e4),l=v(()=>e.max*1e4),r=v(()=>e.step*1e4),n=V(),u=v({get:()=>a.value*1e4,set:p=>{a.value=p/1e4,m()}});P(()=>{m()});function m(){n.value&&(n.value.style.setProperty("--value",n.value.value),n.value.style.setProperty("--min",n.value.min?n.value.min:e.min.toString()),n.value.style.setProperty("--max",n.value.max?n.value.max:e.max.toString()))}function h(p){const s=p.target;s.style.setProperty("--value",s.value)}return(p,s)=>Z((d(),g("input",{ref_key:"sliderRef",ref:n,"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}]])}}),we=B(ke,[["__scopeId","data-v-d88ffd28"]]),Ce={flex:"~ col gap-4"},Ee={flex:"~ row","items-center":"","gap-2":""},Se={flex:"1"},Me={class:"flex items-center gap-1 text-sm font-medium"},Be={class:"text-xs text-neutral-500 dark:text-neutral-400"},je={"font-mono":""},qe={flex:"~ row","items-center":"","gap-2":""},Ie=c({__name:"FieldRange",props:q({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,a=C(t,"modelValue");return(o,l)=>{var r;return d(),g("label",Ce,[f("div",Ee,[f("div",Se,[f("div",Me,x(t.label),1),f("div",Be,x(t.description),1)]),f("span",je,x(((r=e.formatValue)==null?void 0:r.call(e,a.value))||a.value),1)]),f("div",qe,[$(we,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=n=>a.value=n),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}});export{Ie as _,Te as a,Re as b}; +import{d as c,c as g,o as d,a3 as M,bh as w,c2 as B,e as V,a8 as E,T as P,U as O,a as f,bk as b,bl as _,b as $,c6 as R,cE as N,ci as k,cF as D,cB as S,u as i,cA as L,cN as U,f as v,d1 as j,cx as z,d2 as H,w as K,c7 as Y,bq as G,d3 as W,W as X,c_ as J,ck as Q,cg as C,cf as q,Y as x,bm as Z,cd as ee}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";const te=c({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,a)=>(d(),g("div",{class:"volumed",style:M({perspective:`${t.perspective}px`,transform:t.transform})},[w(e.$slots,"default",{},void 0,!0)],4))}}),ae=B(te,[["__scopeId","data-v-568551bc"]]),ne=c({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const a=t,o=V(1),l=V(0);let r=0;const n=E(()=>a.friction),u=E(()=>a.baseSpeed),m=E(()=>a.momentumFactor);function h(s){r||(r=s);const y=s-r;r=s,o.value=u.value+(o.value-u.value)*n.value,l.value+=o.value*y,requestAnimationFrame(h)}function p(s){const y=Math.sqrt(s.movementX**2+s.movementY**2);o.value+=y*m.value}return P(()=>{window.addEventListener("mousemove",p),requestAnimationFrame(h)}),O(()=>{window.removeEventListener("mousemove",p)}),e({momentum:o,currentValue:l}),(s,y)=>w(s.$slots,"default",{momentum:o.value,currentValue:l.value})}}),le=c({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,a)=>(d(),g("div",{class:"test-dummy-flat",style:M({width:`${t.size}px`,height:`${t.size}px`})},a[0]||(a[0]=[f("div",{class:"marker"},null,-1)]),4))}}),oe=B(le,[["__scopeId","data-v-b4ef37ac"]]),Re=c({__name:"TestDummyMarker",setup(t){return(e,a)=>(d(),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:M({transform:`rotate(${o}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});function T(t){return t?t.flatMap(e=>e.type===R?T(e.children):[e]):[]}const re=c({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:a}){return()=>{var m;if(!a.default)return null;const o=T(a.default()),l=o.findIndex(h=>h.type!==N);if(l===-1)return o;const r=o[l];(m=r.props)==null||delete m.ref;const n=r.props?k(e,r.props):e,u=D({...r,props:{}},n);return o.length===1?u:(o[l]=u,o)}}}),se=["area","img","input"],A=c({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:a}){const o=t.asChild?"template":t.as;return typeof o=="string"&&se.includes(o)?()=>S(o,e):o!=="template"?()=>S(t.as,e,{default:a.default}):()=>S(re,e,{default:a.default})}}),ue=c({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,a)=>(d(),b(i(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:_(()=>[w(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function ie(t,e){const a=`${t}Context`,o=Symbol(a);return[n=>{const u=L(o,n);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}\``}`)},n=>(U(o,n),n)]}function I(){const t=z(),e=V(),a=v(()=>{var n,u;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:j(e)}),o=Object.assign({},t.exposed),l={};for(const n in t.props)Object.defineProperty(l,n,{enumerable:!0,configurable:!0,get:()=>t.props[n]});if(Object.keys(o).length>0)for(const n in o)Object.defineProperty(l,n,{enumerable:!0,configurable:!0,get:()=>o[n]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(n){e.value=n,n&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:a}}function de(){const t=V(),e=v(()=>{var a,o;return["#text","#comment"].includes((a=t.value)==null?void 0:a.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:j(t)});return{primitiveElement:t,currentElement:e}}function ce(t){return v(()=>{var e;return H(t)?!!((e=j(t))!=null&&e.closest("form")):!0})}const F=c({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:a,currentElement:o}=de(),l=v(()=>e.checked??e.value);return K(l,(r,n)=>{if(!o.value)return;const u=o.value,m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"value").set;if(p&&r!==n){const s=new Event("input",{bubbles:!0}),y=new Event("change",{bubbles:!0});p.call(u,r),u.dispatchEvent(s),u.dispatchEvent(y)}}),(r,n)=>(d(),b(ue,k({ref_key:"primitiveElement",ref:a},{...e,...r.$attrs},{as:"input"}),null,16))}}),me=c({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,a=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(([n,u])=>({name:`[${e.name}][${r}][${n}]`,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)=>a.value?(d(),b(F,k({key:l.name},{...e,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(d(!0),g(R,{key:1},Y(o.value,n=>(d(),b(F,k({key:n.name,ref_for:!0},{...e,...l.$attrs},{name:n.name,value:n.value}),null,16,["name","value"]))),128))}}),[pe,fe]=ie("SwitchRoot"),ve=c({__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 a=t,o=e,{disabled:l}=G(a),r=W(a,"modelValue",o,{defaultValue:a.defaultValue,passive:a.modelValue===void 0});function n(){l.value||(r.value=!r.value)}const{forwardRef:u,currentElement:m}=I(),h=ce(m),p=v(()=>{var s;return a.id&&m.value?(s=document.querySelector(`[for="${a.id}"]`))==null?void 0:s.innerText:void 0});return fe({modelValue:r,toggleCheck:n,disabled:l}),(s,y)=>(d(),b(i(A),k(s.$attrs,{id:s.id,ref:i(u),role:"switch",type:s.as==="button"?"button":void 0,value:s.value,"aria-label":s.$attrs["aria-label"]||p.value,"aria-checked":i(r),"aria-required":s.required,"data-state":i(r)?"checked":"unchecked","data-disabled":i(l)?"":void 0,"as-child":s.asChild,as:s.as,disabled:i(l),onClick:n,onKeydown:J(Q(n,["prevent"]),["enter"])}),{default:_(()=>[w(s.$slots,"default",{modelValue:i(r)}),i(h)&&s.name?(d(),b(i(me),{key:0,type:"checkbox",name:s.name,disabled:i(l),required:s.required,value:s.value,checked:!!i(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=c({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=pe();return I(),(a,o)=>{var l;return d(),b(i(A),{"data-state":(l=i(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":i(e).disabled.value?"":void 0,"as-child":a.asChild,as:a.as},{default:_(()=>[w(a.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),ye=c({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=C(t,"modelValue");return(a,o)=>(d(),b(i(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:_(()=>[$(i(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"},Te=c({__name:"FieldCheckbox",props:q({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=C(t,"modelValue");return(o,l)=>(d(),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:a.value,"onUpdate:modelValue":l[0]||(l[0]=r=>a.value=r)},null,8,["modelValue"])])]))}}),$e=["min","max","step"],ke=c({__name:"Range",props:q({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,a=C(t,"modelValue"),o=v(()=>e.min*1e4),l=v(()=>e.max*1e4),r=v(()=>e.step*1e4),n=V(),u=v({get:()=>a.value*1e4,set:p=>{a.value=p/1e4,m()}});P(()=>{m()});function m(){n.value&&(n.value.style.setProperty("--value",n.value.value),n.value.style.setProperty("--min",n.value.min?n.value.min:e.min.toString()),n.value.style.setProperty("--max",n.value.max?n.value.max:e.max.toString()))}function h(p){const s=p.target;s.style.setProperty("--value",s.value)}return(p,s)=>Z((d(),g("input",{ref_key:"sliderRef",ref:n,"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}]])}}),we=B(ke,[["__scopeId","data-v-d88ffd28"]]),Ce={flex:"~ col gap-4"},Ee={flex:"~ row","items-center":"","gap-2":""},Se={flex:"1"},Me={class:"flex items-center gap-1 text-sm font-medium"},Be={class:"text-xs text-neutral-500 dark:text-neutral-400"},je={"font-mono":""},qe={flex:"~ row","items-center":"","gap-2":""},Ie=c({__name:"FieldRange",props:q({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,a=C(t,"modelValue");return(o,l)=>{var r;return d(),g("label",Ce,[f("div",Ee,[f("div",Se,[f("div",Me,x(t.label),1),f("div",Be,x(t.description),1)]),f("span",je,x(((r=e.formatValue)==null?void 0:r.call(e,a.value))||a.value),1)]),f("div",qe,[$(we,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=n=>a.value=n),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}});export{Ie as _,Te as a,Re as b}; diff --git a/assets/HeaderLink-z0x7oVxU.js b/assets/HeaderLink--5c4L7nq.js similarity index 90% rename from assets/HeaderLink-z0x7oVxU.js rename to assets/HeaderLink--5c4L7nq.js index 2b9c6344a4c02db6fff44c632167e2fe56c4f530..40654e0b622bbd5825a9cd7d2964765b5f0261f9 100644 --- a/assets/HeaderLink-z0x7oVxU.js +++ b/assets/HeaderLink--5c4L7nq.js @@ -1 +1 @@ -import{d as n,ca as r,bk as l,u as e,c3 as _,o as s,bl as d,c as t,a,c2 as i}from"./index-CKmiAjHk.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],g=n({__name:"HeaderLink",setup(x){const c=r();return(f,o)=>(s(),l(e(_),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:d(()=>[e(c)?(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,__:[0]}))}}),w=i(g,[["__scopeId","data-v-496b6cde"]]);export{w as H}; +import{d as n,ca as r,bk as l,u as e,c3 as _,o as s,bl as d,c as t,a,c2 as i}from"./index-WDP_Z4A8.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],g=n({__name:"HeaderLink",setup(x){const c=r();return(f,o)=>(s(),l(e(_),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:d(()=>[e(c)?(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,__:[0]}))}}),w=i(g,[["__scopeId","data-v-496b6cde"]]);export{w as H}; diff --git a/assets/IconAnimation.vue_vue_type_script_setup_true_lang-B0DnY9ij.js b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js similarity index 95% rename from assets/IconAnimation.vue_vue_type_script_setup_true_lang-B0DnY9ij.js rename to assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js index 8a697571f9861b93d66ec6ac52a7320075581208..8b91dbfa6409caececfa1f96e66a7a89aaac3c00 100644 --- a/assets/IconAnimation.vue_vue_type_script_setup_true_lang-B0DnY9ij.js +++ b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js @@ -1 +1 @@ -import{d as m,e as s,w as p,f,c as h,o as x,a3 as l,a as u,X as y}from"./index-CKmiAjHk.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",{fixed:"","inset-0":"","bg-primary-500":"","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,e as s,w as p,f,c as h,o as x,a3 as l,a as u,X as y}from"./index-WDP_Z4A8.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",{fixed:"","inset-0":"","bg-primary-500":"","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/IconItem-DbtcNtch.js b/assets/IconItem-CdLibJxT.js similarity index 87% rename from assets/IconItem-DbtcNtch.js rename to assets/IconItem-CdLibJxT.js index 98919280665446c0399be646da511ada81fdf4f3..ba44cdfede42a1b46540f0e7612f915acc5f4278 100644 --- a/assets/IconItem-DbtcNtch.js +++ b/assets/IconItem-CdLibJxT.js @@ -1 +1 @@ -import{d as l,a2 as s,bk as c,o as n,bl as d,a as t,c as u,W as o,bh as m,Y as a,X as p,c2 as x}from"./index-CKmiAjHk.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";const h={"z-1":"","flex-1":""},k={"text-lg":"","font-thin":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},v={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},_=l({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(e){return(i,f)=>{const r=s("RouterLink");return n(),c(r,{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:e.to},{default:d(()=>[t("div",h,[t("div",k,a(e.title),1),t("div",v,[t("span",null,a(e.description),1)])]),typeof e.icon=="string"?(n(),u("div",{key:0,class:p(["menu-icon-item-icon",[e.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)):o("",!0),e.iconTemplate?m(i.$slots,"icon",{key:1},void 0,!0):o("",!0)]),_:3},8,["to"])}}}),y=x(_,[["__scopeId","data-v-b1037d36"]]);export{y as I}; +import{d as l,a2 as s,bk as c,o as n,bl as d,a as t,c as u,W as o,bh as m,Y as a,X as p,c2 as x}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";const h={"z-1":"","flex-1":""},k={"text-lg":"","font-thin":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},v={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},_=l({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(e){return(i,f)=>{const r=s("RouterLink");return n(),c(r,{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:e.to},{default:d(()=>[t("div",h,[t("div",k,a(e.title),1),t("div",v,[t("span",null,a(e.description),1)])]),typeof e.icon=="string"?(n(),u("div",{key:0,class:p(["menu-icon-item-icon",[e.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)):o("",!0),e.iconTemplate?m(i.$slots,"icon",{key:1},void 0,!0):o("",!0)]),_:3},8,["to"])}}}),y=x(_,[["__scopeId","data-v-b1037d36"]]);export{y as I}; diff --git a/assets/IconStatusItem-C0p8PHvr.js b/assets/IconStatusItem-B9Mlqc3P.js similarity index 94% rename from assets/IconStatusItem-C0p8PHvr.js rename to assets/IconStatusItem-B9Mlqc3P.js index bf2ace69c409575a38f5de1c9b2009e950a9eee1..a990354b6d3830bbcf0fbd88354e0c43ce33cb84 100644 --- a/assets/IconStatusItem-C0p8PHvr.js +++ b/assets/IconStatusItem-B9Mlqc3P.js @@ -1 +1 @@ -import{d as u,a2 as c,c as e,o as n,b as d,a as o,bl as m,W as a,Y as i,X as s,c2 as _}from"./index-CKmiAjHk.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.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-thin":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-400"},f={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-400"},k=["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",f,[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,k)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),B=_(b,[["__scopeId","data-v-f23cce59"]]);export{B as I}; +import{d as u,a2 as c,c as e,o as n,b as d,a as o,bl as m,W as a,Y as i,X as s,c2 as _}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.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-thin":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-400"},f={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-400"},k=["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",f,[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,k)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),B=_(b,[["__scopeId","data-v-f23cce59"]]);export{B as I}; diff --git a/assets/Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js b/assets/Input.vue_vue_type_script_setup_true_lang-C4baR55j.js similarity index 91% rename from assets/Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js rename to assets/Input.vue_vue_type_script_setup_true_lang-C4baR55j.js index bf8018468f26d0cba8bd511734724b3ee4416fb4..2f63c21206da2803d3921d57e6da91aba9999dcb 100644 --- a/assets/Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js +++ b/assets/Input.vue_vue_type_script_setup_true_lang-C4baR55j.js @@ -1 +1 @@ -import{d as r,cf as n,cg as u,bm as d,d0 as s,o as i,c as m}from"./index-CKmiAjHk.js";const p=["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)=>d((i(),m("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,p)),[[s,t.value]])}});export{y as _}; +import{d as r,cf as n,cg as u,bm as d,d0 as s,o as i,c as m}from"./index-WDP_Z4A8.js";const p=["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)=>d((i(),m("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,p)),[[s,t.value]])}});export{y as _}; diff --git a/assets/InputFile.vue_vue_type_script_setup_true_lang-CToBF7WH.js b/assets/InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js similarity index 96% rename from assets/InputFile.vue_vue_type_script_setup_true_lang-CToBF7WH.js rename to assets/InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js index 7be5966b9269d8a1c4ca1668c5bb0ac9ca23c67d..8dab1f75e36b7b9b95f72e6e7b106bb69a26019a 100644 --- a/assets/InputFile.vue_vue_type_script_setup_true_lang-CToBF7WH.js +++ b/assets/InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js @@ -1 +1 @@ -import{d as g,cf as b,cg as v,e as p,cj as y,c as i,o as n,X as m,u as t,a as l,bh as x}from"./index-CKmiAjHk.js";const k=["accept","multiple"],h={key:0,text:"center","text-sm":""},D={key:1,text:"center","text-sm":""},C=g({__name:"InputFile",props:b({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 c(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]=f=>a.value=!0),onDragleave:e[1]||(e[1]=f=>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:c},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{C as _}; +import{d as g,cf as b,cg as v,e as p,cj as y,c as i,o as n,X as m,u as t,a as l,bh as x}from"./index-WDP_Z4A8.js";const k=["accept","multiple"],h={key:0,text:"center","text-sm":""},D={key:1,text:"center","text-sm":""},C=g({__name:"InputFile",props:b({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 c(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]=f=>a.value=!0),onDragleave:e[1]||(e[1]=f=>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:c},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{C as _}; diff --git a/assets/Model.vue_vue_type_script_setup_true_lang-B6LSxDl2.js b/assets/Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js similarity index 95% rename from assets/Model.vue_vue_type_script_setup_true_lang-B6LSxDl2.js rename to assets/Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js index 33ebc1e296548edb6de77d53723d5b8d659e9fb4..e2d88bd4f229eec2e6de250f75872c861c3defd8 100644 --- a/assets/Model.vue_vue_type_script_setup_true_lang-B6LSxDl2.js +++ b/assets/Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js @@ -1 +1 @@ -import{e as P,T as Y,A as ue,L as C,a as $,D as se,I as de,l as R,M as ce,b as z}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{cp as ve,d as j,e as p,w as d,T as q,U as N,c as X,o as G,bh as U,a8 as F,f as O,ca as fe,be as pe,bs as he,a0 as me,bj as ge,cq as Me,cr as we,c6 as ye,a as be,bi as Se}from"./index-CKmiAjHk.js";import{r as xe}from"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";const Be=o=>Math.max(0,Math.min(1,o||0)),I=o=>Math.round(Be(o)*255),Fe=ve("rgb"),Ie=o=>{if(o===void 0)return;let t=I(o.r),l=I(o.g),c=I(o.b);return"#"+(1<<24|t<<16|l<<8|c).toString(16).slice(1)},Pe=o=>Ie(Fe(o)),Le=j({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:t}){const l=o,c=p(),i=p(),e=p();async function v(r){C.registerTicker($),P.add(Y),i.value=new ue({width:l.width,height:l.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),e.value=i.value.view,e.value.style.objectFit="contain",r.appendChild(i.value.view)}function y(){var r;i.value&&i.value.renderer.resize(l.width,l.height),(r=i.value)!=null&&r.view&&(i.value.view.width=l.width,i.value.view.height=l.height)}d([()=>l.width,()=>l.height],()=>y()),q(async()=>c.value&&await v(c.value)),N(()=>{var r;return(r=i.value)==null?void 0:r.destroy()});async function b(){return new Promise(h=>{if(!e.value||!i.value)return h(null);i.value.render(),e.value.toBlob(h)})}return t({captureFrame:b}),(r,h)=>(G(),X("div",{ref_key:"containerRef",ref:c,"h-full":"","w-full":""},[U(r.$slots,"default",{app:i.value})],512))}});function V(o,t,l){return(1-l)*o+l*t}function H(o,t){return o+Math.random()*(t-o)}function Ce(){let o=-1,t,l=-1;function c(i,e){(e>=o||et.app),c=F(()=>t.paused),i=F(()=>t.focusAt),e=p(),v=p(0),y=p(0),b=O(()=>Math.max(0,Math.min(100,t.mouthOpenSize))),r=fe(),h=pe(Se),W=O(()=>h.between("sm","md").value||h.smaller("sm").value),J=Ce(),D=he(new se({alpha:.2,blur:0,distance:20,rotation:45}));function K(){return e.value.internalModel.coreModel}function k(a){if(!a.value)return;let n=2.2;W.value&&(n=2.2);const m=t.height*.95/y.value*n,s=t.width*.95/v.value*n,g=Math.min(m,s);a.value.scale.set(g,g)}const{live2dModelFile:S,loadingLive2dModel:M,live2dCurrentMotion:Q,availableLive2dMotions:Z,live2dLoadSource:x,live2dModelUrl:A,themeColorsHue:ee,themeColorsHueDynamic:_}=me(ge()),ae=p({group:"Idle",index:0});async function te(){var T;if(!l.value)return;e.value&&(l.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new C;x.value==="file"?await z.setupLive2DModel(a,[S.value],{autoInteract:!1}):x.value==="url"&&await z.setupLive2DModel(a,A.value,{autoInteract:!1}),e.value=a,l.value.stage.addChild(e.value),v.value=e.value.width,y.value=e.value.height,e.value.x=t.width/2,e.value.y=t.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),k(e),e.value.on("hit",f=>{e.value&&f.includes("body")&&e.value.motion("tap_body")});const n=e.value.internalModel,m=n.coreModel,s=n.motionManager;m.setParameterValueById("ParamMouthOpenY",b.value),Z.value=Object.entries(s.definitions).flatMap(([f,u])=>u?u.map((ne,re)=>({motionName:f,motionIndex:re,fileName:ne.File})):[]).filter(Boolean),s.groups.idle&&((T=s.motionGroups[s.groups.idle])==null||T.forEach(f=>{f._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const g=s.update;s.update=function(f,u){return g==null||g.call(this,f,u),s.state.currentGroup===s.groups.idle&&J.update(n,u),!0},s.on("motionStart",(f,u)=>{ae.value={group:f,index:u}}),S.value&&await R.setItem("live2dModel",S.value),M.value=!1}async function le(){if(!l.value)return;C.registerTicker($),P.add(Y),P.add(de);const a=await R.getItem("live2dModel");if(a){S.value=a,x.value="file",M.value=!0;return}if(A.value){x.value="url",M.value=!0;return}M.value=!1}async function oe(a,n){await e.value.motion(a,n,ce.FORCE)}const ie=Me(()=>{e.value&&(e.value.x=t.width/2,e.value.y=t.height,k(e))},100),E=p(),w=p(0);function B(){if(e.value){const a=getComputedStyle(E.value).backgroundColor;D.value.color=Number(Pe(a).replace("#","0x")),e.value.filters=[D.value]}}d([()=>t.width,()=>t.height],()=>ie()),d(r,B,{immediate:!0}),d([e,ee],B);function L(){B(),w.value=requestAnimationFrame(L)}return d(_,()=>{_.value?w.value=requestAnimationFrame(L):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),d(b,a=>K().setParameterValueById("ParamMouthOpenY",a)),d(l,le),d(Q,a=>oe(a.group,a.index)),d(c,a=>{var n,m;a?(n=l.value)==null||n.stop():(m=l.value)==null||m.start()}),d(i,a=>{e.value&&e.value.focus(a.x,a.y)}),we(M,a=>{a&&te()},{debounce:1e3}),q(B),N(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=l.value)==null||a.stage.removeChild(e.value))}),(a,n)=>(G(),X(ye,null,[be("div",{ref_key:"dropShadowColorComputer",ref:E,hidden:"",bg:"primary-400 dark:primary-500"},null,512),U(a.$slots,"default")],64))}});export{Te as _,Le as a,H as r}; +import{e as P,T as Y,A as ue,L as C,a as $,D as se,I as de,l as R,M as ce,b as z}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{cp as ve,d as j,e as p,w as d,T as q,U as N,c as X,o as G,bh as U,a8 as F,f as O,ca as fe,be as pe,bs as he,a0 as me,bj as ge,cq as Me,cr as we,c6 as ye,a as be,bi as Se}from"./index-WDP_Z4A8.js";import{r as xe}from"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";const Be=o=>Math.max(0,Math.min(1,o||0)),I=o=>Math.round(Be(o)*255),Fe=ve("rgb"),Ie=o=>{if(o===void 0)return;let t=I(o.r),l=I(o.g),c=I(o.b);return"#"+(1<<24|t<<16|l<<8|c).toString(16).slice(1)},Pe=o=>Ie(Fe(o)),Le=j({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:t}){const l=o,c=p(),i=p(),e=p();async function v(r){C.registerTicker($),P.add(Y),i.value=new ue({width:l.width,height:l.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),e.value=i.value.view,e.value.style.objectFit="contain",r.appendChild(i.value.view)}function y(){var r;i.value&&i.value.renderer.resize(l.width,l.height),(r=i.value)!=null&&r.view&&(i.value.view.width=l.width,i.value.view.height=l.height)}d([()=>l.width,()=>l.height],()=>y()),q(async()=>c.value&&await v(c.value)),N(()=>{var r;return(r=i.value)==null?void 0:r.destroy()});async function b(){return new Promise(h=>{if(!e.value||!i.value)return h(null);i.value.render(),e.value.toBlob(h)})}return t({captureFrame:b}),(r,h)=>(G(),X("div",{ref_key:"containerRef",ref:c,"h-full":"","w-full":""},[U(r.$slots,"default",{app:i.value})],512))}});function V(o,t,l){return(1-l)*o+l*t}function H(o,t){return o+Math.random()*(t-o)}function Ce(){let o=-1,t,l=-1;function c(i,e){(e>=o||et.app),c=F(()=>t.paused),i=F(()=>t.focusAt),e=p(),v=p(0),y=p(0),b=O(()=>Math.max(0,Math.min(100,t.mouthOpenSize))),r=fe(),h=pe(Se),W=O(()=>h.between("sm","md").value||h.smaller("sm").value),J=Ce(),D=he(new se({alpha:.2,blur:0,distance:20,rotation:45}));function K(){return e.value.internalModel.coreModel}function k(a){if(!a.value)return;let n=2.2;W.value&&(n=2.2);const m=t.height*.95/y.value*n,s=t.width*.95/v.value*n,g=Math.min(m,s);a.value.scale.set(g,g)}const{live2dModelFile:S,loadingLive2dModel:M,live2dCurrentMotion:Q,availableLive2dMotions:Z,live2dLoadSource:x,live2dModelUrl:A,themeColorsHue:ee,themeColorsHueDynamic:_}=me(ge()),ae=p({group:"Idle",index:0});async function te(){var T;if(!l.value)return;e.value&&(l.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new C;x.value==="file"?await z.setupLive2DModel(a,[S.value],{autoInteract:!1}):x.value==="url"&&await z.setupLive2DModel(a,A.value,{autoInteract:!1}),e.value=a,l.value.stage.addChild(e.value),v.value=e.value.width,y.value=e.value.height,e.value.x=t.width/2,e.value.y=t.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),k(e),e.value.on("hit",f=>{e.value&&f.includes("body")&&e.value.motion("tap_body")});const n=e.value.internalModel,m=n.coreModel,s=n.motionManager;m.setParameterValueById("ParamMouthOpenY",b.value),Z.value=Object.entries(s.definitions).flatMap(([f,u])=>u?u.map((ne,re)=>({motionName:f,motionIndex:re,fileName:ne.File})):[]).filter(Boolean),s.groups.idle&&((T=s.motionGroups[s.groups.idle])==null||T.forEach(f=>{f._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const g=s.update;s.update=function(f,u){return g==null||g.call(this,f,u),s.state.currentGroup===s.groups.idle&&J.update(n,u),!0},s.on("motionStart",(f,u)=>{ae.value={group:f,index:u}}),S.value&&await R.setItem("live2dModel",S.value),M.value=!1}async function le(){if(!l.value)return;C.registerTicker($),P.add(Y),P.add(de);const a=await R.getItem("live2dModel");if(a){S.value=a,x.value="file",M.value=!0;return}if(A.value){x.value="url",M.value=!0;return}M.value=!1}async function oe(a,n){await e.value.motion(a,n,ce.FORCE)}const ie=Me(()=>{e.value&&(e.value.x=t.width/2,e.value.y=t.height,k(e))},100),E=p(),w=p(0);function B(){if(e.value){const a=getComputedStyle(E.value).backgroundColor;D.value.color=Number(Pe(a).replace("#","0x")),e.value.filters=[D.value]}}d([()=>t.width,()=>t.height],()=>ie()),d(r,B,{immediate:!0}),d([e,ee],B);function L(){B(),w.value=requestAnimationFrame(L)}return d(_,()=>{_.value?w.value=requestAnimationFrame(L):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),d(b,a=>K().setParameterValueById("ParamMouthOpenY",a)),d(l,le),d(Q,a=>oe(a.group,a.index)),d(c,a=>{var n,m;a?(n=l.value)==null||n.stop():(m=l.value)==null||m.start()}),d(i,a=>{e.value&&e.value.focus(a.x,a.y)}),we(M,a=>{a&&te()},{debounce:1e3}),q(B),N(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=l.value)==null||a.stage.removeChild(e.value))}),(a,n)=>(G(),X(ye,null,[be("div",{ref_key:"dropShadowColorComputer",ref:E,hidden:"",bg:"primary-400 dark:primary-500"},null,512),U(a.$slots,"default")],64))}});export{Te as _,Le as a,H as r}; diff --git a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js similarity index 78% rename from assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js rename to assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js index 55f67faa22e30f034d4ac62d95e881c181a60f77..11bdba79ef8de4de7db1408213f1ecae7348133b 100644 --- a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js +++ b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js @@ -1 +1 @@ -import{_ as t}from"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{d as u,cf as n,$ as p,cg as m,f as c,bk as f,o as v,u as a}from"./index-CKmiAjHk.js";const g=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}=p(),o=m(e,"modelValue"),i=c(()=>l.description||`API Key for ${l.providerName}`);return(V,r)=>(v(),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{g as _}; +import{_ as t}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{d as u,cf as n,$ as p,cg as m,f as c,bk as f,o as v,u as a}from"./index-WDP_Z4A8.js";const g=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}=p(),o=m(e,"modelValue"),i=c(()=>l.description||`API Key for ${l.providerName}`);return(V,r)=>(v(),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{g as _}; diff --git a/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js similarity index 81% rename from assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js rename to assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js index d23f030e172f9d5afe189d06839f1efd7d18d773..3a1ab96acee3a7368598323b0c5c548cb669271f 100644 --- a/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js +++ b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js @@ -1 +1 @@ -import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import{d,e as m,bk as u,o as c,bl as n,a as e,bh as f,Y as _,X as b,cf as v,cg as g,u as V}from"./index-CKmiAjHk.js";import{_ as x}from"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";const h=["onClick"],B={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},k={"mt-4":""},U=d({__name:"ProviderAdvancedSettings",props:{title:null,initialVisible:{type:Boolean}},setup(l){const a=m(l.initialVisible||!1);function r(){a.value=!a.value}return(o,i)=>(c(),u(p,{"w-full":""},{trigger:n(s=>[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:()=>s.setVisible(!s.visible)&&r()},[e("h2",B,[e("span",null,_(l.title||"Advanced"),1)]),e("div",{transform:"",transition:"transform duration-250",class:b({"rotate-180":s.visible})},i[0]||(i[0]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,h)]),default:n(()=>[e("div",k,[f(o.$slots,"default")])]),_:3}))}}),$=d({__name:"ProviderBaseUrlInput",props:v({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=g(l,"modelValue");return(r,o)=>(c(),u(V(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-DpQfJlB8.js";import{d,e as m,bk as u,o as c,bl as n,a as e,bh as f,Y as _,X as b,cf as v,cg as g,u as V}from"./index-WDP_Z4A8.js";import{_ as x}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";const h=["onClick"],B={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},k={"mt-4":""},U=d({__name:"ProviderAdvancedSettings",props:{title:null,initialVisible:{type:Boolean}},setup(l){const a=m(l.initialVisible||!1);function r(){a.value=!a.value}return(o,i)=>(c(),u(p,{"w-full":""},{trigger:n(s=>[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:()=>s.setVisible(!s.visible)&&r()},[e("h2",B,[e("span",null,_(l.title||"Advanced"),1)]),e("div",{transform:"",transition:"transform duration-250",class:b({"rotate-180":s.visible})},i[0]||(i[0]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,h)]),default:n(()=>[e("div",k,[f(o.$slots,"default")])]),_:3}))}}),$=d({__name:"ProviderBaseUrlInput",props:v({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=g(l,"modelValue");return(r,o)=>(c(),u(V(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-4lG7ew5n.js b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js similarity index 94% rename from assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js rename to assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js index de92986c10d7721c08bc980133e0265b76c5e13e..65fdbd173b1f62bed6f9681396f90f838fbf970a 100644 --- a/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js +++ b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js @@ -1 +1 @@ -import{d as o,c as s,o as a,a as e,bh as i,W as u,Y as l}from"./index-CKmiAjHk.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,bh as i,W as u,Y as l}from"./index-WDP_Z4A8.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-B4sh3Fs1.js b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js similarity index 90% rename from assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js rename to assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js index f300862d3e3dcd7ca69307557045ae1a0fc1e828..7b8669f882e2664cd2eecad7d1312c064b674495 100644 --- a/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js +++ b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js @@ -1 +1 @@ -import{d as a,c5 as i,c as o,o as t,bh as s,bm as c,a as l,X as d,c6 as p}from"./index-CKmiAjHk.js";const m={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,u)=>{const r=i("motion");return t(),o(p,null,[s(n.$slots,"default"),c((t(),o("div",m,[l("div",{text:"60",class:d(e.providerIcon||e.providerIconColor)},null,2)])),[[r]])],64)}}});export{_}; +import{d as a,c5 as i,c as o,o as t,bh as s,bm as c,a as l,X as d,c6 as p}from"./index-WDP_Z4A8.js";const m={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,u)=>{const r=i("motion");return t(),o(p,null,[s(n.$slots,"default"),c((t(),o("div",m,[l("div",{text:"60",class:d(e.providerIcon||e.providerIconColor)},null,2)])),[[r]])],64)}}});export{_}; diff --git a/assets/RadioCardSimple-DYJ2lAWN.js b/assets/RadioCardSimple-BzEaEqwF.js similarity index 96% rename from assets/RadioCardSimple-DYJ2lAWN.js rename to assets/RadioCardSimple-BzEaEqwF.js index 59f9b2a949e0630a20596b587f7e1b9e90e5f6e5..c7c2dad71467b9e1405d07c09d839241c4f695fb 100644 --- a/assets/RadioCardSimple-DYJ2lAWN.js +++ b/assets/RadioCardSimple-BzEaEqwF.js @@ -1 +1 @@ -import{d as g,cf as b,cg as w,e as f,c as n,o as d,X as o,bm as V,a as t,c9 as I,W as v,Y as c,b as $,bl as S,ck as k,u as B,c2 as C,f as T,cd as z,c6 as E,c7 as N,bk as D}from"./index-CKmiAjHk.js";import{_ as P}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import{_ as U}from"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";const q=["checked","name","value"],L={class:"relative mr-3 mt-0.5 flex-shrink-0"},j={class:"w-full flex flex-col gap-2"},F={class:"flex items-center"},Q={key:0,class:"relative"},W=["title"],X={key:1,class:"mt-2"},Y=g({__name:"RadioCardDetail",props:b({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=f(!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]=i=>a.value=i),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"absolute opacity-0"},null,8,q),[[I,a.value]]),t("div",L,[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-thin",[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",Q,[$(B(P),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,W)):(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:"mt-0.5 inline-flex items-center text-xs text-primary-500 dark:text-primary-600",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",X,[$(B(U),{modelValue:a.value,"onUpdate:modelValue":r[1]||(r[1]=i=>a.value=i),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))}}),A=C(Y,[["__scopeId","data-v-01e1298e"]]),G={class:"radio-card-detail-many-select"},H={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},J=["placeholder"],K={class:"mt-4 space-y-2"},O={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:b({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:b(["update:customValue"],["update:modelValue"]),setup(e,{emit:a}){const m=e,s=a,x=w(e,"modelValue"),r=f(""),i=f(!1),R=f(""),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){R.value=p,s("update:customValue",p)}return(p,l)=>(d(),n("div",G,[e.searchable?(d(),n("div",H,[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]=u=>r.value=u),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,J),[[z,r.value]])])):v("",!0),t("div",K,[r.value?(d(),n("div",O,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",[i.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(E,null,N(h.value,u=>(d(),D(A,{id:u.id,key:u.id,modelValue:x.value,"onUpdate:modelValue":l[1]||(l[1]=y=>x.value=y),value:u.id,title:u.name,description:u.description,deprecated:u.deprecated,"show-expand-collapse":e.showMore,"expand-collapse-threshold":100,"show-custom-input":u.customizable,"custom-input-value":R.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([i.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([i.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]=u=>i.value=!i.value)},[t("span",null,c(i.value?e.collapseButtonText:e.expandButtonText),1),t("div",{class:o([i.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:b({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:"absolute opacity-0 [&:checked+div]:border-primary-500 [&:checked+div_.radio-dot]:opacity-100 dark:[&:checked+div]:border-primary-400"},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-thin",[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-50bfb5e4"]]);export{me as R,ve as a}; +import{d as g,cf as b,cg as w,e as f,c as n,o as d,X as o,bm as V,a as t,c9 as I,W as v,Y as c,b as $,bl as S,ck as k,u as B,c2 as C,f as T,cd as z,c6 as E,c7 as N,bk as D}from"./index-WDP_Z4A8.js";import{_ as P}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import{_ as U}from"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";const q=["checked","name","value"],L={class:"relative mr-3 mt-0.5 flex-shrink-0"},j={class:"w-full flex flex-col gap-2"},F={class:"flex items-center"},Q={key:0,class:"relative"},W=["title"],X={key:1,class:"mt-2"},Y=g({__name:"RadioCardDetail",props:b({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=f(!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]=i=>a.value=i),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"absolute opacity-0"},null,8,q),[[I,a.value]]),t("div",L,[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-thin",[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",Q,[$(B(P),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,W)):(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:"mt-0.5 inline-flex items-center text-xs text-primary-500 dark:text-primary-600",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",X,[$(B(U),{modelValue:a.value,"onUpdate:modelValue":r[1]||(r[1]=i=>a.value=i),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))}}),A=C(Y,[["__scopeId","data-v-01e1298e"]]),G={class:"radio-card-detail-many-select"},H={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},J=["placeholder"],K={class:"mt-4 space-y-2"},O={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:b({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:b(["update:customValue"],["update:modelValue"]),setup(e,{emit:a}){const m=e,s=a,x=w(e,"modelValue"),r=f(""),i=f(!1),R=f(""),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){R.value=p,s("update:customValue",p)}return(p,l)=>(d(),n("div",G,[e.searchable?(d(),n("div",H,[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]=u=>r.value=u),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,J),[[z,r.value]])])):v("",!0),t("div",K,[r.value?(d(),n("div",O,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",[i.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(E,null,N(h.value,u=>(d(),D(A,{id:u.id,key:u.id,modelValue:x.value,"onUpdate:modelValue":l[1]||(l[1]=y=>x.value=y),value:u.id,title:u.name,description:u.description,deprecated:u.deprecated,"show-expand-collapse":e.showMore,"expand-collapse-threshold":100,"show-custom-input":u.customizable,"custom-input-value":R.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([i.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([i.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]=u=>i.value=!i.value)},[t("span",null,c(i.value?e.collapseButtonText:e.expandButtonText),1),t("div",{class:o([i.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:b({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:"absolute opacity-0 [&:checked+div]:border-primary-500 [&:checked+div_.radio-dot]:opacity-100 dark:[&:checked+div]:border-primary-400"},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-thin",[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-50bfb5e4"]]);export{me as R,ve as a}; diff --git a/assets/Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js b/assets/Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js similarity index 99% rename from assets/Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js rename to assets/Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js index d581aab0878ab41f289e4d059cea59235402a6bc..c1797dd9b260f661e086f0a64cc708d0e28bed77 100644 --- a/assets/Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js +++ b/assets/Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js @@ -1 +1 @@ -import{d as U,cY as je,cZ as Ve,a2 as te,c as ie,o as B,a as H,W as ce,c6 as qe,bk as le,bh as V,a3 as Z,c_ as Ge,X as ze,_ as Ue,c$ as Xe,bl as fe,b as Ye,ci as Ke,cu as Ze,cv as Qe}from"./index-CKmiAjHk.js";import{c as Je,r as Q,o as et,j as tt,s as it,f as ot,d as st,a as nt}from"./floating-ui.core-CgBsuaUc.js";function m(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _(e){return m(e).getComputedStyle(e)}const ge=Math.min,O=Math.max,q=Math.round;function He(e){const t=_(e);let i=parseFloat(t.width),o=parseFloat(t.height);const s=e.offsetWidth,n=e.offsetHeight,r=q(i)!==s||q(o)!==n;return r&&(i=s,o=n),{width:i,height:o,fallback:r}}function N(e){return Be(e)?(e.nodeName||"").toLowerCase():""}let I;function Ae(){if(I)return I;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(I=e.brands.map(t=>t.brand+"/"+t.version).join(" "),I):navigator.userAgent}function b(e){return e instanceof m(e).HTMLElement}function C(e){return e instanceof m(e).Element}function Be(e){return e instanceof m(e).Node}function me(e){return typeof ShadowRoot>"u"?!1:e instanceof m(e).ShadowRoot||e instanceof ShadowRoot}function X(e){const{overflow:t,overflowX:i,overflowY:o,display:s}=_(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+i)&&!["inline","contents"].includes(s)}function rt(e){return["table","td","th"].includes(N(e))}function oe(e){const t=/firefox/i.test(Ae()),i=_(e),o=i.backdropFilter||i.WebkitBackdropFilter;return i.transform!=="none"||i.perspective!=="none"||!!o&&o!=="none"||t&&i.willChange==="filter"||t&&!!i.filter&&i.filter!=="none"||["transform","perspective"].some(s=>i.willChange.includes(s))||["paint","layout","strict","content"].some(s=>{const n=i.contain;return n!=null&&n.includes(s)})}function ke(){return!/^((?!chrome|android).)*safari/i.test(Ae())}function de(e){return["html","body","#document"].includes(N(e))}function Oe(e){return C(e)?e:e.contextElement}const Le={x:1,y:1};function k(e){const t=Oe(e);if(!b(t))return Le;const i=t.getBoundingClientRect(),{width:o,height:s,fallback:n}=He(t);let r=(n?q(i.width):i.width)/o,a=(n?q(i.height):i.height)/s;return r&&Number.isFinite(r)||(r=1),a&&Number.isFinite(a)||(a=1),{x:r,y:a}}function R(e,t,i,o){var s,n;t===void 0&&(t=!1),i===void 0&&(i=!1);const r=e.getBoundingClientRect(),a=Oe(e);let l=Le;t&&(o?C(o)&&(l=k(o)):l=k(e));const d=a?m(a):window,c=!ke()&&i;let h=(r.left+(c&&((s=d.visualViewport)==null?void 0:s.offsetLeft)||0))/l.x,u=(r.top+(c&&((n=d.visualViewport)==null?void 0:n.offsetTop)||0))/l.y,y=r.width/l.x,v=r.height/l.y;if(a){const g=m(a),T=o&&C(o)?m(o):o;let f=g.frameElement;for(;f&&o&&T!==g;){const $=k(f),F=f.getBoundingClientRect(),ue=getComputedStyle(f);F.x+=(f.clientLeft+parseFloat(ue.paddingLeft))*$.x,F.y+=(f.clientTop+parseFloat(ue.paddingTop))*$.y,h*=$.x,u*=$.y,y*=$.x,v*=$.y,h+=F.x,u+=F.y,f=m(f).frameElement}}return{width:y,height:v,top:u,right:h+y,bottom:u+v,left:h,x:h,y:u}}function P(e){return((Be(e)?e.ownerDocument:e.document)||window.document).documentElement}function Y(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Me(e){return R(P(e)).left+Y(e).scrollLeft}function D(e){if(N(e)==="html")return e;const t=e.assignedSlot||e.parentNode||me(e)&&e.host||P(e);return me(t)?t.host:t}function Re(e){const t=D(e);return de(t)?t.ownerDocument.body:b(t)&&X(t)?t:Re(t)}function G(e,t){var i;t===void 0&&(t=[]);const o=Re(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),n=m(o);return s?t.concat(n,n.visualViewport||[],X(o)?o:[]):t.concat(o,G(o))}function we(e,t,i){return t==="viewport"?Q(function(o,s){const n=m(o),r=P(o),a=n.visualViewport;let l=r.clientWidth,d=r.clientHeight,c=0,h=0;if(a){l=a.width,d=a.height;const u=ke();(u||!u&&s==="fixed")&&(c=a.offsetLeft,h=a.offsetTop)}return{width:l,height:d,x:c,y:h}}(e,i)):C(t)?Q(function(o,s){const n=R(o,!0,s==="fixed"),r=n.top+o.clientTop,a=n.left+o.clientLeft,l=b(o)?k(o):{x:1,y:1};return{width:o.clientWidth*l.x,height:o.clientHeight*l.y,x:a*l.x,y:r*l.y}}(t,i)):Q(function(o){const s=P(o),n=Y(o),r=o.ownerDocument.body,a=O(s.scrollWidth,s.clientWidth,r.scrollWidth,r.clientWidth),l=O(s.scrollHeight,s.clientHeight,r.scrollHeight,r.clientHeight);let d=-n.scrollLeft+Me(o);const c=-n.scrollTop;return _(r).direction==="rtl"&&(d+=O(s.clientWidth,r.clientWidth)-a),{width:a,height:l,x:d,y:c}}(P(e)))}function ye(e){return b(e)&&_(e).position!=="fixed"?e.offsetParent:null}function ve(e){const t=m(e);let i=ye(e);for(;i&&rt(i)&&_(i).position==="static";)i=ye(i);return i&&(N(i)==="html"||N(i)==="body"&&_(i).position==="static"&&!oe(i))?t:i||function(o){let s=D(o);for(;b(s)&&!de(s);){if(oe(s))return s;s=D(s)}return null}(e)||t}function at(e,t,i){const o=b(t),s=P(t),n=R(e,!0,i==="fixed",t);let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&i!=="fixed")if((N(t)!=="body"||X(s))&&(r=Y(t)),b(t)){const l=R(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else s&&(a.x=Me(s));return{x:n.left+r.scrollLeft-a.x,y:n.top+r.scrollTop-a.y,width:n.width,height:n.height}}const lt={getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:o,strategy:s}=e;const n=i==="clippingAncestors"?function(d,c){const h=c.get(d);if(h)return h;let u=G(d).filter(T=>C(T)&&N(T)!=="body"),y=null;const v=_(d).position==="fixed";let g=v?D(d):d;for(;C(g)&&!de(g);){const T=_(g),f=oe(g);(v?f||y:f||T.position!=="static"||!y||!["absolute","fixed"].includes(y.position))?y=T:u=u.filter($=>$!==g),g=D(g)}return c.set(d,u),u}(t,this._c):[].concat(i),r=[...n,o],a=r[0],l=r.reduce((d,c)=>{const h=we(t,c,s);return d.top=O(h.top,d.top),d.right=ge(h.right,d.right),d.bottom=ge(h.bottom,d.bottom),d.left=O(h.left,d.left),d},we(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:i,strategy:o}=e;const s=b(i),n=P(i);if(i===n)return t;let r={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&o!=="fixed")&&((N(i)!=="body"||X(n))&&(r=Y(i)),b(i))){const d=R(i);a=k(i),l.x=d.x+i.clientLeft,l.y=d.y+i.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-r.scrollLeft*a.x+l.x,y:t.y*a.y-r.scrollTop*a.y+l.y}},isElement:C,getDimensions:function(e){return b(e)?He(e):e.getBoundingClientRect()},getOffsetParent:ve,getDocumentElement:P,getScale:k,async getElementRects(e){let{reference:t,floating:i,strategy:o}=e;const s=this.getOffsetParent||ve,n=this.getDimensions;return{reference:at(t,await s(i),o),floating:{x:0,y:0,...await n(i)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>_(e).direction==="rtl"},dt=(e,t,i)=>{const o=new Map,s={platform:lt,...i},n={...s.platform,_c:o};return Je(e,t,{...s,platform:n})},A={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function se(e,t){let i=A.themes[e]||{},o;do o=i[t],typeof o>"u"?i.$extend?i=A.themes[i.$extend]||{}:(i=null,o=A[t]):i=null;while(i);return o}function pt(e){const t=[e];let i=A.themes[e]||{};do i.$extend&&!i.$resetCss?(t.push(i.$extend),i=A.themes[i.$extend]||{}):i=null;while(i);return t.map(o=>`v-popper--theme-${o}`)}function $e(e){const t=[e];let i=A.themes[e]||{};do i.$extend?(t.push(i.$extend),i=A.themes[i.$extend]||{}):i=null;while(i);return t}let E=!1;if(typeof window<"u"){E=!1;try{const e=Object.defineProperty({},"passive",{get(){E=!0}});window.addEventListener("test",null,e)}catch{}}let De=!1;typeof window<"u"&&typeof navigator<"u"&&(De=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const ht=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),_e={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},be={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Te(e,t){const i=e.indexOf(t);i!==-1&&e.splice(i,1)}function J(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const w=[];let z=null;const Se={};function xe(e){let t=Se[e];return t||(t=Se[e]=[]),t}let ne=function(){};typeof window<"u"&&(ne=window.Element);function p(e){return function(t){return se(t.theme,e)}}const ee="__floating-vue__popper",Ee=()=>U({name:"VPopper",provide(){return{[ee]:{parentPopper:this}}},inject:{[ee]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:p("disabled")},positioningDisabled:{type:Boolean,default:p("positioningDisabled")},placement:{type:String,default:p("placement"),validator:e=>ht.includes(e)},delay:{type:[String,Number,Object],default:p("delay")},distance:{type:[Number,String],default:p("distance")},skidding:{type:[Number,String],default:p("skidding")},triggers:{type:Array,default:p("triggers")},showTriggers:{type:[Array,Function],default:p("showTriggers")},hideTriggers:{type:[Array,Function],default:p("hideTriggers")},popperTriggers:{type:Array,default:p("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:p("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:p("popperHideTriggers")},container:{type:[String,Object,ne,Boolean],default:p("container")},boundary:{type:[String,ne],default:p("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:p("strategy")},autoHide:{type:[Boolean,Function],default:p("autoHide")},handleResize:{type:Boolean,default:p("handleResize")},instantMove:{type:Boolean,default:p("instantMove")},eagerMount:{type:Boolean,default:p("eagerMount")},popperClass:{type:[String,Array,Object],default:p("popperClass")},computeTransformOrigin:{type:Boolean,default:p("computeTransformOrigin")},autoMinSize:{type:Boolean,default:p("autoMinSize")},autoSize:{type:[Boolean,String],default:p("autoSize")},autoMaxSize:{type:Boolean,default:p("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:p("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:p("preventOverflow")},overflowPadding:{type:[Number,String],default:p("overflowPadding")},arrowPadding:{type:[Number,String],default:p("arrowPadding")},arrowOverflow:{type:Boolean,default:p("arrowOverflow")},flip:{type:Boolean,default:p("flip")},shift:{type:Boolean,default:p("shift")},shiftCrossAxis:{type:Boolean,default:p("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:p("noAutoFocus")},disposeTimeout:{type:Number,default:p("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[ee])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:i=!1}={}){var o,s;(o=this.parentPopper)!=null&&o.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(i||!this.disabled)&&(((s=this.parentPopper)==null?void 0:s.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var i;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(et({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(tt({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(it({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(ot({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(st({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:o,rects:s,middlewareData:n})=>{let r;const{centerOffset:a}=n.arrow;return o.startsWith("top")||o.startsWith("bottom")?r=Math.abs(a)>s.reference.width/2:r=Math.abs(a)>s.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){const o=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:s,placement:n,middlewareData:r})=>{var a;if((a=r.autoSize)!=null&&a.skip)return{};let l,d;return n.startsWith("top")||n.startsWith("bottom")?l=s.reference.width:d=s.reference.height,this.$_innerNode.style[o==="min"?"minWidth":o==="max"?"maxWidth":"width"]=l!=null?`${l}px`:null,this.$_innerNode.style[o==="min"?"minHeight":o==="max"?"maxHeight":"height"]=d!=null?`${d}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(nt({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:o,availableHeight:s})=>{this.$_innerNode.style.maxWidth=o!=null?`${o}px`:null,this.$_innerNode.style.maxHeight=s!=null?`${s}px`:null}})));const i=await dt(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:i.x,y:i.y,placement:i.placement,strategy:i.strategy,arrow:{...i.middlewareData.arrow,...i.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),z&&this.instantMove&&z.instantMove&&z!==this.parentPopper){z.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(z=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await J(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...G(this.$_referenceNode),...G(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),i=this.$_popperNode.querySelector(".v-popper__wrapper"),o=i.parentNode.getBoundingClientRect(),s=t.x+t.width/2-(o.left+i.offsetLeft),n=t.y+t.height/2-(o.top+i.offsetTop);this.result.transformOrigin=`${s}px ${n}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let i=0;i0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Te(w,this),w.length===0&&document.body.classList.remove("v-popper--some-open");for(const i of $e(this.theme)){const o=xe(i);Te(o,this),o.length===0&&document.body.classList.remove(`v-popper--some-open--${i}`)}z===this&&(z=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await J(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=i=>{this.isShown&&!this.$_hideInProgress||(i.usedByTooltip=!0,!this.$_preventShow&&this.show({event:i}))};this.$_registerTriggerListeners(this.$_targetNodes,_e,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],_e,this.popperTriggers,this.popperShowTriggers,e);const t=i=>{i.usedByTooltip||this.hide({event:i})};this.$_registerTriggerListeners(this.$_targetNodes,be,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],be,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,i){this.$_events.push({targetNodes:e,eventType:t,handler:i}),e.forEach(o=>o.addEventListener(t,i,E?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,i,o,s){let n=i;o!=null&&(n=typeof o=="function"?o(n):o),n.forEach(r=>{const a=t[r];a&&this.$_registerEventListeners(e,a,s)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(i=>{const{targetNodes:o,eventType:s,handler:n}=i;!e||e===s?o.forEach(r=>r.removeEventListener(s,n)):t.push(i)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const i of this.$_targetNodes){const o=i.getAttribute(e);o&&(i.removeAttribute(e),i.setAttribute(t,o))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const i in e){const o=e[i];o==null?t.removeAttribute(i):t.setAttribute(i,o)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(L>=e.left&&L<=e.right&&M>=e.top&&M<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),i=L-S,o=M-x,s=t.left+t.width/2-S+(t.top+t.height/2)-x+t.width+t.height,n=S+i*s,r=x+o*s;return W(S,x,n,r,t.left,t.top,t.left,t.bottom)||W(S,x,n,r,t.left,t.top,t.right,t.top)||W(S,x,n,r,t.right,t.top,t.right,t.bottom)||W(S,x,n,r,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(De){const e=E?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>Ce(t),e),document.addEventListener("touchend",t=>Pe(t,!0),e)}else window.addEventListener("mousedown",e=>Ce(e),!0),window.addEventListener("click",e=>Pe(e,!1),!0);window.addEventListener("resize",ft)}function Ce(e,t){for(let i=0;i=0;o--){const s=w[o];try{const n=s.containsGlobalTarget=s.mouseDownContains||s.popperNode().contains(e.target);s.pendingHide=!1,requestAnimationFrame(()=>{if(s.pendingHide=!1,!i[s.randomId]&&Ne(s,n,e)){if(s.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&n){let a=s.parentPopper;for(;a;)i[a.randomId]=!0,a=a.parentPopper;return}let r=s.parentPopper;for(;r&&Ne(r,r.containsGlobalTarget,e);)r.$_handleGlobalClose(e,t),r=r.parentPopper}})}catch{}}}function Ne(e,t,i){return i.closeAllPopover||i.closePopover&&t||ct(e,i)&&!t}function ct(e,t){if(typeof e.autoHide=="function"){const i=e.autoHide(t);return e.lastAutoHide=i,i}return e.autoHide}function ft(){for(let e=0;e{S=L,x=M,L=e.clientX,M=e.clientY},E?{passive:!0}:void 0);function W(e,t,i,o,s,n,r,a){const l=((r-s)*(t-n)-(a-n)*(e-s))/((a-n)*(i-e)-(r-s)*(o-t)),d=((i-e)*(t-n)-(o-t)*(e-s))/((a-n)*(i-e)-(r-s)*(o-t));return l>=0&&l<=1&&d>=0&&d<=1}const gt={extends:Ee()},pe=(e,t)=>{const i=e.__vccOpts||e;for(const[o,s]of t)i[o]=s;return i};function mt(e,t,i,o,s,n){return B(),ie("div",{ref:"reference",class:ze(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[V(e.$slots,"default",Ze(Qe(e.slotData)))],2)}const wt=pe(gt,[["render",mt]]);function yt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var i=e.indexOf("Trident/");if(i>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var s=e.indexOf("Edge/");return s>0?parseInt(e.substring(s+5,e.indexOf(".",s)),10):-1}let j;function re(){re.init||(re.init=!0,j=yt()!==-1)}var K={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){re(),Ue(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",j&&this.$el.appendChild(e),e.data="about:blank",j||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!j&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const vt=Xe();je("data-v-b329ee4c");const $t={class:"resize-observer",tabindex:"-1"};Ve();const _t=vt((e,t,i,o,s,n)=>(B(),le("div",$t)));K.render=_t;K.__scopeId="data-v-b329ee4c";K.__file="src/components/ResizeObserver.vue";const Fe=(e="theme")=>({computed:{themeClass(){return pt(this[e])}}}),bt=U({name:"VPopperContent",components:{ResizeObserver:K},mixins:[Fe()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),Tt=["id","aria-hidden","tabindex","data-popper-placement"],St={ref:"inner",class:"v-popper__inner"},xt=H("div",{class:"v-popper__arrow-outer"},null,-1),Ct=H("div",{class:"v-popper__arrow-inner"},null,-1),Pt=[xt,Ct];function Nt(e,t,i,o,s,n){const r=te("ResizeObserver");return B(),ie("div",{id:e.popperId,ref:"popover",class:ze(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:Z(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=Ge(a=>e.autoHide&&e.$emit("hide"),["esc"]))},[H("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=a=>e.autoHide&&e.$emit("hide"))}),H("div",{class:"v-popper__wrapper",style:Z(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[H("div",St,[e.mounted?(B(),ie(qe,{key:0},[H("div",null,[V(e.$slots,"default")]),e.handleResize?(B(),le(r,{key:0,onNotify:t[1]||(t[1]=a=>e.$emit("resize",a))})):ce("",!0)],64)):ce("",!0)],512),H("div",{ref:"arrow",class:"v-popper__arrow-container",style:Z(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Pt,4)],4)],46,Tt)}const Ie=pe(bt,[["render",Nt]]),We={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let ae=function(){};typeof window<"u"&&(ae=window.Element);const zt=U({name:"VPopperWrapper",components:{Popper:wt,PopperContent:Ie},mixins:[We,Fe("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,ae,Boolean],default:void 0},boundary:{type:[String,ae],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Ht(e,t,i,o,s,n){const r=te("PopperContent"),a=te("Popper");return B(),le(a,Ke({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=l=>e.$emit("update:shown",l)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:fe(({popperId:l,isShown:d,shouldMountContent:c,skipTransition:h,autoHide:u,show:y,hide:v,handleResize:g,onResize:T,classes:f,result:$})=>[V(e.$slots,"default",{shown:d,show:y,hide:v}),Ye(r,{ref:"popperContent","popper-id":l,theme:e.finalTheme,shown:d,mounted:c,"skip-transition":h,"auto-hide":u,"handle-resize":g,classes:f,result:$,onHide:v,onResize:T},{default:fe(()=>[V(e.$slots,"popper",{shown:d,hide:v})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const he=pe(zt,[["render",Ht]]),At={...he,name:"VDropdown",vPopperTheme:"dropdown"};({...he});({...he});U({name:"VTooltipDirective",components:{Popper:Ee(),PopperContent:Ie},mixins:[We],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>se(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>se(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,i=this.content(this);i.then?i.then(o=>this.onResult(t,o)):this.onResult(t,i)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}});const Ot=At;export{Ot as k}; +import{d as U,cY as je,cZ as Ve,a2 as te,c as ie,o as B,a as H,W as ce,c6 as qe,bk as le,bh as V,a3 as Z,c_ as Ge,X as ze,_ as Ue,c$ as Xe,bl as fe,b as Ye,ci as Ke,cu as Ze,cv as Qe}from"./index-WDP_Z4A8.js";import{c as Je,r as Q,o as et,j as tt,s as it,f as ot,d as st,a as nt}from"./floating-ui.core-CgBsuaUc.js";function m(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _(e){return m(e).getComputedStyle(e)}const ge=Math.min,O=Math.max,q=Math.round;function He(e){const t=_(e);let i=parseFloat(t.width),o=parseFloat(t.height);const s=e.offsetWidth,n=e.offsetHeight,r=q(i)!==s||q(o)!==n;return r&&(i=s,o=n),{width:i,height:o,fallback:r}}function N(e){return Be(e)?(e.nodeName||"").toLowerCase():""}let I;function Ae(){if(I)return I;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(I=e.brands.map(t=>t.brand+"/"+t.version).join(" "),I):navigator.userAgent}function b(e){return e instanceof m(e).HTMLElement}function C(e){return e instanceof m(e).Element}function Be(e){return e instanceof m(e).Node}function me(e){return typeof ShadowRoot>"u"?!1:e instanceof m(e).ShadowRoot||e instanceof ShadowRoot}function X(e){const{overflow:t,overflowX:i,overflowY:o,display:s}=_(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+i)&&!["inline","contents"].includes(s)}function rt(e){return["table","td","th"].includes(N(e))}function oe(e){const t=/firefox/i.test(Ae()),i=_(e),o=i.backdropFilter||i.WebkitBackdropFilter;return i.transform!=="none"||i.perspective!=="none"||!!o&&o!=="none"||t&&i.willChange==="filter"||t&&!!i.filter&&i.filter!=="none"||["transform","perspective"].some(s=>i.willChange.includes(s))||["paint","layout","strict","content"].some(s=>{const n=i.contain;return n!=null&&n.includes(s)})}function ke(){return!/^((?!chrome|android).)*safari/i.test(Ae())}function de(e){return["html","body","#document"].includes(N(e))}function Oe(e){return C(e)?e:e.contextElement}const Le={x:1,y:1};function k(e){const t=Oe(e);if(!b(t))return Le;const i=t.getBoundingClientRect(),{width:o,height:s,fallback:n}=He(t);let r=(n?q(i.width):i.width)/o,a=(n?q(i.height):i.height)/s;return r&&Number.isFinite(r)||(r=1),a&&Number.isFinite(a)||(a=1),{x:r,y:a}}function R(e,t,i,o){var s,n;t===void 0&&(t=!1),i===void 0&&(i=!1);const r=e.getBoundingClientRect(),a=Oe(e);let l=Le;t&&(o?C(o)&&(l=k(o)):l=k(e));const d=a?m(a):window,c=!ke()&&i;let h=(r.left+(c&&((s=d.visualViewport)==null?void 0:s.offsetLeft)||0))/l.x,u=(r.top+(c&&((n=d.visualViewport)==null?void 0:n.offsetTop)||0))/l.y,y=r.width/l.x,v=r.height/l.y;if(a){const g=m(a),T=o&&C(o)?m(o):o;let f=g.frameElement;for(;f&&o&&T!==g;){const $=k(f),F=f.getBoundingClientRect(),ue=getComputedStyle(f);F.x+=(f.clientLeft+parseFloat(ue.paddingLeft))*$.x,F.y+=(f.clientTop+parseFloat(ue.paddingTop))*$.y,h*=$.x,u*=$.y,y*=$.x,v*=$.y,h+=F.x,u+=F.y,f=m(f).frameElement}}return{width:y,height:v,top:u,right:h+y,bottom:u+v,left:h,x:h,y:u}}function P(e){return((Be(e)?e.ownerDocument:e.document)||window.document).documentElement}function Y(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Me(e){return R(P(e)).left+Y(e).scrollLeft}function D(e){if(N(e)==="html")return e;const t=e.assignedSlot||e.parentNode||me(e)&&e.host||P(e);return me(t)?t.host:t}function Re(e){const t=D(e);return de(t)?t.ownerDocument.body:b(t)&&X(t)?t:Re(t)}function G(e,t){var i;t===void 0&&(t=[]);const o=Re(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),n=m(o);return s?t.concat(n,n.visualViewport||[],X(o)?o:[]):t.concat(o,G(o))}function we(e,t,i){return t==="viewport"?Q(function(o,s){const n=m(o),r=P(o),a=n.visualViewport;let l=r.clientWidth,d=r.clientHeight,c=0,h=0;if(a){l=a.width,d=a.height;const u=ke();(u||!u&&s==="fixed")&&(c=a.offsetLeft,h=a.offsetTop)}return{width:l,height:d,x:c,y:h}}(e,i)):C(t)?Q(function(o,s){const n=R(o,!0,s==="fixed"),r=n.top+o.clientTop,a=n.left+o.clientLeft,l=b(o)?k(o):{x:1,y:1};return{width:o.clientWidth*l.x,height:o.clientHeight*l.y,x:a*l.x,y:r*l.y}}(t,i)):Q(function(o){const s=P(o),n=Y(o),r=o.ownerDocument.body,a=O(s.scrollWidth,s.clientWidth,r.scrollWidth,r.clientWidth),l=O(s.scrollHeight,s.clientHeight,r.scrollHeight,r.clientHeight);let d=-n.scrollLeft+Me(o);const c=-n.scrollTop;return _(r).direction==="rtl"&&(d+=O(s.clientWidth,r.clientWidth)-a),{width:a,height:l,x:d,y:c}}(P(e)))}function ye(e){return b(e)&&_(e).position!=="fixed"?e.offsetParent:null}function ve(e){const t=m(e);let i=ye(e);for(;i&&rt(i)&&_(i).position==="static";)i=ye(i);return i&&(N(i)==="html"||N(i)==="body"&&_(i).position==="static"&&!oe(i))?t:i||function(o){let s=D(o);for(;b(s)&&!de(s);){if(oe(s))return s;s=D(s)}return null}(e)||t}function at(e,t,i){const o=b(t),s=P(t),n=R(e,!0,i==="fixed",t);let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&i!=="fixed")if((N(t)!=="body"||X(s))&&(r=Y(t)),b(t)){const l=R(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else s&&(a.x=Me(s));return{x:n.left+r.scrollLeft-a.x,y:n.top+r.scrollTop-a.y,width:n.width,height:n.height}}const lt={getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:o,strategy:s}=e;const n=i==="clippingAncestors"?function(d,c){const h=c.get(d);if(h)return h;let u=G(d).filter(T=>C(T)&&N(T)!=="body"),y=null;const v=_(d).position==="fixed";let g=v?D(d):d;for(;C(g)&&!de(g);){const T=_(g),f=oe(g);(v?f||y:f||T.position!=="static"||!y||!["absolute","fixed"].includes(y.position))?y=T:u=u.filter($=>$!==g),g=D(g)}return c.set(d,u),u}(t,this._c):[].concat(i),r=[...n,o],a=r[0],l=r.reduce((d,c)=>{const h=we(t,c,s);return d.top=O(h.top,d.top),d.right=ge(h.right,d.right),d.bottom=ge(h.bottom,d.bottom),d.left=O(h.left,d.left),d},we(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:i,strategy:o}=e;const s=b(i),n=P(i);if(i===n)return t;let r={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&o!=="fixed")&&((N(i)!=="body"||X(n))&&(r=Y(i)),b(i))){const d=R(i);a=k(i),l.x=d.x+i.clientLeft,l.y=d.y+i.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-r.scrollLeft*a.x+l.x,y:t.y*a.y-r.scrollTop*a.y+l.y}},isElement:C,getDimensions:function(e){return b(e)?He(e):e.getBoundingClientRect()},getOffsetParent:ve,getDocumentElement:P,getScale:k,async getElementRects(e){let{reference:t,floating:i,strategy:o}=e;const s=this.getOffsetParent||ve,n=this.getDimensions;return{reference:at(t,await s(i),o),floating:{x:0,y:0,...await n(i)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>_(e).direction==="rtl"},dt=(e,t,i)=>{const o=new Map,s={platform:lt,...i},n={...s.platform,_c:o};return Je(e,t,{...s,platform:n})},A={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function se(e,t){let i=A.themes[e]||{},o;do o=i[t],typeof o>"u"?i.$extend?i=A.themes[i.$extend]||{}:(i=null,o=A[t]):i=null;while(i);return o}function pt(e){const t=[e];let i=A.themes[e]||{};do i.$extend&&!i.$resetCss?(t.push(i.$extend),i=A.themes[i.$extend]||{}):i=null;while(i);return t.map(o=>`v-popper--theme-${o}`)}function $e(e){const t=[e];let i=A.themes[e]||{};do i.$extend?(t.push(i.$extend),i=A.themes[i.$extend]||{}):i=null;while(i);return t}let E=!1;if(typeof window<"u"){E=!1;try{const e=Object.defineProperty({},"passive",{get(){E=!0}});window.addEventListener("test",null,e)}catch{}}let De=!1;typeof window<"u"&&typeof navigator<"u"&&(De=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const ht=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),_e={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},be={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Te(e,t){const i=e.indexOf(t);i!==-1&&e.splice(i,1)}function J(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const w=[];let z=null;const Se={};function xe(e){let t=Se[e];return t||(t=Se[e]=[]),t}let ne=function(){};typeof window<"u"&&(ne=window.Element);function p(e){return function(t){return se(t.theme,e)}}const ee="__floating-vue__popper",Ee=()=>U({name:"VPopper",provide(){return{[ee]:{parentPopper:this}}},inject:{[ee]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:p("disabled")},positioningDisabled:{type:Boolean,default:p("positioningDisabled")},placement:{type:String,default:p("placement"),validator:e=>ht.includes(e)},delay:{type:[String,Number,Object],default:p("delay")},distance:{type:[Number,String],default:p("distance")},skidding:{type:[Number,String],default:p("skidding")},triggers:{type:Array,default:p("triggers")},showTriggers:{type:[Array,Function],default:p("showTriggers")},hideTriggers:{type:[Array,Function],default:p("hideTriggers")},popperTriggers:{type:Array,default:p("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:p("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:p("popperHideTriggers")},container:{type:[String,Object,ne,Boolean],default:p("container")},boundary:{type:[String,ne],default:p("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:p("strategy")},autoHide:{type:[Boolean,Function],default:p("autoHide")},handleResize:{type:Boolean,default:p("handleResize")},instantMove:{type:Boolean,default:p("instantMove")},eagerMount:{type:Boolean,default:p("eagerMount")},popperClass:{type:[String,Array,Object],default:p("popperClass")},computeTransformOrigin:{type:Boolean,default:p("computeTransformOrigin")},autoMinSize:{type:Boolean,default:p("autoMinSize")},autoSize:{type:[Boolean,String],default:p("autoSize")},autoMaxSize:{type:Boolean,default:p("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:p("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:p("preventOverflow")},overflowPadding:{type:[Number,String],default:p("overflowPadding")},arrowPadding:{type:[Number,String],default:p("arrowPadding")},arrowOverflow:{type:Boolean,default:p("arrowOverflow")},flip:{type:Boolean,default:p("flip")},shift:{type:Boolean,default:p("shift")},shiftCrossAxis:{type:Boolean,default:p("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:p("noAutoFocus")},disposeTimeout:{type:Number,default:p("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[ee])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:i=!1}={}){var o,s;(o=this.parentPopper)!=null&&o.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(i||!this.disabled)&&(((s=this.parentPopper)==null?void 0:s.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var i;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(et({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(tt({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(it({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(ot({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(st({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:o,rects:s,middlewareData:n})=>{let r;const{centerOffset:a}=n.arrow;return o.startsWith("top")||o.startsWith("bottom")?r=Math.abs(a)>s.reference.width/2:r=Math.abs(a)>s.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){const o=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:s,placement:n,middlewareData:r})=>{var a;if((a=r.autoSize)!=null&&a.skip)return{};let l,d;return n.startsWith("top")||n.startsWith("bottom")?l=s.reference.width:d=s.reference.height,this.$_innerNode.style[o==="min"?"minWidth":o==="max"?"maxWidth":"width"]=l!=null?`${l}px`:null,this.$_innerNode.style[o==="min"?"minHeight":o==="max"?"maxHeight":"height"]=d!=null?`${d}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(nt({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:o,availableHeight:s})=>{this.$_innerNode.style.maxWidth=o!=null?`${o}px`:null,this.$_innerNode.style.maxHeight=s!=null?`${s}px`:null}})));const i=await dt(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:i.x,y:i.y,placement:i.placement,strategy:i.strategy,arrow:{...i.middlewareData.arrow,...i.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),z&&this.instantMove&&z.instantMove&&z!==this.parentPopper){z.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(z=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await J(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...G(this.$_referenceNode),...G(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),i=this.$_popperNode.querySelector(".v-popper__wrapper"),o=i.parentNode.getBoundingClientRect(),s=t.x+t.width/2-(o.left+i.offsetLeft),n=t.y+t.height/2-(o.top+i.offsetTop);this.result.transformOrigin=`${s}px ${n}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let i=0;i0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Te(w,this),w.length===0&&document.body.classList.remove("v-popper--some-open");for(const i of $e(this.theme)){const o=xe(i);Te(o,this),o.length===0&&document.body.classList.remove(`v-popper--some-open--${i}`)}z===this&&(z=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await J(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=i=>{this.isShown&&!this.$_hideInProgress||(i.usedByTooltip=!0,!this.$_preventShow&&this.show({event:i}))};this.$_registerTriggerListeners(this.$_targetNodes,_e,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],_e,this.popperTriggers,this.popperShowTriggers,e);const t=i=>{i.usedByTooltip||this.hide({event:i})};this.$_registerTriggerListeners(this.$_targetNodes,be,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],be,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,i){this.$_events.push({targetNodes:e,eventType:t,handler:i}),e.forEach(o=>o.addEventListener(t,i,E?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,i,o,s){let n=i;o!=null&&(n=typeof o=="function"?o(n):o),n.forEach(r=>{const a=t[r];a&&this.$_registerEventListeners(e,a,s)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(i=>{const{targetNodes:o,eventType:s,handler:n}=i;!e||e===s?o.forEach(r=>r.removeEventListener(s,n)):t.push(i)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const i of this.$_targetNodes){const o=i.getAttribute(e);o&&(i.removeAttribute(e),i.setAttribute(t,o))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const i in e){const o=e[i];o==null?t.removeAttribute(i):t.setAttribute(i,o)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(L>=e.left&&L<=e.right&&M>=e.top&&M<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),i=L-S,o=M-x,s=t.left+t.width/2-S+(t.top+t.height/2)-x+t.width+t.height,n=S+i*s,r=x+o*s;return W(S,x,n,r,t.left,t.top,t.left,t.bottom)||W(S,x,n,r,t.left,t.top,t.right,t.top)||W(S,x,n,r,t.right,t.top,t.right,t.bottom)||W(S,x,n,r,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(De){const e=E?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>Ce(t),e),document.addEventListener("touchend",t=>Pe(t,!0),e)}else window.addEventListener("mousedown",e=>Ce(e),!0),window.addEventListener("click",e=>Pe(e,!1),!0);window.addEventListener("resize",ft)}function Ce(e,t){for(let i=0;i=0;o--){const s=w[o];try{const n=s.containsGlobalTarget=s.mouseDownContains||s.popperNode().contains(e.target);s.pendingHide=!1,requestAnimationFrame(()=>{if(s.pendingHide=!1,!i[s.randomId]&&Ne(s,n,e)){if(s.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&n){let a=s.parentPopper;for(;a;)i[a.randomId]=!0,a=a.parentPopper;return}let r=s.parentPopper;for(;r&&Ne(r,r.containsGlobalTarget,e);)r.$_handleGlobalClose(e,t),r=r.parentPopper}})}catch{}}}function Ne(e,t,i){return i.closeAllPopover||i.closePopover&&t||ct(e,i)&&!t}function ct(e,t){if(typeof e.autoHide=="function"){const i=e.autoHide(t);return e.lastAutoHide=i,i}return e.autoHide}function ft(){for(let e=0;e{S=L,x=M,L=e.clientX,M=e.clientY},E?{passive:!0}:void 0);function W(e,t,i,o,s,n,r,a){const l=((r-s)*(t-n)-(a-n)*(e-s))/((a-n)*(i-e)-(r-s)*(o-t)),d=((i-e)*(t-n)-(o-t)*(e-s))/((a-n)*(i-e)-(r-s)*(o-t));return l>=0&&l<=1&&d>=0&&d<=1}const gt={extends:Ee()},pe=(e,t)=>{const i=e.__vccOpts||e;for(const[o,s]of t)i[o]=s;return i};function mt(e,t,i,o,s,n){return B(),ie("div",{ref:"reference",class:ze(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[V(e.$slots,"default",Ze(Qe(e.slotData)))],2)}const wt=pe(gt,[["render",mt]]);function yt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var i=e.indexOf("Trident/");if(i>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var s=e.indexOf("Edge/");return s>0?parseInt(e.substring(s+5,e.indexOf(".",s)),10):-1}let j;function re(){re.init||(re.init=!0,j=yt()!==-1)}var K={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){re(),Ue(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",j&&this.$el.appendChild(e),e.data="about:blank",j||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!j&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const vt=Xe();je("data-v-b329ee4c");const $t={class:"resize-observer",tabindex:"-1"};Ve();const _t=vt((e,t,i,o,s,n)=>(B(),le("div",$t)));K.render=_t;K.__scopeId="data-v-b329ee4c";K.__file="src/components/ResizeObserver.vue";const Fe=(e="theme")=>({computed:{themeClass(){return pt(this[e])}}}),bt=U({name:"VPopperContent",components:{ResizeObserver:K},mixins:[Fe()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),Tt=["id","aria-hidden","tabindex","data-popper-placement"],St={ref:"inner",class:"v-popper__inner"},xt=H("div",{class:"v-popper__arrow-outer"},null,-1),Ct=H("div",{class:"v-popper__arrow-inner"},null,-1),Pt=[xt,Ct];function Nt(e,t,i,o,s,n){const r=te("ResizeObserver");return B(),ie("div",{id:e.popperId,ref:"popover",class:ze(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:Z(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=Ge(a=>e.autoHide&&e.$emit("hide"),["esc"]))},[H("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=a=>e.autoHide&&e.$emit("hide"))}),H("div",{class:"v-popper__wrapper",style:Z(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[H("div",St,[e.mounted?(B(),ie(qe,{key:0},[H("div",null,[V(e.$slots,"default")]),e.handleResize?(B(),le(r,{key:0,onNotify:t[1]||(t[1]=a=>e.$emit("resize",a))})):ce("",!0)],64)):ce("",!0)],512),H("div",{ref:"arrow",class:"v-popper__arrow-container",style:Z(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Pt,4)],4)],46,Tt)}const Ie=pe(bt,[["render",Nt]]),We={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let ae=function(){};typeof window<"u"&&(ae=window.Element);const zt=U({name:"VPopperWrapper",components:{Popper:wt,PopperContent:Ie},mixins:[We,Fe("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,ae,Boolean],default:void 0},boundary:{type:[String,ae],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Ht(e,t,i,o,s,n){const r=te("PopperContent"),a=te("Popper");return B(),le(a,Ke({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=l=>e.$emit("update:shown",l)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:fe(({popperId:l,isShown:d,shouldMountContent:c,skipTransition:h,autoHide:u,show:y,hide:v,handleResize:g,onResize:T,classes:f,result:$})=>[V(e.$slots,"default",{shown:d,show:y,hide:v}),Ye(r,{ref:"popperContent","popper-id":l,theme:e.finalTheme,shown:d,mounted:c,"skip-transition":h,"auto-hide":u,"handle-resize":g,classes:f,result:$,onHide:v,onResize:T},{default:fe(()=>[V(e.$slots,"popper",{shown:d,hide:v})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const he=pe(zt,[["render",Ht]]),At={...he,name:"VDropdown",vPopperTheme:"dropdown"};({...he});({...he});U({name:"VTooltipDirective",components:{Popper:Ee(),PopperContent:Ie},mixins:[We],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>se(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>se(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,i=this.content(this);i.then?i.then(o=>this.onResult(t,o)):this.onResult(t,i)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}});const Ot=At;export{Ot as k}; diff --git a/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-9MhYiAWZ.js b/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js similarity index 93% rename from assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-9MhYiAWZ.js rename to assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js index 1f164028888b923b4acdce7fda6fb0bd5418dff0..56eccf17fa8d9335bdbdbab43b6f29026febe763 100644 --- a/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-9MhYiAWZ.js +++ b/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js @@ -1 +1 @@ -import{d as B,c5 as ee,c as b,o as g,bh as $,bm as O,a,X as G,c6 as q,$ as H,e as u,w as K,U as W,b as T,u as s,Y as k,W as R,cd as D,cl as te,c7 as oe,V as ae,a0 as le,f as M,T as se,bk as re,bl as C,cu as E,cv as A,cq as ie}from"./index-CKmiAjHk.js";import{b as ne,a as ue}from"./FieldRange.vue_vue_type_script_setup_true_lang-5-FhMpNA.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as de,g as ce}from"./speech-CRLeR9Bl.js";import{u as ve}from"./providers-bTtvV6aX.js";import{_ as pe,a as me}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as fe}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as ge,a as be}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.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=B({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(x){return(o,S)=>{const d=ee("motion");return g(),b(q,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"},Ke={key:4,class:"mt-2 text-sm text-red-500"},Be=["src"],at=B({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(x,{expose:o}){const S=x,{t:d}=H(),m=u(S.defaultText||"Hello! This is a test of the voice synthesis."),U=u(!1),t=u(""),v=u(""),f=u(null),i=u(!1),h=u(""),p=u("");K(()=>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,v.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),v.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 W(()=>{t.value&&URL.revokeObjectURL(t.value)}),o({testText:m,ssmlText:h,useSSML:i,selectedVoice:p,isGenerating:U,audioUrl:t,errorMessage:v,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]=c=>i.value=c),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]=c=>h.value=c),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)),[[D,h.value]]):O((g(),b("textarea",{key:0,"onUpdate:modelValue":r[1]||(r[1]=c=>m.value=c),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)),[[D,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]=c=>p.value=c),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(q,null,oe(x.availableVoices,c=>(g(),b("option",{key:c.id,value:c.id},k(c.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)),v.value?(g(),b("div",Ke,k(v.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,Be)):R("",!0)]),$(n.$slots,"default")]))}}),Ne={flex:"~ col md:row gap-6"},je={flex:"~ col gap-6"},Fe={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},De={flex:"~ col gap-4"},Ee={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Ae={"w-full":"","rounded-xl":""},lt=B({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(x){const o=x,{t:S}=H(),d=ae(),m=ve(),U=de(),{providers:t}=le(m),v=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=v.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),c=u(""),N=u(""),w=u({});function X(){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=v.value)==null?void 0:y.defaultOptions)==null?void 0:V.baseUrl)||"",X(),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=v.value)==null?void 0:e.defaultOptions)==null?void 0:l.baseUrl)||"",voiceSettings:{...w.value}}},1e3);K([f,i],z),K(w,z,{deep:!0});async function Y(){if(!h.value.trim()&&!r.value||r.value&&!c.value.trim())return;const e=m.getProviderInstance(o.providerId);if(!e){console.error("Failed to initialize speech provider");return}if(!N.value){console.error("No active speech voice selected");return}p.value=!0,I.value="";try{_.value&&j();const l=o.defaultModel||"default",y=r.value?c.value:h.value,V=await ce({...e.speech(l,{voiceSettings:w.value}),input:y,voice:N.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 j(){n.value&&(n.value.pause(),n.value.currentTime=0),_.value&&(URL.revokeObjectURL(_.value),_.value="")}W(()=>{_.value&&URL.revokeObjectURL(_.value)});function J(){var e,l;w.value={...((l=(e=v.value)==null?void 0:e.defaultOptions)==null?void 0:l.voiceSettings)||{}},z()}function Q(e,l){w.value[e]=l}const F=M(()=>({voiceSettings:w.value,updateVoiceSettings:Q,isGenerating:p.value,testText:h.value,useSSML:r.value,ssmlText:c.value,generateTestSpeech:Y,stopTestAudio:j,audioUrl:_.value,audioPlayer:n.value,errorMessage:I.value}));return(e,l)=>{var y,V;return g(),re(_e,{"provider-name":(y=v.value)==null?void 0:y.localizedName,"provider-icon":(V=v.value)==null?void 0:V.icon,"on-back":()=>s(d).back()},{default:C(()=>[a("div",Ne,[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":J},{default:C(()=>{var L;return[T(s(fe),{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=P=>f.value=P),"provider-name":(L=v.value)==null?void 0:L.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),$(e.$slots,"basic-settings")]}),_:3},8,["title","description"]),a("div",je,[a("h2",Fe,k(s(S)("settings.pages.providers.common.section.voice.title")),1),a("div",De,[$(e.$slots,"voice-settings",E(A(F.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=v.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",Ee,[a("div",Ae,[$(e.$slots,"playground",E(A(F.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}});export{at as _,lt as a}; +import{d as B,c5 as ee,c as b,o as g,bh as $,bm as O,a,X as G,c6 as q,$ as H,e as u,w as K,U as W,b as T,u as s,Y as k,W as R,cd as D,cl as te,c7 as oe,V as ae,a0 as le,f as M,T as se,bk as re,bl as C,cu as E,cv as A,cq as ie}from"./index-WDP_Z4A8.js";import{b as ne,a as ue}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as de,g as ce}from"./speech-DRmXCXwq.js";import{u as ve}from"./providers-7GsMyC_3.js";import{_ as pe,a as me}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as fe}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as ge,a as be}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.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=B({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(x){return(o,S)=>{const d=ee("motion");return g(),b(q,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"},Ke={key:4,class:"mt-2 text-sm text-red-500"},Be=["src"],at=B({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(x,{expose:o}){const S=x,{t:d}=H(),m=u(S.defaultText||"Hello! This is a test of the voice synthesis."),U=u(!1),t=u(""),v=u(""),f=u(null),i=u(!1),h=u(""),p=u("");K(()=>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,v.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),v.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 W(()=>{t.value&&URL.revokeObjectURL(t.value)}),o({testText:m,ssmlText:h,useSSML:i,selectedVoice:p,isGenerating:U,audioUrl:t,errorMessage:v,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]=c=>i.value=c),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]=c=>h.value=c),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)),[[D,h.value]]):O((g(),b("textarea",{key:0,"onUpdate:modelValue":r[1]||(r[1]=c=>m.value=c),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)),[[D,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]=c=>p.value=c),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(q,null,oe(x.availableVoices,c=>(g(),b("option",{key:c.id,value:c.id},k(c.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)),v.value?(g(),b("div",Ke,k(v.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,Be)):R("",!0)]),$(n.$slots,"default")]))}}),Ne={flex:"~ col md:row gap-6"},je={flex:"~ col gap-6"},Fe={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},De={flex:"~ col gap-4"},Ee={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Ae={"w-full":"","rounded-xl":""},lt=B({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(x){const o=x,{t:S}=H(),d=ae(),m=ve(),U=de(),{providers:t}=le(m),v=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=v.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),c=u(""),N=u(""),w=u({});function X(){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=v.value)==null?void 0:y.defaultOptions)==null?void 0:V.baseUrl)||"",X(),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=v.value)==null?void 0:e.defaultOptions)==null?void 0:l.baseUrl)||"",voiceSettings:{...w.value}}},1e3);K([f,i],z),K(w,z,{deep:!0});async function Y(){if(!h.value.trim()&&!r.value||r.value&&!c.value.trim())return;const e=m.getProviderInstance(o.providerId);if(!e){console.error("Failed to initialize speech provider");return}if(!N.value){console.error("No active speech voice selected");return}p.value=!0,I.value="";try{_.value&&j();const l=o.defaultModel||"default",y=r.value?c.value:h.value,V=await ce({...e.speech(l,{voiceSettings:w.value}),input:y,voice:N.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 j(){n.value&&(n.value.pause(),n.value.currentTime=0),_.value&&(URL.revokeObjectURL(_.value),_.value="")}W(()=>{_.value&&URL.revokeObjectURL(_.value)});function J(){var e,l;w.value={...((l=(e=v.value)==null?void 0:e.defaultOptions)==null?void 0:l.voiceSettings)||{}},z()}function Q(e,l){w.value[e]=l}const F=M(()=>({voiceSettings:w.value,updateVoiceSettings:Q,isGenerating:p.value,testText:h.value,useSSML:r.value,ssmlText:c.value,generateTestSpeech:Y,stopTestAudio:j,audioUrl:_.value,audioPlayer:n.value,errorMessage:I.value}));return(e,l)=>{var y,V;return g(),re(_e,{"provider-name":(y=v.value)==null?void 0:y.localizedName,"provider-icon":(V=v.value)==null?void 0:V.icon,"on-back":()=>s(d).back()},{default:C(()=>[a("div",Ne,[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":J},{default:C(()=>{var L;return[T(s(fe),{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=P=>f.value=P),"provider-name":(L=v.value)==null?void 0:L.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),$(e.$slots,"basic-settings")]}),_:3},8,["title","description"]),a("div",je,[a("h2",Fe,k(s(S)("settings.pages.providers.common.section.voice.title")),1),a("div",De,[$(e.$slots,"voice-settings",E(A(F.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=v.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",Ee,[a("div",Ae,[$(e.$slots,"playground",E(A(F.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}});export{at as _,lt as a}; diff --git a/assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js b/assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js similarity index 99% rename from assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js rename to assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js index 213251a85f6e067f5a5ea8fa05883f2a5f940f75..d83b8930d1719ef834485aa8677fc8082eba8d3e 100644 --- a/assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js +++ b/assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-fAr5k7ap.js","assets/index-CKmiAjHk.js","assets/index-zBe9gvvY.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 Nx=Object.defineProperty;var Lx=(r,t,e)=>t in r?Nx(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var $=(r,t,e)=>Lx(r,typeof t!="symbol"?t+"":t,e);import{a5 as kh,cO as vi,a6 as Bx,cP as cn}from"./index-CKmiAjHk.js";/*! +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-BWr47-4Z.js","assets/index-WDP_Z4A8.js","assets/index-zBe9gvvY.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 Nx=Object.defineProperty;var Lx=(r,t,e)=>t in r?Nx(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var $=(r,t,e)=>Lx(r,typeof t!="symbol"?t+"":t,e);import{a5 as kh,cO as vi,a6 as Bx,cP as cn}from"./index-WDP_Z4A8.js";/*! * @pixi/constants - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -3095,11 +3095,11 @@ 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(V,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(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,X=v.strstart,ot=v.prev_length,lt=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[X+ot-1],oe=ht[X+ot];v.prev_length>=v.good_match&&(R>>=2),lt>v.lookahead&&(lt=v.lookahead);do if(ht[(q=K)+ot]===oe&&ht[q+ot-1]===ye&&ht[q]===ht[X]&&ht[++q]===ht[X+1]){X+=2,q++;do;while(ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&Xrt&&--R!=0);return ot<=v.lookahead?ot:v.lookahead}function yt(v){var K,q,N,R,X,ot,lt,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,lt=v.window,rt=v.strstart+v.lookahead,ht=R,bt=void 0,bt=ot.avail_in,ht=B)for(X=v.strstart-v.insert,v.ins_h=v.window[X],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,X;if(!v||!v.state||5>8&255),V(N,N.gzhead.time>>16&255),V(N,N.gzhead.time>>24&255),V(N,N.level===9?2:2<=N.strategy||N.level<2?4:0),V(N,255&N.gzhead.os),N.gzhead.extra&&N.gzhead.extra.length&&(V(N,255&N.gzhead.extra.length),V(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):(V(N,0),V(N,0),V(N,0),V(N,0),V(N,0),V(N,N.level===9?2:2<=N.strategy||N.level<2?4:0),V(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));)V(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)){X=1;break}X=N.gzindexR&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),X===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)){X=1;break}X=N.gzindexR&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),X===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&&(V(N,255&v.adler),V(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 lt=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(lt!==M&<!==O||(N.status=666),lt===w||lt===M)return v.avail_out===0&&(N.last_flush=-1),f;if(lt===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?(V(N,255&v.adler),V(N,v.adler>>8&255),V(N,v.adler>>16&255),V(N,v.adler>>24&255),V(N,255&v.total_in),V(N,v.total_in>>8&255),V(N,v.total_in>>16&255),V(N,v.total_in>>24&255)):(et(N,v.adler>>>16),et(N,65535&v.adler)),C(v),0=q.w_size&&(X===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,lt=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,X,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&&(X[0]=255&C,X[1]=C>>>8&255,w.check=a(w.check,X,2,0)),A=C=0,w.mode=3;case 3:for(;A<32;){if(U===0)break t;U--,C+=it[O++]<>>8&255,X[2]=C>>>16&255,X[3]=C>>>24&255,w.check=a(w.check,X,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&&(X[0]=255&C,X[1]=C>>>8&255,w.check=a(w.check,X,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,X,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[V+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 V(R,X){R.pending_buf[R.pending++]=255&X,R.pending_buf[R.pending++]=X>>>8&255}function et(R,X,ot){R.bi_valid>m-ot?(R.bi_buf|=X<>m-R.bi_valid,R.bi_valid+=ot-m):(R.bi_buf|=X<>>=1,ot<<=1,0<--X;);return ot>>>1}function vt(R,X,ot){var lt,rt,ht=new Array(d+1),bt=0;for(lt=1;lt<=d;lt++)ht[lt]=bt=bt+ot[lt-1]<<1;for(rt=0;rt<=X;rt++){var pt=R[2*rt+1];pt!==0&&(R[2*rt]=yt(ht[pt]++,pt))}}function dt(R){var X;for(X=0;X>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),lt=R.heap[1],R.heap[--R.heap_max]=ot,R.heap[--R.heap_max]=lt,ht[2*rt]=ht[2*ot]+ht[2*lt],R.depth[rt]=(R.depth[ot]>=R.depth[lt]?R.depth[ot]:R.depth[lt])+1,ht[2*ot+1]=ht[2*lt+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 Zi,vr,Ji,Ae,tn,co,Kr=ir.dyn_tree,ps=ir.max_code,va=ir.stat_desc.static_tree,pu=ir.stat_desc.has_stree,oi=ir.stat_desc.extra_bits,_a=ir.stat_desc.extra_base,Cn=ir.stat_desc.max_length,An=0;for(Ae=0;Ae<=d;Ae++)oe.bl_count[Ae]=0;for(Kr[2*oe.heap[oe.heap_max]+1]=0,Zi=oe.heap_max+1;Zi>=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&&X!==-1?N(R,X,ot,lt):R.strategy===4||ht===rt?(et(R,2+(lt?1:0),3),ee(R,st,I)):(et(R,4+(lt?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&X,R.pending_buf[R.l_buf+R.last_lit]=255&ot,R.last_lit++,X===0?R.dyn_ltree[2*ot]++:(R.matches++,X--,R.dyn_ltree[2*(w[ot]+h+1)]++,R.dyn_dtree[2*A(X)]++),R.last_lit===R.lit_bufsize-1},n._tr_align=function(R){et(R,2,3),J(R,S,st),function(X){X.bi_valid===16?(V(X,X.bi_buf),X.bi_buf=0,X.bi_valid=0):8<=X.bi_valid&&(X.pending_buf[X.pending++]=255&X.bi_buf,X.bi_buf>>=8,X.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 vi<"u"?vi:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(Yu)),Yu.exports}var SC=xC();const TC=kh(SC);Oi.zipReader=(r,t)=>TC.loadAsync(r);const IC=Oi.createSettings;Oi.createSettings=async r=>{const t=Object.keys(r.files);return t.find(e=>EC(e))?IC(r):OC(t)};function EC(r){return r.endsWith("model3.json")}function CC(r){return r.endsWith(".moc3")}function AC(r){return r.split(/[\\/]/).pop()}function OC(r){const t=r.filter(u=>CC(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=AC(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 rs({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}Oi.readText=(r,t)=>{const e=r.file(t);if(!e)throw new Error(`Cannot find file: ${t}`);return e.async("text")};Oi.getFilePaths=r=>{const t=[];return r.forEach(e=>t.push(e)),Promise.resolve(t)};Oi.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 hp(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 Nt(r){return this instanceof Nt?(this.v=r,this):new Nt(r)}function fr(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 Nt?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 is(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:Nt(r[n](o)),done:!1}:s?s(o):o}:s}}function wi(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 hp=="function"?hp(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 FC=new TextDecoder("utf-8"),nh=r=>FC.decode(r),PC=new TextEncoder,sf=r=>PC.encode(r),MC=r=>typeof r=="number",Iv=r=>typeof r=="boolean",Ge=r=>typeof r=="function",pr=r=>r!=null&&Object(r)===r,ss=r=>pr(r)&&Ge(r.then),ua=r=>pr(r)&&Ge(r[Symbol.iterator]),ao=r=>pr(r)&&Ge(r[Symbol.asyncIterator]),sh=r=>pr(r)&&pr(r.schema),Ev=r=>pr(r)&&"done"in r&&"value"in r,Cv=r=>pr(r)&&Ge(r.stat)&&MC(r.fd),Av=r=>pr(r)&&of(r.body),ru=r=>"_getDOMStream"in r&&"_getNodeStream"in r,DC=r=>pr(r)&&Ge(r.abort)&&Ge(r.getWriter)&&!ru(r),of=r=>pr(r)&&Ge(r.cancel)&&Ge(r.getReader)&&!ru(r),RC=r=>pr(r)&&Ge(r.end)&&Ge(r.write)&&Iv(r.writable)&&!ru(r),Ov=r=>pr(r)&&Ge(r.read)&&Ge(r.pipe)&&Iv(r.readable)&&!ru(r),NC=r=>pr(r)&&Ge(r.clear)&&Ge(r.bytes)&&Ge(r.position)&&Ge(r.setPosition)&&Ge(r.capacity)&&Ge(r.getBufferIdentifier)&&Ge(r.createLong),af=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function LC(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),dp=r=>_e(BigInt64Array,r),le=r=>_e(Uint8Array,r),oh=r=>(r.next(),r);function*BC(r,t){const e=function*(n){yield n},i=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof af?e(t):ua(t)?t:e(t);return yield*oh(function*(n){let s=null;do s=n.next(yield _e(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}const kC=r=>BC(Uint8Array,r);function Fv(r,t){return fr(this,arguments,function*(){if(ss(t))return yield Nt(yield Nt(yield*is(wi(Fv(r,yield Nt(t))))));const i=function(o){return fr(this,arguments,function*(){yield yield Nt(yield Nt(o))})},n=function(o){return fr(this,arguments,function*(){yield Nt(yield*is(wi(oh(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):ua(t)?n(t):ao(t)?t:i(t);return yield Nt(yield*is(wi(oh(function(o){return fr(this,arguments,function*(){let a=null;do a=yield Nt(o.next(yield yield Nt(_e(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Nt(new r)})}const UC=r=>Fv(Uint8Array,r);function Pv(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*jC(r){let t,e=!1,i=[],n,s,o,a=0;function l(){return s==="peek"?Si(i,o)[0]:([n,i,a]=Si(i,o),n)}({cmd:s,size:o}=(yield null)||{cmd:"read",size:0});const u=kC(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 Nt(u()));while(a0&&(n.push(le(s)),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Nt(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=le(e)),e})}}const Xu=(r,t)=>{const e=n=>i([t,n]);let i;return[t,e,new Promise(n=>(i=n)&&r.once(t,e))]};function WC(r){return fr(this,arguments,function*(){const e=[];let i="error",n=!1,s=null,o,a,l=0,u=[],c;function h(){return o==="peek"?Si(u,a)[0]:([c,u,l]=Si(u,a),c)}if({cmd:o,size:a}=(yield yield Nt(null))||{cmd:"read",size:0},r.isTTY)return yield yield Nt(new Uint8Array(0)),yield Nt(null);try{e[0]=Xu(r,"end"),e[1]=Xu(r,"error");do{if(e[2]=Xu(r,"readable"),[i,s]=yield Nt(Promise.race(e.map(f=>f[2]))),i==="error")break;if((n=i==="end")||(Number.isFinite(a-l)?(c=le(r.read(a-l)),c.byteLength0&&(u.push(c),l+=c.byteLength)),n||a<=l)do({cmd:o,size:a}=yield yield Nt(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 Yr;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(Yr||(Yr={}));var Vt;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(Vt||(Vt={}));var Ti;(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"})(Ti||(Ti={}));const qu=2,mi=4,$i=4,me=4,an=new Int32Array(2),pp=new Float32Array(an.buffer),mp=new Float64Array(an.buffer),ka=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var ah;(function(r){r[r.UTF8_BYTES=1]="UTF8_BYTES",r[r.UTF16_STRING=2]="UTF16_STRING"})(ah||(ah={}));let Js=class Mv{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new Mv(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){pp[0]=e,this.writeInt32(t,an[0])}writeFloat64(t,e){mp[0]=e,this.writeInt32(t,an[ka?0:1]),this.writeInt32(t+4,an[ka?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)*qu;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,mi+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 cr.startUnion(t),cr.addMode(t,e),cr.addTypeIds(t,i),cr.endUnion(t)}}let xp=class Do{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 Do).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,e){return t.setPosition(t.position()+me),(e||new Do).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(t){return Do.startUtf8(t),Do.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 Lr=class Ya{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 Ya).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,e){return t.setPosition(t.position()+me),(e||new Ya).__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 Vi).__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 Ya).__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()}},ci=class Di{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 Di).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,e){return t.setPosition(t.position()+me),(e||new Di).__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):to.Little}fields(t,e){const i=this.bb.__offset(this.bb_pos,6);return i?(e||new Lr).__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,to.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 Di.startSchema(t),Di.addEndianness(t,e),Di.addFields(t,i),Di.addCustomMetadata(t,n),Di.addFeatures(t,s),Di.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 Ui;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(Ui||(Ui={}));const HC=void 0;function Qo(r){if(r===null)return"null";if(r===HC)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=>Qo(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 Bv(r,t){return we(r/t)+we(r%t)/we(t)}const YC=Symbol.for("isArrowBigNum");function ii(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)}ii.prototype[YC]=!0;ii.prototype.toJSON=function(){return`"${Zo(this)}"`};ii.prototype.valueOf=function(r){return kv(this,r)};ii.prototype.toString=function(){return Zo(this)};ii.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return kv(this);case"string":return Zo(this);case"default":return QC(this)}return Zo(this)};function $s(...r){return ii.apply(this,r)}function Vs(...r){return ii.apply(this,r)}function Ko(...r){return ii.apply(this,r)}Object.setPrototypeOf($s.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Vs.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Ko.prototype,Object.create(Uint32Array.prototype));Object.assign($s.prototype,ii.prototype,{constructor:$s,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Vs.prototype,ii.prototype,{constructor:Vs,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(Ko.prototype,ii.prototype,{constructor:Ko,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const XC=BigInt(4294967296)*BigInt(4294967296),qC=XC-BigInt(1);function kv(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 Qu(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 yn=class extends At{constructor(){super(L.Null)}toString(){return"Null"}};jv=Symbol.toStringTag;yn[jv]=(r=>r[Symbol.toStringTag]="Null")(yn.prototype);let os=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}`}};$v=Symbol.toStringTag;os[$v]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(os.prototype);class Jo extends os{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(Jo.prototype,"ArrayType",{value:Int32Array});let fl=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}`}};Vv=Symbol.toStringTag;fl[Vv]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(fl.prototype);let dl=class extends At{constructor(){super(L.Binary)}toString(){return"Binary"}};Gv=Symbol.toStringTag;dl[Gv]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(dl.prototype);let pl=class extends At{constructor(){super(L.LargeBinary)}toString(){return"LargeBinary"}};Wv=Symbol.toStringTag;pl[Wv]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(pl.prototype);let ml=class extends At{constructor(){super(L.Utf8)}toString(){return"Utf8"}};Hv=Symbol.toStringTag;ml[Hv]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(ml.prototype);let yl=class extends At{constructor(){super(L.LargeUtf8)}toString(){return"LargeUtf8"}};Yv=Symbol.toStringTag;yl[Yv]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(yl.prototype);let gl=class extends At{constructor(){super(L.Bool)}toString(){return"Bool"}};Xv=Symbol.toStringTag;gl[Xv]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(gl.prototype);let vl=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}]`}};qv=Symbol.toStringTag;vl[qv]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(vl.prototype);let _l=class extends At{constructor(t){super(L.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${Yr[this.unit]}>`}get ArrayType(){return this.unit===Yr.DAY?Int32Array:BigInt64Array}};Qv=Symbol.toStringTag;_l[Qv]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(_l.prototype);let bl=class extends At{constructor(t,e){super(L.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${Vt[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};Kv=Symbol.toStringTag;bl[Kv]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(bl.prototype);let wl=class extends At{constructor(t,e){super(L.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${Vt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};Zv=Symbol.toStringTag;wl[Zv]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(wl.prototype);let xl=class extends At{constructor(t){super(L.Interval),this.unit=t}toString(){return`Interval<${Ti[this.unit]}>`}};Jv=Symbol.toStringTag;xl[Jv]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(xl.prototype);let Sl=class extends At{constructor(t){super(L.Duration),this.unit=t}toString(){return`Duration<${Vt[this.unit]}>`}};t_=Symbol.toStringTag;Sl[t_]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(Sl.prototype);let Tl=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}};e_=Symbol.toStringTag;Tl[e_]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(Tl.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(", ")}}>`}};r_=Symbol.toStringTag;sr[r_]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(sr.prototype);let Il=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(" | ")}>`}};i_=Symbol.toStringTag;Il[i_]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Il.prototype);let El=class extends At{constructor(t){super(L.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};n_=Symbol.toStringTag;El[n_]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(El.prototype);let Cl=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}>`}};s_=Symbol.toStringTag;Cl[s_]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(Cl.prototype);let Al=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(", ")}}>`}};o_=Symbol.toStringTag;Al[o_]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Al.prototype);const ZC=(r=>()=>++r)(-1);let eo=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?ZC():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}>`}};a_=Symbol.toStringTag;eo[a_]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(eo.prototype);function zi(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 JC(this,t,e)}getVisitFnByTypeId(t,e=!0){return Fs(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 JC(r,t,e=!0){return typeof t=="number"?Fs(r,t,e):typeof t=="string"&&t in L?Fs(r,L[t],e):t&&t instanceof At?Fs(r,Sp(t),e):t!=null&&t.type&&t.type instanceof At?Fs(r,Sp(t.type),e):Fs(r,L.NONE,e)}function Fs(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 Sp(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 Vt.SECOND:return L.TimeSecond;case Vt.MILLISECOND:return L.TimeMillisecond;case Vt.MICROSECOND:return L.TimeMicrosecond;case Vt.NANOSECOND:return L.TimeNanosecond}return L.Time;case L.Timestamp:switch(r.unit){case Vt.SECOND:return L.TimestampSecond;case Vt.MILLISECOND:return L.TimestampMillisecond;case Vt.MICROSECOND:return L.TimestampMicrosecond;case Vt.NANOSECOND:return L.TimestampNanosecond}return L.Timestamp;case L.Date:switch(r.unit){case Yr.DAY:return L.DateDay;case Yr.MILLISECOND:return L.DateMillisecond}return L.Date;case L.Interval:switch(r.unit){case Ti.DAY_TIME:return L.IntervalDayTime;case Ti.YEAR_MONTH:return L.IntervalYearMonth}return L.Interval;case L.Duration:switch(r.unit){case Vt.SECOND:return L.DurationSecond;case Vt.MILLISECOND:return L.DurationMillisecond;case Vt.MICROSECOND:return L.DurationMicrosecond;case Vt.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 l_=new Float64Array(1),_s=new Uint32Array(l_.buffer);function u_(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 tA(r){if(r!==r)return 32256;l_[0]=r;const t=(_s[1]&2147483648)>>16&65535;let e=_s[1]&2146435072,i=0;return e>=1089470464?_s[0]>0?e=31744:(e=(e&2080374784)>>16,i=(_s[1]&1048575)>>10):e<=1056964608?(i=1048576+(_s[1]&1048575),i=1048576+(i<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,i=(_s[1]&1048575)+512>>10),t|e|i&65535}let Gt=class extends ie{};function Xt(r){return(t,e,i)=>{if(t.setValid(e,i!=null))return r(t,e,i)}}const eA=(r,t,e)=>{r[t]=Math.floor(e/864e5)},c_=(r,t,e,i)=>{if(e+1{const n=r+e;i?t[n>>3]|=1<>3]&=~(1<{r[t]=e},lf=({values:r},t,e)=>{r[t]=e},h_=({values:r},t,e)=>{r[t]=tA(e)},iA=(r,t,e)=>{switch(r.type.precision){case tr.HALF:return h_(r,t,e);case tr.SINGLE:case tr.DOUBLE:return lf(r,t,e)}},f_=({values:r},t,e)=>{eA(r,t,e.valueOf())},d_=({values:r},t,e)=>{r[t]=BigInt(e)},nA=({stride:r,values:t},e,i)=>{t.set(i.subarray(0,r),r*e)},p_=({values:r,valueOffsets:t},e,i)=>c_(r,t,e,i),m_=({values:r,valueOffsets:t},e,i)=>c_(r,t,e,sf(i)),sA=(r,t,e)=>{r.type.unit===Yr.DAY?f_(r,t,e):d_(r,t,e)},y_=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},g_=({values:r},t,e)=>{r[t]=BigInt(e)},v_=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},__=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},oA=(r,t,e)=>{switch(r.type.unit){case Vt.SECOND:return y_(r,t,e);case Vt.MILLISECOND:return g_(r,t,e);case Vt.MICROSECOND:return v_(r,t,e);case Vt.NANOSECOND:return __(r,t,e)}},b_=({values:r},t,e)=>{r[t]=e},w_=({values:r},t,e)=>{r[t]=e},x_=({values:r},t,e)=>{r[t]=e},S_=({values:r},t,e)=>{r[t]=e},aA=(r,t,e)=>{switch(r.type.unit){case Vt.SECOND:return b_(r,t,e);case Vt.MILLISECOND:return w_(r,t,e);case Vt.MICROSECOND:return x_(r,t,e);case Vt.NANOSECOND:return S_(r,t,e)}},lA=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},uA=(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},hA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[s]),fA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(s)),dA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(n.name)),pA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[n.name]),mA=(r,t,e)=>{const i=r.type.children.map(s=>Xr.getVisitFn(s.type)),n=e instanceof Map?dA(t,e):e instanceof Me?fA(t,e):Array.isArray(e)?hA(t,e):pA(t,e);r.type.children.forEach((s,o)=>n(i[o],r.children[o],s,o))},yA=(r,t,e)=>{r.type.mode===er.Dense?T_(r,t,e):I_(r,t,e)},T_=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Xr.visit(n,r.valueOffsets[t],e)},I_=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Xr.visit(n,t,e)},gA=(r,t,e)=>{var i;(i=r.dictionary)===null||i===void 0||i.set(r.values[t],e)},vA=(r,t,e)=>{r.type.unit===Ti.DAY_TIME?E_(r,t,e):C_(r,t,e)},E_=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},C_=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},A_=({values:r},t,e)=>{r[t]=e},O_=({values:r},t,e)=>{r[t]=e},F_=({values:r},t,e)=>{r[t]=e},P_=({values:r},t,e)=>{r[t]=e},_A=(r,t,e)=>{switch(r.type.unit){case Vt.SECOND:return A_(r,t,e);case Vt.MILLISECOND:return O_(r,t,e);case Vt.MICROSECOND:return F_(r,t,e);case Vt.NANOSECOND:return P_(r,t,e)}},bA=(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`${Qo(t)}: ${Qo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new wA(this[Zr],this[Gs])}},wA=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[Zr].type.children.findIndex(i=>i.name===e)!==-1}getOwnPropertyDescriptor(t,e){if(t[Zr].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[Zr].type.children.findIndex(n=>n.name===e);if(i!==-1){const n=mr.visit(t[Zr].children[i],t[Gs]);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?(Xr.visit(t[Zr].children[n],t[Gs],i),Reflect.set(t,e,i)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,i):!1}},Lt=class extends ie{};function Wt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const SA=(r,t)=>864e5*r[t],TA=(r,t)=>null,M_=(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)},IA=({offset:r,values:t},e)=>{const i=r+e;return(t[i>>3]&1<SA(r,t),R_=({values:r},t)=>we(r[t]),Sn=({stride:r,values:t},e)=>t[r*e],EA=({stride:r,values:t},e)=>u_(t[r*e]),N_=({values:r},t)=>r[t],CA=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),L_=({values:r,valueOffsets:t},e)=>M_(r,t,e),B_=({values:r,valueOffsets:t},e)=>{const i=M_(r,t,e);return i!==null?nh(i):null},AA=({values:r},t)=>r[t],OA=({type:r,values:t},e)=>r.precision!==tr.HALF?t[e]:u_(t[e]),FA=(r,t)=>r.type.unit===Yr.DAY?D_(r,t):R_(r,t),k_=({values:r},t)=>1e3*we(r[t]),U_=({values:r},t)=>we(r[t]),z_=({values:r},t)=>Bv(r[t],BigInt(1e3)),j_=({values:r},t)=>Bv(r[t],BigInt(1e6)),PA=(r,t)=>{switch(r.type.unit){case Vt.SECOND:return k_(r,t);case Vt.MILLISECOND:return U_(r,t);case Vt.MICROSECOND:return z_(r,t);case Vt.NANOSECOND:return j_(r,t)}},$_=({values:r},t)=>r[t],V_=({values:r},t)=>r[t],G_=({values:r},t)=>r[t],W_=({values:r},t)=>r[t],MA=(r,t)=>{switch(r.type.unit){case Vt.SECOND:return $_(r,t);case Vt.MILLISECOND:return V_(r,t);case Vt.MICROSECOND:return G_(r,t);case Vt.NANOSECOND:return W_(r,t)}},DA=({values:r,stride:t},e)=>KC.decimal(r.subarray(t*e,t*(e+1))),RA=(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])},NA=(r,t)=>{const{valueOffsets:e,children:i}=r,{[t]:n,[t+1]:s}=e,o=i[0];return new cf(o.slice(n,s-n))},LA=(r,t)=>new uf(r,t),BA=(r,t)=>r.type.mode===er.Dense?H_(r,t):Y_(r,t),H_=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return mr.visit(i,r.valueOffsets[t])},Y_=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return mr.visit(i,t)},kA=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},UA=(r,t)=>r.type.unit===Ti.DAY_TIME?X_(r,t):q_(r,t),X_=({values:r},t)=>r.subarray(2*t,2*(t+1)),q_=({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},Q_=({values:r},t)=>r[t],K_=({values:r},t)=>r[t],Z_=({values:r},t)=>r[t],J_=({values:r},t)=>r[t],zA=(r,t)=>{switch(r.type.unit){case Vt.SECOND:return Q_(r,t);case Vt.MILLISECOND:return K_(r,t);case Vt.MICROSECOND:return Z_(r,t);case Vt.NANOSECOND:return J_(r,t)}},jA=(r,t)=>{const{stride:e,children:i}=r,s=i[0].slice(t*e,e);return new Me([s])};Lt.prototype.visitNull=Wt(TA);Lt.prototype.visitBool=Wt(IA);Lt.prototype.visitInt=Wt(AA);Lt.prototype.visitInt8=Wt(Sn);Lt.prototype.visitInt16=Wt(Sn);Lt.prototype.visitInt32=Wt(Sn);Lt.prototype.visitInt64=Wt(N_);Lt.prototype.visitUint8=Wt(Sn);Lt.prototype.visitUint16=Wt(Sn);Lt.prototype.visitUint32=Wt(Sn);Lt.prototype.visitUint64=Wt(N_);Lt.prototype.visitFloat=Wt(OA);Lt.prototype.visitFloat16=Wt(EA);Lt.prototype.visitFloat32=Wt(Sn);Lt.prototype.visitFloat64=Wt(Sn);Lt.prototype.visitUtf8=Wt(B_);Lt.prototype.visitLargeUtf8=Wt(B_);Lt.prototype.visitBinary=Wt(L_);Lt.prototype.visitLargeBinary=Wt(L_);Lt.prototype.visitFixedSizeBinary=Wt(CA);Lt.prototype.visitDate=Wt(FA);Lt.prototype.visitDateDay=Wt(D_);Lt.prototype.visitDateMillisecond=Wt(R_);Lt.prototype.visitTimestamp=Wt(PA);Lt.prototype.visitTimestampSecond=Wt(k_);Lt.prototype.visitTimestampMillisecond=Wt(U_);Lt.prototype.visitTimestampMicrosecond=Wt(z_);Lt.prototype.visitTimestampNanosecond=Wt(j_);Lt.prototype.visitTime=Wt(MA);Lt.prototype.visitTimeSecond=Wt($_);Lt.prototype.visitTimeMillisecond=Wt(V_);Lt.prototype.visitTimeMicrosecond=Wt(G_);Lt.prototype.visitTimeNanosecond=Wt(W_);Lt.prototype.visitDecimal=Wt(DA);Lt.prototype.visitList=Wt(RA);Lt.prototype.visitStruct=Wt(LA);Lt.prototype.visitUnion=Wt(BA);Lt.prototype.visitDenseUnion=Wt(H_);Lt.prototype.visitSparseUnion=Wt(Y_);Lt.prototype.visitDictionary=Wt(kA);Lt.prototype.visitInterval=Wt(UA);Lt.prototype.visitIntervalDayTime=Wt(X_);Lt.prototype.visitIntervalYearMonth=Wt(q_);Lt.prototype.visitDuration=Wt(zA);Lt.prototype.visitDurationSecond=Wt(Q_);Lt.prototype.visitDurationMillisecond=Wt(K_);Lt.prototype.visitDurationMicrosecond=Wt(Z_);Lt.prototype.visitDurationNanosecond=Wt(J_);Lt.prototype.visitFixedSizeList=Wt(jA);Lt.prototype.visitMap=Wt(NA);const mr=new Lt,Ps=Symbol.for("keys"),Ws=Symbol.for("vals"),Ms=Symbol.for("kKeysAsStrings"),hh=Symbol.for("_kKeysAsStrings");let cf=class{constructor(t){return this[Ps]=new Me([t.children[0]]).memoize(),this[Ws]=t.children[1],new Proxy(this,new VA)}get[Ms](){return this[hh]||(this[hh]=Array.from(this[Ps].toArray(),String))}[Symbol.iterator](){return new $A(this[Ps],this[Ws])}get size(){return this[Ps].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Ps],e=this[Ws],i={};for(let n=-1,s=t.length;++n`${Qo(t)}: ${Qo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},$A=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)]})}},VA=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Ms]}has(t,e){return t[Ms].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Ms].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Ms].indexOf(e);if(i!==-1){const n=mr.visit(Reflect.get(t,Ws),i);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Ms].indexOf(e);return n!==-1?(Xr.visit(Reflect.get(t,Ws),n,i),Reflect.set(t,e,i)):Reflect.has(t,e)?Reflect.set(t,e,i):!1}};Object.defineProperties(cf.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Ps]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Ws]:{writable:!0,enumerable:!1,configurable:!1,value:null},[hh]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let Tp;function t0(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 hf=(r,t)=>r<0?t+r:r,Ip=r=>r!==r;function lo(r){if(typeof r!=="object"||r===null)return Ip(r)?Ip: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?zC(r,e):!1:r instanceof Map?WA(r):Array.isArray(r)?GA(r):r instanceof Me?HA(r):YA(r,!0)}function GA(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 XA(r,e);case Map:return Ep(r,e,e.keys());case cf:case uf:case Object:case void 0:return Ep(r,e,t||Object.keys(e))}return e instanceof Me?qA(r,e):!1}}function XA(r,t){const e=r.length;if(t.length!==e)return!1;for(let i=-1;++i>i}function Ol(r,t,e){const i=e.byteLength+7&-8;if(r>0||e.byteLength>3):Fl(new ff(e,r,t,null,e0)).subarray(0,i)),n}return e}function Fl(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 ff=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 fh(r,t,n)+fh(r,i,e)+KA(r,n>>3,i-n>>3)}function KA(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+=Ku(s.getUint32(n)),n+=4;for(;o-n>=2;)i+=Ku(s.getUint16(n)),n+=2;for(;o-n>=1;)i+=Ku(s.getUint8(n)),n+=1;return i}function Ku(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 ZA=-1;let Se=class dh{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<=ZA&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-fh(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 dh?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=zi(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(Ol(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 dh(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(Ol(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[Ui.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[Ui.TYPE])&&(o[Ui.TYPE]=s.subarray(t,t+e)),(s=o[Ui.OFFSET])&&(o[Ui.OFFSET]=s.subarray(t,t+e+1))||(s=o[Ui.DATA])&&(o[Ui.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 Bo 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=le(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=le(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=le(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=le(t.data),s=le(t.nullBitmap),o=_o(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=le(t.data),s=le(t.nullBitmap),o=dp(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=le(t.data),s=le(t.nullBitmap),o=_o(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=le(t.data),s=le(t.nullBitmap),o=dp(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=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(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=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(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=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(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=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(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=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(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=le(t.nullBitmap),o=_o(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=le(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=_o(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=le(t.nullBitmap),s=_e(e.indices.ArrayType,t.data),{["dictionary"]:o=new Me([new Bo().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=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(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=le(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 Bo().visit({type:e.valueType})}=t,s=le(t.nullBitmap),{["length"]:o=n.length/zi(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 Bo().visit({type:e.childType})}=t,s=le(t.nullBitmap),o=_o(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 JA=new Bo;function se(r){return JA.visit(r)}let Cp=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 r0(r){return r.reduce((t,e)=>t+e.nullCount,0)}function i0(r){return r.reduce((t,e,i)=>(t[i+1]=t[i]+e.length,t),new Uint32Array(r.length+1))}function n0(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 df(r,t,e,i){let n=0,s=0,o=t.length-1;do{if(n>=o-1)return e0?0:-1}function rO(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let i=0;for(const n of new ff(e,r.offset+(t||0),r.length,e,e0)){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 L.Union:break;case L.Dictionary:break;default:return rO(r,e)}const i=mr.getVisitFn(r),n=lo(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 Cp(r.data.length,i=>{const s=r.data[i].length,o=r.slice(e,e+s);return e+=s,new iO(o)})}let iO=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}=u0[o.typeId],c=s[0];this.isValid=h=>pf(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,c0[o.typeId]),this._offsets=i0(s);break}this.data=s,this.type=o,this.stride=zi(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 tO(this.data)}get nullCount(){return r0(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(hf(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return mf.visit(this)}concat(...t){return new $n(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new $n(t0(this,t,e,({data:i,_offsets:n},s,o)=>n0(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 Ap(this.data[0].dictionary),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new $n(e)}return new Ap(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 $n(e)}return this}};l0=Symbol.toStringTag;Me[l0]=(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=Ml.getVisitFnByTypeId(e);u0[e]={get:i,set:n,indexOf:s},c0[e]=Object.create(r,{isValid:{value:Pl(pf)},get:{value:Pl(mr.getVisitFnByTypeId(e))},set:{value:s0(Xr.getVisitFnByTypeId(e))},indexOf:{value:o0(Ml.getVisitFnByTypeId(e))}})}return"Vector"})(Me.prototype);let Ap=class h0 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 h0(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 ph{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 ci).__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 ph).__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 ph).__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 Vn{constructor(t=[],e,i,n=ke.V5){this.fields=t||[],this.metadata=e||new Map,i||(i=mh(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 Vn(i,this.metadata)}selectAt(t){const e=t.map(i=>this.fields[i]).filter(Boolean);return new Vn(e,this.metadata)}assign(...t){const e=t[0]instanceof Vn?t[0]:Array.isArray(t[0])?new Vn(t[0]):new Vn(t),i=[...this.fields],n=Ua(Ua(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:Ua(Ua(new Map,i[l].metadata),a.metadata)}))&&!1:!0}),o=mh(s,new Map);return new Vn([...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 Ua(r,t){return new Map([...r||new Map,...t||new Map])}function mh(r,t=new Map){for(let e=-1,i=r.length;++e0&&mh(s.children,t)}return t}var nO=Dv,sO=Js;class ta{static decode(t){t=new sO(le(t));const e=_r.getRootAsFooter(t),i=Pe.decode(e.schema(),new Map,e.version());return new oO(i,e)}static encode(t){const e=new nO,i=Pe.encode(e,t.schema);_r.startRecordBatchesVector(e,t.numRecordBatches);for(const o of[...t.recordBatches()].slice().reverse())gn.encode(e,o);const n=e.endVector();_r.startDictionariesVector(e,t.numDictionaries);for(const o of[...t.dictionaryBatches()].slice().reverse())gn.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 Xa extends aO{write(t){if((t=le(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?nh(this.toUint8Array(!0)):this.toUint8Array(!1).then(nh)}toUint8Array(t=!1){return t?Si(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=wi(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 Si(o,a)[0]})}}class Dl{constructor(t){t&&(this.source=new lO(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 ro{constructor(t){t instanceof ro?this.source=t.source:t instanceof Xa?this.source=new Rn(kr.fromAsyncIterable(t)):Ov(t)?this.source=new Rn(kr.fromNodeStream(t)):of(t)?this.source=new Rn(kr.fromDOMStream(t)):Av(t)?this.source=new Rn(kr.fromDOMStream(t.body)):ua(t)?this.source=new Rn(kr.fromIterable(t)):ss(t)?this.source=new Rn(kr.fromAsyncIterable(t)):ao(t)&&(this.source=new Rn(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 lO{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 Rn{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 Fp extends Dl{constructor(t,e){super(),this.position=0,this.buffer=le(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`${Bs(this.buffer[3])} ${Bs(this.buffer[2])} ${Bs(this.buffer[1])} ${Bs(this.buffer[0])}`}static multiply(t,e){return new Li(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new Li(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return Li.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return Li.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const i=t.startsWith("-"),n=t.length,s=new Li(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 hO extends d0{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):Fl(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===Yr.MILLISECOND?_e(Uint8Array,ko.convertArray(i[e])):At.isDecimal(t)?_e(Uint8Array,cO.convertArray(i[e])):At.isBinary(t)||At.isLargeBinary(t)||At.isFixedSizeBinary(t)?fO(i[e]):At.isBool(t)?Fl(i[e]):At.isUtf8(t)||At.isLargeUtf8(t)?sf(i[e].join("")):_e(Uint8Array,_e(t.ArrayType,i[e].map(n=>+n)))}}function fO(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 Ut=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 ar(r,t){return t instanceof r.constructor}function hs(r,t){return r===t||ar(r,t)}function Xi(r,t){return r===t||ar(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function nu(r,t){return r===t||ar(r,t)&&r.precision===t.precision}function dO(r,t){return r===t||ar(r,t)&&r.byteWidth===t.byteWidth}function vf(r,t){return r===t||ar(r,t)&&r.unit===t.unit}function ca(r,t){return r===t||ar(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function ha(r,t){return r===t||ar(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function pO(r,t){return r===t||ar(r,t)&&r.children.length===t.children.length&&vn.compareManyFields(r.children,t.children)}function mO(r,t){return r===t||ar(r,t)&&r.children.length===t.children.length&&vn.compareManyFields(r.children,t.children)}function _f(r,t){return r===t||ar(r,t)&&r.mode===t.mode&&r.typeIds.every((e,i)=>e===t.typeIds[i])&&vn.compareManyFields(r.children,t.children)}function yO(r,t){return r===t||ar(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&vn.visit(r.indices,t.indices)&&vn.visit(r.dictionary,t.dictionary)}function bf(r,t){return r===t||ar(r,t)&&r.unit===t.unit}function fa(r,t){return r===t||ar(r,t)&&r.unit===t.unit}function gO(r,t){return r===t||ar(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&vn.compareManyFields(r.children,t.children)}function vO(r,t){return r===t||ar(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&vn.compareManyFields(r.children,t.children)}Ut.prototype.visitNull=hs;Ut.prototype.visitBool=hs;Ut.prototype.visitInt=Xi;Ut.prototype.visitInt8=Xi;Ut.prototype.visitInt16=Xi;Ut.prototype.visitInt32=Xi;Ut.prototype.visitInt64=Xi;Ut.prototype.visitUint8=Xi;Ut.prototype.visitUint16=Xi;Ut.prototype.visitUint32=Xi;Ut.prototype.visitUint64=Xi;Ut.prototype.visitFloat=nu;Ut.prototype.visitFloat16=nu;Ut.prototype.visitFloat32=nu;Ut.prototype.visitFloat64=nu;Ut.prototype.visitUtf8=hs;Ut.prototype.visitLargeUtf8=hs;Ut.prototype.visitBinary=hs;Ut.prototype.visitLargeBinary=hs;Ut.prototype.visitFixedSizeBinary=dO;Ut.prototype.visitDate=vf;Ut.prototype.visitDateDay=vf;Ut.prototype.visitDateMillisecond=vf;Ut.prototype.visitTimestamp=ca;Ut.prototype.visitTimestampSecond=ca;Ut.prototype.visitTimestampMillisecond=ca;Ut.prototype.visitTimestampMicrosecond=ca;Ut.prototype.visitTimestampNanosecond=ca;Ut.prototype.visitTime=ha;Ut.prototype.visitTimeSecond=ha;Ut.prototype.visitTimeMillisecond=ha;Ut.prototype.visitTimeMicrosecond=ha;Ut.prototype.visitTimeNanosecond=ha;Ut.prototype.visitDecimal=hs;Ut.prototype.visitList=pO;Ut.prototype.visitStruct=mO;Ut.prototype.visitUnion=_f;Ut.prototype.visitDenseUnion=_f;Ut.prototype.visitSparseUnion=_f;Ut.prototype.visitDictionary=yO;Ut.prototype.visitInterval=bf;Ut.prototype.visitIntervalDayTime=bf;Ut.prototype.visitIntervalYearMonth=bf;Ut.prototype.visitDuration=fa;Ut.prototype.visitDurationSecond=fa;Ut.prototype.visitDurationMillisecond=fa;Ut.prototype.visitDurationMicrosecond=fa;Ut.prototype.visitDurationNanosecond=fa;Ut.prototype.visitFixedSizeList=gO;Ut.prototype.visitMap=vO;const vn=new Ut;function yh(r,t){return vn.compareSchemas(r,t)}function Zu(r,t){return _O(r,t.map(e=>e.data.concat()))}function _O(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 hr(r,h))]}function bO(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 p0;let _n=class Gn{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 hr)return[l];if(l instanceof Gn)return l.batches;if(l instanceof Se){if(l.type instanceof sr)return[new hr(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]=Zu(h,c);return p.length===0?[new hr(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 hr))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!yh(n,l.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=n,this.batches=a,this._offsets=s??i0(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=r0(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(hf(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?mf.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 Gn(e,i.map(n=>new hr(e,n)))}slice(t,e){const i=this.schema;[t,e]=t0({length:this.numRows},t,e);const n=n0(this.data,this._offsets,t,e);return new Gn(i,n.map(s=>new hr(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]=Zu(i,a)}return new Gn(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 Gn(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 Gn(...Zu(s,o))}};p0=Symbol.toStringTag;_n[p0]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=Pl(pf),r.get=Pl(mr.getVisitFn(L.Struct)),r.set=s0(Xr.getVisitFn(L.Struct)),r.indexOf=o0(Ml.getVisitFn(L.Struct)),"Table"))(_n.prototype);var m0;let hr=class Ro{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]=Pp(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]=Pp(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=y0(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(hf(t,this.numRows))}set(t,e){return Xr.visit(this.data,t,e)}indexOf(t,e){return Ml.visit(this.data,t,e)}[Symbol.iterator](){return mf.visit(new Me([this.data]))}toArray(){return[...this]}concat(...t){return new _n(this.schema,[this,...t])}slice(t,e){const[i]=new Me([this.data]).slice(t,e).data;return new Ro(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 Ro(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 Ro(e,n)}};m0=Symbol.toStringTag;hr[m0]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(hr.prototype);function Pp(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 y0(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 rn=class li{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 li).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+me),(e||new li).__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 li.startMessage(t),li.addVersion(t,e),li.addHeaderType(t,i),li.addHeader(t,n),li.addBodyLength(t,s),li.addCustomMetadata(t,o),li.endMessage(t)}};class wO extends ie{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return wp.startNull(e),wp.endNull(e)}visitInt(t,e){return Sr.startInt(e),Sr.addBitWidth(e,t.bitWidth),Sr.addIsSigned(e,t.isSigned),Sr.endInt(e)}visitFloat(t,e){return yi.startFloatingPoint(e),yi.addPrecision(e,t.precision),yi.endFloatingPoint(e)}visitBinary(t,e){return yp.startBinary(e),yp.endBinary(e)}visitLargeBinary(t,e){return vp.startLargeBinary(e),vp.endLargeBinary(e)}visitBool(t,e){return gp.startBool(e),gp.endBool(e)}visitUtf8(t,e){return xp.startUtf8(e),xp.endUtf8(e)}visitLargeUtf8(t,e){return _p.startLargeUtf8(e),_p.endLargeUtf8(e)}visitDecimal(t,e){return Is.startDecimal(e),Is.addScale(e,t.scale),Is.addPrecision(e,t.precision),Is.addBitWidth(e,t.bitWidth),Is.endDecimal(e)}visitDate(t,e){return $a.startDate(e),$a.addUnit(e,t.unit),$a.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 gi.startInterval(e),gi.addUnit(e,t.unit),gi.endInterval(e)}visitDuration(t,e){return Va.startDuration(e),Va.addUnit(e,t.unit),Va.endDuration(e)}visitList(t,e){return bp.startList(e),bp.endList(e)}visitStruct(t,e){return Qn.startStruct_(e),Qn.endStruct_(e)}visitUnion(t,e){cr.startTypeIdsVector(e,t.typeIds.length);const i=cr.createTypeIdsVector(e,t.typeIds);return cr.startUnion(e),cr.addMode(e,t.mode),cr.addTypeIds(e,i),cr.endUnion(e)}visitDictionary(t,e){const i=this.visit(t.indices,e);return Vi.startDictionaryEncoding(e),Vi.addId(e,BigInt(t.id)),Vi.addIsOrdered(e,t.isOrdered),i!==void 0&&Vi.addIndexType(e,i),Vi.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return Ga.startFixedSizeBinary(e),Ga.addByteWidth(e,t.byteWidth),Ga.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return Wa.startFixedSizeList(e),Wa.addListSize(e,t.listSize),Wa.endFixedSizeList(e)}visitMap(t,e){return Ha.startMap(e),Ha.addKeysSorted(e,t.keysSorted),Ha.endMap(e)}}const Ju=new wO;function xO(r,t=new Map){return new Pe(TO(r,t),qa(r.metadata),t)}function g0(r){return new Pr(r.count,v0(r.columns),_0(r.columns))}function SO(r){return new Ii(g0(r.data),r.id,r.isDelta)}function TO(r,t){return(r.fields||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function Mp(r,t){return(r.children||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function v0(r){return(r||[]).reduce((t,e)=>[...t,new bn(e.count,IO(e.VALIDITY)),...v0(e.children)],[])}function _0(r,t=[]){for(let e=-1,i=(r||[]).length;++et+ +(e===0),0)}function EO(r,t){let e,i,n,s,o,a;return!t||!(s=r.dictionary)?(o=Rp(r,Mp(r,t)),n=new Ce(r.name,o,r.nullable,qa(r.metadata))):t.has(e=s.id)?(i=(i=s.indexType)?Dp(i):new Jo,a=new eo(t.get(e),i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,qa(r.metadata))):(i=(i=s.indexType)?Dp(i):new Jo,t.set(e,o=Rp(r,Mp(r,t))),a=new eo(o,i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,qa(r.metadata))),n||null}function qa(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function Dp(r){return new os(r.isSigned,r.bitWidth)}function Rp(r,t){const e=r.type.name;switch(e){case"NONE":return new yn;case"null":return new yn;case"binary":return new dl;case"largebinary":return new pl;case"utf8":return new ml;case"largeutf8":return new yl;case"bool":return new gl;case"list":return new Tl((t||[])[0]);case"struct":return new sr(t||[]);case"struct_":return new sr(t||[])}switch(e){case"int":{const i=r.type;return new os(i.isSigned,i.bitWidth)}case"floatingpoint":{const i=r.type;return new fl(tr[i.precision])}case"decimal":{const i=r.type;return new vl(i.scale,i.precision,i.bitWidth)}case"date":{const i=r.type;return new _l(Yr[i.unit])}case"time":{const i=r.type;return new bl(Vt[i.unit],i.bitWidth)}case"timestamp":{const i=r.type;return new wl(Vt[i.unit],i.timezone)}case"interval":{const i=r.type;return new xl(Ti[i.unit])}case"duration":{const i=r.type;return new Sl(Vt[i.unit])}case"union":{const i=r.type,[n,...s]=(i.mode+"").toLowerCase(),o=n.toUpperCase()+s.join("");return new Il(er[o],i.typeIds||[],t||[])}case"fixedsizebinary":{const i=r.type;return new El(i.byteWidth)}case"fixedsizelist":{const i=r.type;return new Cl(i.listSize,(t||[])[0])}case"map":{const i=r.type;return new Al((t||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var CO=Dv,AO=Js;class or{static fromJSON(t,e){const i=new or(0,ke.V5,e);return i._createHeader=OO(t,e),i}static decode(t){t=new AO(le(t));const e=rn.getRootAsMessage(t),i=e.bodyLength(),n=e.version(),s=e.headerType(),o=new or(i,n,s);return o._createHeader=FO(e,s),o}static encode(t){const e=new CO;let i=-1;return t.isSchema()?i=Pe.encode(e,t.header()):t.isRecordBatch()?i=Pr.encode(e,t.header()):t.isDictionaryBatch()&&(i=Ii.encode(e,t.header())),rn.startMessage(e),rn.addVersion(e,ke.V5),rn.addHeader(e,i),rn.addHeaderType(e,t.headerType),rn.addBodyLength(e,BigInt(t.bodyLength)),rn.finishMessageBuffer(e,rn.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 Pr)return new or(e,ke.V5,fe.RecordBatch,t);if(t instanceof Ii)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 Pr{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 Ii{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 _i{constructor(t,e){this.offset=we(t),this.length=we(e)}}class bn{constructor(t,e){this.length=we(t),this.nullCount=we(e)}}function OO(r,t){return()=>{switch(t){case fe.Schema:return Pe.fromJSON(r);case fe.RecordBatch:return Pr.fromJSON(r);case fe.DictionaryBatch:return Ii.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}function FO(r,t){return()=>{switch(t){case fe.Schema:return Pe.decode(r.header(new ci),new Map,r.version());case fe.RecordBatch:return Pr.decode(r.header(new ki),r.version());case fe.DictionaryBatch:return Ii.decode(r.header(new Ss),r.version())}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}Ce.encode=jO;Ce.decode=UO;Ce.fromJSON=EO;Pe.encode=zO;Pe.decode=PO;Pe.fromJSON=xO;Pr.encode=$O;Pr.decode=MO;Pr.fromJSON=g0;Ii.encode=VO;Ii.decode=DO;Ii.fromJSON=SO;bn.encode=GO;bn.decode=NO;_i.encode=WO;_i.decode=RO;function PO(r,t=new Map,e=ke.V5){const i=kO(r,t);return new Pe(i,Qa(r),t,e)}function MO(r,t=ke.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Pr(r.length(),LO(r),BO(r,t))}function DO(r,t=ke.V5){return new Ii(Pr.decode(r.data(),t),r.id(),r.isDelta())}function RO(r){return new _i(r.offset(),r.length())}function NO(r){return new bn(r.length(),r.nullCount())}function LO(r){const t=[];for(let e,i=-1,n=-1,s=r.nodesLength();++iCe.encode(r,s));ci.startFieldsVector(r,e.length);const i=ci.createFieldsVector(r,e),n=t.metadata&&t.metadata.size>0?ci.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 ci.startSchema(r),ci.addFields(r,i),ci.addEndianness(r,HO?to.Little:to.Big),n!==-1&&ci.addCustomMetadata(r,n),ci.endSchema(r)}function jO(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=Ju.visit(s,r),i=Ju.visit(s.dictionary,r)):i=Ju.visit(s,r);const a=(s.children||[]).map(c=>Ce.encode(r,c)),l=Lr.createChildrenVector(r,a),u=t.metadata&&t.metadata.size>0?Lr.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)),Lr.startField(r),Lr.addType(r,i),Lr.addTypeType(r,o),Lr.addChildren(r,l),Lr.addNullable(r,!!t.nullable),e!==-1&&Lr.addName(r,e),n!==-1&&Lr.addDictionary(r,n),u!==-1&&Lr.addCustomMetadata(r,u),Lr.endField(r)}function $O(r,t){const e=t.nodes||[],i=t.buffers||[];ki.startNodesVector(r,e.length);for(const o of e.slice().reverse())bn.encode(r,o);const n=r.endVector();ki.startBuffersVector(r,i.length);for(const o of i.slice().reverse())_i.encode(r,o);const s=r.endVector();return ki.startRecordBatch(r),ki.addLength(r,BigInt(t.length)),ki.addNodes(r,n),ki.addBuffers(r,s),ki.endRecordBatch(r)}function VO(r,t){const e=Pr.encode(r,t.data);return Ss.startDictionaryBatch(r),Ss.addId(r,BigInt(t.id)),Ss.addIsDelta(r,t.isDelta),Ss.addData(r,e),Ss.endDictionaryBatch(r)}function GO(r,t){return Lv.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function WO(r,t){return Nv.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const HO=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),xf=r=>`Expected ${fe[r]} Message in stream, but was null or length 0.`,Sf=r=>`Header pointer of flatbuffer-encoded ${fe[r]} Message is null or length 0.`,b0=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,w0=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`;class x0{constructor(t){this.source=t instanceof Dl?t:new Dl(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(xf(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=le(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(xf(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(Sf(t));return i}}const su=4,gh="ARROW1",ea=new Uint8Array(gh.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:sh(t)?JO(t):Cv(t)?r2(t):ss(t)?Zt(this,void 0,void 0,function*(){return yield Vr.from(yield t)}):Av(t)||of(t)||Ov(t)||ao(t)?e2(new ro(t)):t2(new Dl(t))}static readAll(t){return t instanceof Vr?t.isSync()?kp(t):Up(t):sh(t)||ArrayBuffer.isView(t)||ua(t)||Ev(t)?kp(t):Up(t)}}class Nl extends Vr{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return fr(this,arguments,function*(){yield Nt(yield*is(wi(this[Symbol.iterator]())))})}}class Ll 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=wi(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 T0 extends Nl{constructor(t){super(t),this._impl=t}}class QO extends Ll{constructor(t){super(t),this._impl=t}}class I0{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 hr(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 d0(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(i)}}class Bl extends I0{constructor(t,e){super(e),this._reader=sh(t)?new XO(this._handle=t):new x0(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=C0(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 wf(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class kl extends I0{constructor(t,e){super(e),this._reader=new YO(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=C0(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 wf(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class E0 extends Bl{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 Fp?t:new Fp(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-S0,i=t.readInt32(e),n=t.readAt(e-i,i);return ta.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-S0,i=yield t.readInt32(e),n=yield t.readAt(e-i,i);return ta.decode(n)})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?Tf(t)?new T0(new E0(r.read())):new Nl(new Bl(r)):new Nl(new Bl(function*(){}()))}function e2(r){return Zt(this,void 0,void 0,function*(){const t=yield r.peek(da+7&-8);return t&&t.byteLength>=4?Tf(t)?new T0(new E0(yield r.read())):new Ll(new kl(r)):new Ll(new kl(function(){return fr(this,arguments,function*(){})}()))})}function r2(r){return Zt(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new Rl(r,t);return t>=qO&&Tf(yield e.readAt(0,da+7&-8))?new QO(new KO(e)):new Ll(new kl(e))})}class Ne extends ie{static assemble(...t){const e=n=>n.flatMap(s=>Array.isArray(s)?e(s):s instanceof hr?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 bn(i,0));else{const{nullCount:n}=t;At.isNull(e)||ei.call(this,n<=0?new Uint8Array(0):Ol(t.offset,i,t.nullBitmap)),this.nodes.push(new bn(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 ei(r){const t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new _i(this._byteLength,t)),this._byteLength+=t,this}function i2(r){var t;const{type:e,length:i,typeIds:n,valueOffsets:s}=r;if(ei.call(this,n),e.mode===er.Sparse)return vh.call(this,r);if(e.mode===er.Dense){if(r.offset<=0)return ei.call(this,s),vh.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 n2(r){let t;return r.nullCount>=r.length?ei.call(this,new Uint8Array(0)):(t=r.values)instanceof Uint8Array?ei.call(this,Ol(r.offset,r.length,t)):ei.call(this,Fl(r.values))}function qi(r){return ei.call(this,r.values.subarray(0,r.length*r.stride))}function ou(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 ei.call(this,Pv(-n,t+1,i)),ei.call(this,e.subarray(n,n+o)),this}function If(r){const{length:t,valueOffsets:e}=r;if(e){const{[0]:i,[t]:n}=e;return ei.call(this,Pv(-i,t+1,e)),this.visit(r.children[0].slice(i,n-i))}return this.visit(r.children[0])}function vh(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}Ne.prototype.visitBool=n2;Ne.prototype.visitInt=qi;Ne.prototype.visitFloat=qi;Ne.prototype.visitUtf8=ou;Ne.prototype.visitLargeUtf8=ou;Ne.prototype.visitBinary=ou;Ne.prototype.visitLargeBinary=ou;Ne.prototype.visitFixedSizeBinary=qi;Ne.prototype.visitDate=qi;Ne.prototype.visitTimestamp=qi;Ne.prototype.visitTime=qi;Ne.prototype.visitDecimal=qi;Ne.prototype.visitList=If;Ne.prototype.visitStruct=vh;Ne.prototype.visitUnion=i2;Ne.prototype.visitInterval=qi;Ne.prototype.visitDuration=qi;Ne.prototype.visitFixedSizeList=If;Ne.prototype.visitMap=If;class A0 extends yf{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 Xa,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 ss(t)?t.then(e=>this.writeAll(e)):ao(t)?Of(this,t):Af(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 Xa?this._sink=t:(this._sink=new Xa,t&&DC(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&RC(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||!yh(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 _n&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof hr&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!yh(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof hr?t instanceof wf||this._writeRecordBatch(t):t instanceof _n?this.writeAll(t.batches):ua(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 gn(a,t.bodyLength,this._position)):t.headerType===fe.DictionaryBatch&&this._dictionaryBlocks.push(new gn(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=le(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(ea)}_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 Pr(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 Pr(t.length,s,o),u=new Ii(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)):ao(t)?Of(i,t):Af(i,t)}}class Cf extends A0{static writeAll(t){const e=new Cf;return ss(t)?t.then(i=>e.writeAll(i)):ao(t)?Of(e,t):Af(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=ta.encode(new ta(t,ke.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}function Af(r,t){let e=t;t instanceof _n&&(e=t.batches,r.reset(void 0,t.schema));for(const i of e)r.write(i);return r.finish()}function Of(r,t){return Zt(this,void 0,void 0,function*(){var e,i,n,s,o,a,l;try{for(e=!0,i=wi(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 s2(r,t="stream"){return(t==="stream"?Ef:Cf).writeAll(r).toUint8Array(!0)}var o2=Object.create,O0=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,l2=Object.getOwnPropertyNames,u2=Object.getPrototypeOf,c2=Object.prototype.hasOwnProperty,h2=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),f2=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l2(t))!c2.call(r,n)&&n!==e&&O0(r,n,{get:()=>t[n],enumerable:!(i=a2(t,n))||i.enumerable});return r},d2=(r,t,e)=>(e=r!=null?o2(u2(r)):{},f2(!r||!r.__esModule?O0(e,"default",{value:r,enumerable:!0}):e,r)),p2=h2((r,t)=>{t.exports=Worker}),F0=(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))(F0||{}),m2=(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))(m2||{}),y2=(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))(y2||{}),g2=(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))(g2||{}),v2=(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))(v2||{}),_2=(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))(_2||{}),b2=class{log(r){}},P0=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},w2=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(w2||{}),x2=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 _n(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 M0(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 S2(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=s2(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)}},M0=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}},S2=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 _n(e)}async send(...r){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),e=new M0(this.bindings,this.connectionId,t),i=await Vr.from(e);return console.assert(i.isAsync()),console.assert(i.isStream()),i}},T2=(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))(T2||{}),I2=(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))(I2||{}),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 Ka(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:Ka(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=>_h(t.name,t.type))};case L.Map:{let t=r;return{sqlType:"map",keyType:Ka(t.keyType),valueType:Ka(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 _h(r,t){let e=Ka(t);return e.name=r,e}var E2=new TextEncoder,C2=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 x2(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=E2.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(_h(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(_h(s,o))}e.columnsFlat=n,delete e.columns}let i=new ue("IMPORT_JSON_FROM_PATH",[r,t,e]);await this.postTask(i)}};function A2(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}A2();var O2=(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))(O2||{}),F2=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])),P2=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])),M2=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])),D2=()=>(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])),R2={version:"1.29.1-dev68.0"},Ff=R2.version.split(".");Ff[0];Ff[1];Ff[2];var N2=()=>typeof navigator>"u",tc=null,ec=null,rc=null,ic=null,nc=null;async function L2(){return tc==null&&(tc=typeof BigInt64Array<"u"),ec==null&&(ec=await P2()),rc==null&&(rc=await D2()),ic==null&&(ic=await M2()),nc==null&&(nc=await F2()),{bigInt64Array:tc,crossOriginIsolated:N2()||globalThis.crossOriginIsolated||!1,wasmExceptions:ec,wasmSIMD:ic,wasmThreads:rc,wasmBulkMemory:nc}}async function zp(r){let t=await L2();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}}d2(p2());const sc={},No={};function Uo(r,t){try{const i=(sc[r]||(sc[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return i in No?No[i]:jp(i,i.split(":"))}catch{if(r in No)return No[r];const e=r==null?void 0:r.match(B2);return e?jp(r,e.slice(1)):NaN}}const B2=/([+-]\d\d):?(\d\d)?/;function jp(r,t){const e=+t[0],i=+(t[1]||0);return No[r]=e>0?e*60+i:e*60-i}class Cr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Uo(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)),D0(this),bh(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Cr(...e,t):new Cr(Date.now(),t)}withTimeZone(t){return new Cr(+this,t)}getTimezoneOffset(){return-Uo(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),bh(this),+this}[Symbol.for("constructDateFrom")](t){return new Cr(+new Date(t),this.timeZone)}}const $p=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!$p.test(r))return;const t=r.replace($p,"$1UTC");Cr.prototype[t]&&(r.startsWith("get")?Cr.prototype[r]=function(){return this.internal[t]()}:(Cr.prototype[r]=function(){return Date.prototype[t].apply(this.internal,arguments),k2(this),+this},Cr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),bh(this),+this}))});function bh(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function k2(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()),D0(r)}function D0(r){const t=Uo(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=Uo(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=Uo(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 U2=new TextDecoder("utf-8"),z2=r=>U2.decode(r),j2=new TextEncoder,R0=r=>j2.encode(r),fi=r=>typeof r=="function",pa=r=>r!=null&&Object(r)===r,$2=r=>pa(r)&&fi(r.then),N0=r=>pa(r)&&fi(r[Symbol.iterator]),V2=r=>pa(r)&&fi(r[Symbol.asyncIterator]),G2=r=>pa(r)&&"done"in r&&"value"in r,W2=r=>pa(r)&&fi(r.clear)&&fi(r.bytes)&&fi(r.position)&&fi(r.setPosition)&&fi(r.capacity)&&fi(r.getBufferIdentifier)&&fi(r.createLong),Pf=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function H2(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),q2=r=>rr(Int16Array,r),Q2=r=>rr(Int32Array,r),K2=r=>rr(BigInt64Array,r),Z2=r=>rr(Uint8Array,r),J2=r=>rr(Uint16Array,r),tF=r=>rr(Uint32Array,r),eF=r=>rr(BigUint64Array,r),rF=r=>rr(Float32Array,r),iF=r=>rr(Float64Array,r),nF=r=>rr(Uint8ClampedArray,r),xh=r=>(r.next(),r);function*Fi(r,t){const e=function*(n){yield n},i=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Pf?e(t):N0(t)?t:e(t);return yield*xh(function*(n){let s=null;do s=n.next(yield rr(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}const sF=r=>Fi(Int8Array,r),oF=r=>Fi(Int16Array,r),aF=r=>Fi(Int32Array,r),lF=r=>Fi(Uint8Array,r),uF=r=>Fi(Uint16Array,r),cF=r=>Fi(Uint32Array,r),hF=r=>Fi(Float32Array,r),fF=r=>Fi(Float64Array,r),dF=r=>Fi(Uint8ClampedArray,r);function ni(r,t){return fr(this,arguments,function*(){if($2(t))return yield Nt(yield Nt(yield*is(wi(ni(r,yield Nt(t))))));const i=function(o){return fr(this,arguments,function*(){yield yield Nt(yield Nt(o))})},n=function(o){return fr(this,arguments,function*(){yield Nt(yield*is(wi(xh(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 Pf?i(t):N0(t)?n(t):V2(t)?t:i(t);return yield Nt(yield*is(wi(xh(function(o){return fr(this,arguments,function*(){let a=null;do a=yield Nt(o.next(yield yield Nt(rr(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Nt(new r)})}const pF=r=>ni(Int8Array,r),mF=r=>ni(Int16Array,r),yF=r=>ni(Int32Array,r),gF=r=>ni(Uint8Array,r),vF=r=>ni(Uint16Array,r),_F=r=>ni(Uint32Array,r),bF=r=>ni(Float32Array,r),wF=r=>ni(Float64Array,r),xF=r=>ni(Uint8ClampedArray,r);function SF(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(++eno(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}const EF=Object.freeze(Object.defineProperty({__proto__:null,valueToString:no},Symbol.toStringTag,{value:"Module"}));function Or(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 B0(r,t){return Or(r/t)+Or(r%t)/Or(t)}const k0=Symbol.for("isArrowBigNum");function si(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)}si.prototype[k0]=!0;si.prototype.toJSON=function(){return`"${so(this)}"`};si.prototype.valueOf=function(r){return Mf(this,r)};si.prototype.toString=function(){return so(this)};si.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Mf(this);case"string":return so(this);case"default":return U0(this)}return so(this)};function Hs(...r){return si.apply(this,r)}function Ys(...r){return si.apply(this,r)}function ra(...r){return si.apply(this,r)}Object.setPrototypeOf(Hs.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Ys.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(ra.prototype,Object.create(Uint32Array.prototype));Object.assign(Hs.prototype,si.prototype,{constructor:Hs,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Ys.prototype,si.prototype,{constructor:Ys,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(ra.prototype,si.prototype,{constructor:ra,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const CF=BigInt(4294967296)*BigInt(4294967296),AF=CF-BigInt(1);function Mf(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){const c=BigInt("1".padEnd(t+1,"0")),h=l/c,p=a?-(l%c):l%c,f=Or(h),y=`${p}`.padStart(t,"0");return+`${a&&f===0?"-":""}${f}.${y}`}return Or(l)}function so(r){if(r.byteLength===8)return`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`;if(!r.signed)return oc(r);let t=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2);if(new Int16Array([t.at(-1)])[0]>=0)return oc(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 Vp extends Et{constructor(){super(W.Null)}toString(){return"Null"}}j0=Symbol.toStringTag;Vp[j0]=(r=>r[Symbol.toStringTag]="Null")(Vp.prototype);class Gp 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}`}}$0=Symbol.toStringTag;Gp[$0]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Gp.prototype);class Wp extends Et{constructor(t){super(W.Float),this.precision=t}get ArrayType(){switch(this.precision){case Ar.HALF:return Uint16Array;case Ar.SINGLE:return Float32Array;case Ar.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}V0=Symbol.toStringTag;Wp[V0]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Wp.prototype);class Hp extends Et{constructor(){super(W.Binary)}toString(){return"Binary"}}G0=Symbol.toStringTag;Hp[G0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Hp.prototype);class Yp extends Et{constructor(){super(W.LargeBinary)}toString(){return"LargeBinary"}}W0=Symbol.toStringTag;Yp[W0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(Yp.prototype);class Xp extends Et{constructor(){super(W.Utf8)}toString(){return"Utf8"}}H0=Symbol.toStringTag;Xp[H0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Xp.prototype);class qp extends Et{constructor(){super(W.LargeUtf8)}toString(){return"LargeUtf8"}}Y0=Symbol.toStringTag;qp[Y0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(qp.prototype);class Qp extends Et{constructor(){super(W.Bool)}toString(){return"Bool"}}X0=Symbol.toStringTag;Qp[X0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Qp.prototype);class Kp 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}]`}}q0=Symbol.toStringTag;Kp[q0]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(Kp.prototype);class Zp extends Et{constructor(t){super(W.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${wn[this.unit]}>`}get ArrayType(){return this.unit===wn.DAY?Int32Array:BigInt64Array}}Q0=Symbol.toStringTag;Zp[Q0]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(Zp.prototype);class Jp 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`)}}K0=Symbol.toStringTag;Jp[K0]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(Jp.prototype);class tm extends Et{constructor(t,e){super(W.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${Jt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}Z0=Symbol.toStringTag;tm[Z0]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(tm.prototype);class em extends Et{constructor(t){super(W.Interval),this.unit=t}toString(){return`Interval<${Gr[this.unit]}>`}}J0=Symbol.toStringTag;em[J0]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(em.prototype);class rm extends Et{constructor(t){super(W.Duration),this.unit=t}toString(){return`Duration<${Jt[this.unit]}>`}}tb=Symbol.toStringTag;rm[tb]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(rm.prototype);class im 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}}eb=Symbol.toStringTag;im[eb]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(im.prototype);class Sh extends Et{constructor(t){super(W.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}rb=Symbol.toStringTag;Sh[rb]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(Sh.prototype);class nm 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(" | ")}>`}}ib=Symbol.toStringTag;nm[ib]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(nm.prototype);class sm extends Et{constructor(t){super(W.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}nb=Symbol.toStringTag;sm[nb]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(sm.prototype);class om 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}>`}}sb=Symbol.toStringTag;om[sb]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(om.prototype);class am 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(", ")}}>`}}ob=Symbol.toStringTag;am[ob]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(am.prototype);const FF=(r=>()=>++r)(-1);class lm extends Et{constructor(t,e,i,n){super(W.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=n||!1,this.id=i==null?FF():Or(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}>`}}ab=Symbol.toStringTag;lm[ab]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(lm.prototype);function lb(r){const t=r;switch(r.typeId){case W.Decimal:return r.bitWidth/32;case W.Interval:return t.unit===Gr.MONTH_DAY_NANO?4:1+t.unit;case W.FixedSizeList:return t.listSize;case W.FixedSizeBinary:return t.byteWidth;default:return 1}}class ae{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 PF(this,t,e)}getVisitFnByTypeId(t,e=!0){return Ds(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 PF(r,t,e=!0){return typeof t=="number"?Ds(r,t,e):typeof t=="string"&&t in W?Ds(r,W[t],e):t&&t instanceof Et?Ds(r,um(t),e):t!=null&&t.type&&t.type instanceof Et?Ds(r,um(t.type),e):Ds(r,W.NONE,e)}function Ds(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.IntervalMonthDayNano:i=r.visitIntervalMonthDayNano||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 um(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 Ar.HALF:return W.Float16;case Ar.SINGLE:return W.Float32;case Ar.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 wn.DAY:return W.DateDay;case wn.MILLISECOND:return W.DateMillisecond}return W.Date;case W.Interval:switch(r.unit){case Gr.DAY_TIME:return W.IntervalDayTime;case Gr.YEAR_MONTH:return W.IntervalYearMonth;case Gr.MONTH_DAY_NANO:return W.IntervalMonthDayNano}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 Ei.Dense:return W.DenseUnion;case Ei.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]}'`)}ae.prototype.visitInt8=null;ae.prototype.visitInt16=null;ae.prototype.visitInt32=null;ae.prototype.visitInt64=null;ae.prototype.visitUint8=null;ae.prototype.visitUint16=null;ae.prototype.visitUint32=null;ae.prototype.visitUint64=null;ae.prototype.visitFloat16=null;ae.prototype.visitFloat32=null;ae.prototype.visitFloat64=null;ae.prototype.visitDateDay=null;ae.prototype.visitDateMillisecond=null;ae.prototype.visitTimestampSecond=null;ae.prototype.visitTimestampMillisecond=null;ae.prototype.visitTimestampMicrosecond=null;ae.prototype.visitTimestampNanosecond=null;ae.prototype.visitTimeSecond=null;ae.prototype.visitTimeMillisecond=null;ae.prototype.visitTimeMicrosecond=null;ae.prototype.visitTimeNanosecond=null;ae.prototype.visitDenseUnion=null;ae.prototype.visitSparseUnion=null;ae.prototype.visitIntervalDayTime=null;ae.prototype.visitIntervalYearMonth=null;ae.prototype.visitIntervalMonthDayNano=null;ae.prototype.visitDuration=null;ae.prototype.visitDurationSecond=null;ae.prototype.visitDurationMillisecond=null;ae.prototype.visitDurationMicrosecond=null;ae.prototype.visitDurationNanosecond=null;const ub=new Float64Array(1),bs=new Uint32Array(ub.buffer);function Df(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 cb(r){if(r!==r)return 32256;ub[0]=r;const t=(bs[1]&2147483648)>>16&65535;let e=bs[1]&2146435072,i=0;return e>=1089470464?bs[0]>0?e=31744:(e=(e&2080374784)>>16,i=(bs[1]&1048575)>>10):e<=1056964608?(i=1048576+(bs[1]&1048575),i=1048576+(i<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,i=(bs[1]&1048575)+512>>10),t|e|i&65535}const MF=Object.freeze(Object.defineProperty({__proto__:null,float64ToUint16:cb,uint16ToFloat64:Df},Symbol.toStringTag,{value:"Module"}));class zt extends ae{}function Yt(r){return(t,e,i)=>{if(t.setValid(e,i!=null))return r(t,e,i)}}const DF=(r,t,e)=>{r[t]=Math.floor(e/864e5)},hb=(r,t,e,i)=>{if(e+1{const n=r+e;i?t[n>>3]|=1<>3]&=~(1<{r[t]=e},Rf=({values:r},t,e)=>{r[t]=e},fb=({values:r},t,e)=>{r[t]=cb(e)},NF=(r,t,e)=>{switch(r.type.precision){case Ar.HALF:return fb(r,t,e);case Ar.SINGLE:case Ar.DOUBLE:return Rf(r,t,e)}},db=({values:r},t,e)=>{DF(r,t,e.valueOf())},pb=({values:r},t,e)=>{r[t]=BigInt(e)},LF=({stride:r,values:t},e,i)=>{t.set(i.subarray(0,r),r*e)},mb=({values:r,valueOffsets:t},e,i)=>hb(r,t,e,i),yb=({values:r,valueOffsets:t},e,i)=>hb(r,t,e,R0(i)),BF=(r,t,e)=>{r.type.unit===wn.DAY?db(r,t,e):pb(r,t,e)},gb=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},vb=({values:r},t,e)=>{r[t]=BigInt(e)},_b=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},bb=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},kF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return gb(r,t,e);case Jt.MILLISECOND:return vb(r,t,e);case Jt.MICROSECOND:return _b(r,t,e);case Jt.NANOSECOND:return bb(r,t,e)}},wb=({values:r},t,e)=>{r[t]=e},xb=({values:r},t,e)=>{r[t]=e},Sb=({values:r},t,e)=>{r[t]=e},Tb=({values:r},t,e)=>{r[t]=e},UF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return wb(r,t,e);case Jt.MILLISECOND:return xb(r,t,e);case Jt.MICROSECOND:return Sb(r,t,e);case Jt.NANOSECOND:return Tb(r,t,e)}},zF=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},jF=(r,t,e)=>{const i=r.children[0],n=r.valueOffsets,s=Ci.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=Ci.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},VF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[s]),GF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(s)),WF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(n.name)),HF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[n.name]),YF=(r,t,e)=>{const i=r.type.children.map(s=>Ci.getVisitFn(s.type)),n=e instanceof Map?WF(t,e):e instanceof Qe?GF(t,e):Array.isArray(e)?VF(t,e):HF(t,e);r.type.children.forEach((s,o)=>n(i[o],r.children[o],s,o))},XF=(r,t,e)=>{r.type.mode===Ei.Dense?Ib(r,t,e):Eb(r,t,e)},Ib=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ci.visit(n,r.valueOffsets[t],e)},Eb=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ci.visit(n,t,e)},qF=(r,t,e)=>{var i;(i=r.dictionary)===null||i===void 0||i.set(r.values[t],e)},QF=(r,t,e)=>{switch(r.type.unit){case Gr.YEAR_MONTH:return Ab(r,t,e);case Gr.DAY_TIME:return Cb(r,t,e);case Gr.MONTH_DAY_NANO:return Ob(r,t,e)}},Cb=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},Ab=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},Ob=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},Fb=({values:r},t,e)=>{r[t]=e},Pb=({values:r},t,e)=>{r[t]=e},Mb=({values:r},t,e)=>{r[t]=e},Db=({values:r},t,e)=>{r[t]=e},KF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return Fb(r,t,e);case Jt.MILLISECOND:return Pb(r,t,e);case Jt.MICROSECOND:return Mb(r,t,e);case Jt.NANOSECOND:return Db(r,t,e)}},ZF=(r,t,e)=>{const{stride:i}=r,n=r.children[0],s=Ci.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=t*i;++o`${no(t)}: ${no(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new JF(this[Jr],this[Xs])}}class JF{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[Jr].type.children.some(i=>i.name===e)}getOwnPropertyDescriptor(t,e){if(t[Jr].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[Jr].type.children.findIndex(n=>n.name===e);if(i!==-1){const n=qr.visit(t[Jr].children[i],t[Xs]);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Jr].type.children.findIndex(s=>s.name===e);return n!==-1?(Ci.visit(t[Jr].children[n],t[Xs],i),Reflect.set(t,e,i)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,i):!1}}const eP=new tP;class Pt extends ae{}function jt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const rP=(r,t)=>864e5*r[t],iP=(r,t)=>null,Rb=(r,t,e)=>{if(e+1>=t.length)return null;const i=Or(t[e]),n=Or(t[e+1]);return r.subarray(i,n)},nP=({offset:r,values:t},e)=>{const i=r+e;return(t[i>>3]&1<rP(r,t),Lb=({values:r},t)=>Or(r[t]),Tn=({stride:r,values:t},e)=>t[r*e],sP=({stride:r,values:t},e)=>Df(t[r*e]),Bb=({values:r},t)=>r[t],oP=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),kb=({values:r,valueOffsets:t},e)=>Rb(r,t,e),Ub=({values:r,valueOffsets:t},e)=>{const i=Rb(r,t,e);return i!==null?z2(i):null},aP=({values:r},t)=>r[t],lP=({type:r,values:t},e)=>r.precision!==Ar.HALF?t[e]:Df(t[e]),uP=(r,t)=>r.type.unit===wn.DAY?Nb(r,t):Lb(r,t),zb=({values:r},t)=>1e3*Or(r[t]),jb=({values:r},t)=>Or(r[t]),$b=({values:r},t)=>B0(r[t],BigInt(1e3)),Vb=({values:r},t)=>B0(r[t],BigInt(1e6)),cP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return zb(r,t);case Jt.MILLISECOND:return jb(r,t);case Jt.MICROSECOND:return $b(r,t);case Jt.NANOSECOND:return Vb(r,t)}},Gb=({values:r},t)=>r[t],Wb=({values:r},t)=>r[t],Hb=({values:r},t)=>r[t],Yb=({values:r},t)=>r[t],hP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Gb(r,t);case Jt.MILLISECOND:return Wb(r,t);case Jt.MICROSECOND:return Hb(r,t);case Jt.NANOSECOND:return Yb(r,t)}},fP=({values:r,stride:t},e)=>au.decimal(r.subarray(t*e,t*(e+1))),dP=(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])},pP=(r,t)=>{const{valueOffsets:e,children:i}=r,{[t]:n,[t+1]:s}=e,o=i[0];return new Lf(o.slice(n,s-n))},mP=(r,t)=>new Nf(r,t),yP=(r,t)=>r.type.mode===Ei.Dense?Xb(r,t):qb(r,t),Xb=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return qr.visit(i,r.valueOffsets[t])},qb=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return qr.visit(i,t)},gP=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},vP=(r,t)=>r.type.unit===Gr.MONTH_DAY_NANO?Zb(r,t):r.type.unit===Gr.DAY_TIME?Qb(r,t):Kb(r,t),Qb=({values:r},t)=>r.subarray(2*t,2*(t+1)),Kb=({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},Zb=({values:r},t)=>r.subarray(4*t,4*(t+1)),Jb=({values:r},t)=>r[t],tw=({values:r},t)=>r[t],ew=({values:r},t)=>r[t],rw=({values:r},t)=>r[t],_P=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Jb(r,t);case Jt.MILLISECOND:return tw(r,t);case Jt.MICROSECOND:return ew(r,t);case Jt.NANOSECOND:return rw(r,t)}},bP=(r,t)=>{const{stride:e,children:i}=r,s=i[0].slice(t*e,e);return new Qe([s])};Pt.prototype.visitNull=jt(iP);Pt.prototype.visitBool=jt(nP);Pt.prototype.visitInt=jt(aP);Pt.prototype.visitInt8=jt(Tn);Pt.prototype.visitInt16=jt(Tn);Pt.prototype.visitInt32=jt(Tn);Pt.prototype.visitInt64=jt(Bb);Pt.prototype.visitUint8=jt(Tn);Pt.prototype.visitUint16=jt(Tn);Pt.prototype.visitUint32=jt(Tn);Pt.prototype.visitUint64=jt(Bb);Pt.prototype.visitFloat=jt(lP);Pt.prototype.visitFloat16=jt(sP);Pt.prototype.visitFloat32=jt(Tn);Pt.prototype.visitFloat64=jt(Tn);Pt.prototype.visitUtf8=jt(Ub);Pt.prototype.visitLargeUtf8=jt(Ub);Pt.prototype.visitBinary=jt(kb);Pt.prototype.visitLargeBinary=jt(kb);Pt.prototype.visitFixedSizeBinary=jt(oP);Pt.prototype.visitDate=jt(uP);Pt.prototype.visitDateDay=jt(Nb);Pt.prototype.visitDateMillisecond=jt(Lb);Pt.prototype.visitTimestamp=jt(cP);Pt.prototype.visitTimestampSecond=jt(zb);Pt.prototype.visitTimestampMillisecond=jt(jb);Pt.prototype.visitTimestampMicrosecond=jt($b);Pt.prototype.visitTimestampNanosecond=jt(Vb);Pt.prototype.visitTime=jt(hP);Pt.prototype.visitTimeSecond=jt(Gb);Pt.prototype.visitTimeMillisecond=jt(Wb);Pt.prototype.visitTimeMicrosecond=jt(Hb);Pt.prototype.visitTimeNanosecond=jt(Yb);Pt.prototype.visitDecimal=jt(fP);Pt.prototype.visitList=jt(dP);Pt.prototype.visitStruct=jt(mP);Pt.prototype.visitUnion=jt(yP);Pt.prototype.visitDenseUnion=jt(Xb);Pt.prototype.visitSparseUnion=jt(qb);Pt.prototype.visitDictionary=jt(gP);Pt.prototype.visitInterval=jt(vP);Pt.prototype.visitIntervalDayTime=jt(Qb);Pt.prototype.visitIntervalYearMonth=jt(Kb);Pt.prototype.visitIntervalMonthDayNano=jt(Zb);Pt.prototype.visitDuration=jt(_P);Pt.prototype.visitDurationSecond=jt(Jb);Pt.prototype.visitDurationMillisecond=jt(tw);Pt.prototype.visitDurationMicrosecond=jt(ew);Pt.prototype.visitDurationNanosecond=jt(rw);Pt.prototype.visitFixedSizeList=jt(bP);Pt.prototype.visitMap=jt(pP);const qr=new Pt,Rs=Symbol.for("keys"),qs=Symbol.for("vals"),Ns=Symbol.for("kKeysAsStrings"),Th=Symbol.for("_kKeysAsStrings");class Lf{constructor(t){return this[Rs]=new Qe([t.children[0]]).memoize(),this[qs]=t.children[1],new Proxy(this,new xP)}get[Ns](){return this[Th]||(this[Th]=Array.from(this[Rs].toArray(),String))}[Symbol.iterator](){return new wP(this[Rs],this[qs])}get size(){return this[Rs].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Rs],e=this[qs],i={};for(let n=-1,s=t.length;++n`${no(t)}: ${no(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class wP{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),qr.visit(this.vals,t)]})}}class xP{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Ns]}has(t,e){return t[Ns].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Ns].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Ns].indexOf(e);if(i!==-1){const n=qr.visit(Reflect.get(t,qs),i);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Ns].indexOf(e);return n!==-1?(Ci.visit(Reflect.get(t,qs),n,i),Reflect.set(t,e,i)):Reflect.has(t,e)?Reflect.set(t,e,i):!1}}Object.defineProperties(Lf.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Rs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[qs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Th]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let cm;function iw(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 nw=(r,t)=>r<0?t+r:r,hm=r=>r!==r;function fs(r){if(typeof r!=="object"||r===null)return hm(r)?hm: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?L0(r,e):!1:r instanceof Map?TP(r):Array.isArray(r)?SP(r):r instanceof Qe?IP(r):EP(r,!0)}function SP(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 CP(r,e);case Map:return fm(r,e,e.keys());case Lf:case Nf:case Object:case void 0:return fm(r,e,t||Object.keys(e))}return e instanceof Qe?AP(r,e):!1}}function CP(r,t){const e=r.length;if(t.length!==e)return!1;for(let i=-1;++i>i}function FP(r,t,e){return e?!!(r[t>>3]|=1<>3]&=~(1<0||e.byteLength>3):ow(new uu(e,r,t,null,Bf)).subarray(0,i)),n}return e}function ow(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 uu{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 Ul(r,t,n)+Ul(r,i,e)+aw(r,n>>3,i-n>>3)}function aw(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+=Za(s.getUint32(n)),n+=4;for(;o-n>=2;)i+=Za(s.getUint16(n)),n+=2;for(;o-n>=1;)i+=Za(s.getUint8(n)),n+=1;return i}function Za(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 PP=Object.freeze(Object.defineProperty({__proto__:null,BitIterator:uu,getBit:sw,getBool:Bf,packBools:ow,popcnt_array:aw,popcnt_bit_range:Ul,popcnt_uint32:Za,setBool:FP,truncateBitmap:Ih},Symbol.toStringTag,{value:"Module"})),MP=-1;class ia{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<=MP&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-Ul(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 ia?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=lb(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===Ei.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(Ih(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 ia(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(Ih(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[ji.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[ji.TYPE])&&(o[ji.TYPE]=s.subarray(t,t+e)),(s=o[ji.OFFSET])&&(o[ji.OFFSET]=s.subarray(t,t+e+1))||(s=o[ji.DATA])&&(o[ji.DATA]=n===6?s:s.subarray(i*t,i*(t+e))),o}_sliceChildren(t,e,i){return t.map(n=>n.slice(e,i))}}ia.prototype.children=Object.freeze([]);class dm{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function RP(r){return r.reduce((t,e)=>t+e.nullCount,0)}function NP(r){return r.reduce((t,e,i)=>(t[i+1]=t[i]+e.length,t),new Uint32Array(r.length+1))}function LP(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 kf(r,t,e,i){let n=0,s=0,o=t.length-1;do{if(n>=o-1)return e0?0:-1}function zP(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let i=0;for(const n of new uu(e,r.offset+(t||0),r.length,e,Bf)){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 W.Union:break;case W.Dictionary:break;default:return zP(r,e)}const i=qr.getVisitFn(r),n=fs(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 dm(r.data.length,i=>{const s=r.data[i].length,o=r.slice(e,e+s);return e+=s,new jP(o)})}class jP{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof ia)))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}=hw[o.typeId],c=s[0];this.isValid=h=>lw(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,fw[o.typeId]),this._offsets=NP(s);break}this.data=s,this.type=o,this.stride=lb(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 DP(this.data)}get nullCount(){return RP(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(nw(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return $P.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(iw(this,t,e,({data:i,_offsets:n},s,o)=>LP(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 zl(this.data[0].dictionary),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new Qe(e)}return new zl(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}}cw=Symbol.toStringTag;Qe[cw]=(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=qr.getVisitFnByTypeId(e),n=Ci.getVisitFnByTypeId(e),s=mm.getVisitFnByTypeId(e);hw[e]={get:i,set:n,indexOf:s},fw[e]=Object.create(r,{isValid:{value:pm(lw)},get:{value:pm(qr.getVisitFnByTypeId(e))},set:{value:BP(Ci.getVisitFnByTypeId(e))},indexOf:{value:kP(mm.getVisitFnByTypeId(e))}})}return"Vector"})(Qe.prototype);class zl 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 zl(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 VP=65536;function ks(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const oo=8,Uf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class zf{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`${ks(this.buffer[3])} ${ks(this.buffer[2])} ${ks(this.buffer[1])} ${ks(this.buffer[0])}`}static multiply(t,e){return new hi(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new hi(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return hi.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return hi.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const i=t.startsWith("-"),n=t.length,s=new hi(e);for(let o=i?1:0;o>BigInt(32))):o+=2}return n}function YP(r){const t=r.length,e=new Array(t/2);for(let i=0,n=0;i>>0);i[s++]={months:r[n],days:r[n+1],nanoseconds:t?`${o}`:o}}return i}const qP=Object.freeze(Object.defineProperty({__proto__:null,toIntervalDayTimeInt32Array:WP,toIntervalDayTimeObjects:YP,toIntervalMonthDayNanoInt32Array:HP,toIntervalMonthDayNanoObjects:XP},Symbol.toStringTag,{value:"Module"}));class Rt extends ae{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 ds(r,t){return r===t||lr(r,t)}function Ki(r,t){return r===t||lr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function cu(r,t){return r===t||lr(r,t)&&r.precision===t.precision}function QP(r,t){return r===t||lr(r,t)&&r.byteWidth===t.byteWidth}function jf(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function ma(r,t){return r===t||lr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function ya(r,t){return r===t||lr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function KP(r,t){return r===t||lr(r,t)&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function ZP(r,t){return r===t||lr(r,t)&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function $f(r,t){return r===t||lr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,i)=>e===t.typeIds[i])&&Ai.compareManyFields(r.children,t.children)}function JP(r,t){return r===t||lr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Ai.visit(r.indices,t.indices)&&Ai.visit(r.dictionary,t.dictionary)}function hu(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function ga(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function tM(r,t){return r===t||lr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function eM(r,t){return r===t||lr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}Rt.prototype.visitNull=ds;Rt.prototype.visitBool=ds;Rt.prototype.visitInt=Ki;Rt.prototype.visitInt8=Ki;Rt.prototype.visitInt16=Ki;Rt.prototype.visitInt32=Ki;Rt.prototype.visitInt64=Ki;Rt.prototype.visitUint8=Ki;Rt.prototype.visitUint16=Ki;Rt.prototype.visitUint32=Ki;Rt.prototype.visitUint64=Ki;Rt.prototype.visitFloat=cu;Rt.prototype.visitFloat16=cu;Rt.prototype.visitFloat32=cu;Rt.prototype.visitFloat64=cu;Rt.prototype.visitUtf8=ds;Rt.prototype.visitLargeUtf8=ds;Rt.prototype.visitBinary=ds;Rt.prototype.visitLargeBinary=ds;Rt.prototype.visitFixedSizeBinary=QP;Rt.prototype.visitDate=jf;Rt.prototype.visitDateDay=jf;Rt.prototype.visitDateMillisecond=jf;Rt.prototype.visitTimestamp=ma;Rt.prototype.visitTimestampSecond=ma;Rt.prototype.visitTimestampMillisecond=ma;Rt.prototype.visitTimestampMicrosecond=ma;Rt.prototype.visitTimestampNanosecond=ma;Rt.prototype.visitTime=ya;Rt.prototype.visitTimeSecond=ya;Rt.prototype.visitTimeMillisecond=ya;Rt.prototype.visitTimeMicrosecond=ya;Rt.prototype.visitTimeNanosecond=ya;Rt.prototype.visitDecimal=ds;Rt.prototype.visitList=KP;Rt.prototype.visitStruct=ZP;Rt.prototype.visitUnion=$f;Rt.prototype.visitDenseUnion=$f;Rt.prototype.visitSparseUnion=$f;Rt.prototype.visitDictionary=JP;Rt.prototype.visitInterval=hu;Rt.prototype.visitIntervalDayTime=hu;Rt.prototype.visitIntervalYearMonth=hu;Rt.prototype.visitIntervalMonthDayNano=hu;Rt.prototype.visitDuration=ga;Rt.prototype.visitDurationSecond=ga;Rt.prototype.visitDurationMillisecond=ga;Rt.prototype.visitDurationMicrosecond=ga;Rt.prototype.visitDurationNanosecond=ga;Rt.prototype.visitFixedSizeList=tM;Rt.prototype.visitMap=eM;const Ai=new Rt;function rM(r,t){return Ai.compareSchemas(r,t)}function iM(r,t){return Ai.compareFields(r,t)}function nM(r,t){return Ai.visit(r,t)}const ym=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},OF),GP),PP),MF),TF),OP),EF),qP),{compareSchemas:rM,compareFields:iM,compareTypes:nM}),dw=6048e5,sM=864e5,gm=Symbol.for("constructDateFrom");function Wi(r,t){return typeof r=="function"?r(t):r&&typeof r=="object"&&gm in r?r[gm](t):r instanceof Date?new r.constructor(t):new Date(t)}function Qr(r,t){return Wi(t||r,r)}let oM={};function fu(){return oM}function na(r,t){var a,l,u,c;const e=fu(),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 vm(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 aM(r,...t){const e=Wi.bind(null,t.find(i=>typeof i=="object"));return t.map(e)}function _m(r,t){const e=Qr(r,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function lM(r,t,e){const[i,n]=aM(e==null?void 0:e.in,r,t),s=_m(i),o=_m(n),a=+s-vm(s),l=+o-vm(o);return Math.round((a-l)/sM)}function uM(r,t){const e=pw(r,t),i=Wi(r,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),jl(i)}function cM(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function hM(r){return!(!cM(r)&&typeof r!="number"||isNaN(+Qr(r)))}function fM(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 dM={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"}},pM=(r,t,e)=>{let i;const n=dM[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 ac(r){return(t={})=>{const e=t.width?String(t.width):r.defaultWidth;return r.formats[e]||r.formats[r.defaultWidth]}}const mM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vM={date:ac({formats:mM,defaultWidth:"full"}),time:ac({formats:yM,defaultWidth:"full"}),dateTime:ac({formats:gM,defaultWidth:"full"})},_M={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bM=(r,t,e,i)=>_M[r];function bo(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 wM={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xM={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},SM={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"]},TM={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"]},IM={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"}},EM={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"}},CM=(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"},AM={ordinalNumber:CM,era:bo({values:wM,defaultWidth:"wide"}),quarter:bo({values:xM,defaultWidth:"wide",argumentCallback:r=>r-1}),month:bo({values:SM,defaultWidth:"wide"}),day:bo({values:TM,defaultWidth:"wide"}),dayPeriod:bo({values:IM,defaultWidth:"wide",formattingValues:EM,defaultFormattingWidth:"wide"})};function wo(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)?FM(a,h=>h.test(o)):OM(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 OM(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function FM(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 MM=/^(\d+)(th|st|nd|rd)?/i,DM=/\d+/i,RM={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},NM={any:[/^b/i,/^(a|c)/i]},LM={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},BM={any:[/1/i,/2/i,/3/i,/4/i]},kM={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},UM={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]},zM={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},jM={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]},$M={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},VM={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}},GM={ordinalNumber:PM({matchPattern:MM,parsePattern:DM,valueCallback:r=>parseInt(r,10)}),era:wo({matchPatterns:RM,defaultMatchWidth:"wide",parsePatterns:NM,defaultParseWidth:"any"}),quarter:wo({matchPatterns:LM,defaultMatchWidth:"wide",parsePatterns:BM,defaultParseWidth:"any",valueCallback:r=>r+1}),month:wo({matchPatterns:kM,defaultMatchWidth:"wide",parsePatterns:UM,defaultParseWidth:"any"}),day:wo({matchPatterns:zM,defaultMatchWidth:"wide",parsePatterns:jM,defaultParseWidth:"any"}),dayPeriod:wo({matchPatterns:$M,defaultMatchWidth:"any",parsePatterns:VM,defaultParseWidth:"any"})},WM={code:"en-US",formatDistance:pM,formatLong:vM,formatRelative:bM,localize:AM,match:GM,options:{weekStartsOn:0,firstWeekContainsDate:1}};function HM(r,t){const e=Qr(r,t==null?void 0:t.in);return lM(e,fM(e))+1}function YM(r,t){const e=Qr(r,t==null?void 0:t.in),i=+jl(e)-+uM(e);return Math.round(i/dw)+1}function mw(r,t){var c,h,p,f;const e=Qr(r,t==null?void 0:t.in),i=e.getFullYear(),n=fu(),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=Wi((t==null?void 0:t.in)||r,0);o.setFullYear(i+1,0,s),o.setHours(0,0,0,0);const a=na(o,t),l=Wi((t==null?void 0:t.in)||r,0);l.setFullYear(i,0,s),l.setHours(0,0,0,0);const u=na(l,t);return+e>=+a?i+1:+e>=+u?i:i-1}function XM(r,t){var a,l,u,c;const e=fu(),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=mw(r,t),s=Wi((t==null?void 0:t.in)||r,0);return s.setFullYear(n,0,i),s.setHours(0,0,0,0),na(s,t)}function qM(r,t){const e=Qr(r,t==null?void 0:t.in),i=+na(e,t)-+XM(e,t);return Math.round(i/dw)+1}function ve(r,t){const e=r<0?"-":"",i=Math.abs(r).toString().padStart(t,"0");return e+i}const nn={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)}},ws={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bm={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 nn.y(r,t)},Y:function(r,t,e,i){const n=mw(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=pw(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 nn.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=qM(r,i);return t==="wo"?e.ordinalNumber(n,{unit:"week"}):ve(n,t.length)},I:function(r,t,e){const i=YM(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"}):nn.d(r,t)},D:function(r,t,e){const i=HM(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=ws.noon:i===0?n=ws.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=ws.evening:i>=12?n=ws.afternoon:i>=4?n=ws.morning:n=ws.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 nn.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):nn.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"}):nn.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):nn.s(r,t)},S:function(r,t){return nn.S(r,t)},X:function(r,t,e){const i=r.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return xm(i);case"XXXX":case"XX":return Wn(i);case"XXXXX":case"XXX":default:return Wn(i,":")}},x:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"x":return xm(i);case"xxxx":case"xx":return Wn(i);case"xxxxx":case"xxx":default:return Wn(i,":")}},O:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wm(i,":");case"OOOO":default:return"GMT"+Wn(i,":")}},z:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wm(i,":");case"zzzz":default:return"GMT"+Wn(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 wm(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 xm(r,t){return r%60===0?(r>0?"-":"+")+ve(Math.abs(r)/60,2):Wn(r,t)}function Wn(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 Sm=(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"})}},yw=(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"})}},QM=(r,t)=>{const e=r.match(/(P+)(p+)?/)||[],i=e[1],n=e[2];if(!n)return Sm(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}}",Sm(i,t)).replace("{{time}}",yw(n,t))},KM={p:yw,P:QM},ZM=/^D+$/,JM=/^Y+$/,tD=["D","DD","YY","YYYY"];function eD(r){return ZM.test(r)}function rD(r){return JM.test(r)}function iD(r,t,e){const i=nD(r,t,e);if(console.warn(i),tD.includes(r))throw new RangeError(i)}function nD(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 sD=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oD=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,aD=/^'([^]*?)'?$/,lD=/''/g,uD=/[a-zA-Z]/;function gw(r,t,e){var c,h,p,f;const i=fu(),n=i.locale??WM,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(!hM(a))throw new RangeError("Invalid time value");let l=t.match(oD).map(y=>{const g=y[0];if(g==="p"||g==="P"){const d=KM[g];return d(y,n.formatLong)}return y}).join("").match(sD).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const g=y[0];if(g==="'")return{isToken:!1,value:cD(y)};if(bm[g])return{isToken:!0,value:y};if(g.match(uD))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;(rD(g)||eD(g))&&iD(g,t,String(r));const d=bm[g[0]];return d(a,g,n.localize,u)}).join("")}function cD(r){const t=r.match(aD);return t?t[1].replace(lD,"'"):r}function hD(r,t){return Qr(r*1e3,t==null?void 0:t.in)}function fD(r,t){const e=dD(t)?new t(0):Wi(t,0);return e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),e.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),e}function dD(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function pD(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 mD(r){return r!=null}async function Eh(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await cn(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function yD(r){return gr(r)?!1:Et.isInt(r.type)&&!vw(r)||gD(r)}function gD(r){return gr(r)?!1:Et.isInt(r.type)&&r.type.isSigned===!1}function vD(r){return gr(r)?!1:Et.isFloat(r.type)??!1}function _D(r){return gr(r)?!1:Et.isDecimal(r.type)}function bD(r){return gr(r)?!1:Et.isBool(r.type)}function wD(r){return gr(r)?!1:Et.isDuration(r.type)}function vw(r){return gr(r)?!1:Et.isInt(r.type)&&r.metadata.get("ARROW:extension:name")==="period"}function xD(r){return gr(r)?!1:Et.isTimestamp(r.type)}function SD(r){return gr(r)?!1:Et.isDate(r.type)}function TD(r){return gr(r)?!1:Et.isTime(r.type)}function ID(r){return gr(r)?!1:Et.isList(r.type)||Et.isFixedSizeList(r.type)}function ED(r){return gr(r)?!1:Et.isStruct(r.type)||Et.isMap(r.type)}function CD(r){return gr(r)?!1:Et.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Et.isInterval(r.type)}function AD(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 OD(r,t){var i;const e=AD(r,((i=t==null?void 0:t.type)==null?void 0:i.unit)??Jt.SECOND);return hD(e)}function FD(r,t){const e=OD(r,t);return gw(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function PD(r){const t="yyyy-MM-dd";return r instanceof Date||typeof r=="number"&&Number.isFinite(r)?gw(r,t):(console.warn(`Unsupported date value: ${r}`),String(r))}function MD(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 Cr(r,i):e=new Cr(r):i?e=new Cr(r,i):e=new Cr(r),fD(e,Date)}function DD(r,t){var a;const e=((a=t==null?void 0:t.type)==null?void 0:a.scale)||0;let i=ym.bigNumToString(new ym.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=pD(i.slice(-e),"0")||"";return`${n}${s}${o?`.${o}`:""}`}function RD(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 ND(r,t){var i,n,s,o;if(Et.isInterval(t==null?void 0:t.type))return RD(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=Ch(u.left,(n=(i=t.type)==null?void 0:i.children)==null?void 0:n[0]),f=Ch(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 LD(r,t){return(t==null?void 0:t.type)instanceof Sh?JSON.parse(JSON.stringify(r,(e,i)=>{if(mD(i))return typeof i=="bigint"?Number(i):i})):JSON.parse(JSON.stringify(r,(e,i)=>typeof i=="bigint"?Number(i):i))}function Ch(r,t){if(gr(r))return null;const e=r instanceof Date||Number.isFinite(r);if(e&&SD(t))return PD(r);if(typeof r=="bigint"&&TD(t))return FD(Number(r),t);if(e&&xD(t))return MD(r,t);if(vw(t))throw new Error("Period type is not supported yet");if(CD(t))return ND(r,t);if(wD(t))throw new Error("Duration type is not supported yet");return _D(t)?DD(r,t):vD(t)&&Number.isFinite(r)||yD(t)?r:ED(t)||ID(t)?LD(r,t):bD(t)?!!r:String(r)}function Tm(r){return((r.toArray()||[]).map(i=>i.toJSON())||[]).map(i=>(r.schema.fields.forEach(n=>i[n.name]=Ch(i[n.name],n)),i))}var sa=(r=>(r.ORIGIN_PRIVATE_FS="origin-private-fs",r.NODE_FS="node-fs",r))(sa||{});async function _w(r){const t=Bx(r,{logger:!1});let e,i;const n=await Eh();if(n==="browser"){if(typeof t.bundles>"u"){const{getBundles:l}=await cn(async()=>{const{getBundles:u}=await import("./default-browser-BrgSDbLD.js");return{getBundles:u}},[]);t.bundles=await l()}i=await zp(await t.bundles),e=new Worker(i.mainWorker)}else if(n==="node"){if(typeof t.bundles>"u"){const{getBundles:c}=await cn(async()=>{const{getBundles:h}=await import("./default-node-fAr5k7ap.js");return{getBundles:h}},__vite__mapDeps([0,1,2]));t.bundles=await c()}i=await zp(await t.bundles);let l=i.mainWorker;l.startsWith("/@fs/")&&(l=l.replace("/@fs/","file://"));const u=await cn(()=>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 P0:t.logger===!1?s=new b2:s=t.logger;const o=new C2(s,e);if(await o.instantiate(i.mainModule,i.pthreadWorker),t.storage)switch(t.storage.type){case sa.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 sa.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 Tm(f)}const c=await a.prepare(l),h=await c.query(...u),p=Tm(h);return c.close(),p},close:async()=>{await a.close(),await o.terminate(),await e.terminate()}}}async function BD(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 kD(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 at(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 Nm;Nm=xt;class Ke{constructor(t,e){$(this,"name");$(this,"keyAsName");$(this,"primary");$(this,"notNull");$(this,"default");$(this,"defaultFn");$(this,"onUpdateFn");$(this,"hasDefault");$(this,"isUnique");$(this,"uniqueName");$(this,"uniqueType");$(this,"dataType");$(this,"columnType");$(this,"enumValues");$(this,"generated");$(this,"generatedIdentity");$(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"}}$(Ke,Nm,"Column");const Qs=Symbol.for("drizzle:Name");function UD(r,t){return`${r[Qs]}_${t.join("_")}_unique`}var Lm,Bm;class Fr extends(Bm=Ke,Lm=xt,Bm){constructor(t,e){e.uniqueName||(e.uniqueName=UD(t,[e.name])),super(t,e),this.table=t}}$(Fr,Lm,"PgColumn");const Im=Symbol.for("drizzle:isPgEnum");function zD(r){return!!r&&typeof r=="function"&&Im in r&&r[Im]===!0}var km;km=xt;class dr{constructor(t,e,i,n=!1,s=[]){this._={brand:"Subquery",sql:t,selectedFields:e,alias:i,isWith:n,usedTables:s}}}$(dr,km,"Subquery");var Um,zm;class Vf extends(zm=dr,Um=xt,zm){}$(Vf,Um,"WithSubquery");const Mr={startActiveSpan(r,t){return t()}},He=Symbol.for("drizzle:ViewBaseConfig"),Ks=Symbol.for("drizzle:Schema"),Ah=Symbol.for("drizzle:Columns"),Em=Symbol.for("drizzle:ExtraConfigColumns"),lc=Symbol.for("drizzle:OriginalName"),uc=Symbol.for("drizzle:BaseName"),$l=Symbol.for("drizzle:IsAlias"),Cm=Symbol.for("drizzle:ExtraConfigBuilder"),jD=Symbol.for("drizzle:IsDrizzleTable");var jm,$m,Vm,Gm,Wm,Hm,Ym,Xm,qm,Qm;Qm=xt,qm=Qs,Xm=lc,Ym=Ks,Hm=Ah,Wm=Em,Gm=uc,Vm=$l,$m=jD,jm=Cm;class St{constructor(t,e,i){$(this,qm);$(this,Xm);$(this,Ym);$(this,Hm);$(this,Wm);$(this,Gm);$(this,Vm,!1);$(this,$m,!0);$(this,jm);this[Qs]=this[lc]=t,this[Ks]=e,this[uc]=i}}$(St,Qm,"Table"),$(St,"Symbol",{Name:Qs,Schema:Ks,OriginalName:lc,Columns:Ah,ExtraConfigColumns:Em,BaseName:uc,IsAlias:$l,ExtraConfigBuilder:Cm});function Kn(r){return r[Qs]}function oa(r){return`${r[Ks]??"public"}.${r[Qs]}`}function bw(r){return r!=null&&typeof r.getSQL=="function"}function $D(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 Km;Km=xt;class Ye{constructor(t){$(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new Ft([this])}}$(Ye,Km,"StringChunk");var Zm;Zm=xt;const Xn=class Xn{constructor(t){$(this,"decoder",ww);$(this,"shouldInlineParams",!1);$(this,"usedTables",[]);this.queryChunks=t;for(const e of t)if(at(e,St)){const i=e[St.Symbol.Schema];this.usedTables.push(i===void 0?e[St.Symbol.Name]:i+"."+e[St.Symbol.Name])}}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Mr.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 $D(t.map(c=>{var h;if(at(c,Ye))return{sql:c.value.join(""),params:[]};if(at(c,Vl))return{sql:s(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const p=[new Ye("(")];for(const[f,y]of c.entries())p.push(y),fr},xw={mapToDriverValue:r=>r};({...ww,...xw});var ty;ty=xt;class Hi{constructor(t,e=xw){$(this,"brand");this.value=t,this.encoder=e}getSQL(){return new Ft([this])}}$(Hi,ty,"Param");function H(r,...t){const e=[];(t.length>0||r.length>0&&r[0]!=="")&&e.push(new Ye(r[0]));for(const[i,n]of t.entries())e.push(n,new Ye(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 Ye(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 Vl(l)}r.identifier=s;function o(l){return new as(l)}r.placeholder=o;function a(l,u){return new Hi(l,u)}r.param=a})(H||(H={}));(r=>{var e;e=xt;const i=class i{constructor(s,o){$(this,"isSelectionField",!1);this.sql=s,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new i(this.sql,this.fieldAlias)}};$(i,e,"SQL.Aliased");let t=i;r.Aliased=t})(Ft||(Ft={}));var ey;ey=xt;class as{constructor(t){this.name=t}getSQL(){return new Ft([this])}}$(as,ey,"Placeholder");function Am(r,t){return r.map(e=>{if(at(e,as)){if(!(e.name in t))throw new Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(at(e,Hi)&&at(e.value,as)){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 GD=Symbol.for("drizzle:IsDrizzleView");var ry,iy,ny;ny=xt,iy=He,ry=GD;class In{constructor({name:t,schema:e,selectedFields:i,query:n}){$(this,iy);$(this,ry,!0);this[He]={name:t,originalName:t,schema:e,selectedFields:i,query:n,isExisting:!n,isAlias:!1}}getSQL(){return new Ft([this])}}$(In,ny,"View");Ke.prototype.getSQL=function(){return new Ft([this])};St.prototype.getSQL=function(){return new Ft([this])};dr.prototype.getSQL=function(){return new Ft([this])};var sy;sy=xt;class aa{constructor(t){this.table=t}get(t,e){return e==="table"?this.table:t[e]}}$(aa,sy,"ColumnAliasProxyHandler");var oy;oy=xt;class du{constructor(t,e){this.alias=t,this.replaceOriginalName=e}get(t,e){if(e===St.Symbol.IsAlias)return!0;if(e===St.Symbol.Name)return this.alias;if(this.replaceOriginalName&&e===St.Symbol.OriginalName)return this.alias;if(e===He)return{...t[He],name:this.alias,isAlias:!0};if(e===St.Symbol.Columns){const n=t[St.Symbol.Columns];if(!n)return n;const s={};return Object.keys(n).map(o=>{s[o]=new Proxy(n[o],new aa(new Proxy(t,this)))}),s}const i=t[e];return at(i,Ke)?new Proxy(i,new aa(new Proxy(t,this))):i}}$(du,oy,"TableAliasProxyHandler");function cc(r,t){return new Proxy(r,new du(t,!1))}function Bi(r,t){return new Proxy(r,new aa(new Proxy(r.table,new du(t,!1))))}function Sw(r,t){return new Ft.Aliased(Gl(r.sql,t),r.fieldAlias)}function Gl(r,t){return H.join(r.queryChunks.map(e=>at(e,Ke)?Bi(e,t):at(e,Ft)?Gl(e,t):at(e,Ft.Aliased)?Sw(e,t):e))}var ay,ly;class Gf extends(ly=Error,ay=xt,ly){constructor({message:t,cause:e}){super(t),this.name="DrizzleError",this.cause=e}}$(Gf,ay,"DrizzleError");var uy,cy;class Tw extends(cy=Gf,uy=xt,cy){constructor(){super({message:"Rollback"})}}$(Tw,uy,"TransactionRollbackError");var hy;hy=xt;class Iw{write(t){console.log(t)}}$(Iw,hy,"ConsoleLogWriter");var fy;fy=xt;class Ew{constructor(t){$(this,"writer");this.writer=(t==null?void 0:t.writer)??new Iw}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}`)}}$(Ew,fy,"DefaultLogger");var dy;dy=xt;class Cw{logQuery(){}}$(Cw,dy,"NoopLogger");var py,my;my=xt,py=Symbol.toStringTag;class En{constructor(){$(this,py,"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)}}$(En,my,"QueryPromise");function ls(r,t){return Object.entries(r).reduce((e,[i,n])=>{if(typeof i!="string")return e;const s=t?[...t,i]:[i];return at(n,Ke)||at(n,Ft)||at(n,Ft.Aliased)?e.push({path:s,field:n}):at(n,St)?e.push(...ls(n[St.Symbol.Columns],s)):e.push(...ls(n,s)),e},[])}function Wf(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 Aw(r,t){const e=Object.entries(t).filter(([,i])=>i!==void 0).map(([i,n])=>at(n,Ft)||at(n,Ke)?[i,n]:[i,new Hi(n,r[St.Symbol.Columns][i])]);if(e.length===0)throw new Error("No values to set");return Object.fromEntries(e)}function WD(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 HD(r){return r[St.Symbol.Columns]}function Yn(r){return at(r,dr)?r._.alias:at(r,In)?r[He].name:at(r,Ft)?void 0:r[St.Symbol.IsAlias]?r[St.Symbol.Name]:r[St.Symbol.BaseName]}function YD(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 yy,gy;class Ow extends(gy=Fr,yy=xt,gy){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}$(Ow,yy,"PgDate");var vy,_y;class Fw extends(_y=Fr,vy=xt,_y){getSQLType(){return"date"}}$(Fw,vy,"PgDateString");var by,wy;class Pw extends(wy=Fr,by=xt,wy){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}}$(Pw,by,"PgJson");var xy,Sy;class Mw extends(Sy=Fr,xy=xt,Sy){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}}$(Mw,xy,"PgJsonb");var Ty,Iy;class Dw extends(Iy=Fr,Ty=xt,Iy){constructor(e,i){super(e,i);$(this,"precision");$(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})`}}$(Dw,Ty,"PgNumeric");var Ey,Cy;class Rw extends(Cy=Fr,Ey=xt,Cy){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(Rw,Ey,"PgTime");var Ay,Oy;class Nw extends(Oy=Fr,Ay=xt,Oy){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");$(this,"mapFromDriverValue",e=>new Date(this.withTimezone?e:e+"+0000"));$(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":""}`}}$(Nw,Ay,"PgTimestamp");var Fy,Py;class Lw extends(Py=Fr,Fy=xt,Py){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(Lw,Fy,"PgTimestampString");var My,Dy;class Bw extends(Dy=Fr,My=xt,Dy){getSQLType(){return"uuid"}}$(Bw,My,"PgUUID");const Om=Symbol.for("drizzle:PgInlineForeignKeys"),Fm=Symbol.for("drizzle:EnableRLS");var Ry,Ny,Ly,By,ky,Uy;class br extends(Uy=St,ky=xt,By=Om,Ly=Fm,Ny=St.Symbol.ExtraConfigBuilder,Ry=St.Symbol.ExtraConfigColumns,Uy){constructor(){super(...arguments);$(this,By,[]);$(this,Ly,!1);$(this,Ny);$(this,Ry,{})}}$(br,ky,"PgTable"),$(br,"Symbol",Object.assign({},St.Symbol,{InlineForeignKeys:Om,EnableRLS:Fm}));var zy;zy=xt;class kw{constructor(t,e){$(this,"columns");$(this,"name");this.columns=t,this.name=e}build(t){return new Uw(t,this.columns,this.name)}}$(kw,zy,"PgPrimaryKeyBuilder");var jy;jy=xt;class Uw{constructor(t,e,i){$(this,"columns");$(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`}}$(Uw,jy,"PgPrimaryKey");function yr(r,t){return VD(t)&&!bw(r)&&!at(r,Hi)&&!at(r,as)&&!at(r,Ke)&&!at(r,St)&&!at(r,In)?new Hi(r,t):r}const zw=(r,t)=>H`${r} = ${yr(t,r)}`,XD=(r,t)=>H`${r} <> ${yr(t,r)}`;function Oh(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Ye("("),H.join(t,new Ye(" and ")),new Ye(")")])}function qD(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Ye("("),H.join(t,new Ye(" or ")),new Ye(")")])}function QD(r){return H`not ${r}`}const KD=(r,t)=>H`${r} > ${yr(t,r)}`,ZD=(r,t)=>H`${r} >= ${yr(t,r)}`,JD=(r,t)=>H`${r} < ${yr(t,r)}`,tR=(r,t)=>H`${r} <= ${yr(t,r)}`;function eR(r,t){return Array.isArray(t)?t.length===0?H`false`:H`${r} in ${t.map(e=>yr(e,r))}`:H`${r} in ${yr(t,r)}`}function rR(r,t){return Array.isArray(t)?t.length===0?H`true`:H`${r} not in ${t.map(e=>yr(e,r))}`:H`${r} not in ${yr(t,r)}`}function iR(r){return H`${r} is null`}function nR(r){return H`${r} is not null`}function sR(r){return H`exists ${r}`}function oR(r){return H`not exists ${r}`}function aR(r,t,e){return H`${r} between ${yr(t,r)} and ${yr(e,r)}`}function lR(r,t,e){return H`${r} not between ${yr(t,r)} and ${yr(e,r)}`}function uR(r,t){return H`${r} like ${t}`}function cR(r,t){return H`${r} not like ${t}`}function hR(r,t){return H`${r} ilike ${t}`}function fR(r,t){return H`${r} not ilike ${t}`}function dR(r){return H`${r} asc`}function pR(r){return H`${r} desc`}var $y;$y=xt;class Hf{constructor(t,e,i){$(this,"referencedTableName");$(this,"fieldName");this.sourceTable=t,this.referencedTable=e,this.relationName=i,this.referencedTableName=e[St.Symbol.Name]}}$(Hf,$y,"Relation");var Vy;Vy=xt;class jw{constructor(t,e){this.table=t,this.config=e}}$(jw,Vy,"Relations");var Gy,Wy;const Yl=class Yl extends(Wy=Hf,Gy=xt,Wy){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 Yl(this.sourceTable,this.referencedTable,this.config,this.isNullable);return e.fieldName=t,e}};$(Yl,Gy,"One");let us=Yl;var Hy,Yy;const Xl=class Xl extends(Yy=Hf,Hy=xt,Yy){constructor(t,e,i){super(t,e,i==null?void 0:i.relationName),this.config=i}withFieldName(t){const e=new Xl(this.sourceTable,this.referencedTable,this.config);return e.fieldName=t,e}};$(Xl,Hy,"Many");let Wl=Xl;function mR(){return{and:Oh,between:aR,eq:zw,exists:sR,gt:KD,gte:ZD,ilike:hR,inArray:eR,isNull:iR,isNotNull:nR,like:uR,lt:JD,lte:tR,ne:XD,not:QD,notBetween:lR,notExists:oR,notLike:cR,notIlike:fR,notInArray:rR,or:qD,sql:H}}function yR(){return{sql:H,asc:dR,desc:pR}}function gR(r,t){var s;Object.keys(r).length===1&&"default"in r&&!at(r.default,St)&&(r=r.default);const e={},i={},n={};for(const[o,a]of Object.entries(r))if(at(a,St)){const l=oa(a),u=i[l];e[l]=o,n[o]={tsName:o,dbName:a[St.Symbol.Name],schema:a[St.Symbol.Schema],columns:a[St.Symbol.Columns],relations:(u==null?void 0:u.relations)??{},primaryKey:(u==null?void 0:u.primaryKey)??[]};for(const h of Object.values(a[St.Symbol.Columns]))h.primary&&n[o].primaryKey.push(h);const c=(s=a[St.Symbol.ExtraConfigBuilder])==null?void 0:s.call(a,a[St.Symbol.ExtraConfigColumns]);if(c)for(const h of Object.values(c))at(h,kw)&&n[o].primaryKey.push(...h.columns)}else if(at(a,jw)){const l=oa(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 vR(r){return function(e,i){return new us(r,e,i,(i==null?void 0:i.fields.reduce((n,s)=>n&&s.notNull,!0))??!1)}}function _R(r){return function(e,i){return new Wl(r,e,i)}}function bR(r,t,e){if(at(e,us)&&e.config)return{fields:e.config.fields,references:e.config.references};const i=t[oa(e.referencedTable)];if(!i)throw new Error(`Table "${e.referencedTable[St.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[oa(s)];if(!o)throw new Error(`Table "${s[St.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[St.Symbol.Name]}". Please specify relation name`);if(a[0]&&at(a[0],us)&&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 wR(r){return{one:vR(r),many:_R(r)}}function Fh(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]=at(l,us)?c&&Fh(r,r[a.relationTableTsKey],c,a.selection,n):c.map(h=>Fh(r,r[a.relationTableTsKey],h,a.selection,n))}else{const l=n(e[o]),u=a.field;let c;at(u,Ke)?c=u:at(u,Ft)?c=u.decoder:c=u.sql.decoder,s[a.tsKey]=l===null?null:c.mapFromDriverValue(l)}return s}var Xy;Xy=xt;const ql=class ql{constructor(t){$(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=(at(t,dr)?t._.selectedFields:at(t,In)?t[He].selectedFields:t)[e];if(at(n,Ft.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!n.isSelectionField)return n.sql;const s=n.clone();return s.isSelectionField=!0,s}if(at(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 at(n,Ke)?this.config.alias?new Proxy(n,new aa(new Proxy(n.table,new du(this.config.alias,this.config.replaceOriginalName??!1)))):n:typeof n!="object"||n===null?n:new Proxy(n,new ql(this.config))}};$(ql,Xy,"SelectionProxyHandler");let Je=ql;function xR(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function SR(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 TR(r){return r}var qy;qy=xt;class $w{constructor(t){$(this,"cache",{});$(this,"cachedTables",{});$(this,"convert");this.convert=t==="snake_case"?xR:t==="camelCase"?SR:TR}getColumnCasing(t){if(!t.keyAsName)return t.name;const e=t.table[St.Symbol.Schema]??"public",i=t.table[St.Symbol.OriginalName],n=`${e}.${i}.${t.name}`;return this.cache[n]||this.cacheTable(t.table),this.cache[n]}cacheTable(t){const e=t[St.Symbol.Schema]??"public",i=t[St.Symbol.OriginalName],n=`${e}.${i}`;if(!this.cachedTables[n]){for(const s of Object.values(t[St.Symbol.Columns])){const o=`${n}.${s.name}`;this.cache[o]=this.convert(s.name)}this.cachedTables[n]=!0}}clearCache(){this.cache={},this.cachedTables={}}}$($w,qy,"CasingCache");var Qy,Ky;class Yf extends(Ky=In,Qy=xt,Ky){}$(Yf,Qy,"PgViewBase");var Zy;Zy=xt;class zo{constructor(t){$(this,"casing");this.casing=new $w(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=H` +]`}concat(...t){const e=this.schema,i=this.data.concat(t.flatMap(({data:n})=>n));return new Gn(e,i.map(n=>new hr(e,n)))}slice(t,e){const i=this.schema;[t,e]=t0({length:this.numRows},t,e);const n=n0(this.data,this._offsets,t,e);return new Gn(i,n.map(s=>new hr(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]=Zu(i,a)}return new Gn(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 Gn(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 Gn(...Zu(s,o))}};p0=Symbol.toStringTag;_n[p0]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=Pl(pf),r.get=Pl(mr.getVisitFn(L.Struct)),r.set=s0(Xr.getVisitFn(L.Struct)),r.indexOf=o0(Ml.getVisitFn(L.Struct)),"Table"))(_n.prototype);var m0;let hr=class Ro{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]=Pp(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]=Pp(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=y0(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(hf(t,this.numRows))}set(t,e){return Xr.visit(this.data,t,e)}indexOf(t,e){return Ml.visit(this.data,t,e)}[Symbol.iterator](){return mf.visit(new Me([this.data]))}toArray(){return[...this]}concat(...t){return new _n(this.schema,[this,...t])}slice(t,e){const[i]=new Me([this.data]).slice(t,e).data;return new Ro(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 Ro(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 Ro(e,n)}};m0=Symbol.toStringTag;hr[m0]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(hr.prototype);function Pp(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 y0(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 rn=class li{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 li).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+me),(e||new li).__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 li.startMessage(t),li.addVersion(t,e),li.addHeaderType(t,i),li.addHeader(t,n),li.addBodyLength(t,s),li.addCustomMetadata(t,o),li.endMessage(t)}};class wO extends ie{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return wp.startNull(e),wp.endNull(e)}visitInt(t,e){return Sr.startInt(e),Sr.addBitWidth(e,t.bitWidth),Sr.addIsSigned(e,t.isSigned),Sr.endInt(e)}visitFloat(t,e){return yi.startFloatingPoint(e),yi.addPrecision(e,t.precision),yi.endFloatingPoint(e)}visitBinary(t,e){return yp.startBinary(e),yp.endBinary(e)}visitLargeBinary(t,e){return vp.startLargeBinary(e),vp.endLargeBinary(e)}visitBool(t,e){return gp.startBool(e),gp.endBool(e)}visitUtf8(t,e){return xp.startUtf8(e),xp.endUtf8(e)}visitLargeUtf8(t,e){return _p.startLargeUtf8(e),_p.endLargeUtf8(e)}visitDecimal(t,e){return Is.startDecimal(e),Is.addScale(e,t.scale),Is.addPrecision(e,t.precision),Is.addBitWidth(e,t.bitWidth),Is.endDecimal(e)}visitDate(t,e){return $a.startDate(e),$a.addUnit(e,t.unit),$a.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 gi.startInterval(e),gi.addUnit(e,t.unit),gi.endInterval(e)}visitDuration(t,e){return Va.startDuration(e),Va.addUnit(e,t.unit),Va.endDuration(e)}visitList(t,e){return bp.startList(e),bp.endList(e)}visitStruct(t,e){return Qn.startStruct_(e),Qn.endStruct_(e)}visitUnion(t,e){cr.startTypeIdsVector(e,t.typeIds.length);const i=cr.createTypeIdsVector(e,t.typeIds);return cr.startUnion(e),cr.addMode(e,t.mode),cr.addTypeIds(e,i),cr.endUnion(e)}visitDictionary(t,e){const i=this.visit(t.indices,e);return Vi.startDictionaryEncoding(e),Vi.addId(e,BigInt(t.id)),Vi.addIsOrdered(e,t.isOrdered),i!==void 0&&Vi.addIndexType(e,i),Vi.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return Ga.startFixedSizeBinary(e),Ga.addByteWidth(e,t.byteWidth),Ga.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return Wa.startFixedSizeList(e),Wa.addListSize(e,t.listSize),Wa.endFixedSizeList(e)}visitMap(t,e){return Ha.startMap(e),Ha.addKeysSorted(e,t.keysSorted),Ha.endMap(e)}}const Ju=new wO;function xO(r,t=new Map){return new Pe(TO(r,t),qa(r.metadata),t)}function g0(r){return new Pr(r.count,v0(r.columns),_0(r.columns))}function SO(r){return new Ii(g0(r.data),r.id,r.isDelta)}function TO(r,t){return(r.fields||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function Mp(r,t){return(r.children||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function v0(r){return(r||[]).reduce((t,e)=>[...t,new bn(e.count,IO(e.VALIDITY)),...v0(e.children)],[])}function _0(r,t=[]){for(let e=-1,i=(r||[]).length;++et+ +(e===0),0)}function EO(r,t){let e,i,n,s,o,a;return!t||!(s=r.dictionary)?(o=Rp(r,Mp(r,t)),n=new Ce(r.name,o,r.nullable,qa(r.metadata))):t.has(e=s.id)?(i=(i=s.indexType)?Dp(i):new Jo,a=new eo(t.get(e),i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,qa(r.metadata))):(i=(i=s.indexType)?Dp(i):new Jo,t.set(e,o=Rp(r,Mp(r,t))),a=new eo(o,i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,qa(r.metadata))),n||null}function qa(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function Dp(r){return new os(r.isSigned,r.bitWidth)}function Rp(r,t){const e=r.type.name;switch(e){case"NONE":return new yn;case"null":return new yn;case"binary":return new dl;case"largebinary":return new pl;case"utf8":return new ml;case"largeutf8":return new yl;case"bool":return new gl;case"list":return new Tl((t||[])[0]);case"struct":return new sr(t||[]);case"struct_":return new sr(t||[])}switch(e){case"int":{const i=r.type;return new os(i.isSigned,i.bitWidth)}case"floatingpoint":{const i=r.type;return new fl(tr[i.precision])}case"decimal":{const i=r.type;return new vl(i.scale,i.precision,i.bitWidth)}case"date":{const i=r.type;return new _l(Yr[i.unit])}case"time":{const i=r.type;return new bl(Vt[i.unit],i.bitWidth)}case"timestamp":{const i=r.type;return new wl(Vt[i.unit],i.timezone)}case"interval":{const i=r.type;return new xl(Ti[i.unit])}case"duration":{const i=r.type;return new Sl(Vt[i.unit])}case"union":{const i=r.type,[n,...s]=(i.mode+"").toLowerCase(),o=n.toUpperCase()+s.join("");return new Il(er[o],i.typeIds||[],t||[])}case"fixedsizebinary":{const i=r.type;return new El(i.byteWidth)}case"fixedsizelist":{const i=r.type;return new Cl(i.listSize,(t||[])[0])}case"map":{const i=r.type;return new Al((t||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var CO=Dv,AO=Js;class or{static fromJSON(t,e){const i=new or(0,ke.V5,e);return i._createHeader=OO(t,e),i}static decode(t){t=new AO(le(t));const e=rn.getRootAsMessage(t),i=e.bodyLength(),n=e.version(),s=e.headerType(),o=new or(i,n,s);return o._createHeader=FO(e,s),o}static encode(t){const e=new CO;let i=-1;return t.isSchema()?i=Pe.encode(e,t.header()):t.isRecordBatch()?i=Pr.encode(e,t.header()):t.isDictionaryBatch()&&(i=Ii.encode(e,t.header())),rn.startMessage(e),rn.addVersion(e,ke.V5),rn.addHeader(e,i),rn.addHeaderType(e,t.headerType),rn.addBodyLength(e,BigInt(t.bodyLength)),rn.finishMessageBuffer(e,rn.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 Pr)return new or(e,ke.V5,fe.RecordBatch,t);if(t instanceof Ii)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 Pr{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 Ii{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 _i{constructor(t,e){this.offset=we(t),this.length=we(e)}}class bn{constructor(t,e){this.length=we(t),this.nullCount=we(e)}}function OO(r,t){return()=>{switch(t){case fe.Schema:return Pe.fromJSON(r);case fe.RecordBatch:return Pr.fromJSON(r);case fe.DictionaryBatch:return Ii.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}function FO(r,t){return()=>{switch(t){case fe.Schema:return Pe.decode(r.header(new ci),new Map,r.version());case fe.RecordBatch:return Pr.decode(r.header(new ki),r.version());case fe.DictionaryBatch:return Ii.decode(r.header(new Ss),r.version())}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}Ce.encode=jO;Ce.decode=UO;Ce.fromJSON=EO;Pe.encode=zO;Pe.decode=PO;Pe.fromJSON=xO;Pr.encode=$O;Pr.decode=MO;Pr.fromJSON=g0;Ii.encode=VO;Ii.decode=DO;Ii.fromJSON=SO;bn.encode=GO;bn.decode=NO;_i.encode=WO;_i.decode=RO;function PO(r,t=new Map,e=ke.V5){const i=kO(r,t);return new Pe(i,Qa(r),t,e)}function MO(r,t=ke.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Pr(r.length(),LO(r),BO(r,t))}function DO(r,t=ke.V5){return new Ii(Pr.decode(r.data(),t),r.id(),r.isDelta())}function RO(r){return new _i(r.offset(),r.length())}function NO(r){return new bn(r.length(),r.nullCount())}function LO(r){const t=[];for(let e,i=-1,n=-1,s=r.nodesLength();++iCe.encode(r,s));ci.startFieldsVector(r,e.length);const i=ci.createFieldsVector(r,e),n=t.metadata&&t.metadata.size>0?ci.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 ci.startSchema(r),ci.addFields(r,i),ci.addEndianness(r,HO?to.Little:to.Big),n!==-1&&ci.addCustomMetadata(r,n),ci.endSchema(r)}function jO(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=Ju.visit(s,r),i=Ju.visit(s.dictionary,r)):i=Ju.visit(s,r);const a=(s.children||[]).map(c=>Ce.encode(r,c)),l=Lr.createChildrenVector(r,a),u=t.metadata&&t.metadata.size>0?Lr.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)),Lr.startField(r),Lr.addType(r,i),Lr.addTypeType(r,o),Lr.addChildren(r,l),Lr.addNullable(r,!!t.nullable),e!==-1&&Lr.addName(r,e),n!==-1&&Lr.addDictionary(r,n),u!==-1&&Lr.addCustomMetadata(r,u),Lr.endField(r)}function $O(r,t){const e=t.nodes||[],i=t.buffers||[];ki.startNodesVector(r,e.length);for(const o of e.slice().reverse())bn.encode(r,o);const n=r.endVector();ki.startBuffersVector(r,i.length);for(const o of i.slice().reverse())_i.encode(r,o);const s=r.endVector();return ki.startRecordBatch(r),ki.addLength(r,BigInt(t.length)),ki.addNodes(r,n),ki.addBuffers(r,s),ki.endRecordBatch(r)}function VO(r,t){const e=Pr.encode(r,t.data);return Ss.startDictionaryBatch(r),Ss.addId(r,BigInt(t.id)),Ss.addIsDelta(r,t.isDelta),Ss.addData(r,e),Ss.endDictionaryBatch(r)}function GO(r,t){return Lv.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function WO(r,t){return Nv.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const HO=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),xf=r=>`Expected ${fe[r]} Message in stream, but was null or length 0.`,Sf=r=>`Header pointer of flatbuffer-encoded ${fe[r]} Message is null or length 0.`,b0=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,w0=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`;class x0{constructor(t){this.source=t instanceof Dl?t:new Dl(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(xf(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=le(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(xf(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(Sf(t));return i}}const su=4,gh="ARROW1",ea=new Uint8Array(gh.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:sh(t)?JO(t):Cv(t)?r2(t):ss(t)?Zt(this,void 0,void 0,function*(){return yield Vr.from(yield t)}):Av(t)||of(t)||Ov(t)||ao(t)?e2(new ro(t)):t2(new Dl(t))}static readAll(t){return t instanceof Vr?t.isSync()?kp(t):Up(t):sh(t)||ArrayBuffer.isView(t)||ua(t)||Ev(t)?kp(t):Up(t)}}class Nl extends Vr{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return fr(this,arguments,function*(){yield Nt(yield*is(wi(this[Symbol.iterator]())))})}}class Ll 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=wi(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 T0 extends Nl{constructor(t){super(t),this._impl=t}}class QO extends Ll{constructor(t){super(t),this._impl=t}}class I0{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 hr(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 d0(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(i)}}class Bl extends I0{constructor(t,e){super(e),this._reader=sh(t)?new XO(this._handle=t):new x0(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=C0(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 wf(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class kl extends I0{constructor(t,e){super(e),this._reader=new YO(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=C0(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 wf(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class E0 extends Bl{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 Fp?t:new Fp(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-S0,i=t.readInt32(e),n=t.readAt(e-i,i);return ta.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-S0,i=yield t.readInt32(e),n=yield t.readAt(e-i,i);return ta.decode(n)})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?Tf(t)?new T0(new E0(r.read())):new Nl(new Bl(r)):new Nl(new Bl(function*(){}()))}function e2(r){return Zt(this,void 0,void 0,function*(){const t=yield r.peek(da+7&-8);return t&&t.byteLength>=4?Tf(t)?new T0(new E0(yield r.read())):new Ll(new kl(r)):new Ll(new kl(function(){return fr(this,arguments,function*(){})}()))})}function r2(r){return Zt(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new Rl(r,t);return t>=qO&&Tf(yield e.readAt(0,da+7&-8))?new QO(new KO(e)):new Ll(new kl(e))})}class Ne extends ie{static assemble(...t){const e=n=>n.flatMap(s=>Array.isArray(s)?e(s):s instanceof hr?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 bn(i,0));else{const{nullCount:n}=t;At.isNull(e)||ei.call(this,n<=0?new Uint8Array(0):Ol(t.offset,i,t.nullBitmap)),this.nodes.push(new bn(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 ei(r){const t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new _i(this._byteLength,t)),this._byteLength+=t,this}function i2(r){var t;const{type:e,length:i,typeIds:n,valueOffsets:s}=r;if(ei.call(this,n),e.mode===er.Sparse)return vh.call(this,r);if(e.mode===er.Dense){if(r.offset<=0)return ei.call(this,s),vh.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 n2(r){let t;return r.nullCount>=r.length?ei.call(this,new Uint8Array(0)):(t=r.values)instanceof Uint8Array?ei.call(this,Ol(r.offset,r.length,t)):ei.call(this,Fl(r.values))}function qi(r){return ei.call(this,r.values.subarray(0,r.length*r.stride))}function ou(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 ei.call(this,Pv(-n,t+1,i)),ei.call(this,e.subarray(n,n+o)),this}function If(r){const{length:t,valueOffsets:e}=r;if(e){const{[0]:i,[t]:n}=e;return ei.call(this,Pv(-i,t+1,e)),this.visit(r.children[0].slice(i,n-i))}return this.visit(r.children[0])}function vh(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}Ne.prototype.visitBool=n2;Ne.prototype.visitInt=qi;Ne.prototype.visitFloat=qi;Ne.prototype.visitUtf8=ou;Ne.prototype.visitLargeUtf8=ou;Ne.prototype.visitBinary=ou;Ne.prototype.visitLargeBinary=ou;Ne.prototype.visitFixedSizeBinary=qi;Ne.prototype.visitDate=qi;Ne.prototype.visitTimestamp=qi;Ne.prototype.visitTime=qi;Ne.prototype.visitDecimal=qi;Ne.prototype.visitList=If;Ne.prototype.visitStruct=vh;Ne.prototype.visitUnion=i2;Ne.prototype.visitInterval=qi;Ne.prototype.visitDuration=qi;Ne.prototype.visitFixedSizeList=If;Ne.prototype.visitMap=If;class A0 extends yf{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 Xa,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 ss(t)?t.then(e=>this.writeAll(e)):ao(t)?Of(this,t):Af(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 Xa?this._sink=t:(this._sink=new Xa,t&&DC(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&RC(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||!yh(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 _n&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof hr&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!yh(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof hr?t instanceof wf||this._writeRecordBatch(t):t instanceof _n?this.writeAll(t.batches):ua(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 gn(a,t.bodyLength,this._position)):t.headerType===fe.DictionaryBatch&&this._dictionaryBlocks.push(new gn(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=le(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(ea)}_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 Pr(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 Pr(t.length,s,o),u=new Ii(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)):ao(t)?Of(i,t):Af(i,t)}}class Cf extends A0{static writeAll(t){const e=new Cf;return ss(t)?t.then(i=>e.writeAll(i)):ao(t)?Of(e,t):Af(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=ta.encode(new ta(t,ke.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}function Af(r,t){let e=t;t instanceof _n&&(e=t.batches,r.reset(void 0,t.schema));for(const i of e)r.write(i);return r.finish()}function Of(r,t){return Zt(this,void 0,void 0,function*(){var e,i,n,s,o,a,l;try{for(e=!0,i=wi(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 s2(r,t="stream"){return(t==="stream"?Ef:Cf).writeAll(r).toUint8Array(!0)}var o2=Object.create,O0=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,l2=Object.getOwnPropertyNames,u2=Object.getPrototypeOf,c2=Object.prototype.hasOwnProperty,h2=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),f2=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l2(t))!c2.call(r,n)&&n!==e&&O0(r,n,{get:()=>t[n],enumerable:!(i=a2(t,n))||i.enumerable});return r},d2=(r,t,e)=>(e=r!=null?o2(u2(r)):{},f2(!r||!r.__esModule?O0(e,"default",{value:r,enumerable:!0}):e,r)),p2=h2((r,t)=>{t.exports=Worker}),F0=(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))(F0||{}),m2=(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))(m2||{}),y2=(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))(y2||{}),g2=(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))(g2||{}),v2=(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))(v2||{}),_2=(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))(_2||{}),b2=class{log(r){}},P0=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},w2=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(w2||{}),x2=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 _n(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 M0(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 S2(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=s2(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)}},M0=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}},S2=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 _n(e)}async send(...r){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),e=new M0(this.bindings,this.connectionId,t),i=await Vr.from(e);return console.assert(i.isAsync()),console.assert(i.isStream()),i}},T2=(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))(T2||{}),I2=(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))(I2||{}),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 Ka(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:Ka(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=>_h(t.name,t.type))};case L.Map:{let t=r;return{sqlType:"map",keyType:Ka(t.keyType),valueType:Ka(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 _h(r,t){let e=Ka(t);return e.name=r,e}var E2=new TextEncoder,C2=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 x2(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=E2.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(_h(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(_h(s,o))}e.columnsFlat=n,delete e.columns}let i=new ue("IMPORT_JSON_FROM_PATH",[r,t,e]);await this.postTask(i)}};function A2(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}A2();var O2=(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))(O2||{}),F2=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])),P2=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])),M2=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])),D2=()=>(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])),R2={version:"1.29.1-dev68.0"},Ff=R2.version.split(".");Ff[0];Ff[1];Ff[2];var N2=()=>typeof navigator>"u",tc=null,ec=null,rc=null,ic=null,nc=null;async function L2(){return tc==null&&(tc=typeof BigInt64Array<"u"),ec==null&&(ec=await P2()),rc==null&&(rc=await D2()),ic==null&&(ic=await M2()),nc==null&&(nc=await F2()),{bigInt64Array:tc,crossOriginIsolated:N2()||globalThis.crossOriginIsolated||!1,wasmExceptions:ec,wasmSIMD:ic,wasmThreads:rc,wasmBulkMemory:nc}}async function zp(r){let t=await L2();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}}d2(p2());const sc={},No={};function Uo(r,t){try{const i=(sc[r]||(sc[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return i in No?No[i]:jp(i,i.split(":"))}catch{if(r in No)return No[r];const e=r==null?void 0:r.match(B2);return e?jp(r,e.slice(1)):NaN}}const B2=/([+-]\d\d):?(\d\d)?/;function jp(r,t){const e=+t[0],i=+(t[1]||0);return No[r]=e>0?e*60+i:e*60-i}class Cr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Uo(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)),D0(this),bh(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Cr(...e,t):new Cr(Date.now(),t)}withTimeZone(t){return new Cr(+this,t)}getTimezoneOffset(){return-Uo(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),bh(this),+this}[Symbol.for("constructDateFrom")](t){return new Cr(+new Date(t),this.timeZone)}}const $p=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!$p.test(r))return;const t=r.replace($p,"$1UTC");Cr.prototype[t]&&(r.startsWith("get")?Cr.prototype[r]=function(){return this.internal[t]()}:(Cr.prototype[r]=function(){return Date.prototype[t].apply(this.internal,arguments),k2(this),+this},Cr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),bh(this),+this}))});function bh(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function k2(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()),D0(r)}function D0(r){const t=Uo(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=Uo(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=Uo(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 U2=new TextDecoder("utf-8"),z2=r=>U2.decode(r),j2=new TextEncoder,R0=r=>j2.encode(r),fi=r=>typeof r=="function",pa=r=>r!=null&&Object(r)===r,$2=r=>pa(r)&&fi(r.then),N0=r=>pa(r)&&fi(r[Symbol.iterator]),V2=r=>pa(r)&&fi(r[Symbol.asyncIterator]),G2=r=>pa(r)&&"done"in r&&"value"in r,W2=r=>pa(r)&&fi(r.clear)&&fi(r.bytes)&&fi(r.position)&&fi(r.setPosition)&&fi(r.capacity)&&fi(r.getBufferIdentifier)&&fi(r.createLong),Pf=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function H2(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),q2=r=>rr(Int16Array,r),Q2=r=>rr(Int32Array,r),K2=r=>rr(BigInt64Array,r),Z2=r=>rr(Uint8Array,r),J2=r=>rr(Uint16Array,r),tF=r=>rr(Uint32Array,r),eF=r=>rr(BigUint64Array,r),rF=r=>rr(Float32Array,r),iF=r=>rr(Float64Array,r),nF=r=>rr(Uint8ClampedArray,r),xh=r=>(r.next(),r);function*Fi(r,t){const e=function*(n){yield n},i=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Pf?e(t):N0(t)?t:e(t);return yield*xh(function*(n){let s=null;do s=n.next(yield rr(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}const sF=r=>Fi(Int8Array,r),oF=r=>Fi(Int16Array,r),aF=r=>Fi(Int32Array,r),lF=r=>Fi(Uint8Array,r),uF=r=>Fi(Uint16Array,r),cF=r=>Fi(Uint32Array,r),hF=r=>Fi(Float32Array,r),fF=r=>Fi(Float64Array,r),dF=r=>Fi(Uint8ClampedArray,r);function ni(r,t){return fr(this,arguments,function*(){if($2(t))return yield Nt(yield Nt(yield*is(wi(ni(r,yield Nt(t))))));const i=function(o){return fr(this,arguments,function*(){yield yield Nt(yield Nt(o))})},n=function(o){return fr(this,arguments,function*(){yield Nt(yield*is(wi(xh(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 Pf?i(t):N0(t)?n(t):V2(t)?t:i(t);return yield Nt(yield*is(wi(xh(function(o){return fr(this,arguments,function*(){let a=null;do a=yield Nt(o.next(yield yield Nt(rr(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Nt(new r)})}const pF=r=>ni(Int8Array,r),mF=r=>ni(Int16Array,r),yF=r=>ni(Int32Array,r),gF=r=>ni(Uint8Array,r),vF=r=>ni(Uint16Array,r),_F=r=>ni(Uint32Array,r),bF=r=>ni(Float32Array,r),wF=r=>ni(Float64Array,r),xF=r=>ni(Uint8ClampedArray,r);function SF(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(++eno(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}const EF=Object.freeze(Object.defineProperty({__proto__:null,valueToString:no},Symbol.toStringTag,{value:"Module"}));function Or(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 B0(r,t){return Or(r/t)+Or(r%t)/Or(t)}const k0=Symbol.for("isArrowBigNum");function si(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)}si.prototype[k0]=!0;si.prototype.toJSON=function(){return`"${so(this)}"`};si.prototype.valueOf=function(r){return Mf(this,r)};si.prototype.toString=function(){return so(this)};si.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Mf(this);case"string":return so(this);case"default":return U0(this)}return so(this)};function Hs(...r){return si.apply(this,r)}function Ys(...r){return si.apply(this,r)}function ra(...r){return si.apply(this,r)}Object.setPrototypeOf(Hs.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Ys.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(ra.prototype,Object.create(Uint32Array.prototype));Object.assign(Hs.prototype,si.prototype,{constructor:Hs,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Ys.prototype,si.prototype,{constructor:Ys,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(ra.prototype,si.prototype,{constructor:ra,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const CF=BigInt(4294967296)*BigInt(4294967296),AF=CF-BigInt(1);function Mf(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){const c=BigInt("1".padEnd(t+1,"0")),h=l/c,p=a?-(l%c):l%c,f=Or(h),y=`${p}`.padStart(t,"0");return+`${a&&f===0?"-":""}${f}.${y}`}return Or(l)}function so(r){if(r.byteLength===8)return`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`;if(!r.signed)return oc(r);let t=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2);if(new Int16Array([t.at(-1)])[0]>=0)return oc(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 Vp extends Et{constructor(){super(W.Null)}toString(){return"Null"}}j0=Symbol.toStringTag;Vp[j0]=(r=>r[Symbol.toStringTag]="Null")(Vp.prototype);class Gp 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}`}}$0=Symbol.toStringTag;Gp[$0]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Gp.prototype);class Wp extends Et{constructor(t){super(W.Float),this.precision=t}get ArrayType(){switch(this.precision){case Ar.HALF:return Uint16Array;case Ar.SINGLE:return Float32Array;case Ar.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}V0=Symbol.toStringTag;Wp[V0]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Wp.prototype);class Hp extends Et{constructor(){super(W.Binary)}toString(){return"Binary"}}G0=Symbol.toStringTag;Hp[G0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Hp.prototype);class Yp extends Et{constructor(){super(W.LargeBinary)}toString(){return"LargeBinary"}}W0=Symbol.toStringTag;Yp[W0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(Yp.prototype);class Xp extends Et{constructor(){super(W.Utf8)}toString(){return"Utf8"}}H0=Symbol.toStringTag;Xp[H0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Xp.prototype);class qp extends Et{constructor(){super(W.LargeUtf8)}toString(){return"LargeUtf8"}}Y0=Symbol.toStringTag;qp[Y0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(qp.prototype);class Qp extends Et{constructor(){super(W.Bool)}toString(){return"Bool"}}X0=Symbol.toStringTag;Qp[X0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Qp.prototype);class Kp 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}]`}}q0=Symbol.toStringTag;Kp[q0]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(Kp.prototype);class Zp extends Et{constructor(t){super(W.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${wn[this.unit]}>`}get ArrayType(){return this.unit===wn.DAY?Int32Array:BigInt64Array}}Q0=Symbol.toStringTag;Zp[Q0]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(Zp.prototype);class Jp 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`)}}K0=Symbol.toStringTag;Jp[K0]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(Jp.prototype);class tm extends Et{constructor(t,e){super(W.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${Jt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}Z0=Symbol.toStringTag;tm[Z0]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(tm.prototype);class em extends Et{constructor(t){super(W.Interval),this.unit=t}toString(){return`Interval<${Gr[this.unit]}>`}}J0=Symbol.toStringTag;em[J0]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(em.prototype);class rm extends Et{constructor(t){super(W.Duration),this.unit=t}toString(){return`Duration<${Jt[this.unit]}>`}}tb=Symbol.toStringTag;rm[tb]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(rm.prototype);class im 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}}eb=Symbol.toStringTag;im[eb]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(im.prototype);class Sh extends Et{constructor(t){super(W.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}rb=Symbol.toStringTag;Sh[rb]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(Sh.prototype);class nm 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(" | ")}>`}}ib=Symbol.toStringTag;nm[ib]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(nm.prototype);class sm extends Et{constructor(t){super(W.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}nb=Symbol.toStringTag;sm[nb]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(sm.prototype);class om 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}>`}}sb=Symbol.toStringTag;om[sb]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(om.prototype);class am 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(", ")}}>`}}ob=Symbol.toStringTag;am[ob]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(am.prototype);const FF=(r=>()=>++r)(-1);class lm extends Et{constructor(t,e,i,n){super(W.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=n||!1,this.id=i==null?FF():Or(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}>`}}ab=Symbol.toStringTag;lm[ab]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(lm.prototype);function lb(r){const t=r;switch(r.typeId){case W.Decimal:return r.bitWidth/32;case W.Interval:return t.unit===Gr.MONTH_DAY_NANO?4:1+t.unit;case W.FixedSizeList:return t.listSize;case W.FixedSizeBinary:return t.byteWidth;default:return 1}}class ae{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 PF(this,t,e)}getVisitFnByTypeId(t,e=!0){return Ds(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 PF(r,t,e=!0){return typeof t=="number"?Ds(r,t,e):typeof t=="string"&&t in W?Ds(r,W[t],e):t&&t instanceof Et?Ds(r,um(t),e):t!=null&&t.type&&t.type instanceof Et?Ds(r,um(t.type),e):Ds(r,W.NONE,e)}function Ds(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.IntervalMonthDayNano:i=r.visitIntervalMonthDayNano||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 um(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 Ar.HALF:return W.Float16;case Ar.SINGLE:return W.Float32;case Ar.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 wn.DAY:return W.DateDay;case wn.MILLISECOND:return W.DateMillisecond}return W.Date;case W.Interval:switch(r.unit){case Gr.DAY_TIME:return W.IntervalDayTime;case Gr.YEAR_MONTH:return W.IntervalYearMonth;case Gr.MONTH_DAY_NANO:return W.IntervalMonthDayNano}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 Ei.Dense:return W.DenseUnion;case Ei.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]}'`)}ae.prototype.visitInt8=null;ae.prototype.visitInt16=null;ae.prototype.visitInt32=null;ae.prototype.visitInt64=null;ae.prototype.visitUint8=null;ae.prototype.visitUint16=null;ae.prototype.visitUint32=null;ae.prototype.visitUint64=null;ae.prototype.visitFloat16=null;ae.prototype.visitFloat32=null;ae.prototype.visitFloat64=null;ae.prototype.visitDateDay=null;ae.prototype.visitDateMillisecond=null;ae.prototype.visitTimestampSecond=null;ae.prototype.visitTimestampMillisecond=null;ae.prototype.visitTimestampMicrosecond=null;ae.prototype.visitTimestampNanosecond=null;ae.prototype.visitTimeSecond=null;ae.prototype.visitTimeMillisecond=null;ae.prototype.visitTimeMicrosecond=null;ae.prototype.visitTimeNanosecond=null;ae.prototype.visitDenseUnion=null;ae.prototype.visitSparseUnion=null;ae.prototype.visitIntervalDayTime=null;ae.prototype.visitIntervalYearMonth=null;ae.prototype.visitIntervalMonthDayNano=null;ae.prototype.visitDuration=null;ae.prototype.visitDurationSecond=null;ae.prototype.visitDurationMillisecond=null;ae.prototype.visitDurationMicrosecond=null;ae.prototype.visitDurationNanosecond=null;const ub=new Float64Array(1),bs=new Uint32Array(ub.buffer);function Df(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 cb(r){if(r!==r)return 32256;ub[0]=r;const t=(bs[1]&2147483648)>>16&65535;let e=bs[1]&2146435072,i=0;return e>=1089470464?bs[0]>0?e=31744:(e=(e&2080374784)>>16,i=(bs[1]&1048575)>>10):e<=1056964608?(i=1048576+(bs[1]&1048575),i=1048576+(i<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,i=(bs[1]&1048575)+512>>10),t|e|i&65535}const MF=Object.freeze(Object.defineProperty({__proto__:null,float64ToUint16:cb,uint16ToFloat64:Df},Symbol.toStringTag,{value:"Module"}));class zt extends ae{}function Yt(r){return(t,e,i)=>{if(t.setValid(e,i!=null))return r(t,e,i)}}const DF=(r,t,e)=>{r[t]=Math.floor(e/864e5)},hb=(r,t,e,i)=>{if(e+1{const n=r+e;i?t[n>>3]|=1<>3]&=~(1<{r[t]=e},Rf=({values:r},t,e)=>{r[t]=e},fb=({values:r},t,e)=>{r[t]=cb(e)},NF=(r,t,e)=>{switch(r.type.precision){case Ar.HALF:return fb(r,t,e);case Ar.SINGLE:case Ar.DOUBLE:return Rf(r,t,e)}},db=({values:r},t,e)=>{DF(r,t,e.valueOf())},pb=({values:r},t,e)=>{r[t]=BigInt(e)},LF=({stride:r,values:t},e,i)=>{t.set(i.subarray(0,r),r*e)},mb=({values:r,valueOffsets:t},e,i)=>hb(r,t,e,i),yb=({values:r,valueOffsets:t},e,i)=>hb(r,t,e,R0(i)),BF=(r,t,e)=>{r.type.unit===wn.DAY?db(r,t,e):pb(r,t,e)},gb=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},vb=({values:r},t,e)=>{r[t]=BigInt(e)},_b=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},bb=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},kF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return gb(r,t,e);case Jt.MILLISECOND:return vb(r,t,e);case Jt.MICROSECOND:return _b(r,t,e);case Jt.NANOSECOND:return bb(r,t,e)}},wb=({values:r},t,e)=>{r[t]=e},xb=({values:r},t,e)=>{r[t]=e},Sb=({values:r},t,e)=>{r[t]=e},Tb=({values:r},t,e)=>{r[t]=e},UF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return wb(r,t,e);case Jt.MILLISECOND:return xb(r,t,e);case Jt.MICROSECOND:return Sb(r,t,e);case Jt.NANOSECOND:return Tb(r,t,e)}},zF=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},jF=(r,t,e)=>{const i=r.children[0],n=r.valueOffsets,s=Ci.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=Ci.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},VF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[s]),GF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(s)),WF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(n.name)),HF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[n.name]),YF=(r,t,e)=>{const i=r.type.children.map(s=>Ci.getVisitFn(s.type)),n=e instanceof Map?WF(t,e):e instanceof Qe?GF(t,e):Array.isArray(e)?VF(t,e):HF(t,e);r.type.children.forEach((s,o)=>n(i[o],r.children[o],s,o))},XF=(r,t,e)=>{r.type.mode===Ei.Dense?Ib(r,t,e):Eb(r,t,e)},Ib=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ci.visit(n,r.valueOffsets[t],e)},Eb=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ci.visit(n,t,e)},qF=(r,t,e)=>{var i;(i=r.dictionary)===null||i===void 0||i.set(r.values[t],e)},QF=(r,t,e)=>{switch(r.type.unit){case Gr.YEAR_MONTH:return Ab(r,t,e);case Gr.DAY_TIME:return Cb(r,t,e);case Gr.MONTH_DAY_NANO:return Ob(r,t,e)}},Cb=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},Ab=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},Ob=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},Fb=({values:r},t,e)=>{r[t]=e},Pb=({values:r},t,e)=>{r[t]=e},Mb=({values:r},t,e)=>{r[t]=e},Db=({values:r},t,e)=>{r[t]=e},KF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return Fb(r,t,e);case Jt.MILLISECOND:return Pb(r,t,e);case Jt.MICROSECOND:return Mb(r,t,e);case Jt.NANOSECOND:return Db(r,t,e)}},ZF=(r,t,e)=>{const{stride:i}=r,n=r.children[0],s=Ci.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=t*i;++o`${no(t)}: ${no(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new JF(this[Jr],this[Xs])}}class JF{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[Jr].type.children.some(i=>i.name===e)}getOwnPropertyDescriptor(t,e){if(t[Jr].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[Jr].type.children.findIndex(n=>n.name===e);if(i!==-1){const n=qr.visit(t[Jr].children[i],t[Xs]);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Jr].type.children.findIndex(s=>s.name===e);return n!==-1?(Ci.visit(t[Jr].children[n],t[Xs],i),Reflect.set(t,e,i)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,i):!1}}const eP=new tP;class Pt extends ae{}function jt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const rP=(r,t)=>864e5*r[t],iP=(r,t)=>null,Rb=(r,t,e)=>{if(e+1>=t.length)return null;const i=Or(t[e]),n=Or(t[e+1]);return r.subarray(i,n)},nP=({offset:r,values:t},e)=>{const i=r+e;return(t[i>>3]&1<rP(r,t),Lb=({values:r},t)=>Or(r[t]),Tn=({stride:r,values:t},e)=>t[r*e],sP=({stride:r,values:t},e)=>Df(t[r*e]),Bb=({values:r},t)=>r[t],oP=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),kb=({values:r,valueOffsets:t},e)=>Rb(r,t,e),Ub=({values:r,valueOffsets:t},e)=>{const i=Rb(r,t,e);return i!==null?z2(i):null},aP=({values:r},t)=>r[t],lP=({type:r,values:t},e)=>r.precision!==Ar.HALF?t[e]:Df(t[e]),uP=(r,t)=>r.type.unit===wn.DAY?Nb(r,t):Lb(r,t),zb=({values:r},t)=>1e3*Or(r[t]),jb=({values:r},t)=>Or(r[t]),$b=({values:r},t)=>B0(r[t],BigInt(1e3)),Vb=({values:r},t)=>B0(r[t],BigInt(1e6)),cP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return zb(r,t);case Jt.MILLISECOND:return jb(r,t);case Jt.MICROSECOND:return $b(r,t);case Jt.NANOSECOND:return Vb(r,t)}},Gb=({values:r},t)=>r[t],Wb=({values:r},t)=>r[t],Hb=({values:r},t)=>r[t],Yb=({values:r},t)=>r[t],hP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Gb(r,t);case Jt.MILLISECOND:return Wb(r,t);case Jt.MICROSECOND:return Hb(r,t);case Jt.NANOSECOND:return Yb(r,t)}},fP=({values:r,stride:t},e)=>au.decimal(r.subarray(t*e,t*(e+1))),dP=(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])},pP=(r,t)=>{const{valueOffsets:e,children:i}=r,{[t]:n,[t+1]:s}=e,o=i[0];return new Lf(o.slice(n,s-n))},mP=(r,t)=>new Nf(r,t),yP=(r,t)=>r.type.mode===Ei.Dense?Xb(r,t):qb(r,t),Xb=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return qr.visit(i,r.valueOffsets[t])},qb=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return qr.visit(i,t)},gP=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},vP=(r,t)=>r.type.unit===Gr.MONTH_DAY_NANO?Zb(r,t):r.type.unit===Gr.DAY_TIME?Qb(r,t):Kb(r,t),Qb=({values:r},t)=>r.subarray(2*t,2*(t+1)),Kb=({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},Zb=({values:r},t)=>r.subarray(4*t,4*(t+1)),Jb=({values:r},t)=>r[t],tw=({values:r},t)=>r[t],ew=({values:r},t)=>r[t],rw=({values:r},t)=>r[t],_P=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Jb(r,t);case Jt.MILLISECOND:return tw(r,t);case Jt.MICROSECOND:return ew(r,t);case Jt.NANOSECOND:return rw(r,t)}},bP=(r,t)=>{const{stride:e,children:i}=r,s=i[0].slice(t*e,e);return new Qe([s])};Pt.prototype.visitNull=jt(iP);Pt.prototype.visitBool=jt(nP);Pt.prototype.visitInt=jt(aP);Pt.prototype.visitInt8=jt(Tn);Pt.prototype.visitInt16=jt(Tn);Pt.prototype.visitInt32=jt(Tn);Pt.prototype.visitInt64=jt(Bb);Pt.prototype.visitUint8=jt(Tn);Pt.prototype.visitUint16=jt(Tn);Pt.prototype.visitUint32=jt(Tn);Pt.prototype.visitUint64=jt(Bb);Pt.prototype.visitFloat=jt(lP);Pt.prototype.visitFloat16=jt(sP);Pt.prototype.visitFloat32=jt(Tn);Pt.prototype.visitFloat64=jt(Tn);Pt.prototype.visitUtf8=jt(Ub);Pt.prototype.visitLargeUtf8=jt(Ub);Pt.prototype.visitBinary=jt(kb);Pt.prototype.visitLargeBinary=jt(kb);Pt.prototype.visitFixedSizeBinary=jt(oP);Pt.prototype.visitDate=jt(uP);Pt.prototype.visitDateDay=jt(Nb);Pt.prototype.visitDateMillisecond=jt(Lb);Pt.prototype.visitTimestamp=jt(cP);Pt.prototype.visitTimestampSecond=jt(zb);Pt.prototype.visitTimestampMillisecond=jt(jb);Pt.prototype.visitTimestampMicrosecond=jt($b);Pt.prototype.visitTimestampNanosecond=jt(Vb);Pt.prototype.visitTime=jt(hP);Pt.prototype.visitTimeSecond=jt(Gb);Pt.prototype.visitTimeMillisecond=jt(Wb);Pt.prototype.visitTimeMicrosecond=jt(Hb);Pt.prototype.visitTimeNanosecond=jt(Yb);Pt.prototype.visitDecimal=jt(fP);Pt.prototype.visitList=jt(dP);Pt.prototype.visitStruct=jt(mP);Pt.prototype.visitUnion=jt(yP);Pt.prototype.visitDenseUnion=jt(Xb);Pt.prototype.visitSparseUnion=jt(qb);Pt.prototype.visitDictionary=jt(gP);Pt.prototype.visitInterval=jt(vP);Pt.prototype.visitIntervalDayTime=jt(Qb);Pt.prototype.visitIntervalYearMonth=jt(Kb);Pt.prototype.visitIntervalMonthDayNano=jt(Zb);Pt.prototype.visitDuration=jt(_P);Pt.prototype.visitDurationSecond=jt(Jb);Pt.prototype.visitDurationMillisecond=jt(tw);Pt.prototype.visitDurationMicrosecond=jt(ew);Pt.prototype.visitDurationNanosecond=jt(rw);Pt.prototype.visitFixedSizeList=jt(bP);Pt.prototype.visitMap=jt(pP);const qr=new Pt,Rs=Symbol.for("keys"),qs=Symbol.for("vals"),Ns=Symbol.for("kKeysAsStrings"),Th=Symbol.for("_kKeysAsStrings");class Lf{constructor(t){return this[Rs]=new Qe([t.children[0]]).memoize(),this[qs]=t.children[1],new Proxy(this,new xP)}get[Ns](){return this[Th]||(this[Th]=Array.from(this[Rs].toArray(),String))}[Symbol.iterator](){return new wP(this[Rs],this[qs])}get size(){return this[Rs].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Rs],e=this[qs],i={};for(let n=-1,s=t.length;++n`${no(t)}: ${no(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class wP{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),qr.visit(this.vals,t)]})}}class xP{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Ns]}has(t,e){return t[Ns].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Ns].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Ns].indexOf(e);if(i!==-1){const n=qr.visit(Reflect.get(t,qs),i);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Ns].indexOf(e);return n!==-1?(Ci.visit(Reflect.get(t,qs),n,i),Reflect.set(t,e,i)):Reflect.has(t,e)?Reflect.set(t,e,i):!1}}Object.defineProperties(Lf.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Rs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[qs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Th]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let cm;function iw(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 nw=(r,t)=>r<0?t+r:r,hm=r=>r!==r;function fs(r){if(typeof r!=="object"||r===null)return hm(r)?hm: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?L0(r,e):!1:r instanceof Map?TP(r):Array.isArray(r)?SP(r):r instanceof Qe?IP(r):EP(r,!0)}function SP(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 CP(r,e);case Map:return fm(r,e,e.keys());case Lf:case Nf:case Object:case void 0:return fm(r,e,t||Object.keys(e))}return e instanceof Qe?AP(r,e):!1}}function CP(r,t){const e=r.length;if(t.length!==e)return!1;for(let i=-1;++i>i}function FP(r,t,e){return e?!!(r[t>>3]|=1<>3]&=~(1<0||e.byteLength>3):ow(new uu(e,r,t,null,Bf)).subarray(0,i)),n}return e}function ow(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 uu{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 Ul(r,t,n)+Ul(r,i,e)+aw(r,n>>3,i-n>>3)}function aw(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+=Za(s.getUint32(n)),n+=4;for(;o-n>=2;)i+=Za(s.getUint16(n)),n+=2;for(;o-n>=1;)i+=Za(s.getUint8(n)),n+=1;return i}function Za(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 PP=Object.freeze(Object.defineProperty({__proto__:null,BitIterator:uu,getBit:sw,getBool:Bf,packBools:ow,popcnt_array:aw,popcnt_bit_range:Ul,popcnt_uint32:Za,setBool:FP,truncateBitmap:Ih},Symbol.toStringTag,{value:"Module"})),MP=-1;class ia{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<=MP&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-Ul(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 ia?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=lb(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===Ei.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(Ih(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 ia(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(Ih(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[ji.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[ji.TYPE])&&(o[ji.TYPE]=s.subarray(t,t+e)),(s=o[ji.OFFSET])&&(o[ji.OFFSET]=s.subarray(t,t+e+1))||(s=o[ji.DATA])&&(o[ji.DATA]=n===6?s:s.subarray(i*t,i*(t+e))),o}_sliceChildren(t,e,i){return t.map(n=>n.slice(e,i))}}ia.prototype.children=Object.freeze([]);class dm{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function RP(r){return r.reduce((t,e)=>t+e.nullCount,0)}function NP(r){return r.reduce((t,e,i)=>(t[i+1]=t[i]+e.length,t),new Uint32Array(r.length+1))}function LP(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 kf(r,t,e,i){let n=0,s=0,o=t.length-1;do{if(n>=o-1)return e0?0:-1}function zP(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let i=0;for(const n of new uu(e,r.offset+(t||0),r.length,e,Bf)){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 W.Union:break;case W.Dictionary:break;default:return zP(r,e)}const i=qr.getVisitFn(r),n=fs(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 dm(r.data.length,i=>{const s=r.data[i].length,o=r.slice(e,e+s);return e+=s,new jP(o)})}class jP{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof ia)))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}=hw[o.typeId],c=s[0];this.isValid=h=>lw(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,fw[o.typeId]),this._offsets=NP(s);break}this.data=s,this.type=o,this.stride=lb(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 DP(this.data)}get nullCount(){return RP(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(nw(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return $P.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(iw(this,t,e,({data:i,_offsets:n},s,o)=>LP(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 zl(this.data[0].dictionary),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new Qe(e)}return new zl(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}}cw=Symbol.toStringTag;Qe[cw]=(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=qr.getVisitFnByTypeId(e),n=Ci.getVisitFnByTypeId(e),s=mm.getVisitFnByTypeId(e);hw[e]={get:i,set:n,indexOf:s},fw[e]=Object.create(r,{isValid:{value:pm(lw)},get:{value:pm(qr.getVisitFnByTypeId(e))},set:{value:BP(Ci.getVisitFnByTypeId(e))},indexOf:{value:kP(mm.getVisitFnByTypeId(e))}})}return"Vector"})(Qe.prototype);class zl 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 zl(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 VP=65536;function ks(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const oo=8,Uf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class zf{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`${ks(this.buffer[3])} ${ks(this.buffer[2])} ${ks(this.buffer[1])} ${ks(this.buffer[0])}`}static multiply(t,e){return new hi(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new hi(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return hi.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return hi.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const i=t.startsWith("-"),n=t.length,s=new hi(e);for(let o=i?1:0;o>BigInt(32))):o+=2}return n}function YP(r){const t=r.length,e=new Array(t/2);for(let i=0,n=0;i>>0);i[s++]={months:r[n],days:r[n+1],nanoseconds:t?`${o}`:o}}return i}const qP=Object.freeze(Object.defineProperty({__proto__:null,toIntervalDayTimeInt32Array:WP,toIntervalDayTimeObjects:YP,toIntervalMonthDayNanoInt32Array:HP,toIntervalMonthDayNanoObjects:XP},Symbol.toStringTag,{value:"Module"}));class Rt extends ae{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 ds(r,t){return r===t||lr(r,t)}function Ki(r,t){return r===t||lr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function cu(r,t){return r===t||lr(r,t)&&r.precision===t.precision}function QP(r,t){return r===t||lr(r,t)&&r.byteWidth===t.byteWidth}function jf(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function ma(r,t){return r===t||lr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function ya(r,t){return r===t||lr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function KP(r,t){return r===t||lr(r,t)&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function ZP(r,t){return r===t||lr(r,t)&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function $f(r,t){return r===t||lr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,i)=>e===t.typeIds[i])&&Ai.compareManyFields(r.children,t.children)}function JP(r,t){return r===t||lr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Ai.visit(r.indices,t.indices)&&Ai.visit(r.dictionary,t.dictionary)}function hu(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function ga(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function tM(r,t){return r===t||lr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function eM(r,t){return r===t||lr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}Rt.prototype.visitNull=ds;Rt.prototype.visitBool=ds;Rt.prototype.visitInt=Ki;Rt.prototype.visitInt8=Ki;Rt.prototype.visitInt16=Ki;Rt.prototype.visitInt32=Ki;Rt.prototype.visitInt64=Ki;Rt.prototype.visitUint8=Ki;Rt.prototype.visitUint16=Ki;Rt.prototype.visitUint32=Ki;Rt.prototype.visitUint64=Ki;Rt.prototype.visitFloat=cu;Rt.prototype.visitFloat16=cu;Rt.prototype.visitFloat32=cu;Rt.prototype.visitFloat64=cu;Rt.prototype.visitUtf8=ds;Rt.prototype.visitLargeUtf8=ds;Rt.prototype.visitBinary=ds;Rt.prototype.visitLargeBinary=ds;Rt.prototype.visitFixedSizeBinary=QP;Rt.prototype.visitDate=jf;Rt.prototype.visitDateDay=jf;Rt.prototype.visitDateMillisecond=jf;Rt.prototype.visitTimestamp=ma;Rt.prototype.visitTimestampSecond=ma;Rt.prototype.visitTimestampMillisecond=ma;Rt.prototype.visitTimestampMicrosecond=ma;Rt.prototype.visitTimestampNanosecond=ma;Rt.prototype.visitTime=ya;Rt.prototype.visitTimeSecond=ya;Rt.prototype.visitTimeMillisecond=ya;Rt.prototype.visitTimeMicrosecond=ya;Rt.prototype.visitTimeNanosecond=ya;Rt.prototype.visitDecimal=ds;Rt.prototype.visitList=KP;Rt.prototype.visitStruct=ZP;Rt.prototype.visitUnion=$f;Rt.prototype.visitDenseUnion=$f;Rt.prototype.visitSparseUnion=$f;Rt.prototype.visitDictionary=JP;Rt.prototype.visitInterval=hu;Rt.prototype.visitIntervalDayTime=hu;Rt.prototype.visitIntervalYearMonth=hu;Rt.prototype.visitIntervalMonthDayNano=hu;Rt.prototype.visitDuration=ga;Rt.prototype.visitDurationSecond=ga;Rt.prototype.visitDurationMillisecond=ga;Rt.prototype.visitDurationMicrosecond=ga;Rt.prototype.visitDurationNanosecond=ga;Rt.prototype.visitFixedSizeList=tM;Rt.prototype.visitMap=eM;const Ai=new Rt;function rM(r,t){return Ai.compareSchemas(r,t)}function iM(r,t){return Ai.compareFields(r,t)}function nM(r,t){return Ai.visit(r,t)}const ym=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},OF),GP),PP),MF),TF),OP),EF),qP),{compareSchemas:rM,compareFields:iM,compareTypes:nM}),dw=6048e5,sM=864e5,gm=Symbol.for("constructDateFrom");function Wi(r,t){return typeof r=="function"?r(t):r&&typeof r=="object"&&gm in r?r[gm](t):r instanceof Date?new r.constructor(t):new Date(t)}function Qr(r,t){return Wi(t||r,r)}let oM={};function fu(){return oM}function na(r,t){var a,l,u,c;const e=fu(),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 vm(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 aM(r,...t){const e=Wi.bind(null,t.find(i=>typeof i=="object"));return t.map(e)}function _m(r,t){const e=Qr(r,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function lM(r,t,e){const[i,n]=aM(e==null?void 0:e.in,r,t),s=_m(i),o=_m(n),a=+s-vm(s),l=+o-vm(o);return Math.round((a-l)/sM)}function uM(r,t){const e=pw(r,t),i=Wi(r,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),jl(i)}function cM(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function hM(r){return!(!cM(r)&&typeof r!="number"||isNaN(+Qr(r)))}function fM(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 dM={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"}},pM=(r,t,e)=>{let i;const n=dM[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 ac(r){return(t={})=>{const e=t.width?String(t.width):r.defaultWidth;return r.formats[e]||r.formats[r.defaultWidth]}}const mM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vM={date:ac({formats:mM,defaultWidth:"full"}),time:ac({formats:yM,defaultWidth:"full"}),dateTime:ac({formats:gM,defaultWidth:"full"})},_M={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bM=(r,t,e,i)=>_M[r];function bo(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 wM={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xM={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},SM={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"]},TM={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"]},IM={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"}},EM={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"}},CM=(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"},AM={ordinalNumber:CM,era:bo({values:wM,defaultWidth:"wide"}),quarter:bo({values:xM,defaultWidth:"wide",argumentCallback:r=>r-1}),month:bo({values:SM,defaultWidth:"wide"}),day:bo({values:TM,defaultWidth:"wide"}),dayPeriod:bo({values:IM,defaultWidth:"wide",formattingValues:EM,defaultFormattingWidth:"wide"})};function wo(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)?FM(a,h=>h.test(o)):OM(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 OM(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function FM(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 MM=/^(\d+)(th|st|nd|rd)?/i,DM=/\d+/i,RM={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},NM={any:[/^b/i,/^(a|c)/i]},LM={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},BM={any:[/1/i,/2/i,/3/i,/4/i]},kM={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},UM={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]},zM={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},jM={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]},$M={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},VM={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}},GM={ordinalNumber:PM({matchPattern:MM,parsePattern:DM,valueCallback:r=>parseInt(r,10)}),era:wo({matchPatterns:RM,defaultMatchWidth:"wide",parsePatterns:NM,defaultParseWidth:"any"}),quarter:wo({matchPatterns:LM,defaultMatchWidth:"wide",parsePatterns:BM,defaultParseWidth:"any",valueCallback:r=>r+1}),month:wo({matchPatterns:kM,defaultMatchWidth:"wide",parsePatterns:UM,defaultParseWidth:"any"}),day:wo({matchPatterns:zM,defaultMatchWidth:"wide",parsePatterns:jM,defaultParseWidth:"any"}),dayPeriod:wo({matchPatterns:$M,defaultMatchWidth:"any",parsePatterns:VM,defaultParseWidth:"any"})},WM={code:"en-US",formatDistance:pM,formatLong:vM,formatRelative:bM,localize:AM,match:GM,options:{weekStartsOn:0,firstWeekContainsDate:1}};function HM(r,t){const e=Qr(r,t==null?void 0:t.in);return lM(e,fM(e))+1}function YM(r,t){const e=Qr(r,t==null?void 0:t.in),i=+jl(e)-+uM(e);return Math.round(i/dw)+1}function mw(r,t){var c,h,p,f;const e=Qr(r,t==null?void 0:t.in),i=e.getFullYear(),n=fu(),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=Wi((t==null?void 0:t.in)||r,0);o.setFullYear(i+1,0,s),o.setHours(0,0,0,0);const a=na(o,t),l=Wi((t==null?void 0:t.in)||r,0);l.setFullYear(i,0,s),l.setHours(0,0,0,0);const u=na(l,t);return+e>=+a?i+1:+e>=+u?i:i-1}function XM(r,t){var a,l,u,c;const e=fu(),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=mw(r,t),s=Wi((t==null?void 0:t.in)||r,0);return s.setFullYear(n,0,i),s.setHours(0,0,0,0),na(s,t)}function qM(r,t){const e=Qr(r,t==null?void 0:t.in),i=+na(e,t)-+XM(e,t);return Math.round(i/dw)+1}function ve(r,t){const e=r<0?"-":"",i=Math.abs(r).toString().padStart(t,"0");return e+i}const nn={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)}},ws={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bm={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 nn.y(r,t)},Y:function(r,t,e,i){const n=mw(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=pw(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 nn.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=qM(r,i);return t==="wo"?e.ordinalNumber(n,{unit:"week"}):ve(n,t.length)},I:function(r,t,e){const i=YM(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"}):nn.d(r,t)},D:function(r,t,e){const i=HM(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=ws.noon:i===0?n=ws.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=ws.evening:i>=12?n=ws.afternoon:i>=4?n=ws.morning:n=ws.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 nn.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):nn.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"}):nn.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):nn.s(r,t)},S:function(r,t){return nn.S(r,t)},X:function(r,t,e){const i=r.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return xm(i);case"XXXX":case"XX":return Wn(i);case"XXXXX":case"XXX":default:return Wn(i,":")}},x:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"x":return xm(i);case"xxxx":case"xx":return Wn(i);case"xxxxx":case"xxx":default:return Wn(i,":")}},O:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wm(i,":");case"OOOO":default:return"GMT"+Wn(i,":")}},z:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wm(i,":");case"zzzz":default:return"GMT"+Wn(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 wm(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 xm(r,t){return r%60===0?(r>0?"-":"+")+ve(Math.abs(r)/60,2):Wn(r,t)}function Wn(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 Sm=(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"})}},yw=(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"})}},QM=(r,t)=>{const e=r.match(/(P+)(p+)?/)||[],i=e[1],n=e[2];if(!n)return Sm(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}}",Sm(i,t)).replace("{{time}}",yw(n,t))},KM={p:yw,P:QM},ZM=/^D+$/,JM=/^Y+$/,tD=["D","DD","YY","YYYY"];function eD(r){return ZM.test(r)}function rD(r){return JM.test(r)}function iD(r,t,e){const i=nD(r,t,e);if(console.warn(i),tD.includes(r))throw new RangeError(i)}function nD(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 sD=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oD=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,aD=/^'([^]*?)'?$/,lD=/''/g,uD=/[a-zA-Z]/;function gw(r,t,e){var c,h,p,f;const i=fu(),n=i.locale??WM,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(!hM(a))throw new RangeError("Invalid time value");let l=t.match(oD).map(y=>{const g=y[0];if(g==="p"||g==="P"){const d=KM[g];return d(y,n.formatLong)}return y}).join("").match(sD).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const g=y[0];if(g==="'")return{isToken:!1,value:cD(y)};if(bm[g])return{isToken:!0,value:y};if(g.match(uD))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;(rD(g)||eD(g))&&iD(g,t,String(r));const d=bm[g[0]];return d(a,g,n.localize,u)}).join("")}function cD(r){const t=r.match(aD);return t?t[1].replace(lD,"'"):r}function hD(r,t){return Qr(r*1e3,t==null?void 0:t.in)}function fD(r,t){const e=dD(t)?new t(0):Wi(t,0);return e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),e.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),e}function dD(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function pD(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 mD(r){return r!=null}async function Eh(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await cn(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function yD(r){return gr(r)?!1:Et.isInt(r.type)&&!vw(r)||gD(r)}function gD(r){return gr(r)?!1:Et.isInt(r.type)&&r.type.isSigned===!1}function vD(r){return gr(r)?!1:Et.isFloat(r.type)??!1}function _D(r){return gr(r)?!1:Et.isDecimal(r.type)}function bD(r){return gr(r)?!1:Et.isBool(r.type)}function wD(r){return gr(r)?!1:Et.isDuration(r.type)}function vw(r){return gr(r)?!1:Et.isInt(r.type)&&r.metadata.get("ARROW:extension:name")==="period"}function xD(r){return gr(r)?!1:Et.isTimestamp(r.type)}function SD(r){return gr(r)?!1:Et.isDate(r.type)}function TD(r){return gr(r)?!1:Et.isTime(r.type)}function ID(r){return gr(r)?!1:Et.isList(r.type)||Et.isFixedSizeList(r.type)}function ED(r){return gr(r)?!1:Et.isStruct(r.type)||Et.isMap(r.type)}function CD(r){return gr(r)?!1:Et.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Et.isInterval(r.type)}function AD(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 OD(r,t){var i;const e=AD(r,((i=t==null?void 0:t.type)==null?void 0:i.unit)??Jt.SECOND);return hD(e)}function FD(r,t){const e=OD(r,t);return gw(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function PD(r){const t="yyyy-MM-dd";return r instanceof Date||typeof r=="number"&&Number.isFinite(r)?gw(r,t):(console.warn(`Unsupported date value: ${r}`),String(r))}function MD(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 Cr(r,i):e=new Cr(r):i?e=new Cr(r,i):e=new Cr(r),fD(e,Date)}function DD(r,t){var a;const e=((a=t==null?void 0:t.type)==null?void 0:a.scale)||0;let i=ym.bigNumToString(new ym.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=pD(i.slice(-e),"0")||"";return`${n}${s}${o?`.${o}`:""}`}function RD(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 ND(r,t){var i,n,s,o;if(Et.isInterval(t==null?void 0:t.type))return RD(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=Ch(u.left,(n=(i=t.type)==null?void 0:i.children)==null?void 0:n[0]),f=Ch(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 LD(r,t){return(t==null?void 0:t.type)instanceof Sh?JSON.parse(JSON.stringify(r,(e,i)=>{if(mD(i))return typeof i=="bigint"?Number(i):i})):JSON.parse(JSON.stringify(r,(e,i)=>typeof i=="bigint"?Number(i):i))}function Ch(r,t){if(gr(r))return null;const e=r instanceof Date||Number.isFinite(r);if(e&&SD(t))return PD(r);if(typeof r=="bigint"&&TD(t))return FD(Number(r),t);if(e&&xD(t))return MD(r,t);if(vw(t))throw new Error("Period type is not supported yet");if(CD(t))return ND(r,t);if(wD(t))throw new Error("Duration type is not supported yet");return _D(t)?DD(r,t):vD(t)&&Number.isFinite(r)||yD(t)?r:ED(t)||ID(t)?LD(r,t):bD(t)?!!r:String(r)}function Tm(r){return((r.toArray()||[]).map(i=>i.toJSON())||[]).map(i=>(r.schema.fields.forEach(n=>i[n.name]=Ch(i[n.name],n)),i))}var sa=(r=>(r.ORIGIN_PRIVATE_FS="origin-private-fs",r.NODE_FS="node-fs",r))(sa||{});async function _w(r){const t=Bx(r,{logger:!1});let e,i;const n=await Eh();if(n==="browser"){if(typeof t.bundles>"u"){const{getBundles:l}=await cn(async()=>{const{getBundles:u}=await import("./default-browser-BrgSDbLD.js");return{getBundles:u}},[]);t.bundles=await l()}i=await zp(await t.bundles),e=new Worker(i.mainWorker)}else if(n==="node"){if(typeof t.bundles>"u"){const{getBundles:c}=await cn(async()=>{const{getBundles:h}=await import("./default-node-BWr47-4Z.js");return{getBundles:h}},__vite__mapDeps([0,1,2]));t.bundles=await c()}i=await zp(await t.bundles);let l=i.mainWorker;l.startsWith("/@fs/")&&(l=l.replace("/@fs/","file://"));const u=await cn(()=>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 P0:t.logger===!1?s=new b2:s=t.logger;const o=new C2(s,e);if(await o.instantiate(i.mainModule,i.pthreadWorker),t.storage)switch(t.storage.type){case sa.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 sa.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 Tm(f)}const c=await a.prepare(l),h=await c.query(...u),p=Tm(h);return c.close(),p},close:async()=>{await a.close(),await o.terminate(),await e.terminate()}}}async function BD(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 kD(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 at(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 Nm;Nm=xt;class Ke{constructor(t,e){$(this,"name");$(this,"keyAsName");$(this,"primary");$(this,"notNull");$(this,"default");$(this,"defaultFn");$(this,"onUpdateFn");$(this,"hasDefault");$(this,"isUnique");$(this,"uniqueName");$(this,"uniqueType");$(this,"dataType");$(this,"columnType");$(this,"enumValues");$(this,"generated");$(this,"generatedIdentity");$(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"}}$(Ke,Nm,"Column");const Qs=Symbol.for("drizzle:Name");function UD(r,t){return`${r[Qs]}_${t.join("_")}_unique`}var Lm,Bm;class Fr extends(Bm=Ke,Lm=xt,Bm){constructor(t,e){e.uniqueName||(e.uniqueName=UD(t,[e.name])),super(t,e),this.table=t}}$(Fr,Lm,"PgColumn");const Im=Symbol.for("drizzle:isPgEnum");function zD(r){return!!r&&typeof r=="function"&&Im in r&&r[Im]===!0}var km;km=xt;class dr{constructor(t,e,i,n=!1,s=[]){this._={brand:"Subquery",sql:t,selectedFields:e,alias:i,isWith:n,usedTables:s}}}$(dr,km,"Subquery");var Um,zm;class Vf extends(zm=dr,Um=xt,zm){}$(Vf,Um,"WithSubquery");const Mr={startActiveSpan(r,t){return t()}},He=Symbol.for("drizzle:ViewBaseConfig"),Ks=Symbol.for("drizzle:Schema"),Ah=Symbol.for("drizzle:Columns"),Em=Symbol.for("drizzle:ExtraConfigColumns"),lc=Symbol.for("drizzle:OriginalName"),uc=Symbol.for("drizzle:BaseName"),$l=Symbol.for("drizzle:IsAlias"),Cm=Symbol.for("drizzle:ExtraConfigBuilder"),jD=Symbol.for("drizzle:IsDrizzleTable");var jm,$m,Vm,Gm,Wm,Hm,Ym,Xm,qm,Qm;Qm=xt,qm=Qs,Xm=lc,Ym=Ks,Hm=Ah,Wm=Em,Gm=uc,Vm=$l,$m=jD,jm=Cm;class St{constructor(t,e,i){$(this,qm);$(this,Xm);$(this,Ym);$(this,Hm);$(this,Wm);$(this,Gm);$(this,Vm,!1);$(this,$m,!0);$(this,jm);this[Qs]=this[lc]=t,this[Ks]=e,this[uc]=i}}$(St,Qm,"Table"),$(St,"Symbol",{Name:Qs,Schema:Ks,OriginalName:lc,Columns:Ah,ExtraConfigColumns:Em,BaseName:uc,IsAlias:$l,ExtraConfigBuilder:Cm});function Kn(r){return r[Qs]}function oa(r){return`${r[Ks]??"public"}.${r[Qs]}`}function bw(r){return r!=null&&typeof r.getSQL=="function"}function $D(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 Km;Km=xt;class Ye{constructor(t){$(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new Ft([this])}}$(Ye,Km,"StringChunk");var Zm;Zm=xt;const Xn=class Xn{constructor(t){$(this,"decoder",ww);$(this,"shouldInlineParams",!1);$(this,"usedTables",[]);this.queryChunks=t;for(const e of t)if(at(e,St)){const i=e[St.Symbol.Schema];this.usedTables.push(i===void 0?e[St.Symbol.Name]:i+"."+e[St.Symbol.Name])}}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Mr.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 $D(t.map(c=>{var h;if(at(c,Ye))return{sql:c.value.join(""),params:[]};if(at(c,Vl))return{sql:s(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const p=[new Ye("(")];for(const[f,y]of c.entries())p.push(y),fr},xw={mapToDriverValue:r=>r};({...ww,...xw});var ty;ty=xt;class Hi{constructor(t,e=xw){$(this,"brand");this.value=t,this.encoder=e}getSQL(){return new Ft([this])}}$(Hi,ty,"Param");function H(r,...t){const e=[];(t.length>0||r.length>0&&r[0]!=="")&&e.push(new Ye(r[0]));for(const[i,n]of t.entries())e.push(n,new Ye(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 Ye(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 Vl(l)}r.identifier=s;function o(l){return new as(l)}r.placeholder=o;function a(l,u){return new Hi(l,u)}r.param=a})(H||(H={}));(r=>{var e;e=xt;const i=class i{constructor(s,o){$(this,"isSelectionField",!1);this.sql=s,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new i(this.sql,this.fieldAlias)}};$(i,e,"SQL.Aliased");let t=i;r.Aliased=t})(Ft||(Ft={}));var ey;ey=xt;class as{constructor(t){this.name=t}getSQL(){return new Ft([this])}}$(as,ey,"Placeholder");function Am(r,t){return r.map(e=>{if(at(e,as)){if(!(e.name in t))throw new Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(at(e,Hi)&&at(e.value,as)){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 GD=Symbol.for("drizzle:IsDrizzleView");var ry,iy,ny;ny=xt,iy=He,ry=GD;class In{constructor({name:t,schema:e,selectedFields:i,query:n}){$(this,iy);$(this,ry,!0);this[He]={name:t,originalName:t,schema:e,selectedFields:i,query:n,isExisting:!n,isAlias:!1}}getSQL(){return new Ft([this])}}$(In,ny,"View");Ke.prototype.getSQL=function(){return new Ft([this])};St.prototype.getSQL=function(){return new Ft([this])};dr.prototype.getSQL=function(){return new Ft([this])};var sy;sy=xt;class aa{constructor(t){this.table=t}get(t,e){return e==="table"?this.table:t[e]}}$(aa,sy,"ColumnAliasProxyHandler");var oy;oy=xt;class du{constructor(t,e){this.alias=t,this.replaceOriginalName=e}get(t,e){if(e===St.Symbol.IsAlias)return!0;if(e===St.Symbol.Name)return this.alias;if(this.replaceOriginalName&&e===St.Symbol.OriginalName)return this.alias;if(e===He)return{...t[He],name:this.alias,isAlias:!0};if(e===St.Symbol.Columns){const n=t[St.Symbol.Columns];if(!n)return n;const s={};return Object.keys(n).map(o=>{s[o]=new Proxy(n[o],new aa(new Proxy(t,this)))}),s}const i=t[e];return at(i,Ke)?new Proxy(i,new aa(new Proxy(t,this))):i}}$(du,oy,"TableAliasProxyHandler");function cc(r,t){return new Proxy(r,new du(t,!1))}function Bi(r,t){return new Proxy(r,new aa(new Proxy(r.table,new du(t,!1))))}function Sw(r,t){return new Ft.Aliased(Gl(r.sql,t),r.fieldAlias)}function Gl(r,t){return H.join(r.queryChunks.map(e=>at(e,Ke)?Bi(e,t):at(e,Ft)?Gl(e,t):at(e,Ft.Aliased)?Sw(e,t):e))}var ay,ly;class Gf extends(ly=Error,ay=xt,ly){constructor({message:t,cause:e}){super(t),this.name="DrizzleError",this.cause=e}}$(Gf,ay,"DrizzleError");var uy,cy;class Tw extends(cy=Gf,uy=xt,cy){constructor(){super({message:"Rollback"})}}$(Tw,uy,"TransactionRollbackError");var hy;hy=xt;class Iw{write(t){console.log(t)}}$(Iw,hy,"ConsoleLogWriter");var fy;fy=xt;class Ew{constructor(t){$(this,"writer");this.writer=(t==null?void 0:t.writer)??new Iw}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}`)}}$(Ew,fy,"DefaultLogger");var dy;dy=xt;class Cw{logQuery(){}}$(Cw,dy,"NoopLogger");var py,my;my=xt,py=Symbol.toStringTag;class En{constructor(){$(this,py,"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)}}$(En,my,"QueryPromise");function ls(r,t){return Object.entries(r).reduce((e,[i,n])=>{if(typeof i!="string")return e;const s=t?[...t,i]:[i];return at(n,Ke)||at(n,Ft)||at(n,Ft.Aliased)?e.push({path:s,field:n}):at(n,St)?e.push(...ls(n[St.Symbol.Columns],s)):e.push(...ls(n,s)),e},[])}function Wf(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 Aw(r,t){const e=Object.entries(t).filter(([,i])=>i!==void 0).map(([i,n])=>at(n,Ft)||at(n,Ke)?[i,n]:[i,new Hi(n,r[St.Symbol.Columns][i])]);if(e.length===0)throw new Error("No values to set");return Object.fromEntries(e)}function WD(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 HD(r){return r[St.Symbol.Columns]}function Yn(r){return at(r,dr)?r._.alias:at(r,In)?r[He].name:at(r,Ft)?void 0:r[St.Symbol.IsAlias]?r[St.Symbol.Name]:r[St.Symbol.BaseName]}function YD(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 yy,gy;class Ow extends(gy=Fr,yy=xt,gy){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}$(Ow,yy,"PgDate");var vy,_y;class Fw extends(_y=Fr,vy=xt,_y){getSQLType(){return"date"}}$(Fw,vy,"PgDateString");var by,wy;class Pw extends(wy=Fr,by=xt,wy){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}}$(Pw,by,"PgJson");var xy,Sy;class Mw extends(Sy=Fr,xy=xt,Sy){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}}$(Mw,xy,"PgJsonb");var Ty,Iy;class Dw extends(Iy=Fr,Ty=xt,Iy){constructor(e,i){super(e,i);$(this,"precision");$(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})`}}$(Dw,Ty,"PgNumeric");var Ey,Cy;class Rw extends(Cy=Fr,Ey=xt,Cy){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(Rw,Ey,"PgTime");var Ay,Oy;class Nw extends(Oy=Fr,Ay=xt,Oy){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");$(this,"mapFromDriverValue",e=>new Date(this.withTimezone?e:e+"+0000"));$(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":""}`}}$(Nw,Ay,"PgTimestamp");var Fy,Py;class Lw extends(Py=Fr,Fy=xt,Py){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(Lw,Fy,"PgTimestampString");var My,Dy;class Bw extends(Dy=Fr,My=xt,Dy){getSQLType(){return"uuid"}}$(Bw,My,"PgUUID");const Om=Symbol.for("drizzle:PgInlineForeignKeys"),Fm=Symbol.for("drizzle:EnableRLS");var Ry,Ny,Ly,By,ky,Uy;class br extends(Uy=St,ky=xt,By=Om,Ly=Fm,Ny=St.Symbol.ExtraConfigBuilder,Ry=St.Symbol.ExtraConfigColumns,Uy){constructor(){super(...arguments);$(this,By,[]);$(this,Ly,!1);$(this,Ny);$(this,Ry,{})}}$(br,ky,"PgTable"),$(br,"Symbol",Object.assign({},St.Symbol,{InlineForeignKeys:Om,EnableRLS:Fm}));var zy;zy=xt;class kw{constructor(t,e){$(this,"columns");$(this,"name");this.columns=t,this.name=e}build(t){return new Uw(t,this.columns,this.name)}}$(kw,zy,"PgPrimaryKeyBuilder");var jy;jy=xt;class Uw{constructor(t,e,i){$(this,"columns");$(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`}}$(Uw,jy,"PgPrimaryKey");function yr(r,t){return VD(t)&&!bw(r)&&!at(r,Hi)&&!at(r,as)&&!at(r,Ke)&&!at(r,St)&&!at(r,In)?new Hi(r,t):r}const zw=(r,t)=>H`${r} = ${yr(t,r)}`,XD=(r,t)=>H`${r} <> ${yr(t,r)}`;function Oh(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Ye("("),H.join(t,new Ye(" and ")),new Ye(")")])}function qD(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Ye("("),H.join(t,new Ye(" or ")),new Ye(")")])}function QD(r){return H`not ${r}`}const KD=(r,t)=>H`${r} > ${yr(t,r)}`,ZD=(r,t)=>H`${r} >= ${yr(t,r)}`,JD=(r,t)=>H`${r} < ${yr(t,r)}`,tR=(r,t)=>H`${r} <= ${yr(t,r)}`;function eR(r,t){return Array.isArray(t)?t.length===0?H`false`:H`${r} in ${t.map(e=>yr(e,r))}`:H`${r} in ${yr(t,r)}`}function rR(r,t){return Array.isArray(t)?t.length===0?H`true`:H`${r} not in ${t.map(e=>yr(e,r))}`:H`${r} not in ${yr(t,r)}`}function iR(r){return H`${r} is null`}function nR(r){return H`${r} is not null`}function sR(r){return H`exists ${r}`}function oR(r){return H`not exists ${r}`}function aR(r,t,e){return H`${r} between ${yr(t,r)} and ${yr(e,r)}`}function lR(r,t,e){return H`${r} not between ${yr(t,r)} and ${yr(e,r)}`}function uR(r,t){return H`${r} like ${t}`}function cR(r,t){return H`${r} not like ${t}`}function hR(r,t){return H`${r} ilike ${t}`}function fR(r,t){return H`${r} not ilike ${t}`}function dR(r){return H`${r} asc`}function pR(r){return H`${r} desc`}var $y;$y=xt;class Hf{constructor(t,e,i){$(this,"referencedTableName");$(this,"fieldName");this.sourceTable=t,this.referencedTable=e,this.relationName=i,this.referencedTableName=e[St.Symbol.Name]}}$(Hf,$y,"Relation");var Vy;Vy=xt;class jw{constructor(t,e){this.table=t,this.config=e}}$(jw,Vy,"Relations");var Gy,Wy;const Yl=class Yl extends(Wy=Hf,Gy=xt,Wy){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 Yl(this.sourceTable,this.referencedTable,this.config,this.isNullable);return e.fieldName=t,e}};$(Yl,Gy,"One");let us=Yl;var Hy,Yy;const Xl=class Xl extends(Yy=Hf,Hy=xt,Yy){constructor(t,e,i){super(t,e,i==null?void 0:i.relationName),this.config=i}withFieldName(t){const e=new Xl(this.sourceTable,this.referencedTable,this.config);return e.fieldName=t,e}};$(Xl,Hy,"Many");let Wl=Xl;function mR(){return{and:Oh,between:aR,eq:zw,exists:sR,gt:KD,gte:ZD,ilike:hR,inArray:eR,isNull:iR,isNotNull:nR,like:uR,lt:JD,lte:tR,ne:XD,not:QD,notBetween:lR,notExists:oR,notLike:cR,notIlike:fR,notInArray:rR,or:qD,sql:H}}function yR(){return{sql:H,asc:dR,desc:pR}}function gR(r,t){var s;Object.keys(r).length===1&&"default"in r&&!at(r.default,St)&&(r=r.default);const e={},i={},n={};for(const[o,a]of Object.entries(r))if(at(a,St)){const l=oa(a),u=i[l];e[l]=o,n[o]={tsName:o,dbName:a[St.Symbol.Name],schema:a[St.Symbol.Schema],columns:a[St.Symbol.Columns],relations:(u==null?void 0:u.relations)??{},primaryKey:(u==null?void 0:u.primaryKey)??[]};for(const h of Object.values(a[St.Symbol.Columns]))h.primary&&n[o].primaryKey.push(h);const c=(s=a[St.Symbol.ExtraConfigBuilder])==null?void 0:s.call(a,a[St.Symbol.ExtraConfigColumns]);if(c)for(const h of Object.values(c))at(h,kw)&&n[o].primaryKey.push(...h.columns)}else if(at(a,jw)){const l=oa(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 vR(r){return function(e,i){return new us(r,e,i,(i==null?void 0:i.fields.reduce((n,s)=>n&&s.notNull,!0))??!1)}}function _R(r){return function(e,i){return new Wl(r,e,i)}}function bR(r,t,e){if(at(e,us)&&e.config)return{fields:e.config.fields,references:e.config.references};const i=t[oa(e.referencedTable)];if(!i)throw new Error(`Table "${e.referencedTable[St.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[oa(s)];if(!o)throw new Error(`Table "${s[St.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[St.Symbol.Name]}". Please specify relation name`);if(a[0]&&at(a[0],us)&&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 wR(r){return{one:vR(r),many:_R(r)}}function Fh(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]=at(l,us)?c&&Fh(r,r[a.relationTableTsKey],c,a.selection,n):c.map(h=>Fh(r,r[a.relationTableTsKey],h,a.selection,n))}else{const l=n(e[o]),u=a.field;let c;at(u,Ke)?c=u:at(u,Ft)?c=u.decoder:c=u.sql.decoder,s[a.tsKey]=l===null?null:c.mapFromDriverValue(l)}return s}var Xy;Xy=xt;const ql=class ql{constructor(t){$(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=(at(t,dr)?t._.selectedFields:at(t,In)?t[He].selectedFields:t)[e];if(at(n,Ft.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!n.isSelectionField)return n.sql;const s=n.clone();return s.isSelectionField=!0,s}if(at(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 at(n,Ke)?this.config.alias?new Proxy(n,new aa(new Proxy(n.table,new du(this.config.alias,this.config.replaceOriginalName??!1)))):n:typeof n!="object"||n===null?n:new Proxy(n,new ql(this.config))}};$(ql,Xy,"SelectionProxyHandler");let Je=ql;function xR(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function SR(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 TR(r){return r}var qy;qy=xt;class $w{constructor(t){$(this,"cache",{});$(this,"cachedTables",{});$(this,"convert");this.convert=t==="snake_case"?xR:t==="camelCase"?SR:TR}getColumnCasing(t){if(!t.keyAsName)return t.name;const e=t.table[St.Symbol.Schema]??"public",i=t.table[St.Symbol.OriginalName],n=`${e}.${i}.${t.name}`;return this.cache[n]||this.cacheTable(t.table),this.cache[n]}cacheTable(t){const e=t[St.Symbol.Schema]??"public",i=t[St.Symbol.OriginalName],n=`${e}.${i}`;if(!this.cachedTables[n]){for(const s of Object.values(t[St.Symbol.Columns])){const o=`${n}.${s.name}`;this.cache[o]=this.convert(s.name)}this.cachedTables[n]=!0}}clearCache(){this.cache={},this.cachedTables={}}}$($w,qy,"CasingCache");var Qy,Ky;class Yf extends(Ky=In,Qy=xt,Ky){}$(Yf,Qy,"PgViewBase");var Zy;Zy=xt;class zo{constructor(t){$(this,"casing");this.casing=new $w(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=H` CREATE TABLE IF NOT EXISTS ${H.identifier(s)}.${H.identifier(n)} ( id SERIAL PRIMARY KEY, hash text NOT NULL, created_at bigint ) `;await e.execute(H`CREATE SCHEMA IF NOT EXISTS ${H.identifier(s)}`),await e.execute(o);const l=(await e.all(H`select id, hash, created_at from ${H.identifier(s)}.${H.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 H.join(n.flatMap((o,a)=>{const l=i[o],u=e[o]??H.param(l.onUpdateFn(),l),c=H`${H.identifier(this.casing.getColumnCasing(l))} = ${u}`;return a{const a=[];if(at(s,Ft.Aliased)&&s.isSelectionField)a.push(H.identifier(s.fieldAlias));else if(at(s,Ft.Aliased)||at(s,Ft)){const l=at(s,Ft.Aliased)?s.sql:s;e?a.push(new Ft(l.queryChunks.map(u=>at(u,Fr)?H.identifier(this.casing.getColumnCasing(u)):u))):a.push(l),at(s,Ft.Aliased)&&a.push(H` as ${H.identifier(s.fieldAlias)}`)}else at(s,Ke)&&(e?a.push(H.identifier(this.casing.getColumnCasing(s))):a.push(s));return oa==null?void 0:a.some(({alias:M})=>M===(it[St.Symbol.IsAlias]?Kn(it):it[St.Symbol.BaseName])))(w.field.table)){const it=Kn(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?H` distinct`:H` distinct on (${H.join(f.on,H`, `)})`);const S=this.buildSelection(g,{isSingleTable:d}),E=this.buildFromTable(o),b=this.buildJoins(a),F=n?H` where ${n}`:void 0,x=s?H` having ${s}`:void 0;let z;l&&l.length>0&&(z=H` order by ${H.join(l,H`, `)}`);let B;u&&u.length>0&&(B=H` group by ${H.join(u,H`, `)}`);const tt=typeof c=="object"||typeof c=="number"&&c>=0?H` limit ${c}`:void 0,st=h?H` offset ${h}`:void 0,I=H.empty();if(p){const w=H` for ${H.raw(p.strength)}`;p.config.of&&w.append(H` of ${H.join(Array.isArray(p.config.of)?p.config.of:[p.config.of],H`, `)}`),p.config.noWait?w.append(H` nowait`):p.config.skipLocked&&w.append(H` skip locked`),I.append(w)}const Z=H`${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=H`(${t.getSQL()}) `,u=H`(${n.getSQL()})`;let c;if(o&&o.length>0){const y=[];for(const g of o)if(at(g,Fr))y.push(H.identifier(g.name));else if(at(g,Ft)){for(let d=0;d=0?H` limit ${s}`:void 0,p=H.raw(`${e} ${i?"all ":""}`),f=a?H` offset ${a}`:void 0;return H`${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[St.Symbol.Columns],c=Object.entries(u).filter(([m,_])=>!_.shouldDisableInsert()),h=c.map(([,m])=>H.identifier(this.casing.getColumnCasing(m)));if(o){const m=e;at(m,Ft)?l.push(m):l.push(m.getSQL())}else{const m=e;l.push(H.raw("values "));for(const[_,S]of m.entries()){const E=[];for(const[b,F]of c){const x=S[b];if(x===void 0||at(x,Hi)&&x.value===void 0)if(F.defaultFn!==void 0){const z=F.defaultFn(),B=at(z,Ft)?z:H.param(z,F);E.push(B)}else if(!F.default&&F.onUpdateFn!==void 0){const z=F.onUpdateFn(),B=at(z,Ft)?z:H.param(z,F);E.push(B)}else E.push(H`default`);else E.push(x)}l.push(E),_({dbKey:S.name,tsKey:_,field:Bi(S,a),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{const m=Object.fromEntries(Object.entries(s.columns).map(([x,z])=>[x,Bi(z,a)]));if(o.where){const x=typeof o.where=="function"?o.where(m,mR()):o.where;y=x&&Gl(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:H}):o.extras;for(const[x,z]of Object.entries(b))_.push({tsKey:x,value:Sw(z,a)})}for(const{tsKey:x,value:z}of _)c.push({dbKey:at(z,Ft.Aliased)?z.fieldAlias:s.columns[x].name,tsKey:x,field:at(z,Ke)?Bi(z,a):z,relationTableTsKey:void 0,isJson:!1,selection:[]});let F=typeof o.orderBy=="function"?o.orderBy(m,yR()):o.orderBy??[];Array.isArray(F)||(F=[F]),f=F.map(x=>at(x,Ke)?Bi(x,a):Gl(x,a)),h=o.limit,p=o.offset;for(const{tsKey:x,queryConfig:z,relation:B}of E){const tt=bR(e,i,B),st=oa(B.referencedTable),I=i[st],Z=`${a}_${x}`,w=Oh(...tt.fields.map((O,D)=>zw(Bi(tt.references[D],Z),Bi(O,a)))),it=this.buildRelationalQueryWithoutPK({fullSchema:t,schema:e,tableNamesMap:i,table:t[I],tableConfig:e[I],queryConfig:at(B,us)?z===!0?{limit:1}:{...z,limit:1}:z,tableAlias:Z,joinOn:w,nestedQueryRelation:B}),M=H`${H.identifier(Z)}.${H.identifier("data")}`.as(x);g.push({on:H`true`,table:new dr(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 Gf({message:`No fields selected for table "${s.tsName}" ("${a}")`});let d;if(y=Oh(u,y),l){let m=H`json_build_array(${H.join(c.map(({field:E,tsKey:b,isJson:F})=>F?H`${H.identifier(`${a}_${b}`)}.${H.identifier("data")}`:at(E,Ft.Aliased)?E.sql:E),H`, `)})`;at(l,Wl)&&(m=H`coalesce(json_agg(${m}${f.length>0?H` order by ${H.join(f,H`, `)}`: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:cc(n,a),fields:{},fieldsFlat:[{path:[],field:H.raw("*")}],where:y,limit:h,offset:p,orderBy:f,setOperators:[]}),y=void 0,h=void 0,p=void 0,f=[]):d=cc(n,a),d=this.buildSelectQuery({table:at(d,br)?d:new dr(d,{},a),fields:{},fieldsFlat:_.map(({field:E})=>({path:[],field:at(E,Ke)?Bi(E,a):E})),joins:g,where:y,limit:h,offset:p,orderBy:f,setOperators:[]})}else d=this.buildSelectQuery({table:cc(n,a),fields:{},fieldsFlat:c.map(({field:m})=>({path:[],field:at(m,Ke)?Bi(m,a):m})),joins:g,where:y,limit:h,offset:p,orderBy:f,setOperators:[]});return{tableTsKey:s.tsName,sql:d,selection:c}}}$(zo,Zy,"PgDialect");var Jy;Jy=xt;class Vw{getSelectedFields(){return this._.selectedFields}}$(Vw,Jy,"TypedQueryBuilder");var tg;tg=xt;class Tr{constructor(t){$(this,"fields");$(this,"session");$(this,"dialect");$(this,"withList",[]);$(this,"distinct");$(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:at(i,dr)?n=Object.fromEntries(Object.keys(i._.selectedFields).map(s=>[s,i[s]])):at(i,Yf)?n=i[He].selectedFields:at(i,Ft)?n={}:n=HD(i),new Xf({table:i,fields:n,isPartialSelect:e,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}$(Tr,tg,"PgSelectBuilder");var eg,rg;class Gw extends(rg=Vw,eg=xt,rg){constructor({table:e,fields:i,isPartialSelect:n,session:s,dialect:o,withList:a,distinct:l}){super();$(this,"_");$(this,"config");$(this,"joinsNotNullableMap");$(this,"tableName");$(this,"isPartialSelect");$(this,"session");$(this,"dialect");$(this,"cacheConfig");$(this,"usedTables",new Set);$(this,"leftJoin",this.createJoin("left",!1));$(this,"leftJoinLateral",this.createJoin("left",!0));$(this,"rightJoin",this.createJoin("right",!1));$(this,"innerJoin",this.createJoin("inner",!1));$(this,"innerJoinLateral",this.createJoin("inner",!0));$(this,"fullJoin",this.createJoin("full",!1));$(this,"crossJoin",this.createJoin("cross",!1));$(this,"crossJoinLateral",this.createJoin("cross",!0));$(this,"union",this.createSetOperator("union",!1));$(this,"unionAll",this.createSetOperator("union",!0));$(this,"intersect",this.createSetOperator("intersect",!1));$(this,"intersectAll",this.createSetOperator("intersect",!0));$(this,"except",this.createSetOperator("except",!1));$(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,config:this.config},this.tableName=Yn(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{};for(const u of Zn(e))this.usedTables.add(u)}getUsedTables(){return[...this.usedTables]}createJoin(e,i){return(n,s)=>{var l;const o=this.tableName,a=Yn(n);for(const u of Zn(n))this.usedTables.add(u);if(typeof a=="string"&&((l=this.config.joins)!=null&&l.some(u=>u.alias===a)))throw new Error(`Alias "${a}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof o=="string"&&(this.config.fields={[o]:this.config.fields}),typeof a=="string"&&!at(n,Ft))){const u=at(n,dr)?n._.selectedFields:at(n,In)?n[He].selectedFields:n[St.Symbol.Columns];this.config.fields[a]=u}if(typeof s=="function"&&(s=s(new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:s,table:n,joinType:e,alias:a,lateral:i}),typeof a=="string")switch(e){case"left":{this.joinsNotNullableMap[a]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([u])=>[u,!1])),this.joinsNotNullableMap[a]=!0;break}case"cross":case"inner":{this.joinsNotNullableMap[a]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([u])=>[u,!1])),this.joinsNotNullableMap[a]=!1;break}}return this}}createSetOperator(e,i){return n=>{const s=typeof n=="function"?n(IR()):n;if(!Wf(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){const i=[];if(i.push(...Zn(this.config.table)),this.config.joins)for(const n of this.config.joins)i.push(...Zn(n.table));return new Proxy(new dr(this.getSQL(),this.config.fields,e,!1,[...new Set(i)]),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}$withCache(e){return this.cacheConfig=e===void 0?{config:{},enable:!0,autoInvalidate:!0}:e===!1?{enable:!1}:{enable:!0,autoInvalidate:!0,...e},this}}$(Gw,eg,"PgSelectQueryBuilder");var ig,ng;class Xf extends(ng=Gw,ig=xt,ng){constructor(){super(...arguments);$(this,"authToken");$(this,"execute",e=>Mr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)))}_prepare(e){const{session:i,config:n,dialect:s,joinsNotNullableMap:o,authToken:a,cacheConfig:l,usedTables:u}=this;if(!i)throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");const{fields:c}=n;return Mr.startActiveSpan("drizzle.prepareQuery",()=>{const h=ls(c),p=i.prepareQuery(s.sqlToQuery(this.getSQL()),h,e,!0,void 0,{type:"select",tables:[...u]},l);return p.joinsNotNullableMap=o,p.setToken(a)})}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}$(Xf,ig,"PgSelect");WD(Xf,[En]);function uo(r,t){return(e,i,...n)=>{const s=[i,...n].map(o=>({type:r,isAll:t,rightSelect:o}));for(const o of s)if(!Wf(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 IR=()=>({union:ER,unionAll:CR,intersect:AR,intersectAll:OR,except:FR,exceptAll:PR}),ER=uo("union",!1),CR=uo("union",!0),AR=uo("intersect",!1),OR=uo("intersect",!0),FR=uo("except",!1),PR=uo("except",!0);var sg;sg=xt;class qf{constructor(t){$(this,"dialect");$(this,"dialectConfig");$(this,"$with",(t,e)=>{const i=this;return{as:s=>(typeof s=="function"&&(s=s(i)),new Proxy(new Vf(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new Je({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});this.dialect=at(t,zo)?t:void 0,this.dialectConfig=at(t,zo)?void 0:t}with(...t){const e=this;function i(o){return new Tr({fields:o??void 0,session:void 0,dialect:e.getDialect(),withList:t})}function n(o){return new Tr({fields:o??void 0,session:void 0,dialect:e.getDialect(),distinct:!0})}function s(o,a){return new Tr({fields:a??void 0,session:void 0,dialect:e.getDialect(),distinct:{on:o}})}return{select:i,selectDistinct:n,selectDistinctOn:s}}select(t){return new Tr({fields:t??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(t){return new Tr({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(t,e){return new Tr({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:t}})}getDialect(){return this.dialect||(this.dialect=new zo(this.dialectConfig)),this.dialect}}$(qf,sg,"PgQueryBuilder");function Zn(r){return at(r,br)?[r[Ks]?`${r[Ks]}.${r[St.Symbol.BaseName]}`:r[St.Symbol.BaseName]]:at(r,dr)?r._.usedTables??[]:at(r,Ft)?r.usedTables??[]:[]}var og,ag;class Ph extends(ag=En,og=xt,ag){constructor(e,i,n,s){super();$(this,"config");$(this,"cacheConfig");$(this,"authToken");$(this,"execute",e=>Mr.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[St.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=ls(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){return Mr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:"delete",tables:Zn(this.config.table)},this.cacheConfig))}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:Kn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}$(Ph,og,"PgDelete");var lg;lg=xt;class Mh{constructor(t,e,i,n,s){$(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[St.Symbol.Columns];for(const o of Object.keys(i)){const a=i[o];n[o]=at(a,Ft)?a:new Hi(a,s[o])}return n});return new Dh(this.table,e,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(t){const e=typeof t=="function"?t(new qf):t;if(!at(e,Ft)&&!Wf(this.table[Ah],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 Dh(this.table,e,this.session,this.dialect,this.withList,!0)}}$(Mh,lg,"PgInsertBuilder");var ug,cg;class Dh extends(cg=En,ug=xt,cg){constructor(e,i,n,s,o,a,l){super();$(this,"config");$(this,"cacheConfig");$(this,"authToken");$(this,"execute",e=>Mr.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[St.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=ls(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=H`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?H` where ${e.where}`:void 0;this.config.onConflict=H`(${H.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?H` where ${e.where}`:void 0,n=e.targetWhere?H` where ${e.targetWhere}`:void 0,s=e.setWhere?H` where ${e.setWhere}`:void 0,o=this.dialect.buildUpdateSet(this.config.table,Aw(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=H`(${H.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 Mr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:"insert",tables:Zn(this.config.table)},this.cacheConfig))}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:Kn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}$(Dh,ug,"PgInsert");var hg,fg;class Ww extends(fg=En,hg=xt,fg){constructor(e,i,n){super();$(this,"config");$(this,"authToken");$(this,"execute",e=>Mr.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 Mr.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}}$(Ww,hg,"PgRefreshMaterializedView");var dg;dg=xt;class Rh{constructor(t,e,i,n){$(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 Hw(this.table,Aw(this.table,t),this.session,this.dialect,this.withList).setToken(this.authToken)}}$(Rh,dg,"PgUpdateBuilder");var pg,mg;class Hw extends(mg=En,pg=xt,mg){constructor(e,i,n,s,o){super();$(this,"config");$(this,"tableName");$(this,"joinsNotNullableMap");$(this,"cacheConfig");$(this,"leftJoin",this.createJoin("left"));$(this,"rightJoin",this.createJoin("right"));$(this,"innerJoin",this.createJoin("inner"));$(this,"fullJoin",this.createJoin("full"));$(this,"authToken");$(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=Yn(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}from(e){const i=e,n=Yn(i);return typeof n=="string"&&(this.joinsNotNullableMap[n]=!0),this.config.from=i,this}getTableLikeFields(e){return at(e,br)?e[St.Symbol.Columns]:at(e,dr)?e._.selectedFields:e[He].selectedFields}createJoin(e){return(i,n)=>{const s=Yn(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&&!at(this.config.from,Ft)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[St.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[St.Symbol.Columns]),this.config.from)){const i=Yn(this.config.from);if(typeof i=="string"&&this.config.from&&!at(this.config.from,Ft)){const n=this.getTableLikeFields(this.config.from);e[i]=n}for(const n of this.config.joins){const s=Yn(n.table);if(typeof s=="string"&&!at(n.table,Ft)){const o=this.getTableLikeFields(n.table);e[s]=o}}}return this.config.returningFields=e,this.config.returning=ls(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,void 0,{type:"insert",tables:Zn(this.config.table)},this.cacheConfig);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:Kn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}$(Hw,pg,"PgUpdate");var yg,gg,vg;const $o=class $o extends(vg=Ft,gg=xt,yg=Symbol.toStringTag,vg){constructor(e){super($o.buildEmbeddedCount(e.source,e.filters).queryChunks);$(this,"sql");$(this,"token");$(this,yg,"PgCountBuilder");$(this,"session");this.params=e,this.mapWith(Number),this.session=e.session,this.sql=$o.buildCount(e.source,e.filters)}static buildEmbeddedCount(e,i){return H`(select count(*) from ${e}${H.raw(" where ").if(i)}${i})`}static buildCount(e,i){return H`select count(*) as count from ${e}${H.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})}};$($o,gg,"PgCountBuilder");let Nh=$o;var _g;_g=xt;class Yw{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 Lh(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t||{},"many")}findFirst(t){return new Lh(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t?{...t,limit:1}:{limit:1},"first")}}$(Yw,_g,"PgRelationalQueryBuilder");var bg,wg;class Lh extends(wg=En,bg=xt,wg){constructor(e,i,n,s,o,a,l,u,c){super();$(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 Mr.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=>Fh(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 Mr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(void 0,this.authToken))}}$(Lh,bg,"PgRelationalQuery");var xg,Sg;class Xw extends(Sg=En,xg=xt,Sg){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}}$(Xw,xg,"PgRaw");var Tg;Tg=xt;class Qf{constructor(t,e,i){$(this,"query");$(this,"$with",(t,e)=>{const i=this;return{as:s=>(typeof s=="function"&&(s=s(new qf(i.dialect))),new Proxy(new Vf(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new Je({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});$(this,"$cache");$(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 Yw(i.fullSchema,this._.schema,this._.tableNamesMap,i.fullSchema[n],s,t,e);this.$cache={invalidate:async n=>{}}}$count(t,e){return new Nh({source:t,filters:e,session:this.session})}with(...t){const e=this;function i(u){return new Tr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t})}function n(u){return new Tr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:!0})}function s(u,c){return new Tr({fields:c??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:{on:u}})}function o(u){return new Rh(u,e.session,e.dialect,t)}function a(u){return new Mh(u,e.session,e.dialect,t)}function l(u){return new Ph(u,e.session,e.dialect,t)}return{select:i,selectDistinct:n,selectDistinctOn:s,update:o,insert:a,delete:l}}select(t){return new Tr({fields:t??void 0,session:this.session,dialect:this.dialect})}selectDistinct(t){return new Tr({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(t,e){return new Tr({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:{on:t}})}update(t){return new Rh(t,this.session,this.dialect)}insert(t){return new Mh(t,this.session,this.dialect)}delete(t){return new Ph(t,this.session,this.dialect)}refreshMaterializedView(t){return new Ww(t,this.session,this.dialect)}execute(t){const e=typeof t=="string"?H.raw(t):t.getSQL(),i=this.dialect.sqlToQuery(e),n=this.session.prepareQuery(i,void 0,void 0,!1);return new Xw(()=>n.execute(void 0,this.authToken),e,i,s=>n.mapResult(s,!0))}transaction(t,e){return this.session.transaction(t,e)}}$(Qf,Tg,"PgDatabase");var Ig;Ig=xt;class qw{}$(qw,Ig,"Cache");var Eg,Cg;class Qw extends(Cg=qw,Eg=xt,Cg){strategy(){return"all"}async get(t){}async put(t,e,i,n){}async onMutate(t){}}$(Qw,Eg,"NoopCache");async function Pm(r,t){const e=`${r}-${JSON.stringify(t)}`,n=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",n);return[...new Uint8Array(s)].map(l=>l.toString(16).padStart(2,"0")).join("")}class un extends Error{constructor(t,e,i){super(`Failed query: ${t} -params: ${e}`),this.query=t,this.params=e,this.cause=i,Error.captureStackTrace(this,un),i&&(this.cause=i)}}var Ag;Ag=xt;class Kw{constructor(t,e,i,n){$(this,"authToken");$(this,"joinsNotNullableMap");var s;this.query=t,this.cache=e,this.queryMetadata=i,this.cacheConfig=n,e&&e.strategy()==="all"&&n===void 0&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),(s=this.cacheConfig)!=null&&s.enable||(this.cacheConfig=void 0)}getQuery(){return this.query}mapResult(t,e){return t}setToken(t){return this.authToken=t,this}async queryWithCache(t,e,i){if(this.cache===void 0||at(this.cache,Qw)||this.queryMetadata===void 0)try{return await i()}catch(n){throw new un(t,e,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await i()}catch(n){throw new un(t,e,n)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{const[n]=await Promise.all([i(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return n}catch(n){throw new un(t,e,n)}if(!this.cacheConfig)try{return await i()}catch(n){throw new un(t,e,n)}if(this.queryMetadata.type==="select"){const n=await this.cache.get(this.cacheConfig.tag??await Pm(t,e),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(n===void 0){let s;try{s=await i()}catch(o){throw new un(t,e,o)}return await this.cache.put(this.cacheConfig.tag??await Pm(t,e),s,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),s}return n}try{return await i()}catch(n){throw new un(t,e,n)}}}$(Kw,Ag,"PgPreparedQuery");var Og;Og=xt;class Zw{constructor(t){this.dialect=t}execute(t,e){return Mr.startActiveSpan("drizzle.operation",()=>Mr.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)}}$(Zw,Og,"PgSession");var Fg,Pg;class Jw extends(Pg=Qf,Fg=xt,Pg){constructor(t,e,i,n=0){super(t,e,i),this.schema=i,this.nestedIndex=n}rollback(){throw new Tw}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"),H.raw(e.join(" "))}setTransaction(t){return this.session.execute(H`set transaction ${this.getTransactionConfigSQL(t)}`)}}$(Jw,Fg,"PgTransaction");function Mm(r){return typeof r=="string"&&/^true$/i.test(r)}function MR(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&&Mm(i)&&(t.logger=!0);const n=e.searchParams.get("storage");switch(n){case sa.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:sa.ORIGIN_PRIVATE_FS,path:e.pathname.startsWith("/")?e.pathname.slice(1):e.pathname,...s&&Mm(s)&&{accessMode:F0.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${n}"`);break}return t}var Mg,Dg;class tx extends(Dg=Kw,Mg=xt,Dg){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=Am(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=Am(this.params,t);return this.logger.logQuery(this.queryString,e),(await this.client).query(this.queryString,e)}}$(tx,Mg,"DuckDBWasmPreparedQuery");var Rg,Ng;const Ql=class Ql extends(Ng=Zw,Rg=xt,Ng){constructor(e,i,n,s={}){super(i);$(this,"logger");this.client=e,this.schema=n,this.options=s,this.logger=s.logger??new Cw}prepareQuery(e,i,n,s,o){return new tx(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 BD(this.client,async n=>{const s=new Ql(n,this.dialect,this.schema,this.options),o=new Bh(this.dialect,s,this.schema);return i&&await o.setTransaction(i),e(o)})}};$(Ql,Rg,"DuckDBWasmSession");let Hl=Ql;var Lg,Bg;const Kl=class Kl extends(Bg=Jw,Lg=xt,Bg){constructor(e,i,n,s=0){super(e,i,n,s);$(this,"dialect");$(this,"session");this.dialect=e,this.session=i}async transaction(e){return kD(this.session.client,"",async i=>{const n=new Hl(i,this.dialect,this.schema,this.session.options),s=new Kl(this.dialect,n,this.schema);return e(s)})}};$(Kl,Lg,"DuckDBWasmTransaction");let Bh=Kl;var kg,Ug;class ex extends(Ug=Qf,kg=xt,Ug){}$(ex,kg,"DuckDBWasmDatabase");function jo(r,t={}){const e=new zo({casing:t.casing});let i;t.logger===!0?i=new Ew:t.logger!==!1&&(i=t.logger);let n;if(t.schema){const a=gR(t.schema,wR);n={fullSchema:t.schema,schema:a.tables,tableNamesMap:a.tableNamesMap}}const s=new Hl(r,e,n,{logger:i}),o=new ex(e,s,n);return o.$client=r,o}function Dm(r,t){const e=MR(r);let i;return e.bundles==="import-url"?i=(async()=>{const s=await Eh();switch(s){case"browser":return(await cn(async()=>{const{getImportUrlBundles:o}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:o}},__vite__mapDeps([3,4]))).getImportUrlBundles();case"node":return await(await cn(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 Eh();switch(s){case"browser":return(await cn(async()=>{const{getBundles:o}=await import("./default-browser-BrgSDbLD.js");return{getBundles:o}},[])).getBundles();case"node":return await(await cn(async()=>{const{getBundles:o}=await import("./default-node-fAr5k7ap.js");return{getBundles:o}},__vite__mapDeps([0,1,2]))).getBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})(),jo(_w({bundles:i,logger:e.logger?new P0:void 0,storage:e.storage}),t)}function Rm(...r){if(typeof r[0]=="string")return Dm(r[0],r[1]);if(YD(r[0])){const{connection:t,client:e,...i}=r[0];if(e)return jo(e,i);if(typeof t=="string")return Dm(t,i);if(typeof t>"u")throw new Error("connection option is required");return jo(_w({bundles:t.bundles,logger:t.logger,storage:t.storage}),i)}return jo(r[0],r[1])}(r=>{function t(e){return jo({options:{parsers:{},serializers:{}}},e)}r.mock=t})(Rm||(Rm={}));export{H1 as A,UR as D,BR as I,TC as J,hI as L,xc as M,LR as T,di as a,Re as b,Rm as d,la as e,kR as l}; +params: ${e}`),this.query=t,this.params=e,this.cause=i,Error.captureStackTrace(this,un),i&&(this.cause=i)}}var Ag;Ag=xt;class Kw{constructor(t,e,i,n){$(this,"authToken");$(this,"joinsNotNullableMap");var s;this.query=t,this.cache=e,this.queryMetadata=i,this.cacheConfig=n,e&&e.strategy()==="all"&&n===void 0&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),(s=this.cacheConfig)!=null&&s.enable||(this.cacheConfig=void 0)}getQuery(){return this.query}mapResult(t,e){return t}setToken(t){return this.authToken=t,this}async queryWithCache(t,e,i){if(this.cache===void 0||at(this.cache,Qw)||this.queryMetadata===void 0)try{return await i()}catch(n){throw new un(t,e,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await i()}catch(n){throw new un(t,e,n)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{const[n]=await Promise.all([i(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return n}catch(n){throw new un(t,e,n)}if(!this.cacheConfig)try{return await i()}catch(n){throw new un(t,e,n)}if(this.queryMetadata.type==="select"){const n=await this.cache.get(this.cacheConfig.tag??await Pm(t,e),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(n===void 0){let s;try{s=await i()}catch(o){throw new un(t,e,o)}return await this.cache.put(this.cacheConfig.tag??await Pm(t,e),s,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),s}return n}try{return await i()}catch(n){throw new un(t,e,n)}}}$(Kw,Ag,"PgPreparedQuery");var Og;Og=xt;class Zw{constructor(t){this.dialect=t}execute(t,e){return Mr.startActiveSpan("drizzle.operation",()=>Mr.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)}}$(Zw,Og,"PgSession");var Fg,Pg;class Jw extends(Pg=Qf,Fg=xt,Pg){constructor(t,e,i,n=0){super(t,e,i),this.schema=i,this.nestedIndex=n}rollback(){throw new Tw}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"),H.raw(e.join(" "))}setTransaction(t){return this.session.execute(H`set transaction ${this.getTransactionConfigSQL(t)}`)}}$(Jw,Fg,"PgTransaction");function Mm(r){return typeof r=="string"&&/^true$/i.test(r)}function MR(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&&Mm(i)&&(t.logger=!0);const n=e.searchParams.get("storage");switch(n){case sa.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:sa.ORIGIN_PRIVATE_FS,path:e.pathname.startsWith("/")?e.pathname.slice(1):e.pathname,...s&&Mm(s)&&{accessMode:F0.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${n}"`);break}return t}var Mg,Dg;class tx extends(Dg=Kw,Mg=xt,Dg){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=Am(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=Am(this.params,t);return this.logger.logQuery(this.queryString,e),(await this.client).query(this.queryString,e)}}$(tx,Mg,"DuckDBWasmPreparedQuery");var Rg,Ng;const Ql=class Ql extends(Ng=Zw,Rg=xt,Ng){constructor(e,i,n,s={}){super(i);$(this,"logger");this.client=e,this.schema=n,this.options=s,this.logger=s.logger??new Cw}prepareQuery(e,i,n,s,o){return new tx(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 BD(this.client,async n=>{const s=new Ql(n,this.dialect,this.schema,this.options),o=new Bh(this.dialect,s,this.schema);return i&&await o.setTransaction(i),e(o)})}};$(Ql,Rg,"DuckDBWasmSession");let Hl=Ql;var Lg,Bg;const Kl=class Kl extends(Bg=Jw,Lg=xt,Bg){constructor(e,i,n,s=0){super(e,i,n,s);$(this,"dialect");$(this,"session");this.dialect=e,this.session=i}async transaction(e){return kD(this.session.client,"",async i=>{const n=new Hl(i,this.dialect,this.schema,this.session.options),s=new Kl(this.dialect,n,this.schema);return e(s)})}};$(Kl,Lg,"DuckDBWasmTransaction");let Bh=Kl;var kg,Ug;class ex extends(Ug=Qf,kg=xt,Ug){}$(ex,kg,"DuckDBWasmDatabase");function jo(r,t={}){const e=new zo({casing:t.casing});let i;t.logger===!0?i=new Ew:t.logger!==!1&&(i=t.logger);let n;if(t.schema){const a=gR(t.schema,wR);n={fullSchema:t.schema,schema:a.tables,tableNamesMap:a.tableNamesMap}}const s=new Hl(r,e,n,{logger:i}),o=new ex(e,s,n);return o.$client=r,o}function Dm(r,t){const e=MR(r);let i;return e.bundles==="import-url"?i=(async()=>{const s=await Eh();switch(s){case"browser":return(await cn(async()=>{const{getImportUrlBundles:o}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:o}},__vite__mapDeps([3,4]))).getImportUrlBundles();case"node":return await(await cn(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 Eh();switch(s){case"browser":return(await cn(async()=>{const{getBundles:o}=await import("./default-browser-BrgSDbLD.js");return{getBundles:o}},[])).getBundles();case"node":return await(await cn(async()=>{const{getBundles:o}=await import("./default-node-BWr47-4Z.js");return{getBundles:o}},__vite__mapDeps([0,1,2]))).getBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})(),jo(_w({bundles:i,logger:e.logger?new P0:void 0,storage:e.storage}),t)}function Rm(...r){if(typeof r[0]=="string")return Dm(r[0],r[1]);if(YD(r[0])){const{connection:t,client:e,...i}=r[0];if(e)return jo(e,i);if(typeof t=="string")return Dm(t,i);if(typeof t>"u")throw new Error("connection option is required");return jo(_w({bundles:t.bundles,logger:t.logger,storage:t.storage}),i)}return jo(r[0],r[1])}(r=>{function t(e){return jo({options:{parsers:{},serializers:{}}},e)}r.mock=t})(Rm||(Rm={}));export{H1 as A,UR as D,BR as I,TC as J,hI as L,xc as M,LR as T,di as a,Re as b,Rm as d,la as e,kR as l}; diff --git a/assets/Textarea.vue_vue_type_script_setup_true_lang-DlkitCQO.js b/assets/Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js similarity index 75% rename from assets/Textarea.vue_vue_type_script_setup_true_lang-DlkitCQO.js rename to assets/Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js index 19154f6d84929dd7f12142f31cb1919ae0a021d4..08f370561e66dda12ef490ad7f4709843f45dc20 100644 --- a/assets/Textarea.vue_vue_type_script_setup_true_lang-DlkitCQO.js +++ b/assets/Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js @@ -1 +1 @@ -import{_ as r}from"./Basic.vue_vue_type_script_setup_true_lang-Bm_AZiZR.js";import{d as t,cg as u,bk as d,o as n}from"./index-CKmiAjHk.js";const p=t({__name:"Textarea",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(l){const e=u(l,"modelValue");return(s,a)=>(n(),d(r,{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=o=>e.value=o),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-sm":"","outline-none":"",shadow:"sm",bg:"neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900"},null,8,["modelValue"]))}});export{p as _}; +import{_ as r}from"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js";import{d as t,cg as u,bk as d,o as n}from"./index-WDP_Z4A8.js";const p=t({__name:"Textarea",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(l){const e=u(l,"modelValue");return(s,a)=>(n(),d(r,{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=o=>e.value=o),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-sm":"","outline-none":"",shadow:"sm",bg:"neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900"},null,8,["modelValue"]))}});export{p as _}; diff --git a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js similarity index 96% rename from assets/TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js rename to assets/TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js index 90423fd70cb150ff0502f198e6df90f77da4ada5..128506d9994a0b2036a4b80e83248f29d4ff5b89 100644 --- a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js +++ b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js @@ -1 +1 @@ -import{d as l,bk as m,o as T,cm as b,bl as B,bh as v}from"./index-CKmiAjHk.js";const n="0px",W=l({__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)=>(T(),m(b,{css:!1,onEnter:u,onLeave:f},{default:B(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _}; +import{d as l,bk as m,o as T,cm as b,bl as B,bh as v}from"./index-WDP_Z4A8.js";const n="0px",W=l({__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)=>(T(),m(b,{css:!1,onEnter:u,onLeave:f},{default:B(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _}; diff --git a/assets/_...all_-Dto0bah3.js b/assets/_...all_-ZSCTB34-.js similarity index 63% rename from assets/_...all_-Dto0bah3.js rename to assets/_...all_-ZSCTB34-.js index 06a27073937846d80e181a145a921a9bf628d590..8a6884efef46535af68c5f9b7adcfd927cb9199a 100644 --- a/assets/_...all_-Dto0bah3.js +++ b/assets/_...all_-ZSCTB34-.js @@ -1 +1 @@ -import{c2 as e,c,o as n}from"./index-CKmiAjHk.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{c2 as e,c,o as n}from"./index-WDP_Z4A8.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-COXfZI0a.js b/assets/airi-card-Cgw9OiDq.js similarity index 94% rename from assets/airi-card-COXfZI0a.js rename to assets/airi-card-Cgw9OiDq.js index ba25e6ba153af60337e3d589d7534bcb9ed93a6e..02bd147d1fa812b862afe41ca3f212e727f7790e 100644 --- a/assets/airi-card-COXfZI0a.js +++ b/assets/airi-card-Cgw9OiDq.js @@ -1,4 +1,4 @@ -import{a4 as W,cc as L,f as g,a0 as O,T as D,$ as G,w as H}from"./index-CKmiAjHk.js";import{c as N}from"./emotions-DWNSb738.js";import{u as b}from"./consciousness-C2QUWl48.js";import{u as k}from"./speech-CRLeR9Bl.js";function q(a,u){return{role:"system",content:[a,N.map(n=>`- ${n}`).join(` +import{a4 as W,cc as L,f as g,a0 as O,T as D,$ as G,w as H}from"./index-WDP_Z4A8.js";import{c as N}from"./emotions-DWNSb738.js";import{u as b}from"./consciousness-CI5ipeHX.js";import{u as k}from"./speech-DRmXCXwq.js";function q(a,u){return{role:"system",content:[a,N.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=b(),R=k(),{activeModel:l}=O(P),{activeSpeechVoiceId:m,activeSpeechModel:p}=O(R),$=s=>{const e=crypto.randomUUID();return a.value.set(e,f(s)),e},B=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-B3PyfvNm.js b/assets/alibaba-cloud-model-studio-AJxwqJ9S.js similarity index 71% rename from assets/alibaba-cloud-model-studio-B3PyfvNm.js rename to assets/alibaba-cloud-model-studio-AJxwqJ9S.js index d26be1c24ca53e5233102ddd960ee282f5f9c063..904aff48b9b7a6749162630d41de98693230f36c 100644 --- a/assets/alibaba-cloud-model-studio-B3PyfvNm.js +++ b/assets/alibaba-cloud-model-studio-AJxwqJ9S.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as x,e as m,a0 as k,$,f as V,T as F,w as v,bk as B,o as I,bl as y,b as c,u as i,a as T}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as U}from"./providers-bTtvV6aX.js";import{u as E}from"./speech-CRLeR9Bl.js";import{_ as f}from"./FieldRange.vue_vue_type_script_setup_true_lang-5-FhMpNA.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as K,a as L}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-9MhYiAWZ.js";import{b as P}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";const N={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=E(),a=U(),{providers:g}=k(a),{t:s}=$(),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 F(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)=>(I(),B(i(L),{"provider-id":o,"default-model":_,"additional-settings":u},{"voice-settings":y(()=>[T("div",N,[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(K),{"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_686f6999_lang-Br6hYQpP.js";import{d as x,e as m,a0 as k,$,f as V,T as F,w as v,bk as B,o as I,bl as y,b as c,u as i,a as T}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as U}from"./providers-7GsMyC_3.js";import{u as E}from"./speech-DRmXCXwq.js";import{_ as f}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as K,a as L}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js";import{b as P}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";const N={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=E(),a=U(),{providers:g}=k(a),{t:s}=$(),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 F(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)=>(I(),B(i(L),{"provider-id":o,"default-model":_,"additional-settings":u},{"voice-settings":y(()=>[T("div",N,[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(K),{"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-Bh6Yn43R.js b/assets/anthropic-CRbvwdIi.js similarity index 77% rename from assets/anthropic-Bh6Yn43R.js rename to assets/anthropic-CRbvwdIi.js index ab4384de967d5c427b1ee5edca59595fe2aea559..3468e47a3c7b3d4273308958753fa47a845304f9 100644 --- a/assets/anthropic-Bh6Yn43R.js +++ b/assets/anthropic-CRbvwdIi.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as S,$ as x,V as U,a0 as V,f as v,T as w,w as C,bk as K,o as R,bl as c,a as i,b as l,ch as p,u as a}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as $}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as O,a as A}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as I}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as N,a as T}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const e="anthropic",z=S({__name:"anthropic",setup(M){const{t:u}=x(),g=U(),h=$(),{providers:o}=V(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}});w(()=>{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(B),{"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:c(()=>[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-semibold":"",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(N),null,{default:c(()=>[l(a(T),{title:a(u)("settings.pages.providers.common.section.basic.title"),description:a(u)("settings.pages.providers.common.section.basic.description"),"on-reset":y},{default:c(()=>{var d;return[l(a(I),{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(u)("settings.pages.providers.common.section.advanced.title")},{default:c(()=>[l(a(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,__:[2]},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(z);export{z as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as S,$ as x,V as U,a0 as V,f as v,T as w,w as C,bk as K,o as R,bl as c,a as i,b as l,ch as p,u as a}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as $}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as O,a as A}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as I}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as N,a as T}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const e="anthropic",z=S({__name:"anthropic",setup(M){const{t:u}=x(),g=U(),h=$(),{providers:o}=V(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}});w(()=>{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(B),{"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:c(()=>[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-semibold":"",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(N),null,{default:c(()=>[l(a(T),{title:a(u)("settings.pages.providers.common.section.basic.title"),description:a(u)("settings.pages.providers.common.section.basic.description"),"on-reset":y},{default:c(()=>{var d;return[l(a(I),{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(u)("settings.pages.providers.common.section.advanced.title")},{default:c(()=>[l(a(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,__:[2]},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(z);export{z as default}; diff --git a/assets/audio-DfI-muF9.js b/assets/audio-DU0_kfqA.js similarity index 88% rename from assets/audio-DfI-muF9.js rename to assets/audio-DU0_kfqA.js index c2e278280ffdf3888026e002f1858309861c5a99..6215be0a8b24689f6446df244eca95612c75ef57 100644 --- a/assets/audio-DfI-muF9.js +++ b/assets/audio-DU0_kfqA.js @@ -1 +1 @@ -import{d as s,e as f,c as d,o as p,a as t}from"./index-CKmiAjHk.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,e as f,c as d,o as p,a as t}from"./index-WDP_Z4A8.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-B_pMBWgQ.js b/assets/background-remove-C-QrXCNT.js similarity index 99% rename from assets/background-remove-B_pMBWgQ.js rename to assets/background-remove-C-QrXCNT.js index d151b21f4c76a3e7bff06c68d99397d3c91773e5..cfe22b49121e7858f96026ce5f283bd4925ba7a9 100644 --- a/assets/background-remove-B_pMBWgQ.js +++ b/assets/background-remove-C-QrXCNT.js @@ -1,4 +1,4 @@ -var _v=Object.defineProperty;var gv=(e,r,t)=>r in e?_v(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var Y=(e,r,t)=>gv(e,typeof r!="symbol"?r+"":r,t);import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as wv}from"./InputFile.vue_vue_type_script_setup_true_lang-CToBF7WH.js";import{d as bv,e as zs,f as Mv,T as yv,c as Tn,o as En,a as Vr,b as vv,Y as Ef,c6 as Pf,c7 as Cf,W as Sf,a3 as xv,u as Tv}from"./index-CKmiAjHk.js";import"./floating-ui.core-CgBsuaUc.js";const la=new Map,kn=[],Ev=(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}}},Cv=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 Pv(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)})]},Sv="1.22.0";let $f="warning";const Ts={wasm:{},webgl:{},webgpu:{},versions:{common:Sv},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}`);$f=e}},get logLevel(){return $f}};Object.defineProperty(Ts,"logLevel",{enumerable:!0});const $v=Ts,kv=(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 c=0,d=p,_=p*2,f=-1;i==="RGBA"?(c=0,d=p,_=p*2,f=p*3):i==="RGB"?(c=0,d=p,_=p*2):i==="RBG"&&(c=0,_=p,d=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 c=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 d=4;let _=0,f=1,v=2,$=3,g=0,w=c,C=c*2,E=-1;a==="RGBA"?(g=0,w=c,C=c*2,E=c*3):a==="RGB"?(g=0,w=c,C=c*2):a==="RBG"&&(g=0,C=c,w=c*2),s=t.createImageData(o,n);for(let x=0;x{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 c=4,d=0,_=1,f=2,v=3,$=0,g=u,w=u*2,C=-1;a==="RGB"&&(c=3,d=0,_=1,f=2,v=-1),l==="RGBA"?C=u*3:l==="RBG"?($=0,w=u,g=u*2):l==="BGR"&&(w=0,g=u,$=u*2);for(let x=0;x{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 c=u(p);if(c!=null){let d=e.height,_=e.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(d=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=d,a.width=_}else a.tensorFormat="RGBA",a.height=d,a.width=_;c.drawImage(e,0,0),i=c.getImageData(0,0,_,d).data}else throw new Error("Can not access image data")}else if(s){let p,c;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(p=r.resizedHeight,c=r.resizedWidth):(p=e.height,c=e.width),r!==void 0&&(a=r),a.format="RGBA",a.height=p,a.width=c,r!==void 0){const d=l();d.width=c,d.height=p;const _=u(d);if(_!=null)_.putImageData(e,0,0),i=_.getImageData(0,0,c,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 c=u(p);if(c!=null){const d=e.height,_=e.width;return c.drawImage(e,0,0,_,d),i=c.getImageData(0,0,_,d).data,a.height=d,a.width=_,Al(i,a)}else throw new Error("Can not access image data")}else{if(n)return new Promise((p,c)=>{const d=l(),_=u(d);if(!e||!_)return c();const f=new Image;f.crossOrigin="Anonymous",f.src=e,f.onload=()=>{d.width=f.width,d.height=f.height,_.drawImage(f,0,0,d.width,d.height);const v=_.getImageData(0,0,d.width,d.height);a.height=d.height,a.width=d.width,p(Al(v.data,a))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(i!==void 0)return Al(i,a);throw new Error("Input data provided is not supported - aborted tensor creation")},Fv=(e,r)=>{const{width:t,height:s,download:o,dispose:n}=r,i=[1,s,t,4];return new us({location:"texture",type:"float32",texture:e,dims:i,download:o,dispose:n})},Ov=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new us({location:"gpu-buffer",type:t??"float32",gpuBuffer:e,dims:s,download:o,dispose:n})},Dv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new us({location:"ml-tensor",type:t??"float32",mlTensor:e,dims:s,download:o,dispose:n})},Lv=(e,r,t)=>new us({location:"cpu-pinned",type:e,data:r,dims:t??[r.length]}),ro=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 kf=!1;const zv=()=>{if(!kf){kf=!0;const e=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,t=globalThis.Float16Array,s=typeof t<"u"&&t.from;e&&(ro.set("int64",BigInt64Array),ua.set(BigInt64Array,"int64")),r&&(ro.set("uint64",BigUint64Array),ua.set(BigUint64Array,"uint64")),s?(ro.set("float16",t),ua.set(t,"float16")):ro.set("float16",Uint16Array)}},Bv=e=>{let r=1;for(let t=0;t{switch(e.location){case"cpu":return new us(e.type,e.data,r);case"cpu-pinned":return new us({location:"cpu-pinned",data:e.data,type:e.type,dims:r});case"texture":return new us({location:"texture",texture:e.texture,type:e.type,dims:r});case"gpu-buffer":return new us({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:r});case"ml-tensor":return new us({location:"ml-tensor",mlTensor:e.mlTensor,type:e.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}};let us=class{constructor(r,t,s){zv();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=ro.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=ro.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=Bv(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 Av(r,t)}static fromTexture(r,t){return Fv(r,t)}static fromGpuBuffer(r,t){return Ov(r,t)}static fromMLTensor(r,t){return Dv(r,t)}static fromPinnedBuffer(r,t,s){return Lv(r,t,s)}toDataURL(r){return kv(this,r)}toImageData(r){return Iv(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 Rv(this,r)}};const eo=us,db=(e,r)=>{(typeof Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||console.timeStamp(`${e}::ORT::${r}`)},pb=(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 Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||pb("BEGIN",e)},Fu=e=>{(typeof Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||pb("END",e)};let jv=class hb{constructor(r){this.handler=r}async run(r,t,s){Au();const o={};let n={};if(typeof r!="object"||r===null||r instanceof eo||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 eo)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 c of this.outputNames)if(p.indexOf(c)!==-1){const d=t[c];(d===null||d instanceof eo)&&(u=!0,i=!1,o[c]=d)}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 eo?l[u]=p:l[u]=new eo(p.type,p.data,p.dims)}return Fu(),l}async release(){return this.handler.dispose()}static async create(r,t,s,o){Au();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 c=0,d=r.byteLength;if(typeof t=="object"&&t!==null)i=t;else if(typeof t=="number"){if(c=t,!Number.isSafeInteger(c))throw new RangeError("'byteOffset' must be an integer.");if(c<0||c>=p.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${p.byteLength}).`);if(d=r.byteLength-c,typeof s=="number"){if(d=s,!Number.isSafeInteger(d))throw new RangeError("'byteLength' must be an integer.");if(d<=0||c+d>p.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${p.byteLength-c}].`);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,c,d)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const[a,l]=await Cv(i),u=await a.createInferenceSessionHandler(n,l);return Fu(),new hb(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}};const Nv=jv,Vv=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession:Nv,TRACE:db,TRACE_FUNC_BEGIN:Au,TRACE_FUNC_END:Fu,Tensor:eo,env:$v,registerBackend:Ev},Symbol.toStringTag,{value:"Module"}));/*! +var _v=Object.defineProperty;var gv=(e,r,t)=>r in e?_v(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var Y=(e,r,t)=>gv(e,typeof r!="symbol"?r+"":r,t);import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as wv}from"./InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js";import{d as bv,e as zs,f as Mv,T as yv,c as Tn,o as En,a as Vr,b as vv,Y as Ef,c6 as Pf,c7 as Cf,W as Sf,a3 as xv,u as Tv}from"./index-WDP_Z4A8.js";import"./floating-ui.core-CgBsuaUc.js";const la=new Map,kn=[],Ev=(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}}},Cv=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 Pv(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)})]},Sv="1.22.0";let $f="warning";const Ts={wasm:{},webgl:{},webgpu:{},versions:{common:Sv},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}`);$f=e}},get logLevel(){return $f}};Object.defineProperty(Ts,"logLevel",{enumerable:!0});const $v=Ts,kv=(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 c=0,d=p,_=p*2,f=-1;i==="RGBA"?(c=0,d=p,_=p*2,f=p*3):i==="RGB"?(c=0,d=p,_=p*2):i==="RBG"&&(c=0,_=p,d=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 c=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 d=4;let _=0,f=1,v=2,$=3,g=0,w=c,C=c*2,E=-1;a==="RGBA"?(g=0,w=c,C=c*2,E=c*3):a==="RGB"?(g=0,w=c,C=c*2):a==="RBG"&&(g=0,C=c,w=c*2),s=t.createImageData(o,n);for(let x=0;x{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 c=4,d=0,_=1,f=2,v=3,$=0,g=u,w=u*2,C=-1;a==="RGB"&&(c=3,d=0,_=1,f=2,v=-1),l==="RGBA"?C=u*3:l==="RBG"?($=0,w=u,g=u*2):l==="BGR"&&(w=0,g=u,$=u*2);for(let x=0;x{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 c=u(p);if(c!=null){let d=e.height,_=e.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(d=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=d,a.width=_}else a.tensorFormat="RGBA",a.height=d,a.width=_;c.drawImage(e,0,0),i=c.getImageData(0,0,_,d).data}else throw new Error("Can not access image data")}else if(s){let p,c;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(p=r.resizedHeight,c=r.resizedWidth):(p=e.height,c=e.width),r!==void 0&&(a=r),a.format="RGBA",a.height=p,a.width=c,r!==void 0){const d=l();d.width=c,d.height=p;const _=u(d);if(_!=null)_.putImageData(e,0,0),i=_.getImageData(0,0,c,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 c=u(p);if(c!=null){const d=e.height,_=e.width;return c.drawImage(e,0,0,_,d),i=c.getImageData(0,0,_,d).data,a.height=d,a.width=_,Al(i,a)}else throw new Error("Can not access image data")}else{if(n)return new Promise((p,c)=>{const d=l(),_=u(d);if(!e||!_)return c();const f=new Image;f.crossOrigin="Anonymous",f.src=e,f.onload=()=>{d.width=f.width,d.height=f.height,_.drawImage(f,0,0,d.width,d.height);const v=_.getImageData(0,0,d.width,d.height);a.height=d.height,a.width=d.width,p(Al(v.data,a))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(i!==void 0)return Al(i,a);throw new Error("Input data provided is not supported - aborted tensor creation")},Fv=(e,r)=>{const{width:t,height:s,download:o,dispose:n}=r,i=[1,s,t,4];return new us({location:"texture",type:"float32",texture:e,dims:i,download:o,dispose:n})},Ov=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new us({location:"gpu-buffer",type:t??"float32",gpuBuffer:e,dims:s,download:o,dispose:n})},Dv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new us({location:"ml-tensor",type:t??"float32",mlTensor:e,dims:s,download:o,dispose:n})},Lv=(e,r,t)=>new us({location:"cpu-pinned",type:e,data:r,dims:t??[r.length]}),ro=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 kf=!1;const zv=()=>{if(!kf){kf=!0;const e=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,t=globalThis.Float16Array,s=typeof t<"u"&&t.from;e&&(ro.set("int64",BigInt64Array),ua.set(BigInt64Array,"int64")),r&&(ro.set("uint64",BigUint64Array),ua.set(BigUint64Array,"uint64")),s?(ro.set("float16",t),ua.set(t,"float16")):ro.set("float16",Uint16Array)}},Bv=e=>{let r=1;for(let t=0;t{switch(e.location){case"cpu":return new us(e.type,e.data,r);case"cpu-pinned":return new us({location:"cpu-pinned",data:e.data,type:e.type,dims:r});case"texture":return new us({location:"texture",texture:e.texture,type:e.type,dims:r});case"gpu-buffer":return new us({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:r});case"ml-tensor":return new us({location:"ml-tensor",mlTensor:e.mlTensor,type:e.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}};let us=class{constructor(r,t,s){zv();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=ro.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=ro.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=Bv(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 Av(r,t)}static fromTexture(r,t){return Fv(r,t)}static fromGpuBuffer(r,t){return Ov(r,t)}static fromMLTensor(r,t){return Dv(r,t)}static fromPinnedBuffer(r,t,s){return Lv(r,t,s)}toDataURL(r){return kv(this,r)}toImageData(r){return Iv(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 Rv(this,r)}};const eo=us,db=(e,r)=>{(typeof Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||console.timeStamp(`${e}::ORT::${r}`)},pb=(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 Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||pb("BEGIN",e)},Fu=e=>{(typeof Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||pb("END",e)};let jv=class hb{constructor(r){this.handler=r}async run(r,t,s){Au();const o={};let n={};if(typeof r!="object"||r===null||r instanceof eo||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 eo)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 c of this.outputNames)if(p.indexOf(c)!==-1){const d=t[c];(d===null||d instanceof eo)&&(u=!0,i=!1,o[c]=d)}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 eo?l[u]=p:l[u]=new eo(p.type,p.data,p.dims)}return Fu(),l}async release(){return this.handler.dispose()}static async create(r,t,s,o){Au();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 c=0,d=r.byteLength;if(typeof t=="object"&&t!==null)i=t;else if(typeof t=="number"){if(c=t,!Number.isSafeInteger(c))throw new RangeError("'byteOffset' must be an integer.");if(c<0||c>=p.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${p.byteLength}).`);if(d=r.byteLength-c,typeof s=="number"){if(d=s,!Number.isSafeInteger(d))throw new RangeError("'byteLength' must be an integer.");if(d<=0||c+d>p.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${p.byteLength-c}].`);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,c,d)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const[a,l]=await Cv(i),u=await a.createInferenceSessionHandler(n,l);return Fu(),new hb(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}};const Nv=jv,Vv=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession:Nv,TRACE:db,TRACE_FUNC_BEGIN:Au,TRACE_FUNC_END:Fu,Tensor:eo,env:$v,registerBackend:Ev},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-txh6jnNz.js b/assets/chat-mn0JV4Kp.js similarity index 99% rename from assets/chat-txh6jnNz.js rename to assets/chat-mn0JV4Kp.js index aed10976fceb45fe5b7012d446ed95b270c3908c..cc4d3348db975532398a14cad39b85a6bd0a49c9 100644 --- a/assets/chat-txh6jnNz.js +++ b/assets/chat-mn0JV4Kp.js @@ -1 +1 @@ -import{d as P,cc as W,e as S,c as h,o as y,a as i,bm as C,cd as E,u as M,bI as A,c6 as q,c7 as z,bd as D,W as U,Y as $}from"./index-CKmiAjHk.js";import{s as K}from"./index-Dpfqqu9L.js";import"./index-LHmcipjy.js";var B=()=>{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}}}},H=new WeakMap,I=new WeakMap,T=0,F=0,_=e=>{const r=`${T++}`,o={include:t=>n.has(t),with:t=>{const d=`${F++}`,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),I.set(l,o),l}},n=new WeakSet;return H.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,J=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);Y.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}J(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=O.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=>{O.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 Q(){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 G({listeners:e.steps})}}}async function X(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(Q(),[[[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 K({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 X(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,cc as W,e as S,c as h,o as y,a as i,bm as C,cd as E,u as M,bI as A,c6 as q,c7 as z,bd as D,W as U,Y as $}from"./index-WDP_Z4A8.js";import{s as K}from"./index-Dpfqqu9L.js";import"./index-LHmcipjy.js";var B=()=>{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}}}},H=new WeakMap,I=new WeakMap,T=0,F=0,_=e=>{const r=`${T++}`,o={include:t=>n.has(t),with:t=>{const d=`${F++}`,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),I.set(l,o),l}},n=new WeakSet;return H.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,J=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);Y.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}J(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=O.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=>{O.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 Q(){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 G({listeners:e.steps})}}}async function X(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(Q(),[[[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 K({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 X(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-WSAnC8p9.js b/assets/cloudflare-workers-ai-Nzt67BKJ.js similarity index 76% rename from assets/cloudflare-workers-ai-WSAnC8p9.js rename to assets/cloudflare-workers-ai-Nzt67BKJ.js index 5de541334bc0637f1c00d56a1f2a6413dd137c8e..59020e8481d304976caedbde30e07ad10f85fdb5 100644 --- a/assets/cloudflare-workers-ai-WSAnC8p9.js +++ b/assets/cloudflare-workers-ai-Nzt67BKJ.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as k,cf as y,cg as $,bk as I,o as h,u as l,$ as M,V as q,a0 as x,f as v,T as K,w as P,bl as f,b as c}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as z}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as A}from"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import{_ as B}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as C,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as V}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const S=k({__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=$(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=k({__name:"cloudflare-workers-ai",setup(p){const{t:r}=M(),u=q(),n=z(),{providers:e}=x(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}});K(()=>{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 _,g;return h(),I(l(R),{"provider-name":(_=t.value)==null?void 0:_.localizedName,"provider-icon-color":(g=t.value)==null?void 0:g.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 b;return[c(l(B),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=m=>s.value=m),"provider-name":(b=t.value)==null?void 0:b.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 V=="function"&&V(U);export{U as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as k,cf as y,cg as $,bk as I,o as h,u as l,$ as M,V as q,a0 as x,f as v,T as K,w as P,bl as f,b as c}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as A}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import{_ as B}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as C,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as V}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const S=k({__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=$(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=k({__name:"cloudflare-workers-ai",setup(p){const{t:r}=M(),u=q(),n=z(),{providers:e}=x(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}});K(()=>{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 _,g;return h(),I(l(R),{"provider-name":(_=t.value)==null?void 0:_.localizedName,"provider-icon-color":(g=t.value)==null?void 0:g.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 b;return[c(l(B),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=m=>s.value=m),"provider-name":(b=t.value)==null?void 0:b.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 V=="function"&&V(U);export{U as default}; diff --git a/assets/color-scheme-CpTOavyA.js b/assets/color-scheme-DFRftciY.js similarity index 90% rename from assets/color-scheme-CpTOavyA.js rename to assets/color-scheme-DFRftciY.js index 52c9cdac25ceb7e60d8cdedd5071396bd5ca300f..33ac9f0b1bdaea0d8bf678515b874c7f40add384 100644 --- a/assets/color-scheme-CpTOavyA.js +++ b/assets/color-scheme-DFRftciY.js @@ -1 +1 @@ -import{d as D,cf as V,cg as E,bm as i,c as n,o as r,X as w,cd as $,c2 as v,bj as F,$ as H,c5 as S,bk as y,bl as b,a as e,Y as m,ch as M,u as o,bn as j,b as g,c6 as f,c7 as R}from"./index-CKmiAjHk.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as C,a as I}from"./ColorPalette.vue_vue_type_script_setup_true_lang-nn7hoVat.js";import{b as B}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./index-qrRTaw2W.js";const N=["disabled"],T=D({__name:"ColorHueRange",props:V({disabled:{type:Boolean},class:null},{colorValue:{type:String,default:""},colorValueModifiers:{}}),emits:["update:colorValue"],setup(c){const s=c,p=E(c,"colorValue");return(l,t)=>i((r(),n("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>p.value=a),type:"range",min:"0",max:"360",step:"0.01",class:w(["color-hue-range",[s.disabled?"opacity-25 cursor-not-allowed":"cursor-pointer",s.class||""]]),transition:"all ease-in-out duration-250",disabled:s.disabled},null,10,N)),[[$,p.value]])}}),U=v(T,[["__scopeId","data-v-ae80cb9d"]]),z=[[],["#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"]],L={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"},O={"text-lg":"","font-semibold":""},P={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},X={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"},Y={"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"},q={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"},G=["duration","delay"],J={"font-medium":""},K={text:"sm neutral-500"},Q={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":""},A=D({__name:"color-scheme",setup(c){const s=F(),{t:p}=H();return(l,t)=>{const a=S("motion");return r(),n(f,null,[i((r(),y(o(C),{"mb-2":"",title:o(p)("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:b(()=>[i((r(),n("div",L,[e("span",O,m(l.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",P,[i(e("input",{"onUpdate:modelValue":t[0]||(t[0]=d=>o(s).themeColorsHueDynamic=d),type:"checkbox",class:"peer sr-only"},null,512),[[j,o(s).themeColorsHueDynamic]]),t[2]||(t[2]=e("div",{class:"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 peer-checked:bg-primary-500 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),M(" "+m(l.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])])),[[a]]),i(g(o(U),{modelValue:o(s).themeColorsHue,"onUpdate:modelValue":t[1]||(t[1]=d=>o(s).themeColorsHue=d),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+6*10,delay:6*50,disabled:o(s).themeColorsHueDynamic},null,8,["modelValue","disabled"]),[[a]]),i((r(),n("div",X,[t[4]||(t[4]=e("span",{"bg-primary-50":""},"50",-1)),t[5]||(t[5]=e("span",{"bg-primary-100":""},"100",-1)),t[6]||(t[6]=e("span",{"bg-primary-200":""},"200",-1)),t[7]||(t[7]=e("span",{"bg-primary-300":""},"300",-1)),t[8]||(t[8]=e("span",{"bg-primary-400":""},"400",-1)),t[9]||(t[9]=e("span",{"bg-primary-500":""},"500",-1)),i((r(),n("div",Y,t[3]||(t[3]=[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)]))),[[a]])])),[[a]]),i((r(),n("div",q,t[10]||(t[10]=[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)]))),[[a]])]),_:1},8,["title"])),[[a]]),i((r(),y(o(C),{"mb-2":"",title:o(p)("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:b(()=>[(r(!0),n(f,null,R(l.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:d,description:h,colors:x},u)=>i((r(),n("div",{key:u,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+u*10,delay:11*50+u*50,transition:"all ease-in-out duration-250"},[e("div",null,[e("span",J,m(l.$rt(d)),1),e("div",K,m(l.$rt(h)),1)]),g(I,{colors:x.map((_,k)=>({hex:o(z)[u][k],name:l.$rt(_)}))},null,8,["colors"])],8,G)),[[a]])),128))]),_:1},8,["title"])),[[a]]),i((r(),n("div",Q,t[11]||(t[11]=[e("div",{text:"60","i-solar:pallete-2-bold-duotone":""},null,-1)]))),[[a]])],64)}}});typeof B=="function"&&B(A);const de=v(A,[["__scopeId","data-v-29f357ba"]]);export{de as default}; +import{d as D,cf as V,cg as E,bm as i,c as n,o as r,X as w,cd as $,c2 as v,bj as F,$ as H,c5 as S,bk as y,bl as b,a as e,Y as m,ch as M,u as o,bn as j,b as g,c6 as f,c7 as R}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as C,a as I}from"./ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js";import{b as B}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./index-DeGbjSQn.js";const N=["disabled"],T=D({__name:"ColorHueRange",props:V({disabled:{type:Boolean},class:null},{colorValue:{type:String,default:""},colorValueModifiers:{}}),emits:["update:colorValue"],setup(c){const s=c,p=E(c,"colorValue");return(l,t)=>i((r(),n("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>p.value=a),type:"range",min:"0",max:"360",step:"0.01",class:w(["color-hue-range",[s.disabled?"opacity-25 cursor-not-allowed":"cursor-pointer",s.class||""]]),transition:"all ease-in-out duration-250",disabled:s.disabled},null,10,N)),[[$,p.value]])}}),U=v(T,[["__scopeId","data-v-ae80cb9d"]]),z=[[],["#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"]],L={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"},O={"text-lg":"","font-semibold":""},P={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},X={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"},Y={"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"},q={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"},G=["duration","delay"],J={"font-medium":""},K={text:"sm neutral-500"},Q={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":""},A=D({__name:"color-scheme",setup(c){const s=F(),{t:p}=H();return(l,t)=>{const a=S("motion");return r(),n(f,null,[i((r(),y(o(C),{"mb-2":"",title:o(p)("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:b(()=>[i((r(),n("div",L,[e("span",O,m(l.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",P,[i(e("input",{"onUpdate:modelValue":t[0]||(t[0]=d=>o(s).themeColorsHueDynamic=d),type:"checkbox",class:"peer sr-only"},null,512),[[j,o(s).themeColorsHueDynamic]]),t[2]||(t[2]=e("div",{class:"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 peer-checked:bg-primary-500 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),M(" "+m(l.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])])),[[a]]),i(g(o(U),{modelValue:o(s).themeColorsHue,"onUpdate:modelValue":t[1]||(t[1]=d=>o(s).themeColorsHue=d),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+6*10,delay:6*50,disabled:o(s).themeColorsHueDynamic},null,8,["modelValue","disabled"]),[[a]]),i((r(),n("div",X,[t[4]||(t[4]=e("span",{"bg-primary-50":""},"50",-1)),t[5]||(t[5]=e("span",{"bg-primary-100":""},"100",-1)),t[6]||(t[6]=e("span",{"bg-primary-200":""},"200",-1)),t[7]||(t[7]=e("span",{"bg-primary-300":""},"300",-1)),t[8]||(t[8]=e("span",{"bg-primary-400":""},"400",-1)),t[9]||(t[9]=e("span",{"bg-primary-500":""},"500",-1)),i((r(),n("div",Y,t[3]||(t[3]=[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)]))),[[a]])])),[[a]]),i((r(),n("div",q,t[10]||(t[10]=[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)]))),[[a]])]),_:1},8,["title"])),[[a]]),i((r(),y(o(C),{"mb-2":"",title:o(p)("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:b(()=>[(r(!0),n(f,null,R(l.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:d,description:h,colors:x},u)=>i((r(),n("div",{key:u,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+u*10,delay:11*50+u*50,transition:"all ease-in-out duration-250"},[e("div",null,[e("span",J,m(l.$rt(d)),1),e("div",K,m(l.$rt(h)),1)]),g(I,{colors:x.map((_,k)=>({hex:o(z)[u][k],name:l.$rt(_)}))},null,8,["colors"])],8,G)),[[a]])),128))]),_:1},8,["title"])),[[a]]),i((r(),n("div",Q,t[11]||(t[11]=[e("div",{text:"60","i-solar:pallete-2-bold-duotone":""},null,-1)]))),[[a]])],64)}}});typeof B=="function"&&B(A);const de=v(A,[["__scopeId","data-v-29f357ba"]]);export{de as default}; diff --git a/assets/consciousness-C2QUWl48.js b/assets/consciousness-CI5ipeHX.js similarity index 90% rename from assets/consciousness-C2QUWl48.js rename to assets/consciousness-CI5ipeHX.js index c7a1fd16199ef4a1119dcfdeb196ae1e174ec2dd..b7a298fe319a31151ea89f6384f49aff03c18611 100644 --- a/assets/consciousness-C2QUWl48.js +++ b/assets/consciousness-CI5ipeHX.js @@ -1 +1 @@ -import{a4 as P,cc as n,e as M,f as r,w as L}from"./index-CKmiAjHk.js";import{u as w}from"./providers-bTtvV6aX.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)),f=r(()=>o.isLoadingModels[s.value]||!1),p=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:f,activeProviderModelError:p,filteredModels:g,resetModelSelection:u,loadModelsForProvider:v}});export{h as u}; +import{a4 as P,cc as n,e as M,f as r,w as L}from"./index-WDP_Z4A8.js";import{u as w}from"./providers-7GsMyC_3.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)),f=r(()=>o.isLoadingModels[s.value]||!1),p=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:f,activeProviderModelError:p,filteredModels:g,resetModelSelection:u,loadModelsForProvider:v}});export{h as u}; diff --git a/assets/consciousness-zfnvAfyl.js b/assets/consciousness-DTcES_Z6.js similarity index 93% rename from assets/consciousness-zfnvAfyl.js rename to assets/consciousness-DTcES_Z6.js index 91a584d457bf15991a2cf4694d6bca71662643e1..22fa920396004ff5e7afd024f075b3ba938607bb 100644 --- a/assets/consciousness-zfnvAfyl.js +++ b/assets/consciousness-DTcES_Z6.js @@ -1 +1 @@ -import{d as R,a0 as b,$ as U,T as z,c5 as B,c as r,o as n,a as s,bm as f,W as k,Y as i,u as e,c6 as y,c7 as D,b as q,bl as T,c3 as j,bk as M,bI as u,cd as E}from"./index-CKmiAjHk.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as F}from"./consciousness-C2QUWl48.js";import{u as I}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{R as Q,a as A}from"./RadioCardSimple-DYJ2lAWN.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const W={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},Y={flex:"~ col gap-4"},$={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},G={text:"neutral-400 dark:neutral-400"},H={"max-w-full":""},J={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},K={key:1},O={key:0},X={flex:"~ col gap-4"},Z={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"},le={class:"text-sm text-red-600 dark:text-red-400"},ne={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:"flex items-center gap-3 border border-primary-200 rounded-lg bg-primary-50 p-4 dark:border-primary-800 dark:bg-primary-900/20"},ve={class:"flex flex-col"},ge={class:"font-medium"},_e={class:"text-sm text-primary-600 dark:text-primary-400"},he={class:"mt-2"},be={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 V=I(),x=F(),{availableProviders:C,allChatProvidersMetadata:P}=b(V),{activeProvider:a,activeModel:d,customModelName:S,modelSearchQuery:c,supportsModelListing:v,providerModels:p,isLoadingActiveProviderModels:g,activeProviderModelError:_}=b(x),{t}=U();z(async()=>{await x.loadModelsForProvider(a.value)});function N(h){S.value=h}return(h,o)=>{const L=B("motion");return n(),r(y,null,[s("div",W,[s("div",null,[s("div",Y,[s("div",null,[s("h2",$,i(e(t)("settings.pages.providers.title")),1),s("div",G,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),s("div",H,[e(C).length>0?(n(),r("fieldset",J,[(n(!0),r(y,null,D(e(P),l=>(n(),M(e(A),{id:l.id,key:l.id,modelValue:e(a),"onUpdate:modelValue":o[0]||(o[0]=m=>u(a)?a.value=m:null),name:"provider",value:l.id,title:l.localizedName,description:l.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(n(),r("div",K,[q(e(j),{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:T(()=>o[4]||(o[4]=[s("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),s("div",{class:"flex flex-col"},[s("span",{class:"font-medium"},"No Providers Configured"),s("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),s("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1,__:[4]})]))])])]),e(a)&&e(v)?(n(),r("div",O,[s("div",X,[s("div",null,[s("h2",Z,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),s("div",ee,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e(g)?(n(),r("div",se,[o[5]||(o[5]=s("div",{class:"mr-2 animate-spin"},[s("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):e(_)?(n(),r("div",te,[o[6]||(o[6]=s("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),s("div",oe,[s("span",ie,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),s("span",le,i(e(_)),1)])])):e(p).length===0&&!e(g)?(n(),r("div",ne,[o[7]||(o[7]=s("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),s("div",re,[s("span",de,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),s("span",ae,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):e(p).length>0?(n(),M(e(Q),{key:3,modelValue:e(d),"onUpdate:modelValue":o[1]||(o[1]=l=>u(d)?d.value=l:null),"search-query":e(c),"onUpdate:searchQuery":o[2]||(o[2]=l=>u(c)?c.value=l:null),items:e(p).sort((l,m)=>l.id===e(d)?-1:m.id===e(d)?1:0),searchable:!0,"search-placeholder":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:e(c)}),"search-results-text":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":N},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"])):k("",!0)])])):e(a)&&!e(v)?(n(),r("div",ce,[s("div",ue,[s("div",null,[s("h2",pe,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),s("div",me,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s("div",xe,[o[8]||(o[8]=s("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-primary-500 dark:text-primary-400"},null,-1)),s("div",ve,[s("span",ge,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),s("span",_e,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),s("div",he,[s("label",be,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),f(s("input",{"onUpdate:modelValue":o[3]||(o[3]=l=>u(d)?d.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:e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,fe),[[E,e(d)]])])])])):k("",!0)]),f((n(),r("div",ke,o[9]||(o[9]=[s("div",{text:"60","i-solar:ghost-bold-duotone":""},null,-1)]))),[[L]])],64)}}});typeof w=="function"&&w(ye);export{ye as default}; +import{d as R,a0 as b,$ as U,T as z,c5 as B,c as r,o as n,a as s,bm as f,W as k,Y as i,u as e,c6 as y,c7 as D,b as q,bl as T,c3 as j,bk as M,bI as u,cd as E}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as F}from"./consciousness-CI5ipeHX.js";import{u as I}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{R as Q,a as A}from"./RadioCardSimple-BzEaEqwF.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const W={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},Y={flex:"~ col gap-4"},$={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},G={text:"neutral-400 dark:neutral-400"},H={"max-w-full":""},J={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},K={key:1},O={key:0},X={flex:"~ col gap-4"},Z={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"},le={class:"text-sm text-red-600 dark:text-red-400"},ne={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:"flex items-center gap-3 border border-primary-200 rounded-lg bg-primary-50 p-4 dark:border-primary-800 dark:bg-primary-900/20"},ve={class:"flex flex-col"},ge={class:"font-medium"},_e={class:"text-sm text-primary-600 dark:text-primary-400"},he={class:"mt-2"},be={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 V=I(),x=F(),{availableProviders:C,allChatProvidersMetadata:P}=b(V),{activeProvider:a,activeModel:d,customModelName:S,modelSearchQuery:c,supportsModelListing:v,providerModels:p,isLoadingActiveProviderModels:g,activeProviderModelError:_}=b(x),{t}=U();z(async()=>{await x.loadModelsForProvider(a.value)});function N(h){S.value=h}return(h,o)=>{const L=B("motion");return n(),r(y,null,[s("div",W,[s("div",null,[s("div",Y,[s("div",null,[s("h2",$,i(e(t)("settings.pages.providers.title")),1),s("div",G,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),s("div",H,[e(C).length>0?(n(),r("fieldset",J,[(n(!0),r(y,null,D(e(P),l=>(n(),M(e(A),{id:l.id,key:l.id,modelValue:e(a),"onUpdate:modelValue":o[0]||(o[0]=m=>u(a)?a.value=m:null),name:"provider",value:l.id,title:l.localizedName,description:l.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(n(),r("div",K,[q(e(j),{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:T(()=>o[4]||(o[4]=[s("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),s("div",{class:"flex flex-col"},[s("span",{class:"font-medium"},"No Providers Configured"),s("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),s("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1,__:[4]})]))])])]),e(a)&&e(v)?(n(),r("div",O,[s("div",X,[s("div",null,[s("h2",Z,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),s("div",ee,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e(g)?(n(),r("div",se,[o[5]||(o[5]=s("div",{class:"mr-2 animate-spin"},[s("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):e(_)?(n(),r("div",te,[o[6]||(o[6]=s("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),s("div",oe,[s("span",ie,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),s("span",le,i(e(_)),1)])])):e(p).length===0&&!e(g)?(n(),r("div",ne,[o[7]||(o[7]=s("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),s("div",re,[s("span",de,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),s("span",ae,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):e(p).length>0?(n(),M(e(Q),{key:3,modelValue:e(d),"onUpdate:modelValue":o[1]||(o[1]=l=>u(d)?d.value=l:null),"search-query":e(c),"onUpdate:searchQuery":o[2]||(o[2]=l=>u(c)?c.value=l:null),items:e(p).sort((l,m)=>l.id===e(d)?-1:m.id===e(d)?1:0),searchable:!0,"search-placeholder":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:e(c)}),"search-results-text":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":N},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"])):k("",!0)])])):e(a)&&!e(v)?(n(),r("div",ce,[s("div",ue,[s("div",null,[s("h2",pe,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),s("div",me,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s("div",xe,[o[8]||(o[8]=s("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-primary-500 dark:text-primary-400"},null,-1)),s("div",ve,[s("span",ge,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),s("span",_e,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),s("div",he,[s("label",be,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),f(s("input",{"onUpdate:modelValue":o[3]||(o[3]=l=>u(d)?d.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:e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,fe),[[E,e(d)]])])])])):k("",!0)]),f((n(),r("div",ke,o[9]||(o[9]=[s("div",{text:"60","i-solar:ghost-bold-duotone":""},null,-1)]))),[[L]])],64)}}});typeof w=="function"&&w(ye);export{ye as default}; diff --git a/assets/deepseek-B_VkuzDZ.js b/assets/deepseek-C4C7ySbq.js similarity index 64% rename from assets/deepseek-B_VkuzDZ.js rename to assets/deepseek-C4C7ySbq.js index 8b2dc5f349c1ee0f046753d154f0d33f97c69685..9e0bd97eb7f2ba88809df705e1cc425d964d48eb 100644 --- a/assets/deepseek-B_VkuzDZ.js +++ b/assets/deepseek-C4C7ySbq.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as V,$ as U,V as $,a0 as y,f as c,T as K,w as h,bk as w,o as x,bl as u,b as l,u as t}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as z}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const a="deepseek",B=V({__name:"deepseek",setup(I){const{t:m}=U(),b=$(),d=z(),{providers:o}=y(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}});K(()=>{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)||""}),h([i,s],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:s.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:i.value,"onUpdate:modelValue":r[0]||(r[0]=g=>i.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:s.value,"onUpdate:modelValue":r[1]||(r[1]=p=>s.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_686f6999_lang-Br6hYQpP.js";import{d as V,$ as U,V as $,a0 as y,f as c,T as K,w as h,bk as w,o as x,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="deepseek",B=V({__name:"deepseek",setup(I){const{t:m}=U(),b=$(),d=z(),{providers:o}=y(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}});K(()=>{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)||""}),h([i,s],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:s.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:i.value,"onUpdate:modelValue":r[0]||(r[0]=g=>i.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:s.value,"onUpdate:modelValue":r[1]||(r[1]=p=>s.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-BF6G54My.js b/assets/default-MxM0RvWC.js similarity index 89% rename from assets/default-BF6G54My.js rename to assets/default-MxM0RvWC.js index 75cad1da2a2523017b56172e58668903e0fd039f..809c1d78a055fb8aad21bc0db9437bce676f895d 100644 --- a/assets/default-BF6G54My.js +++ b/assets/default-MxM0RvWC.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-CKmiAjHk.js";import{H as d}from"./HeaderLink-z0x7oVxU.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-WDP_Z4A8.js";import{H as d}from"./HeaderLink--5c4L7nq.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-fAr5k7ap.js b/assets/default-node-BWr47-4Z.js similarity index 89% rename from assets/default-node-fAr5k7ap.js rename to assets/default-node-BWr47-4Z.js index d602f838f2bd947df665a69b893f453dd64a71ee..06967bf06d63b73533200b0b088c6518dfb4fa41 100644 --- a/assets/default-node-fAr5k7ap.js +++ b/assets/default-node-BWr47-4Z.js @@ -1 +1 @@ -import{cP as t}from"./index-CKmiAjHk.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{cP as t}from"./index-WDP_Z4A8.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-BfEew3MB.js b/assets/delays-WpVM8VPm.js similarity index 70% rename from assets/delays-BfEew3MB.js rename to assets/delays-WpVM8VPm.js index 7c0557a9a1d4b2c9a141641d8c2ed64eeb38abd2..1a8a85b884833d28a2cd8c554b4354148cb85f05 100644 --- a/assets/delays-BfEew3MB.js +++ b/assets/delays-WpVM8VPm.js @@ -1 +1 @@ -import"./three-vrm.module-D3hfVPJz.js";import{b as g,l as _}from"./queues-CFrXkpuW.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as k}from"./Textarea.vue_vue_type_script_setup_true_lang-DlkitCQO.js";import{d as b,e as r,c as n,o as t,a as e,b as y,u as x,Y as i,c6 as f,c7 as m}from"./index-CKmiAjHk.js";import"./emotions-DWNSb738.js";import"./queue-C8JDWgSn.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Bm_AZiZR.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":""},E={"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=b({__name:"delays",setup(B){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(k),{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",E,[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",S,[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{T as default}; +import"./three-vrm.module-DIVMhp6T.js";import{b as g,l as _}from"./queues-DBvSyUSC.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as k}from"./Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js";import{d as b,e as r,c as n,o as t,a as e,b as y,u as x,Y as i,c6 as f,c7 as m}from"./index-WDP_Z4A8.js";import"./emotions-DWNSb738.js";import"./queue-C50Iq5oO.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.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":""},E={"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=b({__name:"delays",setup(B){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(k),{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",E,[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",S,[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{T as default}; diff --git a/assets/developer-BTVcsgZj.js b/assets/developer-B1AODhAI.js similarity index 82% rename from assets/developer-BTVcsgZj.js rename to assets/developer-B1AODhAI.js index 07c76664b04e92a606c1b89bd50ed3240170bc91..439f906d3de2acaa9619cfbd450e3a2158cebd2f 100644 --- a/assets/developer-BTVcsgZj.js +++ b/assets/developer-B1AODhAI.js @@ -1 +1 @@ -import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{d as p,bj as c,c5 as m,c as s,o as r,bm as a,b as l,u as i,a as f,c6 as b}from"./index-CKmiAjHk.js";import{_ as d}from"./CheckBar.vue_vue_type_script_setup_true_lang-BreKm1Zw.js";import{b as u}from"./route-block-B_A1xBdJ.js";const y={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":""},g=p({__name:"developer",setup(v){const t=c();return(_,e)=>{const o=m("motion");return r(),s(b,null,[a(l(d,{modelValue:i(t).disableTransitions,"onUpdate:modelValue":e[0]||(e[0]=n=>i(t).disableTransitions=n),"mb-2":"","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"]),[[o]]),a(l(d,{modelValue:i(t).usePageSpecificTransitions,"onUpdate:modelValue":e[1]||(e[1]=n=>i(t).usePageSpecificTransitions=n),disabled:i(t).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"]),[[o]]),a((r(),s("div",y,e[2]||(e[2]=[f("div",{text:"60","i-solar:code-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof u=="function"&&u(g);export{g as default}; +import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{d as p,bj as c,c5 as m,c as s,o as r,bm as a,b as l,u as i,a as f,c6 as b}from"./index-WDP_Z4A8.js";import{_ as d}from"./CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js";import{b as u}from"./route-block-B_A1xBdJ.js";const y={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":""},g=p({__name:"developer",setup(v){const t=c();return(_,e)=>{const o=m("motion");return r(),s(b,null,[a(l(d,{modelValue:i(t).disableTransitions,"onUpdate:modelValue":e[0]||(e[0]=n=>i(t).disableTransitions=n),"mb-2":"","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"]),[[o]]),a(l(d,{modelValue:i(t).usePageSpecificTransitions,"onUpdate:modelValue":e[1]||(e[1]=n=>i(t).usePageSpecificTransitions=n),disabled:i(t).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"]),[[o]]),a((r(),s("div",y,e[2]||(e[2]=[f("div",{text:"60","i-solar:code-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof u=="function"&&u(g);export{g as default}; diff --git a/assets/effect-WSjEuzC9-fUavg5P7.js b/assets/effect-WSjEuzC9-Dq66khSv.js similarity index 51% rename from assets/effect-WSjEuzC9-fUavg5P7.js rename to assets/effect-WSjEuzC9-Dq66khSv.js index 3661afe99f1b94c52d4bcd716ed9b802f99a8cc9..05db38318b322eff1fdcf92db87f8d715a95d08a 100644 --- a/assets/effect-WSjEuzC9-fUavg5P7.js +++ b/assets/effect-WSjEuzC9-Dq66khSv.js @@ -1 +1 @@ -import{cP as r}from"./index-CKmiAjHk.js";import{t as e}from"./mcp-CyJbhMv7.js";const c=async()=>{const{JSONSchema:t}=await e(r(()=>import("./__vite-optional-peer-dep_effect_xsschema-BIHI7g3E.js"),[]),"effect");return o=>t.make(o)};export{c as getToJsonSchemaFn}; +import{cP as r}from"./index-WDP_Z4A8.js";import{t as e}from"./mcp-CVsSz3w1.js";const c=async()=>{const{JSONSchema:t}=await e(r(()=>import("./__vite-optional-peer-dep_effect_xsschema-BIHI7g3E.js"),[]),"effect");return o=>t.make(o)};export{c as getToJsonSchemaFn}; diff --git a/assets/elevenlabs-TKIB81vh.js b/assets/elevenlabs-DfWVlghd.js similarity index 80% rename from assets/elevenlabs-TKIB81vh.js rename to assets/elevenlabs-DfWVlghd.js index 70d0508dd8f4b402a838505bd3ab9acc5f4ea8f4..d457933298ca1980f559a4f11e126cd1a90af8ba 100644 --- a/assets/elevenlabs-TKIB81vh.js +++ b/assets/elevenlabs-DfWVlghd.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as h,e as n,a0 as F,$ as I,f as k,T,w as r,bk as E,o as K,bl as x,b as d,u as o,a as L}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as N}from"./providers-bTtvV6aX.js";import{u as z}from"./speech-CRLeR9Bl.js";import{_ as p,a as G}from"./FieldRange.vue_vue_type_script_setup_true_lang-5-FhMpNA.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as H,a as R}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-9MhYiAWZ.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.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=N(),{providers:C}=F(t),{t:a}=I(),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 T(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)=>(K(),E(o(R),{"provider-id":l,"default-model":_,"additional-settings":V},{"voice-settings":x(()=>[L("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_686f6999_lang-Br6hYQpP.js";import{d as h,e as n,a0 as F,$ as I,f as k,T,w as r,bk as E,o as K,bl as x,b as d,u as o,a as L}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as N}from"./providers-7GsMyC_3.js";import{u as z}from"./speech-DRmXCXwq.js";import{_ as p,a as G}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as H,a as R}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.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=N(),{providers:C}=F(t),{t:a}=I(),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 T(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)=>(K(),E(o(R),{"provider-id":l,"default-model":_,"additional-settings":V},{"voice-settings":x(()=>[L("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-DuCT_vyT.js b/assets/emotions-D8xwaz_1.js similarity index 77% rename from assets/emotions-DuCT_vyT.js rename to assets/emotions-D8xwaz_1.js index 1958834b2227af5f17070a09e1c0d3eff81bc5e6..8063fa854d956f8bf83b74e7ff9d54d18b9c1df9 100644 --- a/assets/emotions-DuCT_vyT.js +++ b/assets/emotions-D8xwaz_1.js @@ -1 +1 @@ -import{u as _}from"./queue-C8JDWgSn.js";import{a as k,l as b}from"./queues-CFrXkpuW.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as x}from"./Textarea.vue_vue_type_script_setup_true_lang-DlkitCQO.js";import{d as h,e as u,c as s,o as t,a as e,b as w,u as M,Y as d,c6 as p,c7 as f}from"./index-CKmiAjHk.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Bm_AZiZR.js";const V={flex:"","flex-col":"","gap-2":"","p-2":""},y={flex:"","flex-row":"","gap-2":""},E={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},Q={"w-full":"",flex:"","flex-row":"","gap-4":""},S={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},B={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},Y=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=k(g);function v(){r.value=!0;const a=l.value.split("");for(const o of a)m.add(o);m.add(b),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",E,d(r.value?"Processing...":"Send"),1)]),e("div",Q,[e("div",S,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(p,null,f(c.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))]),e("div",B,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(p,null,f(i.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))])])]))}});export{Y as default}; +import{u as _}from"./queue-C50Iq5oO.js";import{a as k,l as b}from"./queues-DBvSyUSC.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as x}from"./Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js";import{d as h,e as u,c as s,o as t,a as e,b as w,u as M,Y as d,c6 as p,c7 as f}from"./index-WDP_Z4A8.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js";const V={flex:"","flex-col":"","gap-2":"","p-2":""},y={flex:"","flex-row":"","gap-2":""},E={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},Q={"w-full":"",flex:"","flex-row":"","gap-4":""},S={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},B={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},Y=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=k(g);function v(){r.value=!0;const a=l.value.split("");for(const o of a)m.add(o);m.add(b),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",E,d(r.value?"Processing...":"Send"),1)]),e("div",Q,[e("div",S,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(p,null,f(c.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))]),e("div",B,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(p,null,f(i.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))])])]))}});export{Y as default}; diff --git a/assets/featherless-ai-jvb9kDLO.js b/assets/featherless-ai-Abs5j3EH.js similarity index 64% rename from assets/featherless-ai-jvb9kDLO.js rename to assets/featherless-ai-Abs5j3EH.js index 019c854954cdf0d23c004ad75f184b59a6dafb16..26ade800cb91fa9f944dd75fc1317074b66ecfb7 100644 --- a/assets/featherless-ai-jvb9kDLO.js +++ b/assets/featherless-ai-Abs5j3EH.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as k,$ as U,V as $,a0 as h,f as v,T as y,w as K,bk as w,o as x,bl as u,b as l,u as t}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as z}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const a="featherless-ai",C=k({__name:"featherless-ai",setup(I){const{t:m}=U(),b=$(),d=z(),{providers:o}=h(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}});y(()=>{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 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:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"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.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_686f6999_lang-Br6hYQpP.js";import{d as k,$ as U,V as $,a0 as h,f as v,T as y,w as K,bk as w,o as x,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="featherless-ai",C=k({__name:"featherless-ai",setup(I){const{t:m}=U(),b=$(),d=z(),{providers:o}=h(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}});y(()=>{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 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:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"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.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-FlufMP-a.js b/assets/filter-message-BA3h9Pac.js similarity index 75% rename from assets/filter-message-FlufMP-a.js rename to assets/filter-message-BA3h9Pac.js index 00bf3eec70f5d91fd69c344ce61b83617fcaca6e..03e9128ba352f2868fcf93f37e3f45943f524ce6 100644 --- a/assets/filter-message-FlufMP-a.js +++ b/assets/filter-message-BA3h9Pac.js @@ -1 +1 @@ -import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as m}from"./Textarea.vue_vue_type_script_setup_true_lang-DlkitCQO.js";import{d as g,e as c,c as v,o as _,a as o,b,u as x,Y as d}from"./index-CKmiAjHk.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Bm_AZiZR.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":""},C=g({__name:"filter-message",setup(M){const s=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=s.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),s.value="",u.value=!1}return(i,e)=>(_(),v("div",S,[o("div",k,[b(x(m),{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=t=>s.value=t),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),o("button",w,d(u.value?"Processing...":"Send"),1)]),o("div",V,[e[1]||(e[1]=o("h3",{"font-semibold":""}," Streaming Message ",-1)),o("div",null,d(r.value.content),1)])]))}});export{C as default}; +import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as m}from"./Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js";import{d as g,e as c,c as v,o as _,a as o,b,u as x,Y as d}from"./index-WDP_Z4A8.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.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":""},C=g({__name:"filter-message",setup(M){const s=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=s.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),s.value="",u.value=!1}return(i,e)=>(_(),v("div",S,[o("div",k,[b(x(m),{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=t=>s.value=t),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),o("button",w,d(u.value?"Processing...":"Send"),1)]),o("div",V,[e[1]||(e[1]=o("h3",{"font-semibold":""}," Streaming Message ",-1)),o("div",null,d(r.value.content),1)])]))}});export{C as default}; diff --git a/assets/fireworks-ai-DzrjGQik.js b/assets/fireworks-ai-Cgaz7mYL.js similarity index 64% rename from assets/fireworks-ai-DzrjGQik.js rename to assets/fireworks-ai-Cgaz7mYL.js index 89006217595bfa4814e988c3134f6fc231e090e3..a9d9e5c8db16d13932d67302f2a4bf9cd4cc7956 100644 --- a/assets/fireworks-ai-DzrjGQik.js +++ b/assets/fireworks-ai-Cgaz7mYL.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as V,$ as w,V as U,a0 as $,f as c,T as y,w as K,bk as h,o as x,bl as u,b as l,u as t}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as z}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const a="fireworks-ai",C=V({__name:"fireworks-ai",setup(I){const{t:m}=w(),b=U(),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}});y(()=>{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_686f6999_lang-Br6hYQpP.js";import{d as V,$ as w,V as U,a0 as $,f as c,T as y,w as K,bk as h,o as x,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="fireworks-ai",C=V({__name:"fireworks-ai",setup(I){const{t:m}=w(),b=U(),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}});y(()=>{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/general-DywEs7c1.js b/assets/general-D0FjssBx.js similarity index 87% rename from assets/general-DywEs7c1.js rename to assets/general-D0FjssBx.js index 9c91a7a2e4d166e65a04e9c214a4136a424fc7b0..40151afbb3fea3fb09993a19be7fdb552eb84e71 100644 --- a/assets/general-DywEs7c1.js +++ b/assets/general-D0FjssBx.js @@ -1 +1 @@ -import{d as m,bj as g,ca as f,c5 as y,c as l,o as r,bm as t,b,u,bI as v,ch as _,Y as d,a as n,cl as h,c6 as x}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{_ as k}from"./CheckBar.vue_vue_type_script_setup_true_lang-BreKm1Zw.js";import{b as p}from"./route-block-B_A1xBdJ.js";const V={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"},j={value:"en-US"},D={value:"zh-CN"},N={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":""},S=m({__name:"general",setup($){const c=g(),o=f();return(a,e)=>{const i=y("motion");return r(),l(x,null,[t(b(k,{modelValue:u(o),"onUpdate:modelValue":e[0]||(e[0]=s=>v(o)?o.value=s:null),"mb-2":"",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"]),[[i]]),t((r(),l("div",V,[_(d(a.$t("settings.language.title"))+" ",1),t(n("select",{"onUpdate:modelValue":e[1]||(e[1]=s=>u(c).language=s),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[n("option",j,d(a.$t("settings.language.english")),1),n("option",D,d(a.$t("settings.language.chinese")),1)],512),[[h,u(c).language]])])),[[i]]),t((r(),l("div",N,e[2]||(e[2]=[n("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[i]])],64)}}});typeof p=="function"&&p(S);export{S as default}; +import{d as m,bj as g,ca as f,c5 as y,c as l,o as r,bm as t,b,u,bI as v,ch as _,Y as d,a as n,cl as h,c6 as x}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{_ as k}from"./CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js";import{b as p}from"./route-block-B_A1xBdJ.js";const V={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"},j={value:"en-US"},D={value:"zh-CN"},N={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":""},S=m({__name:"general",setup($){const c=g(),o=f();return(a,e)=>{const i=y("motion");return r(),l(x,null,[t(b(k,{modelValue:u(o),"onUpdate:modelValue":e[0]||(e[0]=s=>v(o)?o.value=s:null),"mb-2":"",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"]),[[i]]),t((r(),l("div",V,[_(d(a.$t("settings.language.title"))+" ",1),t(n("select",{"onUpdate:modelValue":e[1]||(e[1]=s=>u(c).language=s),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[n("option",j,d(a.$t("settings.language.english")),1),n("option",D,d(a.$t("settings.language.chinese")),1)],512),[[h,u(c).language]])])),[[i]]),t((r(),l("div",N,e[2]||(e[2]=[n("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[i]])],64)}}});typeof p=="function"&&p(S);export{S as default}; diff --git a/assets/google-generative-ai-CYSSKC4y.js b/assets/google-generative-ai-Cvwii5l7.js similarity index 67% rename from assets/google-generative-ai-CYSSKC4y.js rename to assets/google-generative-ai-Cvwii5l7.js index 7bd793e88b803539edaca20247ef9b5de87afb11..9c7ddd5590697cdd89598191f81b4bbff2fa0a4e 100644 --- a/assets/google-generative-ai-CYSSKC4y.js +++ b/assets/google-generative-ai-Cvwii5l7.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as U,$ as V,V as k,a0 as $,f as v,T as y,w as K,bk as I,o as G,bl as p,b as l,u as t}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as M}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as N,a as w}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as x}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as f}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const e="google-generative-ai",z=U({__name:"google-generative-ai",setup(B){const{t:m}=V(),_=k(),c=M(),{providers:a}=$(c),u=v(()=>c.getProviderMetadata(e)),r=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}}),s=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}});y(()=>{var o,i;a.value[e]||(a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),r.value=((o=a.value[e])==null?void 0:o.apiKey)||"",s.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"}),K([r,s],()=>{a.value[e]={...a.value[e],apiKey:r.value,baseUrl:s.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 G(),I(t(S),{"provider-name":((d=u.value)==null?void 0:d.localizedName)||"Google | Gemini","provider-icon":(g=u.value)==null?void 0:g.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[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:p(()=>{var n;return[l(t(x),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=h=>r.value=h),"provider-name":((n=u.value)==null?void 0:n.localizedName)||"Google",placeholder:"GEMINI_API_KEY"},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(N),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(w),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=n=>s.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(z);export{z as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as U,$ as V,V as k,a0 as $,f as v,T as y,w as K,bk as I,o as G,bl as p,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as M}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as N,a as w}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as x}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as f}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const e="google-generative-ai",z=U({__name:"google-generative-ai",setup(B){const{t:m}=V(),_=k(),c=M(),{providers:a}=$(c),u=v(()=>c.getProviderMetadata(e)),r=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}}),s=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}});y(()=>{var o,i;a.value[e]||(a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),r.value=((o=a.value[e])==null?void 0:o.apiKey)||"",s.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"}),K([r,s],()=>{a.value[e]={...a.value[e],apiKey:r.value,baseUrl:s.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 G(),I(t(S),{"provider-name":((d=u.value)==null?void 0:d.localizedName)||"Google | Gemini","provider-icon":(g=u.value)==null?void 0:g.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[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:p(()=>{var n;return[l(t(x),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=h=>r.value=h),"provider-name":((n=u.value)==null?void 0:n.localizedName)||"Google",placeholder:"GEMINI_API_KEY"},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(N),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(w),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=n=>s.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(z);export{z as default}; diff --git a/assets/image-M7z4Z5JL.js b/assets/image-CibzeZAR.js similarity index 95% rename from assets/image-M7z4Z5JL.js rename to assets/image-CibzeZAR.js index f56d7d970fe42a9c1958cc38aa093017b96ae3c1..a766d3c5f4c75e83f9a42d63ee806b222cdf88ad 100644 --- a/assets/image-M7z4Z5JL.js +++ b/assets/image-CibzeZAR.js @@ -1,2 +1,2 @@ -import{d as _,e as i,ce as y,c as d,o as u,a,W as x,Y as v,u as w,c2 as b}from"./index-CKmiAjHk.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=i(),n=i(""),{copy:g}=y({source:n});async function m(r){return new Promise((e,o)=>{const t=new FileReader;t.onload=s=>{var l,c;e(((c=(l=s.target)==null?void 0:l.result)==null?void 0:c.toString())||"")},t.onerror=s=>{o(s)},t.readAsDataURL(r)})}async function f(r){var t;const o=(t=r.target.files)==null?void 0:t[0];if(o){p.value=o;const s=await m(o);n.value=s}}return(r,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," "+v(n.value)+` +import{d as _,e as i,ce as y,c as d,o as u,a,W as x,Y as v,u as w,c2 as b}from"./index-WDP_Z4A8.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=i(),n=i(""),{copy:g}=y({source:n});async function m(r){return new Promise((e,o)=>{const t=new FileReader;t.onload=s=>{var l,c;e(((c=(l=s.target)==null?void 0:l.result)==null?void 0:c.toString())||"")},t.onerror=s=>{o(s)},t.readAsDataURL(r)})}async function f(r){var t;const o=(t=r.target.files)==null?void 0:t[0];if(o){p.value=o;const s=await m(o);n.value=s}}return(r,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," "+v(n.value)+` `,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>w(g)())}," Copy Data URL ")])):x("",!0)]))}}),B=b(k,[["__scopeId","data-v-7edd53e6"]]);export{B as default}; diff --git a/assets/index-pLLmzOw-.js b/assets/index-BUHNZNXi.js similarity index 77% rename from assets/index-pLLmzOw-.js rename to assets/index-BUHNZNXi.js index 94f6771b2835415981cec3442b367c88b2bef722..c9813c79604b575e13bc7219961155a6ddc88e8f 100644 --- a/assets/index-pLLmzOw-.js +++ b/assets/index-BUHNZNXi.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d,$ as m,f as u,c5 as g,c as s,o,a as n,bm as r,c6 as f,c7 as h,bk as _,a3 as v,u as y}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{I as b}from"./IconItem-DbtcNtch.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{b as l}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const x={flex:"~ col gap-4","font-thin":""},k={flex:"~ col gap-4"},B={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":""},I={text:"60","i-solar:settings-bold-duotone":""},z=d({__name:"index",setup(D){const{t:e}=m(),c=u(()=>[{title:e("settings.pages.themes.general.title"),description:e("settings.pages.themes.general.description"),icon:"i-solar:emoji-funny-square-bold-duotone",to:"/settings/appearance/general"},{title:e("settings.pages.themes.color-scheme.title"),description:e("settings.pages.themes.color-scheme.description"),icon:"i-solar:pallete-2-bold-duotone",to:"/settings/appearance/color-scheme"},{title:e("settings.pages.themes.developer.title"),description:e("settings.pages.themes.developer.description"),icon:"i-solar:code-bold-duotone",to:"/settings/appearance/developer"}]);return(j,a)=>{const i=g("motion");return o(),s("div",x,[a[0]||(a[0]=n("div",null,null,-1)),n("div",k,[(o(!0),s(f,null,h(c.value,(t,p)=>r((o(),_(y(b),{key:t.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:v({transitionDelay:`${p*50}ms`}),title:t.title,description:t.description,icon:t.icon,to:t.to},null,8,["style","title","description","icon","to"])),[[i]])),128))]),r((o(),s("div",B,[r(n("div",I,null,512),[[i]])])),[[i]])])}}});typeof l=="function"&&l(z);export{z as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d,$ as m,f as u,c5 as g,c as s,o,a as n,bm as r,c6 as f,c7 as h,bk as _,a3 as v,u as y}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{I as b}from"./IconItem-CdLibJxT.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{b as l}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const x={flex:"~ col gap-4","font-thin":""},k={flex:"~ col gap-4"},B={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":""},I={text:"60","i-solar:settings-bold-duotone":""},z=d({__name:"index",setup(D){const{t:e}=m(),c=u(()=>[{title:e("settings.pages.themes.general.title"),description:e("settings.pages.themes.general.description"),icon:"i-solar:emoji-funny-square-bold-duotone",to:"/settings/appearance/general"},{title:e("settings.pages.themes.color-scheme.title"),description:e("settings.pages.themes.color-scheme.description"),icon:"i-solar:pallete-2-bold-duotone",to:"/settings/appearance/color-scheme"},{title:e("settings.pages.themes.developer.title"),description:e("settings.pages.themes.developer.description"),icon:"i-solar:code-bold-duotone",to:"/settings/appearance/developer"}]);return(j,a)=>{const i=g("motion");return o(),s("div",x,[a[0]||(a[0]=n("div",null,null,-1)),n("div",k,[(o(!0),s(f,null,h(c.value,(t,p)=>r((o(),_(y(b),{key:t.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:v({transitionDelay:`${p*50}ms`}),title:t.title,description:t.description,icon:t.icon,to:t.to},null,8,["style","title","description","icon","to"])),[[i]])),128))]),r((o(),s("div",B,[r(n("div",I,null,512),[[i]])])),[[i]])])}}});typeof l=="function"&&l(z);export{z as default}; diff --git a/assets/index-DIkUKy0M.js b/assets/index-C7BBvJH7.js similarity index 85% rename from assets/index-DIkUKy0M.js rename to assets/index-C7BBvJH7.js index 5ce1334c941d5a2d35c89f9147c5cc6c9d22ea49..adb408fc475563b041813b28016fed8194b77d90 100644 --- a/assets/index-DIkUKy0M.js +++ b/assets/index-C7BBvJH7.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as h,$ as v,f as b,c5 as k,c as t,o as i,a as c,bk as d,bm as m,c6 as l,c7 as _,u as s}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{I as x}from"./IconStatusItem-C0p8PHvr.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as I}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0DnY9ij.js";import{u as z}from"./useIconAnimation-BW2D9qMM.js";import{b as g}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const B={grid:"~ cols-1 sm:cols-2 gap-4"},w={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":""},A=h({__name:"index",setup(C){const{t:e}=v(),p=b(()=>[{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",w,n[0]||(n[0]=[c("div",{text:"60","i-solar:layers-bold-duotone":""},null,-1)]))),[[r]])],64)}}});typeof g=="function"&&g(A);export{A as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as h,$ as v,f as b,c5 as k,c as t,o as i,a as c,bk as d,bm as m,c6 as l,c7 as _,u as s}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{I as x}from"./IconStatusItem-B9Mlqc3P.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as I}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js";import{u as z}from"./useIconAnimation-B41IKS_9.js";import{b as g}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const B={grid:"~ cols-1 sm:cols-2 gap-4"},w={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":""},A=h({__name:"index",setup(C){const{t:e}=v(),p=b(()=>[{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",w,n[0]||(n[0]=[c("div",{text:"60","i-solar:layers-bold-duotone":""},null,-1)]))),[[r]])],64)}}});typeof g=="function"&&g(A);export{A as default}; diff --git a/assets/index-L-IUids0.js b/assets/index-C9m14O1J.js similarity index 88% rename from assets/index-L-IUids0.js rename to assets/index-C9m14O1J.js index 1cb860e76588f02af7eaf108c1f6114bc65446a2..281b580abd4b9e12294a002c4f2c6b770b136b18 100644 --- a/assets/index-L-IUids0.js +++ b/assets/index-C9m14O1J.js @@ -1 +1 @@ -import{l as Z,J as P}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{_ as W,a as Y}from"./Model.vue_vue_type_script_setup_true_lang-B6LSxDl2.js";import{d as E,bj as I,c as m,o as s,u as t,bh as q,$ as G,cn as H,a0 as K,e as j,w as Q,co as X,b as l,bk as J,W as ee,bl as u,a as f,bm as O,cd as te,ch as g,Y as N,c6 as U,c7 as V,cl as oe,c2 as ie,bg as ne,cb as ae,c5 as le}from"./index-CKmiAjHk.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import"./three-vrm.module-D3hfVPJz.js";import{d as z,e as se}from"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{V as re}from"./browser-CkchkNbv.js";import{_ as de}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0DnY9ij.js";import{_ as B,a as ce}from"./ColorPalette.vue_vue_type_script_setup_true_lang-nn7hoVat.js";import{u as ue}from"./useIconAnimation-BW2D9qMM.js";import{b as D}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./index-qrRTaw2W.js";const fe=["disabled"],h=E({__name:"Live2DModelControlButton",emits:["click"],setup(F){const r=I();return(d,i)=>(s(),m("button",{disabled:t(r).loadingLive2dModel,bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250",rounded:"",onClick:i[0]||(i[0]=p=>d.$emit("click"))},[q(d.$slots,"default")],8,fe))}}),me={flex:"~ col gap-4"},pe={flex:"","items-center":"","gap-2":""},ve=["disabled","placeholder"],_e={"font-medium":""},be={flex:"","gap-2":""},ge=["onUpdate:modelValue"],he=["href","download"],ye=E({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(F){const{t:r}=G(),d=H({accept:"application/zip"}),i=I(),{live2dModelFile:p,live2dMotionMap:v,live2dLoadSource:y,loadingLive2dModel:M,availableLive2dMotions:L,live2dModelUrl:k}=K(i),b=j(k.value);d.onChange(o=>{o&&o.length>0&&(v.value={},p.value=o[0],y.value="file",M.value=!0)}),Q(()=>i.loadingLive2dModel,o=>{o||y.value==="file"&&L.value.forEach(e=>{e.motionName in z?v.value[e.fileName]=e.motionName:v.value[e.fileName]=se})});async function x(o,e){if(!Object.keys(e).length)return o;const a=await new P().loadAsync(o),c=Object.keys(a.files).find($=>$.endsWith("model3.json"));if(!c)throw new Error("model3.json not found");const A=await a.file(c).async("string"),R=JSON.parse(A),C={};Object.entries(e).forEach(([$,S])=>{if(C[S]){C[S].push({File:$});return}C[S]=[{File:$}]}),R.FileReferences.Motions=C,a.file(c,JSON.stringify(R,null,2));const T=await a.generateAsync({type:"blob"});return new File([T],o.name,{type:o.type,lastModified:o.lastModified})}async function _(){const o=await Z.getItem("live2dModel");if(!o)return;const e=await x(o,v.value);p.value=e,y.value="file",M.value=!0}const w=X(p);return(o,e)=>(s(),m("div",me,[l(t(B),{title:t(r)("settings.live2d.change-model.title"),icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:u(()=>[f("div",pe,[O(f("input",{"onUpdate:modelValue":e[0]||(e[0]=n=>b.value=n),disabled:t(i).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(r)("settings.live2d.change-model.from-url-placeholder")},null,8,ve),[[te,b.value]]),l(h,{class:"form-control",onClick:e[1]||(e[1]=n=>k.value=b.value)},{default:u(()=>[g(N(t(r)("settings.live2d.change-model.from-url")),1)]),_:1})]),l(h,{class:"form-control place-self-end",onClick:e[2]||(e[2]=n=>t(d).open())},{default:u(()=>[g(N(t(r)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),l(h,{class:"form-control",onClick:e[3]||(e[3]=n=>o.$emit("extractColorsFromModel"))},{default:u(()=>e[4]||(e[4]=[g(" Extract colors from model ")])),_:1,__:[4]}),l(ce,{colors:F.palette.map(n=>({hex:n,name:n}))},null,8,["colors"])]),_:1},8,["title"]),t(i).live2dLoadSource==="file"?(s(),J(t(B),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:u(()=>{var n;return[(s(!0),m(U,null,V(t(i).availableLive2dMotions,a=>(s(),m("div",{key:a.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[f("span",_e,N(a.fileName),1),f("div",be,[O(f("select",{"onUpdate:modelValue":c=>t(i).live2dMotionMap[a.fileName]=c},[(s(!0),m(U,null,V(Object.keys(t(z)),c=>(s(),m("option",{key:c},N(c),1))),128))],8,ge),[[oe,t(i).live2dMotionMap[a.fileName]]]),l(h,{class:"form-control",onClick:c=>t(i).live2dCurrentMotion={group:a.motionName,index:a.motionIndex}},{default:u(()=>e[5]||(e[5]=[g(" Play ")])),_:2,__:[5]},1032,["onClick"])])]))),128)),l(h,{onClick:_},{default:u(()=>e[6]||(e[6]=[g(" Save and patch ")])),_:1,__:[6]}),f("a",{"mt-2":"",block:"",href:t(w),download:`${((n=t(i).live2dModelFile)==null?void 0:n.name)||"live2d"}-motion-edited.zip`},[l(h,{"w-full":""},{default:u(()=>e[7]||(e[7]=[g("Export")])),_:1,__:[7]})],8,he)]}),_:1})):ee("",!0)]))}}),xe=ie(ye,[["__scopeId","data-v-90548ace"]]),Me={flex:""},ke={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":""},we=E({__name:"index",setup(F){const r=j(),d=j(),{width:i,height:p}=ne(r),v=j([]);async function y(){if(!d.value)return;const x=await d.value.captureFrame();if(!x){console.error("No frame captured");return}const _=URL.createObjectURL(x);try{const o=await new re(_).getPalette();v.value=Object.values(o).map(e=>e==null?void 0:e.hex).filter(e=>typeof e=="string")}finally{URL.revokeObjectURL(_)}}const{iconAnimationStarted:M,showIconAnimation:L,animationIcon:k}=ue("i-solar:people-nearby-bold-duotone"),b=ae();return(x,_)=>{const w=le("motion");return s(),m(U,null,[f("div",Me,[f("div",{ref_key:"live2dContainerRef",ref:r,w:"50%",h:"80vh"},[l(t(Y),{ref_key:"live2dCanvasRef",ref:d,width:t(i),height:t(p)},{default:u(({app:o})=>[l(t(W),{app:o,"mouth-open-size":0,width:t(i),height:t(p),paused:!1,"focus-at":{x:t(b).x.value,y:t(b).y.value}},null,8,["app","width","height","focus-at"])]),_:1},8,["width","height"])],512),l(xe,{w:"50%",h:"80vh",palette:v.value,onExtractColorsFromModel:y},null,8,["palette"])]),t(L)?(s(),J(de,{key:0,"z-index":-1,icon:t(k),"icon-size":12,duration:1e3,started:t(M),"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(),m("div",ke,_[0]||(_[0]=[f("div",{text:"60","i-solar:people-nearby-bold-duotone":""},null,-1)]))),[[w]])],64)}}});typeof D=="function"&&D(we);export{we as default}; +import{l as Z,J as P}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{_ as W,a as Y}from"./Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js";import{d as E,bj as I,c as m,o as s,u as t,bh as q,$ as G,cn as H,a0 as K,e as j,w as Q,co as X,b as l,bk as J,W as ee,bl as u,a as f,bm as O,cd as te,ch as g,Y as N,c6 as U,c7 as V,cl as oe,c2 as ie,bg as ne,cb as ae,c5 as le}from"./index-WDP_Z4A8.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import"./three-vrm.module-DIVMhp6T.js";import{d as z,e as se}from"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{V as re}from"./browser-CkchkNbv.js";import{_ as de}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js";import{_ as B,a as ce}from"./ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js";import{u as ue}from"./useIconAnimation-B41IKS_9.js";import{b as D}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./index-DeGbjSQn.js";const fe=["disabled"],h=E({__name:"Live2DModelControlButton",emits:["click"],setup(F){const r=I();return(d,i)=>(s(),m("button",{disabled:t(r).loadingLive2dModel,bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250",rounded:"",onClick:i[0]||(i[0]=p=>d.$emit("click"))},[q(d.$slots,"default")],8,fe))}}),me={flex:"~ col gap-4"},pe={flex:"","items-center":"","gap-2":""},ve=["disabled","placeholder"],_e={"font-medium":""},be={flex:"","gap-2":""},ge=["onUpdate:modelValue"],he=["href","download"],ye=E({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(F){const{t:r}=G(),d=H({accept:"application/zip"}),i=I(),{live2dModelFile:p,live2dMotionMap:v,live2dLoadSource:y,loadingLive2dModel:M,availableLive2dMotions:L,live2dModelUrl:k}=K(i),b=j(k.value);d.onChange(o=>{o&&o.length>0&&(v.value={},p.value=o[0],y.value="file",M.value=!0)}),Q(()=>i.loadingLive2dModel,o=>{o||y.value==="file"&&L.value.forEach(e=>{e.motionName in z?v.value[e.fileName]=e.motionName:v.value[e.fileName]=se})});async function x(o,e){if(!Object.keys(e).length)return o;const a=await new P().loadAsync(o),c=Object.keys(a.files).find($=>$.endsWith("model3.json"));if(!c)throw new Error("model3.json not found");const A=await a.file(c).async("string"),R=JSON.parse(A),C={};Object.entries(e).forEach(([$,S])=>{if(C[S]){C[S].push({File:$});return}C[S]=[{File:$}]}),R.FileReferences.Motions=C,a.file(c,JSON.stringify(R,null,2));const T=await a.generateAsync({type:"blob"});return new File([T],o.name,{type:o.type,lastModified:o.lastModified})}async function _(){const o=await Z.getItem("live2dModel");if(!o)return;const e=await x(o,v.value);p.value=e,y.value="file",M.value=!0}const w=X(p);return(o,e)=>(s(),m("div",me,[l(t(B),{title:t(r)("settings.live2d.change-model.title"),icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:u(()=>[f("div",pe,[O(f("input",{"onUpdate:modelValue":e[0]||(e[0]=n=>b.value=n),disabled:t(i).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(r)("settings.live2d.change-model.from-url-placeholder")},null,8,ve),[[te,b.value]]),l(h,{class:"form-control",onClick:e[1]||(e[1]=n=>k.value=b.value)},{default:u(()=>[g(N(t(r)("settings.live2d.change-model.from-url")),1)]),_:1})]),l(h,{class:"form-control place-self-end",onClick:e[2]||(e[2]=n=>t(d).open())},{default:u(()=>[g(N(t(r)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),l(h,{class:"form-control",onClick:e[3]||(e[3]=n=>o.$emit("extractColorsFromModel"))},{default:u(()=>e[4]||(e[4]=[g(" Extract colors from model ")])),_:1,__:[4]}),l(ce,{colors:F.palette.map(n=>({hex:n,name:n}))},null,8,["colors"])]),_:1},8,["title"]),t(i).live2dLoadSource==="file"?(s(),J(t(B),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:u(()=>{var n;return[(s(!0),m(U,null,V(t(i).availableLive2dMotions,a=>(s(),m("div",{key:a.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[f("span",_e,N(a.fileName),1),f("div",be,[O(f("select",{"onUpdate:modelValue":c=>t(i).live2dMotionMap[a.fileName]=c},[(s(!0),m(U,null,V(Object.keys(t(z)),c=>(s(),m("option",{key:c},N(c),1))),128))],8,ge),[[oe,t(i).live2dMotionMap[a.fileName]]]),l(h,{class:"form-control",onClick:c=>t(i).live2dCurrentMotion={group:a.motionName,index:a.motionIndex}},{default:u(()=>e[5]||(e[5]=[g(" Play ")])),_:2,__:[5]},1032,["onClick"])])]))),128)),l(h,{onClick:_},{default:u(()=>e[6]||(e[6]=[g(" Save and patch ")])),_:1,__:[6]}),f("a",{"mt-2":"",block:"",href:t(w),download:`${((n=t(i).live2dModelFile)==null?void 0:n.name)||"live2d"}-motion-edited.zip`},[l(h,{"w-full":""},{default:u(()=>e[7]||(e[7]=[g("Export")])),_:1,__:[7]})],8,he)]}),_:1})):ee("",!0)]))}}),xe=ie(ye,[["__scopeId","data-v-90548ace"]]),Me={flex:""},ke={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":""},we=E({__name:"index",setup(F){const r=j(),d=j(),{width:i,height:p}=ne(r),v=j([]);async function y(){if(!d.value)return;const x=await d.value.captureFrame();if(!x){console.error("No frame captured");return}const _=URL.createObjectURL(x);try{const o=await new re(_).getPalette();v.value=Object.values(o).map(e=>e==null?void 0:e.hex).filter(e=>typeof e=="string")}finally{URL.revokeObjectURL(_)}}const{iconAnimationStarted:M,showIconAnimation:L,animationIcon:k}=ue("i-solar:people-nearby-bold-duotone"),b=ae();return(x,_)=>{const w=le("motion");return s(),m(U,null,[f("div",Me,[f("div",{ref_key:"live2dContainerRef",ref:r,w:"50%",h:"80vh"},[l(t(Y),{ref_key:"live2dCanvasRef",ref:d,width:t(i),height:t(p)},{default:u(({app:o})=>[l(t(W),{app:o,"mouth-open-size":0,width:t(i),height:t(p),paused:!1,"focus-at":{x:t(b).x.value,y:t(b).y.value}},null,8,["app","width","height","focus-at"])]),_:1},8,["width","height"])],512),l(xe,{w:"50%",h:"80vh",palette:v.value,onExtractColorsFromModel:y},null,8,["palette"])]),t(L)?(s(),J(de,{key:0,"z-index":-1,icon:t(k),"icon-size":12,duration:1e3,started:t(M),"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(),m("div",ke,_[0]||(_[0]=[f("div",{text:"60","i-solar:people-nearby-bold-duotone":""},null,-1)]))),[[w]])],64)}}});typeof D=="function"&&D(we);export{we as default}; diff --git a/assets/index-tA0UiLFB.js b/assets/index-CDTTBfwQ.js similarity index 99% rename from assets/index-tA0UiLFB.js rename to assets/index-CDTTBfwQ.js index 6db1725baec1257445687c6645921d15e61da1e8..392e01506e115c1596352c3ed1867d9a26d58171 100644 --- a/assets/index-tA0UiLFB.js +++ b/assets/index-CDTTBfwQ.js @@ -1,4 +1,4 @@ -import{Z as s,b as x}from"./mcp-CyJbhMv7.js";import"./index-CKmiAjHk.js";const M=Symbol("Let zodToJsonSchema decide on which parser to use"),P={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},D=t=>typeof t=="string"?{...P,name:t}:{...P,...t},T=t=>{const e=D(t),a=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,currentPath:a,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([n,r])=>[r._def,{def:r._def,path:[...e.basePath,e.definitionPath,n],jsonSchema:void 0}]))}};function _(t,e,a,n){n!=null&&n.errorMessages&&a&&(t.errorMessage={...t.errorMessage,[e]:a})}function l(t,e,a,n,r){t[e]=a,_(t,e,n,r)}function N(){return{}}function $(t,e){var n,r,i;const a={type:"array"};return(n=t.type)!=null&&n._def&&((i=(r=t.type)==null?void 0:r._def)==null?void 0:i.typeName)!==s.ZodAny&&(a.items=c(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&l(a,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&l(a,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(l(a,"minItems",t.exactLength.value,t.exactLength.message,e),l(a,"maxItems",t.exactLength.value,t.exactLength.message,e)),a}function w(t,e){const a={type:"integer",format:"int64"};if(!t.checks)return a;for(const n of t.checks)switch(n.kind){case"min":e.target==="jsonSchema7"?n.inclusive?l(a,"minimum",n.value,n.message,e):l(a,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(a.exclusiveMinimum=!0),l(a,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?l(a,"maximum",n.value,n.message,e):l(a,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(a.exclusiveMaximum=!0),l(a,"maximum",n.value,n.message,e));break;case"multipleOf":l(a,"multipleOf",n.value,n.message,e);break}return a}function z(){return{type:"boolean"}}function Z(t,e){return c(t.type._def,e)}const L=(t,e)=>c(t.innerType._def,e);function S(t,e,a){const n=a??e.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((r,i)=>S(t,e,r))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return F(t,e)}}const F=(t,e)=>{const a={type:"integer",format:"unix-time"};if(e.target==="openApi3")return a;for(const n of t.checks)switch(n.kind){case"min":l(a,"minimum",n.value,n.message,e);break;case"max":l(a,"maximum",n.value,n.message,e);break}return a};function I(t,e){return{...c(t.innerType._def,e),default:t.defaultValue()}}function E(t,e){return e.effectStrategy==="input"?c(t.schema._def,e):{}}function R(t){return{type:"string",enum:Array.from(t.values)}}const C=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function U(t,e){const a=[c(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),c(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i);let n=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const r=[];return a.forEach(i=>{if(C(i))r.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let o=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:m,...p}=i;o=p}else n=void 0;r.push(o)}}),r.length?{allOf:r,...n}:void 0}function B(t,e){const a=typeof t.value;return a!=="bigint"&&a!=="number"&&a!=="boolean"&&a!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:a==="bigint"?"integer":a,enum:[t.value]}:{type:a==="bigint"?"integer":a,const:t.value}}let b;const f={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(b===void 0&&(b=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),b),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function O(t,e){const a={type:"string"};if(t.checks)for(const n of t.checks)switch(n.kind){case"min":l(a,"minLength",typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,n.message,e);break;case"max":l(a,"maxLength",typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value,n.message,e);break;case"email":switch(e.emailStrategy){case"format:email":y(a,"email",n.message,e);break;case"format:idn-email":y(a,"idn-email",n.message,e);break;case"pattern:zod":d(a,f.email,n.message,e);break}break;case"url":y(a,"uri",n.message,e);break;case"uuid":y(a,"uuid",n.message,e);break;case"regex":d(a,n.regex,n.message,e);break;case"cuid":d(a,f.cuid,n.message,e);break;case"cuid2":d(a,f.cuid2,n.message,e);break;case"startsWith":d(a,RegExp(`^${v(n.value,e)}`),n.message,e);break;case"endsWith":d(a,RegExp(`${v(n.value,e)}$`),n.message,e);break;case"datetime":y(a,"date-time",n.message,e);break;case"date":y(a,"date",n.message,e);break;case"time":y(a,"time",n.message,e);break;case"duration":y(a,"duration",n.message,e);break;case"length":l(a,"minLength",typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,n.message,e),l(a,"maxLength",typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value,n.message,e);break;case"includes":{d(a,RegExp(v(n.value,e)),n.message,e);break}case"ip":{n.version!=="v6"&&y(a,"ipv4",n.message,e),n.version!=="v4"&&y(a,"ipv6",n.message,e);break}case"base64url":d(a,f.base64url,n.message,e);break;case"jwt":d(a,f.jwt,n.message,e);break;case"cidr":{n.version!=="v6"&&d(a,f.ipv4Cidr,n.message,e),n.version!=="v4"&&d(a,f.ipv6Cidr,n.message,e);break}case"emoji":d(a,f.emoji(),n.message,e);break;case"ulid":{d(a,f.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{y(a,"binary",n.message,e);break}case"contentEncoding:base64":{l(a,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{d(a,f.base64,n.message,e);break}}break}case"nanoid":d(a,f.nanoid,n.message,e)}return a}function v(t,e){return e.patternStrategy==="escape"?q(t):t}const V=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function q(t){let e="";for(let a=0;ai.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&n.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...a&&n.errorMessages&&{errorMessage:{format:a}}})):l(t,"format",e,a,n)}function d(t,e,a,n){var r;t.pattern||(r=t.allOf)!=null&&r.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&n.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:k(e,n),...a&&n.errorMessages&&{errorMessage:{pattern:a}}})):l(t,"pattern",k(e,n),a,n)}function k(t,e){var p;if(!e.applyRegexFlags||!t.flags)return t.source;const a={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=a.i?t.source.toLowerCase():t.source;let r="",i=!1,o=!1,m=!1;for(let u=0;utypeof t=="string"?{...P,name:t}:{...P,...t},T=t=>{const e=D(t),a=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,currentPath:a,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([n,r])=>[r._def,{def:r._def,path:[...e.basePath,e.definitionPath,n],jsonSchema:void 0}]))}};function _(t,e,a,n){n!=null&&n.errorMessages&&a&&(t.errorMessage={...t.errorMessage,[e]:a})}function l(t,e,a,n,r){t[e]=a,_(t,e,n,r)}function N(){return{}}function $(t,e){var n,r,i;const a={type:"array"};return(n=t.type)!=null&&n._def&&((i=(r=t.type)==null?void 0:r._def)==null?void 0:i.typeName)!==s.ZodAny&&(a.items=c(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&l(a,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&l(a,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(l(a,"minItems",t.exactLength.value,t.exactLength.message,e),l(a,"maxItems",t.exactLength.value,t.exactLength.message,e)),a}function w(t,e){const a={type:"integer",format:"int64"};if(!t.checks)return a;for(const n of t.checks)switch(n.kind){case"min":e.target==="jsonSchema7"?n.inclusive?l(a,"minimum",n.value,n.message,e):l(a,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(a.exclusiveMinimum=!0),l(a,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?l(a,"maximum",n.value,n.message,e):l(a,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(a.exclusiveMaximum=!0),l(a,"maximum",n.value,n.message,e));break;case"multipleOf":l(a,"multipleOf",n.value,n.message,e);break}return a}function z(){return{type:"boolean"}}function Z(t,e){return c(t.type._def,e)}const L=(t,e)=>c(t.innerType._def,e);function S(t,e,a){const n=a??e.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((r,i)=>S(t,e,r))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return F(t,e)}}const F=(t,e)=>{const a={type:"integer",format:"unix-time"};if(e.target==="openApi3")return a;for(const n of t.checks)switch(n.kind){case"min":l(a,"minimum",n.value,n.message,e);break;case"max":l(a,"maximum",n.value,n.message,e);break}return a};function I(t,e){return{...c(t.innerType._def,e),default:t.defaultValue()}}function E(t,e){return e.effectStrategy==="input"?c(t.schema._def,e):{}}function R(t){return{type:"string",enum:Array.from(t.values)}}const C=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function U(t,e){const a=[c(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),c(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i);let n=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const r=[];return a.forEach(i=>{if(C(i))r.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let o=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:m,...p}=i;o=p}else n=void 0;r.push(o)}}),r.length?{allOf:r,...n}:void 0}function B(t,e){const a=typeof t.value;return a!=="bigint"&&a!=="number"&&a!=="boolean"&&a!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:a==="bigint"?"integer":a,enum:[t.value]}:{type:a==="bigint"?"integer":a,const:t.value}}let b;const f={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(b===void 0&&(b=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),b),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function O(t,e){const a={type:"string"};if(t.checks)for(const n of t.checks)switch(n.kind){case"min":l(a,"minLength",typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,n.message,e);break;case"max":l(a,"maxLength",typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value,n.message,e);break;case"email":switch(e.emailStrategy){case"format:email":y(a,"email",n.message,e);break;case"format:idn-email":y(a,"idn-email",n.message,e);break;case"pattern:zod":d(a,f.email,n.message,e);break}break;case"url":y(a,"uri",n.message,e);break;case"uuid":y(a,"uuid",n.message,e);break;case"regex":d(a,n.regex,n.message,e);break;case"cuid":d(a,f.cuid,n.message,e);break;case"cuid2":d(a,f.cuid2,n.message,e);break;case"startsWith":d(a,RegExp(`^${v(n.value,e)}`),n.message,e);break;case"endsWith":d(a,RegExp(`${v(n.value,e)}$`),n.message,e);break;case"datetime":y(a,"date-time",n.message,e);break;case"date":y(a,"date",n.message,e);break;case"time":y(a,"time",n.message,e);break;case"duration":y(a,"duration",n.message,e);break;case"length":l(a,"minLength",typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,n.message,e),l(a,"maxLength",typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value,n.message,e);break;case"includes":{d(a,RegExp(v(n.value,e)),n.message,e);break}case"ip":{n.version!=="v6"&&y(a,"ipv4",n.message,e),n.version!=="v4"&&y(a,"ipv6",n.message,e);break}case"base64url":d(a,f.base64url,n.message,e);break;case"jwt":d(a,f.jwt,n.message,e);break;case"cidr":{n.version!=="v6"&&d(a,f.ipv4Cidr,n.message,e),n.version!=="v4"&&d(a,f.ipv6Cidr,n.message,e);break}case"emoji":d(a,f.emoji(),n.message,e);break;case"ulid":{d(a,f.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{y(a,"binary",n.message,e);break}case"contentEncoding:base64":{l(a,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{d(a,f.base64,n.message,e);break}}break}case"nanoid":d(a,f.nanoid,n.message,e)}return a}function v(t,e){return e.patternStrategy==="escape"?q(t):t}const V=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function q(t){let e="";for(let a=0;ai.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&n.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...a&&n.errorMessages&&{errorMessage:{format:a}}})):l(t,"format",e,a,n)}function d(t,e,a,n){var r;t.pattern||(r=t.allOf)!=null&&r.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&n.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:k(e,n),...a&&n.errorMessages&&{errorMessage:{pattern:a}}})):l(t,"pattern",k(e,n),a,n)}function k(t,e){var p;if(!e.applyRegexFlags||!t.flags)return t.source;const a={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=a.i?t.source.toLowerCase():t.source;let r="",i=!1,o=!1,m=!1;for(let u=0;ui**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=Kn("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:ql})),Wl=Kn("SpeakingStore",()=>{const n=W(0),r=W(!1),i=Ue(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function En(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+=En(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=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class vn{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}vn.prototype.normal={};vn.prototype.property={};vn.prototype.space=void 0;function ha(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new vn(n,r,e)}function Fr(t){return t.toLowerCase()}class We{constructor(e,n){this.attribute=n,this.property=e}}We.prototype.attribute="";We.prototype.booleanish=!1;We.prototype.boolean=!1;We.prototype.commaOrSpaceSeparated=!1;We.prototype.commaSeparated=!1;We.prototype.defined=!1;We.prototype.mustUseProperty=!1;We.prototype.number=!1;We.prototype.overloadedBoolean=!1;We.prototype.property="";We.prototype.spaceSeparated=!1;We.prototype.space=void 0;let Ql=0;const ce=Ft(),Le=Ft(),ma=Ft(),G=Ft(),Re=Ft(),Yt=Ft(),Qe=Ft();function Ft(){return 2**++Ql}const Br=Object.freeze(Object.defineProperty({__proto__:null,boolean:ce,booleanish:Le,commaOrSpaceSeparated:Qe,commaSeparated:Yt,number:G,overloadedBoolean:ma,spaceSeparated:Re},Symbol.toStringTag,{value:"Module"})),sr=Object.keys(Br);class fi extends We{constructor(e,n,r,i){let o=-1;if(super(e,n),Fi(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&nu.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Bi,ou);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Bi.test(o)){let a=o.replace(tu,iu);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=fi}return new i(r,e)}function iu(t){return"-"+t.toLowerCase()}function ou(t){return t.charAt(1).toUpperCase()}const au=ha([ga,Jl,va,ba,wa],"html"),ka=ha([ga,eu,va,ba,wa],"svg"),zi={}.hasOwnProperty;function su(t,e){const n=e||{};function r(i,...o){let a=r.invalid;const s=r.handlers;if(i&&zi.call(i,t)){const l=String(i[t]);a=zi.call(s,l)?s[l]:r.unknown}if(a)return a.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const lu=/^>|^->||--!>|"],cu=["<",">"];function fu(t,e,n,r){return r.settings.bogusComments?"":"";function i(o){return Gt(o,Object.assign({},r.settings.characterReferences,{subset:cu}))}}function du(t,e,n,r){return""}function pu(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function hu(t){return t.join(" ").trim()}const mu=/[ \t\n\f\r]/g;function di(t){return typeof t=="object"?t.type==="text"?Ui(t.value):!1:Ui(t)}function Ui(t){return t.replace(mu,"")===""}const De=_a(1),Ta=_a(-1),gu=[];function _a(t){return e;function e(n,r,i){const o=n?n.children:gu;let a=(r||0)+t,s=o[a];if(!i)for(;s&&di(s);)a+=t,s=o[a];return s}}const yu={}.hasOwnProperty;function Ea(t){return e;function e(n,r,i){return yu.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const pi=Ea({body:vu,caption:lr,colgroup:lr,dd:Tu,dt:ku,head:lr,html:xu,li:wu,optgroup:_u,option:Eu,p:bu,rp:ji,rt:ji,tbody:Au,td:Vi,tfoot:Su,th:Vi,thead:Mu,tr:Iu});function lr(t,e,n){const r=De(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&di(r.value.charAt(0)))}function xu(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}function vu(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}function bu(t,e,n){const r=De(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function wu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="li"}function ku(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Tu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ji(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function _u(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Eu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Mu(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Au(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Su(t,e,n){return!De(n,e)}function Iu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Vi(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Ru=Ea({body:Lu,colgroup:Pu,head:Nu,html:Cu,tbody:Du});function Cu(t){const e=De(t,-1);return!e||e.type!=="comment"}function Nu(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function Lu(t){const e=De(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&di(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Pu(t,e,n){const r=Ta(n,e),i=De(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&pi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Du(t,e,n){const r=Ta(n,e),i=De(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&pi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Mn={name:[[` +import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{a4 as Kn,e as W,f as Ue,a5 as bs,a6 as Yo,a7 as ws,w as Be,a8 as ks,a9 as Ts,U as Ot,u as H,aa as _s,ab as Nr,ac as Ko,ad as Es,ae as cn,af as qo,ag as ft,ah as Pe,ai as ze,aj as xt,ak as pn,al as Ms,am as As,an as Ss,ao as vt,ap as ae,aq as Is,ar as Bn,as as Rs,at as Qr,au as Cs,av as Ns,aw as Nt,ax as Wo,ay as Jr,az as Xo,aA as Zo,aB as Qo,aC as zn,aD as Lt,aE as Un,aF as Jo,aG as Vt,aH as Ls,aI as tr,aJ as Ps,aK as ea,aL as qn,aM as Ht,aN as hn,aO as ta,aP as Ds,aQ as Pt,aR as Os,aS as Fs,aT as Bs,aU as zs,aV as nr,aW as Mt,aX as Dt,aY as $t,aZ as Us,a_ as js,a$ as Vs,b0 as na,b1 as ei,b2 as ti,b3 as jn,b4 as Ai,b5 as Si,b6 as Ii,b7 as Ri,b8 as Hs,b9 as $s,ba as ni,bb as ra,bc as Gs,a0 as Ke,bd as rr,d as Fe,be as Ys,bf as Ks,bg as ri,T as mn,c as ie,o as J,bh as gn,bi as qs,$ as Zt,bj as Wt,bk as Xt,bl as Ye,b as Te,a as O,X as lt,bm as Et,bn as ii,W as at,Y as ve,bo as yt,bp as _t,bq as oi,br as Wn,bs as ia,bt as Vn,bu as Ws,bv as Ci,bw as Xs,bx as oa,by as yn,bz as Zs,bA as ai,bB as Qs,bC as aa,bD as At,bE as Js,bF as sa,bG as el,bH as tl,bI as nl,bJ as rl,bK as la,bL as il,bM as ol,bN as al,bO as sl,bP as ll,bQ as ul,bR as cl,bS as ir,bT as Lr,bU as Pr,bV as Ni,bW as or,bX as fl,bY as dl,bZ as pl,b_ as hl,b$ as ml,a3 as Dr,c0 as gl,c1 as yl,c2 as xn,c3 as xl,c4 as ua,_ as Hn,c5 as ca,c6 as si,c7 as li,c8 as vl,c9 as ar,ca as bl,cb as wl}from"./index-WDP_Z4A8.js";import{d as Li,V as kl,a as Tl,c as _l,r as El,b as Or,e as Ml}from"./three-vrm.module-DIVMhp6T.js";import{E as Al,a as Sl,b as Il}from"./emotions-DWNSb738.js";import{m as Rl,d as Cl}from"./mcp-CVsSz3w1.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{getImportUrlBundles as Nl}from"./import-url-browser-CPN8ipMD.js";import{s as Gt,c as Pi,u as Ll,g as Pl}from"./speech-DRmXCXwq.js";import{u as Dn}from"./queue-C50Iq5oO.js";import{u as Dl,a as Ol,b as Fl,l as Bl}from"./queues-DBvSyUSC.js";import{l as zl,u as ui}from"./providers-7GsMyC_3.js";import{s as Ul}from"./index-Dpfqqu9L.js";import{u as jl}from"./airi-card-Cgw9OiDq.js";import{_ as ci}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import{r as on,_ as Vl,a as Hl}from"./Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js";import{_ as Di}from"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import{H as $l}from"./HeaderLink--5c4L7nq.js";import{u as fa}from"./consciousness-CI5ipeHX.js";import{_ as da}from"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js";import{b as Oi}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.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=Kn("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:ql})),Wl=Kn("SpeakingStore",()=>{const n=W(0),r=W(!1),i=Ue(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function En(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+=En(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=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class vn{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}vn.prototype.normal={};vn.prototype.property={};vn.prototype.space=void 0;function ha(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new vn(n,r,e)}function Fr(t){return t.toLowerCase()}class We{constructor(e,n){this.attribute=n,this.property=e}}We.prototype.attribute="";We.prototype.booleanish=!1;We.prototype.boolean=!1;We.prototype.commaOrSpaceSeparated=!1;We.prototype.commaSeparated=!1;We.prototype.defined=!1;We.prototype.mustUseProperty=!1;We.prototype.number=!1;We.prototype.overloadedBoolean=!1;We.prototype.property="";We.prototype.spaceSeparated=!1;We.prototype.space=void 0;let Ql=0;const ce=Ft(),Le=Ft(),ma=Ft(),G=Ft(),Re=Ft(),Yt=Ft(),Qe=Ft();function Ft(){return 2**++Ql}const Br=Object.freeze(Object.defineProperty({__proto__:null,boolean:ce,booleanish:Le,commaOrSpaceSeparated:Qe,commaSeparated:Yt,number:G,overloadedBoolean:ma,spaceSeparated:Re},Symbol.toStringTag,{value:"Module"})),sr=Object.keys(Br);class fi extends We{constructor(e,n,r,i){let o=-1;if(super(e,n),Fi(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&nu.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Bi,ou);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Bi.test(o)){let a=o.replace(tu,iu);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=fi}return new i(r,e)}function iu(t){return"-"+t.toLowerCase()}function ou(t){return t.charAt(1).toUpperCase()}const au=ha([ga,Jl,va,ba,wa],"html"),ka=ha([ga,eu,va,ba,wa],"svg"),zi={}.hasOwnProperty;function su(t,e){const n=e||{};function r(i,...o){let a=r.invalid;const s=r.handlers;if(i&&zi.call(i,t)){const l=String(i[t]);a=zi.call(s,l)?s[l]:r.unknown}if(a)return a.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const lu=/^>|^->||--!>|"],cu=["<",">"];function fu(t,e,n,r){return r.settings.bogusComments?"":"";function i(o){return Gt(o,Object.assign({},r.settings.characterReferences,{subset:cu}))}}function du(t,e,n,r){return""}function pu(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function hu(t){return t.join(" ").trim()}const mu=/[ \t\n\f\r]/g;function di(t){return typeof t=="object"?t.type==="text"?Ui(t.value):!1:Ui(t)}function Ui(t){return t.replace(mu,"")===""}const De=_a(1),Ta=_a(-1),gu=[];function _a(t){return e;function e(n,r,i){const o=n?n.children:gu;let a=(r||0)+t,s=o[a];if(!i)for(;s&&di(s);)a+=t,s=o[a];return s}}const yu={}.hasOwnProperty;function Ea(t){return e;function e(n,r,i){return yu.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const pi=Ea({body:vu,caption:lr,colgroup:lr,dd:Tu,dt:ku,head:lr,html:xu,li:wu,optgroup:_u,option:Eu,p:bu,rp:ji,rt:ji,tbody:Au,td:Vi,tfoot:Su,th:Vi,thead:Mu,tr:Iu});function lr(t,e,n){const r=De(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&di(r.value.charAt(0)))}function xu(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}function vu(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}function bu(t,e,n){const r=De(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function wu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="li"}function ku(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Tu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ji(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function _u(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Eu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Mu(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Au(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Su(t,e,n){return!De(n,e)}function Iu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Vi(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Ru=Ea({body:Lu,colgroup:Pu,head:Nu,html:Cu,tbody:Du});function Cu(t){const e=De(t,-1);return!e||e.type!=="comment"}function Nu(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function Lu(t){const e=De(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&di(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Pu(t,e,n){const r=Ta(n,e),i=De(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&pi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Du(t,e,n){const r=Ta(n,e),i=De(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&pi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Mn={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 diff --git a/assets/index-DHpf7rbn.js b/assets/index-CKKZXq7c.js similarity index 89% rename from assets/index-DHpf7rbn.js rename to assets/index-CKKZXq7c.js index 6f43c519ca80c44166b3543b2fd76a370f7a28ba..814a7f7312595021fedf6ae3c1840fc5309329de 100644 --- a/assets/index-DHpf7rbn.js +++ b/assets/index-CKKZXq7c.js @@ -1 +1 @@ -import{d as i,c5 as n,bm as r,o as a,c as s,a as c}from"./index-CKmiAjHk.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,c5 as n,bm as r,o as a,c as s,a as c}from"./index-WDP_Z4A8.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-GnxVOwEm.js b/assets/index-Cqc4fKz2.js similarity index 85% rename from assets/index-GnxVOwEm.js rename to assets/index-Cqc4fKz2.js index ba91a7a7fa4d533cac542907eb2518198fa4c392..98f2642d829b76673e9b19671960b583f35570df 100644 --- a/assets/index-GnxVOwEm.js +++ b/assets/index-Cqc4fKz2.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as E,V as T,e as n,$ as w,bj as A,f as $,c5 as z,c as p,o as a,a as u,bk as b,bm as m,c6 as P,c7 as j,u as g,a3 as D,_ as q}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{I as R}from"./IconItem-DbtcNtch.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as V}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0DnY9ij.js";import{b as h}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const F={flex:"~ col gap-4","font-thin":""},L={flex:"~ col gap-4"},N={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":""},O={text:"60","i-solar:settings-bold-duotone":""},G=E({__name:"index",setup(H){const k=T(),f=n(!1),x=n(),r=n(),{t}=w(),v=n(""),y=n(""),_=n(!1),c=A();function I(){var o;(o=r.value)==null||o.call(r)}async function S(o,s){const e=o.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const l=e.getBoundingClientRect(),d=`${l.left}px, ${l.top}px`;v.value=s.icon,y.value=d,_.value=!0,await q(),f.value=!0}const B=k.beforeEach(async(o,s,i)=>{if(!c.usePageSpecificTransitions||c.disableTransitions){i();return}await new Promise(e=>{r.value=e}),B(),i()}),C=$(()=>[{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(o,s)=>{const i=z("motion");return a(),p("div",F,[s[0]||(s[0]=u("div",null,null,-1)),u("div",L,[(a(!0),p(P,null,j(C.value,(e,l)=>m((a(),b(g(R),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:D({transitionDelay:`${l*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:d=>S(d,e)},null,8,["style","title","description","icon","to","onClick"])),[[i]])),128))]),_.value&&!g(c).disableTransitions&&g(c).usePageSpecificTransitions?(a(),b(V,{key:0,ref_key:"iconAnimation",ref:x,icon:v.value,"icon-size":6*1.2,position:y.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:f.value,onAnimationEndedOnce:I},null,8,["icon","position","started"])):m((a(),p("div",N,[m(u("div",O,null,512),[[i]])])),[[i]])])}}});typeof h=="function"&&h(G);export{G as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as E,V as T,e as n,$ as w,bj as A,f as $,c5 as z,c as p,o as a,a as u,bk as b,bm as m,c6 as P,c7 as j,u as g,a3 as D,_ as q}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{I as R}from"./IconItem-CdLibJxT.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as V}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js";import{b as h}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const F={flex:"~ col gap-4","font-thin":""},L={flex:"~ col gap-4"},N={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":""},O={text:"60","i-solar:settings-bold-duotone":""},G=E({__name:"index",setup(H){const k=T(),f=n(!1),x=n(),r=n(),{t}=w(),v=n(""),y=n(""),_=n(!1),c=A();function I(){var o;(o=r.value)==null||o.call(r)}async function S(o,s){const e=o.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const l=e.getBoundingClientRect(),d=`${l.left}px, ${l.top}px`;v.value=s.icon,y.value=d,_.value=!0,await q(),f.value=!0}const B=k.beforeEach(async(o,s,i)=>{if(!c.usePageSpecificTransitions||c.disableTransitions){i();return}await new Promise(e=>{r.value=e}),B(),i()}),C=$(()=>[{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(o,s)=>{const i=z("motion");return a(),p("div",F,[s[0]||(s[0]=u("div",null,null,-1)),u("div",L,[(a(!0),p(P,null,j(C.value,(e,l)=>m((a(),b(g(R),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:D({transitionDelay:`${l*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:d=>S(d,e)},null,8,["style","title","description","icon","to","onClick"])),[[i]])),128))]),_.value&&!g(c).disableTransitions&&g(c).usePageSpecificTransitions?(a(),b(V,{key:0,ref_key:"iconAnimation",ref:x,icon:v.value,"icon-size":6*1.2,position:y.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:f.value,onAnimationEndedOnce:I},null,8,["icon","position","started"])):m((a(),p("div",N,[m(u("div",O,null,512),[[i]])])),[[i]])])}}});typeof h=="function"&&h(G);export{G as default}; diff --git a/assets/index-Cw6hf1Dy.js b/assets/index-CsewVBbh.js similarity index 91% rename from assets/index-Cw6hf1Dy.js rename to assets/index-CsewVBbh.js index 8f359caa1cb47747b96f6f90599842faad770411..f642709328a98a4ce877bda3f31c79a82e0e1b06 100644 --- a/assets/index-Cw6hf1Dy.js +++ b/assets/index-CsewVBbh.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as A,a0 as z,a2 as _,c5 as w,c as r,o as n,a as e,bk as s,bm as d,ch as x,c6 as c,c7 as m,u as i}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as S}from"./providers-bTtvV6aX.js";import{I as p}from"./IconStatusItem-C0p8PHvr.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{u as C}from"./useIconAnimation-BW2D9qMM.js";import{b as y}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";const T={flex:"","flex-col":"","gap-5":""},D={grid:"~ cols-2 gap-4"},N={grid:"~ cols-2 gap-4"},B={grid:"~ cols-2 gap-4"},O={key:1,text:"neutral-500/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":""},P=A({__name:"index",setup(R){const f=S(),{allChatProvidersMetadata:u,allAudioSpeechProvidersMetadata:g,allAudioTranscriptionProvidersMetadata:v}=z(f),{iconAnimationStarted:h,showIconAnimation:k,animationIcon:b}=C("i-solar:box-minimalistic-bold-duotone");return(q,o)=>{const I=_("IconAnimation"),l=w("motion");return n(),r(c,null,[e("div",T,[o[0]||(o[0]=e("div",{bg:"primary-500/10 dark:primary-800/25","rounded-lg":"","p-4":""},[e("div",{"mb-2":"","text-xl":"","font-semibold":"",text:"primary-800 dark:primary-100"}," First time here? "),e("div",{text:"primary-700 dark:primary-300"},[x(" AIRI requires at least one "),e("div",{bg:"primary-500/10 dark:primary-800/25","inline-flex":"","items-center":"","gap-1":"","rounded-lg":"","px-2":"","py-0.5":"","translate-y":"[0.25lh]"},[e("div",{"i-solar:chat-square-like-bold-duotone":""}),e("strong",{"font-semibold":""},"Chat")]),x(" provider to be configured to think, and behave properly. You could think of it as the brain of the characters living in AIRI system. ")])],-1)),o[1]||(o[1]=e("div",{flex:"~ row items-center gap-2"},[e("div",{"i-solar:chat-square-like-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Text generation model providers. e.g. OpenRouter, OpenAI, Ollama.")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Chat ")])])],-1)),e("div",D,[(n(!0),r(c,null,m(i(u),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:a*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"])),[[l]])),128))]),o[2]||(o[2]=e("div",{flex:"~ row items-center gap-2","my-5":""},[e("div",{"i-solar:user-speak-rounded-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Speech (text-to-speech) model providers. e.g. ElevenLabs, Azure Speech.")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Speech ")])])],-1)),e("div",N,[(n(!0),r(c,null,m(i(g),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:(i(u).length+a)*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"])),[[l]])),128))]),o[3]||(o[3]=e("div",{flex:"~ row items-center gap-2","my-5":""},[e("div",{"i-solar:microphone-3-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Transcription (speech-to-text) model providers. e.g. Whisper.cpp, OpenAI, Azure Speech")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Transcription ")])])],-1)),e("div",B,[(n(!0),r(c,null,m(i(v),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:(i(u).length+i(g).length+a)*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"])),[[l]])),128))])]),i(k)?(n(),s(I,{key:0,"z-index":-1,icon:i(b),"icon-size":12,duration:1e3,started:i(h),"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"])):d((n(),r("div",O,o[4]||(o[4]=[e("div",{text:"60","i-solar:box-minimalistic-bold-duotone":""},null,-1)]))),[[l]])],64)}}});typeof y=="function"&&y(P);export{P as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as A,a0 as z,a2 as _,c5 as w,c as r,o as n,a as e,bk as s,bm as d,ch as x,c6 as c,c7 as m,u as i}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as S}from"./providers-7GsMyC_3.js";import{I as p}from"./IconStatusItem-B9Mlqc3P.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{u as C}from"./useIconAnimation-B41IKS_9.js";import{b as y}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";const T={flex:"","flex-col":"","gap-5":""},D={grid:"~ cols-2 gap-4"},N={grid:"~ cols-2 gap-4"},B={grid:"~ cols-2 gap-4"},O={key:1,text:"neutral-500/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":""},P=A({__name:"index",setup(R){const f=S(),{allChatProvidersMetadata:u,allAudioSpeechProvidersMetadata:g,allAudioTranscriptionProvidersMetadata:v}=z(f),{iconAnimationStarted:h,showIconAnimation:k,animationIcon:b}=C("i-solar:box-minimalistic-bold-duotone");return(q,o)=>{const I=_("IconAnimation"),l=w("motion");return n(),r(c,null,[e("div",T,[o[0]||(o[0]=e("div",{bg:"primary-500/10 dark:primary-800/25","rounded-lg":"","p-4":""},[e("div",{"mb-2":"","text-xl":"","font-semibold":"",text:"primary-800 dark:primary-100"}," First time here? "),e("div",{text:"primary-700 dark:primary-300"},[x(" AIRI requires at least one "),e("div",{bg:"primary-500/10 dark:primary-800/25","inline-flex":"","items-center":"","gap-1":"","rounded-lg":"","px-2":"","py-0.5":"","translate-y":"[0.25lh]"},[e("div",{"i-solar:chat-square-like-bold-duotone":""}),e("strong",{"font-semibold":""},"Chat")]),x(" provider to be configured to think, and behave properly. You could think of it as the brain of the characters living in AIRI system. ")])],-1)),o[1]||(o[1]=e("div",{flex:"~ row items-center gap-2"},[e("div",{"i-solar:chat-square-like-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Text generation model providers. e.g. OpenRouter, OpenAI, Ollama.")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Chat ")])])],-1)),e("div",D,[(n(!0),r(c,null,m(i(u),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:a*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"])),[[l]])),128))]),o[2]||(o[2]=e("div",{flex:"~ row items-center gap-2","my-5":""},[e("div",{"i-solar:user-speak-rounded-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Speech (text-to-speech) model providers. e.g. ElevenLabs, Azure Speech.")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Speech ")])])],-1)),e("div",N,[(n(!0),r(c,null,m(i(g),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:(i(u).length+a)*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"])),[[l]])),128))]),o[3]||(o[3]=e("div",{flex:"~ row items-center gap-2","my-5":""},[e("div",{"i-solar:microphone-3-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Transcription (speech-to-text) model providers. e.g. Whisper.cpp, OpenAI, Azure Speech")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Transcription ")])])],-1)),e("div",B,[(n(!0),r(c,null,m(i(v),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:(i(u).length+i(g).length+a)*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"])),[[l]])),128))])]),i(k)?(n(),s(I,{key:0,"z-index":-1,icon:i(b),"icon-size":12,duration:1e3,started:i(h),"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"])):d((n(),r("div",O,o[4]||(o[4]=[e("div",{text:"60","i-solar:box-minimalistic-bold-duotone":""},null,-1)]))),[[l]])],64)}}});typeof y=="function"&&y(P);export{P as default}; diff --git a/assets/index-qrRTaw2W.js b/assets/index-DeGbjSQn.js similarity index 99% rename from assets/index-qrRTaw2W.js rename to assets/index-DeGbjSQn.js index 50e1ee9735fa01f6b6001a2b880a4ebb04021d06..e33618f8db0bc28a7d5837af00673eb2412d5c37 100644 --- a/assets/index-qrRTaw2W.js +++ b/assets/index-DeGbjSQn.js @@ -1,3 +1,3 @@ -import{f as w,e as C,bs as ht,w as F,bL as mt,bM as yt,ct as ie,u as f,d as O,bk as D,o as _,bl as x,bh as E,cu as G,cv as J,ci as P,ck as ke,_ as ne,T as fe,bq as Ue,W as gt,b as ee,cw as Qt,cx as oe,cy as Zt,cz as wt,cA as en,cB as Be,cC as tn,cD as nn,a8 as on,U as bt,c6 as rn,cE as xt,cF as ln,cG as Ct,cH as lt,bK as M,bG as an,ch as sn,Y as un,c as Ot,a3 as Ye,cI as Et,cJ as dn,r as _t,cK as cn,cL as fn,a as pn,cM as vn,cN as hn}from"./index-CKmiAjHk.js";import{o as mn,f as yn,s as gn,a as wn,h as bn,l as xn,c as Cn,b as j,r as Dt,d as On,e as Ae,m as ue,g as We,i as Oe}from"./floating-ui.core-CgBsuaUc.js";function Pe(){return typeof window<"u"}function re(e){return Xe(e)?(e.nodeName||"").toLowerCase():"#document"}function S(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function V(e){var n;return(n=(Xe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Xe(e){return Pe()?e instanceof Node||e instanceof S(e).Node:!1}function I(e){return Pe()?e instanceof Element||e instanceof S(e).Element:!1}function K(e){return Pe()?e instanceof HTMLElement||e instanceof S(e).HTMLElement:!1}function it(e){return!Pe()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof S(e).ShadowRoot}function ve(e){const{overflow:n,overflowX:t,overflowY:o,display:r}=k(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+t)&&!["inline","contents"].includes(r)}function En(e){return["table","td","th"].includes(re(e))}function $e(e){return[":popover-open",":modal"].some(n=>{try{return e.matches(n)}catch{return!1}})}function qe(e){const n=Ge(),t=I(e)?k(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>t[o]?t[o]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!n&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!n&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(t.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(t.contain||"").includes(o))}function _n(e){let n=q(e);for(;K(n)&&!ce(n);){if(qe(n))return n;if($e(n))return null;n=q(n)}return null}function Ge(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ce(e){return["html","body","#document"].includes(re(e))}function k(e){return S(e).getComputedStyle(e)}function Re(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if(re(e)==="html")return e;const n=e.assignedSlot||e.parentNode||it(e)&&e.host||V(e);return it(n)?n.host:n}function Bt(e){const n=q(e);return ce(n)?e.ownerDocument?e.ownerDocument.body:e.body:K(n)&&ve(n)?n:Bt(n)}function pe(e,n,t){var o;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Bt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),l=S(r);if(i){const a=He(l);return n.concat(l,l.visualViewport||[],ve(r)?r:[],a&&t?pe(a):[])}return n.concat(r,pe(r,[],t))}function He(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function At(e){const n=k(e);let t=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const r=K(e),i=r?e.offsetWidth:t,l=r?e.offsetHeight:o,a=Ae(t)!==i||Ae(o)!==l;return a&&(t=i,o=l),{width:t,height:o,$:a}}function Je(e){return I(e)?e:e.contextElement}function de(e){const n=Je(e);if(!K(n))return j(1);const t=n.getBoundingClientRect(),{width:o,height:r,$:i}=At(n);let l=(i?Ae(t.width):t.width)/o,a=(i?Ae(t.height):t.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const Dn=j(0);function Tt(e){const n=S(e);return!Ge()||!n.visualViewport?Dn:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Bn(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==S(e)?!1:n}function te(e,n,t,o){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),i=Je(e);let l=j(1);n&&(o?I(o)&&(l=de(o)):l=de(e));const a=Bn(i,t,o)?Tt(i):j(0);let c=(r.left+a.x)/l.x,d=(r.top+a.y)/l.y,s=r.width/l.x,u=r.height/l.y;if(i){const p=S(i),v=o&&I(o)?S(o):o;let h=p,g=He(h);for(;g&&o&&v!==h;){const m=de(g),y=g.getBoundingClientRect(),B=k(g),b=y.left+(g.clientLeft+parseFloat(B.paddingLeft))*m.x,$=y.top+(g.clientTop+parseFloat(B.paddingTop))*m.y;c*=m.x,d*=m.y,s*=m.x,u*=m.y,c+=b,d+=$,h=S(g),g=He(h)}}return Dt({width:s,height:u,x:c,y:d})}function Qe(e,n){const t=Re(e).scrollLeft;return n?n.left+t:te(V(e)).left+t}function Pt(e,n,t){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),r=o.left+n.scrollLeft-(t?0:Qe(e,o)),i=o.top+n.scrollTop;return{x:r,y:i}}function An(e){let{elements:n,rect:t,offsetParent:o,strategy:r}=e;const i=r==="fixed",l=V(o),a=n?$e(n.floating):!1;if(o===l||a&&i)return t;let c={scrollLeft:0,scrollTop:0},d=j(1);const s=j(0),u=K(o);if((u||!u&&!i)&&((re(o)!=="body"||ve(l))&&(c=Re(o)),K(o))){const v=te(o);d=de(o),s.x=v.x+o.clientLeft,s.y=v.y+o.clientTop}const p=l&&!u&&!i?Pt(l,c,!0):j(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+s.x+p.x,y:t.y*d.y-c.scrollTop*d.y+s.y+p.y}}function Tn(e){return Array.from(e.getClientRects())}function Pn(e){const n=V(e),t=Re(e),o=e.ownerDocument.body,r=ue(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=ue(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let l=-t.scrollLeft+Qe(e);const a=-t.scrollTop;return k(o).direction==="rtl"&&(l+=ue(n.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}function $n(e,n){const t=S(e),o=V(e),r=t.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,c=0;if(r){i=r.width,l=r.height;const d=Ge();(!d||d&&n==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:l,x:a,y:c}}function Rn(e,n){const t=te(e,!0,n==="fixed"),o=t.top+e.clientTop,r=t.left+e.clientLeft,i=K(e)?de(e):j(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y,c=r*i.x,d=o*i.y;return{width:l,height:a,x:c,y:d}}function at(e,n,t){let o;if(n==="viewport")o=$n(e,t);else if(n==="document")o=Pn(V(e));else if(I(n))o=Rn(n,t);else{const r=Tt(e);o={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Dt(o)}function $t(e,n){const t=q(e);return t===n||!I(t)||ce(t)?!1:k(t).position==="fixed"||$t(t,n)}function Nn(e,n){const t=n.get(e);if(t)return t;let o=pe(e,[],!1).filter(a=>I(a)&&re(a)!=="body"),r=null;const i=k(e).position==="fixed";let l=i?q(e):e;for(;I(l)&&!ce(l);){const a=k(l),c=qe(l);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ve(l)&&!c&&$t(e,l))?o=o.filter(s=>s!==l):r=a,l=q(l)}return n.set(e,o),o}function Sn(e){let{element:n,boundary:t,rootBoundary:o,strategy:r}=e;const l=[...t==="clippingAncestors"?$e(n)?[]:Nn(n,this._c):[].concat(t),o],a=l[0],c=l.reduce((d,s)=>{const u=at(n,s,r);return d.top=ue(u.top,d.top),d.right=We(u.right,d.right),d.bottom=We(u.bottom,d.bottom),d.left=ue(u.left,d.left),d},at(n,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fn(e){const{width:n,height:t}=At(e);return{width:n,height:t}}function Ln(e,n,t){const o=K(n),r=V(n),i=t==="fixed",l=te(e,!0,i,n);let a={scrollLeft:0,scrollTop:0};const c=j(0);if(o||!o&&!i)if((re(n)!=="body"||ve(r))&&(a=Re(n)),o){const p=te(n,!0,i,n);c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}else r&&(c.x=Qe(r));const d=r&&!o&&!i?Pt(r,a):j(0),s=l.left+a.scrollLeft-c.x-d.x,u=l.top+a.scrollTop-c.y-d.y;return{x:s,y:u,width:l.width,height:l.height}}function Se(e){return k(e).position==="static"}function st(e,n){if(!K(e)||k(e).position==="fixed")return null;if(n)return n(e);let t=e.offsetParent;return V(e)===t&&(t=t.ownerDocument.body),t}function Rt(e,n){const t=S(e);if($e(e))return t;if(!K(e)){let r=q(e);for(;r&&!ce(r);){if(I(r)&&!Se(r))return r;r=q(r)}return t}let o=st(e,n);for(;o&&En(o)&&Se(o);)o=st(o,n);return o&&ce(o)&&Se(o)&&!qe(o)?t:o||_n(e)||t}const Mn=async function(e){const n=this.getOffsetParent||Rt,t=this.getDimensions,o=await t(e.floating);return{reference:Ln(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function In(e){return k(e).direction==="rtl"}const kn={convertOffsetParentRelativeRectToViewportRelativeRect:An,getDocumentElement:V,getClippingRect:Sn,getOffsetParent:Rt,getElementRects:Mn,getClientRects:Tn,getDimensions:Fn,getScale:de,isElement:I,isRTL:In};function Nt(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function Wn(e,n){let t=null,o;const r=V(e);function i(){var a;clearTimeout(o),(a=t)==null||a.disconnect(),t=null}function l(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const d=e.getBoundingClientRect(),{left:s,top:u,width:p,height:v}=d;if(a||n(),!p||!v)return;const h=Oe(u),g=Oe(r.clientWidth-(s+p)),m=Oe(r.clientHeight-(u+v)),y=Oe(s),b={rootMargin:-h+"px "+-g+"px "+-m+"px "+-y+"px",threshold:ue(0,We(1,c))||1};let $=!0;function R(L){const T=L[0].intersectionRatio;if(T!==c){if(!$)return l();T?l(!1,T):o=setTimeout(()=>{l(!1,1e-7)},1e3)}T===1&&!Nt(d,e.getBoundingClientRect())&&l(),$=!1}try{t=new IntersectionObserver(R,{...b,root:r.ownerDocument})}catch{t=new IntersectionObserver(R,b)}t.observe(e)}return l(!0),i}function Hn(e,n,t,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,d=Je(e),s=r||i?[...d?pe(d):[],...pe(n)]:[];s.forEach(y=>{r&&y.addEventListener("scroll",t,{passive:!0}),i&&y.addEventListener("resize",t)});const u=d&&a?Wn(d,t):null;let p=-1,v=null;l&&(v=new ResizeObserver(y=>{let[B]=y;B&&B.target===d&&v&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(n)})),t()}),d&&!c&&v.observe(d),v.observe(n));let h,g=c?te(e):null;c&&m();function m(){const y=te(e);g&&!Nt(g,y)&&t(),g=y,h=requestAnimationFrame(m)}return t(),()=>{var y;s.forEach(B=>{r&&B.removeEventListener("scroll",t),i&&B.removeEventListener("resize",t)}),u==null||u(),(y=v)==null||y.disconnect(),v=null,c&&cancelAnimationFrame(h)}}const jn=mn,Kn=gn,ut=yn,Vn=wn,zn=bn,Un=On,Yn=xn,Xn=(e,n,t)=>{const o=new Map,r={platform:kn,...t},i={...r.platform,_c:o};return Cn(e,n,{...r,platform:i})};function qn(e){return e!=null&&typeof e=="object"&&"$el"in e}function je(e){if(qn(e)){const n=e.$el;return Xe(n)&&re(n)==="#comment"?null:n}return e}function se(e){return typeof e=="function"?e():f(e)}function Gn(e){return{name:"arrow",options:e,fn(n){const t=je(se(e.element));return t==null?{}:Un({element:t,padding:e.padding}).fn(n)}}}function St(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dt(e,n){const t=St(e);return Math.round(n*t)/t}function Jn(e,n,t){t===void 0&&(t={});const o=t.whileElementsMounted,r=w(()=>{var T;return(T=se(t.open))!=null?T:!0}),i=w(()=>se(t.middleware)),l=w(()=>{var T;return(T=se(t.placement))!=null?T:"bottom"}),a=w(()=>{var T;return(T=se(t.strategy))!=null?T:"absolute"}),c=w(()=>{var T;return(T=se(t.transform))!=null?T:!0}),d=w(()=>je(e.value)),s=w(()=>je(n.value)),u=C(0),p=C(0),v=C(a.value),h=C(l.value),g=ht({}),m=C(!1),y=w(()=>{const T={position:v.value,left:"0",top:"0"};if(!s.value)return T;const H=dt(s.value,u.value),ge=dt(s.value,p.value);return c.value?{...T,transform:"translate("+H+"px, "+ge+"px)",...St(s.value)>=1.5&&{willChange:"transform"}}:{position:v.value,left:H+"px",top:ge+"px"}});let B;function b(){if(d.value==null||s.value==null)return;const T=r.value;Xn(d.value,s.value,{middleware:i.value,placement:l.value,strategy:a.value}).then(H=>{u.value=H.x,p.value=H.y,v.value=H.strategy,h.value=H.placement,g.value=H.middlewareData,m.value=T!==!1})}function $(){typeof B=="function"&&(B(),B=void 0)}function R(){if($(),o===void 0){b();return}if(d.value!=null&&s.value!=null){B=o(d.value,s.value,b);return}}function L(){r.value||(m.value=!1)}return F([i,l,a,r],b,{flush:"sync"}),F([d,s],R,{flush:"sync"}),F(r,L,{flush:"sync"}),mt()&&yt($),{x:ie(u),y:ie(p),strategy:ie(v),placement:ie(h),middlewareData:ie(g),isPositioned:ie(m),floatingStyles:y,update:b}}function le(e,n){const t=typeof e=="string"&&!n?`${e}Context`:n,o=Symbol(t);return[r=>{const i=en(o,r);if(i||i===null)return i;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},r=>(hn(o,r),r)]}function Ft(e,n,t){const o=t.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&o.addEventListener(e,n,{once:!0}),o.dispatchEvent(r)}function Qn(e,n){var t;const o=ht();return M(()=>{o.value=e()},{...n,flush:(t=void 0)!=null?t:"sync"}),Ct(o)}function he(e){return mt()?(yt(e),!0):!1}function Zn(){const e=new Set,n=t=>{e.delete(t)};return{on:t=>{e.add(t);const o=()=>n(t);return he(o),{off:o}},off:n,trigger:(...t)=>Promise.all(Array.from(e).map(o=>o(...t)))}}function eo(e){let n=!1,t;const o=Et(!0);return(...r)=>(n||(t=o.run(()=>e(...r)),n=!0),t)}function to(e){let n=0,t,o;const r=()=>{n-=1,o&&n<=0&&(o.stop(),t=void 0,o=void 0)};return(...i)=>(n+=1,t||(o=Et(!0),t=o.run(()=>e(...i))),he(r),t)}function Z(e){return typeof e=="function"?e():f(e)}const Q=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const no=e=>typeof e<"u",oo=Object.prototype.toString,ro=e=>oo.call(e)==="[object Object]",lo=()=>{},ct=io();function io(){var e,n;return Q&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((n=window==null?void 0:window.navigator)==null?void 0:n.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ao(e){return oe()}function so(e,n=1e4){return vn((t,o)=>{let r=Z(e),i;const l=()=>setTimeout(()=>{r=Z(e),o()},Z(n));return he(()=>{clearTimeout(i)}),{get(){return t(),r},set(a){r=a,o(),clearTimeout(i),i=l()}}})}function uo(e,n){ao()&&dn(e,n)}function Lt(e,n,t={}){const{immediate:o=!0}=t,r=C(!1);let i=null;function l(){i&&(clearTimeout(i),i=null)}function a(){r.value=!1,l()}function c(...d){l(),r.value=!0,i=setTimeout(()=>{r.value=!1,i=null,e(...d)},Z(n))}return o&&(r.value=!0,Q&&c()),he(a),{isPending:Ct(r),start:c,stop:a}}function me(e){var n;const t=Z(e);return(n=t==null?void 0:t.$el)!=null?n:t}const Ze=Q?window:void 0;function Te(...e){let n,t,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,o,r]=e,n=Ze):[n,t,o,r]=e,!n)return lo;Array.isArray(t)||(t=[t]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach(s=>s()),i.length=0},a=(s,u,p,v)=>(s.addEventListener(u,p,v),()=>s.removeEventListener(u,p,v)),c=F(()=>[me(n),Z(r)],([s,u])=>{if(l(),!s)return;const p=ro(u)?{...u}:u;i.push(...t.flatMap(v=>o.map(h=>a(s,v,h,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),l()};return he(d),d}function co(e){return typeof e=="function"?e:typeof e=="string"?n=>n.key===e:Array.isArray(e)?n=>e.includes(n.key):()=>!0}function fo(...e){let n,t,o={};e.length===3?(n=e[0],t=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(n=!0,t=e[0],o=e[1]):(n=e[0],t=e[1]):(n=!0,t=e[0]);const{target:r=Ze,eventName:i="keydown",passive:l=!1,dedupe:a=!1}=o,c=co(n);return Te(r,i,d=>{d.repeat&&Z(a)||c(d)&&t(d)},l)}function po(){const e=C(!1),n=oe();return n&&fe(()=>{e.value=!0},n),e}function vo(e){return JSON.parse(JSON.stringify(e))}function Mt(e,n,t,o={}){var r,i,l;const{clone:a=!1,passive:c=!1,eventName:d,deep:s=!1,defaultValue:u,shouldEmit:p}=o,v=oe(),h=t||(v==null?void 0:v.emit)||((r=v==null?void 0:v.$emit)==null?void 0:r.bind(v))||((l=(i=v==null?void 0:v.proxy)==null?void 0:i.$emit)==null?void 0:l.bind(v==null?void 0:v.proxy));let g=d;g=g||`update:${n.toString()}`;const m=b=>a?typeof a=="function"?a(b):vo(b):b,y=()=>no(e[n])?m(e[n]):u,B=b=>{p?p(b)&&h(g,b):h(g,b)};if(c){const b=y(),$=C(b);let R=!1;return F(()=>e[n],L=>{R||(R=!0,$.value=m(L),ne(()=>R=!1))}),F($,L=>{!R&&(L!==e[n]||s)&&B(L)},{deep:s}),$}else return w({get(){return y()},set(b){B(b)}})}function et(e){return e?e.flatMap(n=>n.type===rn?et(n.children):[n]):[]}function X(){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 Fe(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Ke(e,n,t=".",o){if(!Fe(n))return Ke(e,{},t);const r=Object.assign({},n);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const l=e[i];l!=null&&(Array.isArray(l)&&Array.isArray(r[i])?r[i]=[...l,...r[i]]:Fe(l)&&Fe(r[i])?r[i]=Ke(l,r[i],(t?`${t}.`:"")+i.toString()):r[i]=l)}return r}function ho(e){return(...n)=>n.reduce((t,o)=>Ke(t,o,""),{})}const mo=ho(),[It,Tr]=le("ConfigProvider");let yo="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",go=(e=21)=>{let n="",t=e;for(;t--;)n+=yo[Math.random()*64|0];return n};const wo=to(()=>{const e=C(new Map),n=C(),t=w(()=>{for(const l of e.value.values())if(l)return!0;return!1}),o=It({scrollBody:C(!0)});let r=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=n.value??"",ct&&(r==null||r()),n.value=void 0};return F(t,(l,a)=>{var c;if(!Q)return;if(!l){a&&i();return}n.value===void 0&&(n.value=document.body.style.overflow);const d=window.innerWidth-document.documentElement.clientWidth,s={padding:d,margin:0},u=(c=o.scrollBody)!=null&&c.value?typeof o.scrollBody.value=="object"?mo({padding:o.scrollBody.value.padding===!0?d:o.scrollBody.value.padding,margin:o.scrollBody.value.margin===!0?d:o.scrollBody.value.margin},s):s:{padding:0,margin:0};d>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",`${d}px`),document.body.style.overflow="hidden"),ct&&(r=Te(document,"touchmove",p=>xo(p),{passive:!1})),ne(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function bo(e){const n=go(6),t=wo();t.value.set(n,e);const o=w({get:()=>t.value.get(n)??!1,set:r=>t.value.set(n,r)});return uo(()=>{t.value.delete(n)}),o}function kt(e){const n=window.getComputedStyle(e);if(n.overflowX==="scroll"||n.overflowY==="scroll"||n.overflowX==="auto"&&e.clientWidth1?!0:(n.preventDefault&&n.cancelable&&n.preventDefault(),!1)}function ye(e){const n=oe(),t=n==null?void 0:n.type.emits,o={};return t!=null&&t.length||console.warn(`No emitted event found. Please check component: ${n==null?void 0:n.type.__name}`),t==null||t.forEach(r=>{o[Zt(wt(r))]=(...i)=>e(r,...i)}),o}function Wt(e){const n=oe(),t=Object.keys((n==null?void 0:n.type.props)??{}).reduce((r,i)=>{const l=(n==null?void 0:n.type.props[i]).default;return l!==void 0&&(r[i]=l),r},{}),o=on(e);return w(()=>{const r={},i=(n==null?void 0:n.vnode.props)??{};return Object.keys(i).forEach(l=>{r[wt(l)]=i[l]}),Object.keys({...t,...r}).reduce((l,a)=>(o.value[a]!==void 0&&(l[a]=o.value[a]),l),{})})}function Ht(e,n){const t=Wt(e),o=n?ye(n):{};return w(()=>({...t.value,...o}))}function A(){const e=oe(),n=C(),t=w(()=>{var l,a;return["#text","#comment"].includes((l=n.value)==null?void 0:l.$el.nodeName)?(a=n.value)==null?void 0:a.$el.nextElementSibling:me(n)}),o=Object.assign({},e.exposed),r={};for(const l in e.props)Object.defineProperty(r,l,{enumerable:!0,configurable:!0,get:()=>e.props[l]});if(Object.keys(o).length>0)for(const l in o)Object.defineProperty(r,l,{enumerable:!0,configurable:!0,get:()=>o[l]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=r;function i(l){n.value=l,l&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>l instanceof Element?l:l.$el}),e.exposed=r)}return{forwardRef:i,currentRef:n,currentElement:t}}function Co(e,n){const t=so(!1,300),o=C(null),r=Zn();function i(){o.value=null,t.value=!1}function l(a,c){const d=a.currentTarget,s={x:a.clientX,y:a.clientY},u=Oo(s,d.getBoundingClientRect()),p=Eo(s,u),v=_o(c.getBoundingClientRect()),h=Bo([...p,...v]);o.value=h,t.value=!0}return M(a=>{if(e.value&&n.value){const c=s=>l(s,n.value),d=s=>l(s,e.value);e.value.addEventListener("pointerleave",c),n.value.addEventListener("pointerleave",d),a(()=>{var s,u;(s=e.value)==null||s.removeEventListener("pointerleave",c),(u=n.value)==null||u.removeEventListener("pointerleave",d)})}}),M(a=>{var c;if(o.value){const d=s=>{var u,p;if(!o.value)return;const v=s.target,h={x:s.clientX,y:s.clientY},g=((u=e.value)==null?void 0:u.contains(v))||((p=n.value)==null?void 0:p.contains(v)),m=!Do(h,o.value),y=!!v.closest("[data-grace-area-trigger]");g?i():(m||y)&&(i(),r.trigger())};(c=e.value)==null||c.ownerDocument.addEventListener("pointermove",d),a(()=>{var s;return(s=e.value)==null?void 0:s.ownerDocument.removeEventListener("pointermove",d)})}}),{isPointerInTransit:t,onPointerExit:r.on}}function Oo(e,n){const t=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),r=Math.abs(n.right-e.x),i=Math.abs(n.left-e.x);switch(Math.min(t,o,r,i)){case i:return"left";case r:return"right";case t:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Eo(e,n,t=5){const o=[];switch(n){case"top":o.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":o.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":o.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":o.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return o}function _o(e){const{top:n,right:t,bottom:o,left:r}=e;return[{x:r,y:n},{x:t,y:n},{x:t,y:o},{x:r,y:o}]}function Do(e,n){const{x:t,y:o}=e;let r=!1;for(let i=0,l=n.length-1;io!=s>o&&t<(d-a)*(o-c)/(s-c)+a&&(r=!r)}return r}function Bo(e){const n=e.slice();return n.sort((t,o)=>t.xo.x?1:t.yo.y?1:0),Ao(n)}function Ao(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o=2;){const i=n[n.length-1],l=n[n.length-2];if((i.x-l.x)*(r.y-l.y)>=(i.y-l.y)*(r.x-l.x))n.pop();else break}n.push(r)}n.pop();const t=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(r.y-l.y)>=(i.y-l.y)*(r.x-l.x))t.pop();else break}t.push(r)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}var To=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},ae=new WeakMap,Ee=new WeakMap,_e={},Le=0,jt=function(e){return e&&(e.host||jt(e.parentNode))},Po=function(e,n){return n.map(function(t){if(e.contains(t))return t;var o=jt(t);return o&&e.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},$o=function(e,n,t,o){var r=Po(n,Array.isArray(e)?e:[e]);_e[t]||(_e[t]=new WeakMap);var i=_e[t],l=[],a=new Set,c=new Set(r),d=function(u){!u||a.has(u)||(a.add(u),d(u.parentNode))};r.forEach(d);var s=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(p){if(a.has(p))s(p);else try{var v=p.getAttribute(o),h=v!==null&&v!=="false",g=(ae.get(p)||0)+1,m=(i.get(p)||0)+1;ae.set(p,g),i.set(p,m),l.push(p),g===1&&h&&Ee.set(p,!0),m===1&&p.setAttribute(t,"true"),h||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return s(n),a.clear(),Le++,function(){l.forEach(function(u){var p=ae.get(u)-1,v=i.get(u)-1;ae.set(u,p),i.set(u,v),p||(Ee.has(u)||u.removeAttribute(o),Ee.delete(u)),v||u.removeAttribute(t)}),Le--,Le||(ae=new WeakMap,ae=new WeakMap,Ee=new WeakMap,_e={})}},Ro=function(e,n,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=To(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),$o(o,r,t,"aria-hidden")):function(){return null}};function No(e){let n;F(()=>me(e),t=>{t?n=Ro(t):n&&n()}),bt(()=>{n&&n()})}let So=0;function Ve(e,n="radix"){const t=It({useId:void 0});return lt?`${n}-${lt()}`:t.useId?`${n}-${t.useId()}`:`${n}-${++So}`}function Fo(e){const n=C(),t=w(()=>{var r;return((r=n.value)==null?void 0:r.width)??0}),o=w(()=>{var r;return((r=n.value)==null?void 0:r.height)??0});return fe(()=>{const r=me(e);if(r){n.value={width:r.offsetWidth,height:r.offsetHeight};const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const a=l[0];let c,d;if("borderBoxSize"in a){const s=a.borderBoxSize,u=Array.isArray(s)?s[0]:s;c=u.inlineSize,d=u.blockSize}else c=r.offsetWidth,d=r.offsetHeight;n.value={width:c,height:d}});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else n.value=void 0}),{width:t,height:o}}function Lo(e,n){const t=C(e);function o(r){return n[t.value][r]??t.value}return{state:t,dispatch:r=>{t.value=o(r)}}}const Mo=O({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:n,slots:t}){return()=>{var o,r;if(!t.default)return null;const i=et(t.default()),l=i.findIndex(s=>s.type!==xt);if(l===-1)return i;const a=i[l];(o=a.props)==null||delete o.ref;const c=a.props?P(n,a.props):n;n.class&&(r=a.props)!=null&&r.class&&delete a.props.class;const d=ln(a,c);for(const s in c)s.startsWith("on")&&(d.props||(d.props={}),d.props[s]=c[s]);return i.length===1?d:(i[l]=d,i)}}}),W=O({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:n,slots:t}){const o=e.asChild?"template":e.as;return typeof o=="string"&&["area","img","input"].includes(o)?()=>Be(o,n):o!=="template"?()=>Be(e.as,n,{default:t.default}):()=>Be(Mo,n,{default:t.default})}});function Io(e,n){var t;const o=C({}),r=C("none"),i=C(e),l=e.value?"mounted":"unmounted";let a;const c=((t=n.value)==null?void 0:t.ownerDocument.defaultView)??Ze,{state:d,dispatch:s}=Lo(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=m=>{var y;if(Q){const B=new CustomEvent(m,{bubbles:!1,cancelable:!1});(y=n.value)==null||y.dispatchEvent(B)}};F(e,async(m,y)=>{var B;const b=y!==m;if(await ne(),b){const $=r.value,R=De(n.value);m?(s("MOUNT"),u("enter"),R==="none"&&u("after-enter")):R==="none"||((B=o.value)==null?void 0:B.display)==="none"?(s("UNMOUNT"),u("leave"),u("after-leave")):y&&$!==R?(s("ANIMATION_OUT"),u("leave")):(s("UNMOUNT"),u("after-leave"))}},{immediate:!0});const p=m=>{const y=De(n.value),B=y.includes(m.animationName),b=d.value==="mounted"?"enter":"leave";if(m.target===n.value&&B&&(u(`after-${b}`),s("ANIMATION_END"),!i.value)){const $=n.value.style.animationFillMode;n.value.style.animationFillMode="forwards",a=c==null?void 0:c.setTimeout(()=>{var R;((R=n.value)==null?void 0:R.style.animationFillMode)==="forwards"&&(n.value.style.animationFillMode=$)})}m.target===n.value&&y==="none"&&s("ANIMATION_END")},v=m=>{m.target===n.value&&(r.value=De(n.value))},h=F(n,(m,y)=>{m?(o.value=getComputedStyle(m),m.addEventListener("animationstart",v),m.addEventListener("animationcancel",p),m.addEventListener("animationend",p)):(s("ANIMATION_END"),a!==void 0&&(c==null||c.clearTimeout(a)),y==null||y.removeEventListener("animationstart",v),y==null||y.removeEventListener("animationcancel",p),y==null||y.removeEventListener("animationend",p))},{immediate:!0}),g=F(d,()=>{const m=De(n.value);r.value=d.value==="mounted"?m:"none"});return bt(()=>{h(),g()}),{isPresent:w(()=>["mounted","unmountSuspended"].includes(d.value))}}function De(e){return e&&getComputedStyle(e).animationName||"none"}const tt=O({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:n,expose:t}){var o;const{present:r,forceMount:i}=Ue(e),l=C(),{isPresent:a}=Io(r,l);t({present:a});let c=n.default({present:a});c=et(c||[]);const d=oe();if(c&&(c==null?void 0:c.length)>1){const s=(o=d==null?void 0:d.parent)!=null&&o.type.name?`<${d.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${s}\` 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{f as w,e as C,bs as ht,w as F,bL as mt,bM as yt,ct as ie,u as f,d as O,bk as D,o as _,bl as x,bh as E,cu as G,cv as J,ci as P,ck as ke,_ as ne,T as fe,bq as Ue,W as gt,b as ee,cw as Qt,cx as oe,cy as Zt,cz as wt,cA as en,cB as Be,cC as tn,cD as nn,a8 as on,U as bt,c6 as rn,cE as xt,cF as ln,cG as Ct,cH as lt,bK as M,bG as an,ch as sn,Y as un,c as Ot,a3 as Ye,cI as Et,cJ as dn,r as _t,cK as cn,cL as fn,a as pn,cM as vn,cN as hn}from"./index-WDP_Z4A8.js";import{o as mn,f as yn,s as gn,a as wn,h as bn,l as xn,c as Cn,b as j,r as Dt,d as On,e as Ae,m as ue,g as We,i as Oe}from"./floating-ui.core-CgBsuaUc.js";function Pe(){return typeof window<"u"}function re(e){return Xe(e)?(e.nodeName||"").toLowerCase():"#document"}function S(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function V(e){var n;return(n=(Xe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Xe(e){return Pe()?e instanceof Node||e instanceof S(e).Node:!1}function I(e){return Pe()?e instanceof Element||e instanceof S(e).Element:!1}function K(e){return Pe()?e instanceof HTMLElement||e instanceof S(e).HTMLElement:!1}function it(e){return!Pe()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof S(e).ShadowRoot}function ve(e){const{overflow:n,overflowX:t,overflowY:o,display:r}=k(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+t)&&!["inline","contents"].includes(r)}function En(e){return["table","td","th"].includes(re(e))}function $e(e){return[":popover-open",":modal"].some(n=>{try{return e.matches(n)}catch{return!1}})}function qe(e){const n=Ge(),t=I(e)?k(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>t[o]?t[o]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!n&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!n&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(t.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(t.contain||"").includes(o))}function _n(e){let n=q(e);for(;K(n)&&!ce(n);){if(qe(n))return n;if($e(n))return null;n=q(n)}return null}function Ge(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ce(e){return["html","body","#document"].includes(re(e))}function k(e){return S(e).getComputedStyle(e)}function Re(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if(re(e)==="html")return e;const n=e.assignedSlot||e.parentNode||it(e)&&e.host||V(e);return it(n)?n.host:n}function Bt(e){const n=q(e);return ce(n)?e.ownerDocument?e.ownerDocument.body:e.body:K(n)&&ve(n)?n:Bt(n)}function pe(e,n,t){var o;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Bt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),l=S(r);if(i){const a=He(l);return n.concat(l,l.visualViewport||[],ve(r)?r:[],a&&t?pe(a):[])}return n.concat(r,pe(r,[],t))}function He(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function At(e){const n=k(e);let t=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const r=K(e),i=r?e.offsetWidth:t,l=r?e.offsetHeight:o,a=Ae(t)!==i||Ae(o)!==l;return a&&(t=i,o=l),{width:t,height:o,$:a}}function Je(e){return I(e)?e:e.contextElement}function de(e){const n=Je(e);if(!K(n))return j(1);const t=n.getBoundingClientRect(),{width:o,height:r,$:i}=At(n);let l=(i?Ae(t.width):t.width)/o,a=(i?Ae(t.height):t.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const Dn=j(0);function Tt(e){const n=S(e);return!Ge()||!n.visualViewport?Dn:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Bn(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==S(e)?!1:n}function te(e,n,t,o){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),i=Je(e);let l=j(1);n&&(o?I(o)&&(l=de(o)):l=de(e));const a=Bn(i,t,o)?Tt(i):j(0);let c=(r.left+a.x)/l.x,d=(r.top+a.y)/l.y,s=r.width/l.x,u=r.height/l.y;if(i){const p=S(i),v=o&&I(o)?S(o):o;let h=p,g=He(h);for(;g&&o&&v!==h;){const m=de(g),y=g.getBoundingClientRect(),B=k(g),b=y.left+(g.clientLeft+parseFloat(B.paddingLeft))*m.x,$=y.top+(g.clientTop+parseFloat(B.paddingTop))*m.y;c*=m.x,d*=m.y,s*=m.x,u*=m.y,c+=b,d+=$,h=S(g),g=He(h)}}return Dt({width:s,height:u,x:c,y:d})}function Qe(e,n){const t=Re(e).scrollLeft;return n?n.left+t:te(V(e)).left+t}function Pt(e,n,t){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),r=o.left+n.scrollLeft-(t?0:Qe(e,o)),i=o.top+n.scrollTop;return{x:r,y:i}}function An(e){let{elements:n,rect:t,offsetParent:o,strategy:r}=e;const i=r==="fixed",l=V(o),a=n?$e(n.floating):!1;if(o===l||a&&i)return t;let c={scrollLeft:0,scrollTop:0},d=j(1);const s=j(0),u=K(o);if((u||!u&&!i)&&((re(o)!=="body"||ve(l))&&(c=Re(o)),K(o))){const v=te(o);d=de(o),s.x=v.x+o.clientLeft,s.y=v.y+o.clientTop}const p=l&&!u&&!i?Pt(l,c,!0):j(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+s.x+p.x,y:t.y*d.y-c.scrollTop*d.y+s.y+p.y}}function Tn(e){return Array.from(e.getClientRects())}function Pn(e){const n=V(e),t=Re(e),o=e.ownerDocument.body,r=ue(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=ue(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let l=-t.scrollLeft+Qe(e);const a=-t.scrollTop;return k(o).direction==="rtl"&&(l+=ue(n.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}function $n(e,n){const t=S(e),o=V(e),r=t.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,c=0;if(r){i=r.width,l=r.height;const d=Ge();(!d||d&&n==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:l,x:a,y:c}}function Rn(e,n){const t=te(e,!0,n==="fixed"),o=t.top+e.clientTop,r=t.left+e.clientLeft,i=K(e)?de(e):j(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y,c=r*i.x,d=o*i.y;return{width:l,height:a,x:c,y:d}}function at(e,n,t){let o;if(n==="viewport")o=$n(e,t);else if(n==="document")o=Pn(V(e));else if(I(n))o=Rn(n,t);else{const r=Tt(e);o={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Dt(o)}function $t(e,n){const t=q(e);return t===n||!I(t)||ce(t)?!1:k(t).position==="fixed"||$t(t,n)}function Nn(e,n){const t=n.get(e);if(t)return t;let o=pe(e,[],!1).filter(a=>I(a)&&re(a)!=="body"),r=null;const i=k(e).position==="fixed";let l=i?q(e):e;for(;I(l)&&!ce(l);){const a=k(l),c=qe(l);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ve(l)&&!c&&$t(e,l))?o=o.filter(s=>s!==l):r=a,l=q(l)}return n.set(e,o),o}function Sn(e){let{element:n,boundary:t,rootBoundary:o,strategy:r}=e;const l=[...t==="clippingAncestors"?$e(n)?[]:Nn(n,this._c):[].concat(t),o],a=l[0],c=l.reduce((d,s)=>{const u=at(n,s,r);return d.top=ue(u.top,d.top),d.right=We(u.right,d.right),d.bottom=We(u.bottom,d.bottom),d.left=ue(u.left,d.left),d},at(n,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fn(e){const{width:n,height:t}=At(e);return{width:n,height:t}}function Ln(e,n,t){const o=K(n),r=V(n),i=t==="fixed",l=te(e,!0,i,n);let a={scrollLeft:0,scrollTop:0};const c=j(0);if(o||!o&&!i)if((re(n)!=="body"||ve(r))&&(a=Re(n)),o){const p=te(n,!0,i,n);c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}else r&&(c.x=Qe(r));const d=r&&!o&&!i?Pt(r,a):j(0),s=l.left+a.scrollLeft-c.x-d.x,u=l.top+a.scrollTop-c.y-d.y;return{x:s,y:u,width:l.width,height:l.height}}function Se(e){return k(e).position==="static"}function st(e,n){if(!K(e)||k(e).position==="fixed")return null;if(n)return n(e);let t=e.offsetParent;return V(e)===t&&(t=t.ownerDocument.body),t}function Rt(e,n){const t=S(e);if($e(e))return t;if(!K(e)){let r=q(e);for(;r&&!ce(r);){if(I(r)&&!Se(r))return r;r=q(r)}return t}let o=st(e,n);for(;o&&En(o)&&Se(o);)o=st(o,n);return o&&ce(o)&&Se(o)&&!qe(o)?t:o||_n(e)||t}const Mn=async function(e){const n=this.getOffsetParent||Rt,t=this.getDimensions,o=await t(e.floating);return{reference:Ln(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function In(e){return k(e).direction==="rtl"}const kn={convertOffsetParentRelativeRectToViewportRelativeRect:An,getDocumentElement:V,getClippingRect:Sn,getOffsetParent:Rt,getElementRects:Mn,getClientRects:Tn,getDimensions:Fn,getScale:de,isElement:I,isRTL:In};function Nt(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function Wn(e,n){let t=null,o;const r=V(e);function i(){var a;clearTimeout(o),(a=t)==null||a.disconnect(),t=null}function l(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const d=e.getBoundingClientRect(),{left:s,top:u,width:p,height:v}=d;if(a||n(),!p||!v)return;const h=Oe(u),g=Oe(r.clientWidth-(s+p)),m=Oe(r.clientHeight-(u+v)),y=Oe(s),b={rootMargin:-h+"px "+-g+"px "+-m+"px "+-y+"px",threshold:ue(0,We(1,c))||1};let $=!0;function R(L){const T=L[0].intersectionRatio;if(T!==c){if(!$)return l();T?l(!1,T):o=setTimeout(()=>{l(!1,1e-7)},1e3)}T===1&&!Nt(d,e.getBoundingClientRect())&&l(),$=!1}try{t=new IntersectionObserver(R,{...b,root:r.ownerDocument})}catch{t=new IntersectionObserver(R,b)}t.observe(e)}return l(!0),i}function Hn(e,n,t,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,d=Je(e),s=r||i?[...d?pe(d):[],...pe(n)]:[];s.forEach(y=>{r&&y.addEventListener("scroll",t,{passive:!0}),i&&y.addEventListener("resize",t)});const u=d&&a?Wn(d,t):null;let p=-1,v=null;l&&(v=new ResizeObserver(y=>{let[B]=y;B&&B.target===d&&v&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(n)})),t()}),d&&!c&&v.observe(d),v.observe(n));let h,g=c?te(e):null;c&&m();function m(){const y=te(e);g&&!Nt(g,y)&&t(),g=y,h=requestAnimationFrame(m)}return t(),()=>{var y;s.forEach(B=>{r&&B.removeEventListener("scroll",t),i&&B.removeEventListener("resize",t)}),u==null||u(),(y=v)==null||y.disconnect(),v=null,c&&cancelAnimationFrame(h)}}const jn=mn,Kn=gn,ut=yn,Vn=wn,zn=bn,Un=On,Yn=xn,Xn=(e,n,t)=>{const o=new Map,r={platform:kn,...t},i={...r.platform,_c:o};return Cn(e,n,{...r,platform:i})};function qn(e){return e!=null&&typeof e=="object"&&"$el"in e}function je(e){if(qn(e)){const n=e.$el;return Xe(n)&&re(n)==="#comment"?null:n}return e}function se(e){return typeof e=="function"?e():f(e)}function Gn(e){return{name:"arrow",options:e,fn(n){const t=je(se(e.element));return t==null?{}:Un({element:t,padding:e.padding}).fn(n)}}}function St(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dt(e,n){const t=St(e);return Math.round(n*t)/t}function Jn(e,n,t){t===void 0&&(t={});const o=t.whileElementsMounted,r=w(()=>{var T;return(T=se(t.open))!=null?T:!0}),i=w(()=>se(t.middleware)),l=w(()=>{var T;return(T=se(t.placement))!=null?T:"bottom"}),a=w(()=>{var T;return(T=se(t.strategy))!=null?T:"absolute"}),c=w(()=>{var T;return(T=se(t.transform))!=null?T:!0}),d=w(()=>je(e.value)),s=w(()=>je(n.value)),u=C(0),p=C(0),v=C(a.value),h=C(l.value),g=ht({}),m=C(!1),y=w(()=>{const T={position:v.value,left:"0",top:"0"};if(!s.value)return T;const H=dt(s.value,u.value),ge=dt(s.value,p.value);return c.value?{...T,transform:"translate("+H+"px, "+ge+"px)",...St(s.value)>=1.5&&{willChange:"transform"}}:{position:v.value,left:H+"px",top:ge+"px"}});let B;function b(){if(d.value==null||s.value==null)return;const T=r.value;Xn(d.value,s.value,{middleware:i.value,placement:l.value,strategy:a.value}).then(H=>{u.value=H.x,p.value=H.y,v.value=H.strategy,h.value=H.placement,g.value=H.middlewareData,m.value=T!==!1})}function $(){typeof B=="function"&&(B(),B=void 0)}function R(){if($(),o===void 0){b();return}if(d.value!=null&&s.value!=null){B=o(d.value,s.value,b);return}}function L(){r.value||(m.value=!1)}return F([i,l,a,r],b,{flush:"sync"}),F([d,s],R,{flush:"sync"}),F(r,L,{flush:"sync"}),mt()&&yt($),{x:ie(u),y:ie(p),strategy:ie(v),placement:ie(h),middlewareData:ie(g),isPositioned:ie(m),floatingStyles:y,update:b}}function le(e,n){const t=typeof e=="string"&&!n?`${e}Context`:n,o=Symbol(t);return[r=>{const i=en(o,r);if(i||i===null)return i;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},r=>(hn(o,r),r)]}function Ft(e,n,t){const o=t.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&o.addEventListener(e,n,{once:!0}),o.dispatchEvent(r)}function Qn(e,n){var t;const o=ht();return M(()=>{o.value=e()},{...n,flush:(t=void 0)!=null?t:"sync"}),Ct(o)}function he(e){return mt()?(yt(e),!0):!1}function Zn(){const e=new Set,n=t=>{e.delete(t)};return{on:t=>{e.add(t);const o=()=>n(t);return he(o),{off:o}},off:n,trigger:(...t)=>Promise.all(Array.from(e).map(o=>o(...t)))}}function eo(e){let n=!1,t;const o=Et(!0);return(...r)=>(n||(t=o.run(()=>e(...r)),n=!0),t)}function to(e){let n=0,t,o;const r=()=>{n-=1,o&&n<=0&&(o.stop(),t=void 0,o=void 0)};return(...i)=>(n+=1,t||(o=Et(!0),t=o.run(()=>e(...i))),he(r),t)}function Z(e){return typeof e=="function"?e():f(e)}const Q=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const no=e=>typeof e<"u",oo=Object.prototype.toString,ro=e=>oo.call(e)==="[object Object]",lo=()=>{},ct=io();function io(){var e,n;return Q&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((n=window==null?void 0:window.navigator)==null?void 0:n.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ao(e){return oe()}function so(e,n=1e4){return vn((t,o)=>{let r=Z(e),i;const l=()=>setTimeout(()=>{r=Z(e),o()},Z(n));return he(()=>{clearTimeout(i)}),{get(){return t(),r},set(a){r=a,o(),clearTimeout(i),i=l()}}})}function uo(e,n){ao()&&dn(e,n)}function Lt(e,n,t={}){const{immediate:o=!0}=t,r=C(!1);let i=null;function l(){i&&(clearTimeout(i),i=null)}function a(){r.value=!1,l()}function c(...d){l(),r.value=!0,i=setTimeout(()=>{r.value=!1,i=null,e(...d)},Z(n))}return o&&(r.value=!0,Q&&c()),he(a),{isPending:Ct(r),start:c,stop:a}}function me(e){var n;const t=Z(e);return(n=t==null?void 0:t.$el)!=null?n:t}const Ze=Q?window:void 0;function Te(...e){let n,t,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,o,r]=e,n=Ze):[n,t,o,r]=e,!n)return lo;Array.isArray(t)||(t=[t]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach(s=>s()),i.length=0},a=(s,u,p,v)=>(s.addEventListener(u,p,v),()=>s.removeEventListener(u,p,v)),c=F(()=>[me(n),Z(r)],([s,u])=>{if(l(),!s)return;const p=ro(u)?{...u}:u;i.push(...t.flatMap(v=>o.map(h=>a(s,v,h,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),l()};return he(d),d}function co(e){return typeof e=="function"?e:typeof e=="string"?n=>n.key===e:Array.isArray(e)?n=>e.includes(n.key):()=>!0}function fo(...e){let n,t,o={};e.length===3?(n=e[0],t=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(n=!0,t=e[0],o=e[1]):(n=e[0],t=e[1]):(n=!0,t=e[0]);const{target:r=Ze,eventName:i="keydown",passive:l=!1,dedupe:a=!1}=o,c=co(n);return Te(r,i,d=>{d.repeat&&Z(a)||c(d)&&t(d)},l)}function po(){const e=C(!1),n=oe();return n&&fe(()=>{e.value=!0},n),e}function vo(e){return JSON.parse(JSON.stringify(e))}function Mt(e,n,t,o={}){var r,i,l;const{clone:a=!1,passive:c=!1,eventName:d,deep:s=!1,defaultValue:u,shouldEmit:p}=o,v=oe(),h=t||(v==null?void 0:v.emit)||((r=v==null?void 0:v.$emit)==null?void 0:r.bind(v))||((l=(i=v==null?void 0:v.proxy)==null?void 0:i.$emit)==null?void 0:l.bind(v==null?void 0:v.proxy));let g=d;g=g||`update:${n.toString()}`;const m=b=>a?typeof a=="function"?a(b):vo(b):b,y=()=>no(e[n])?m(e[n]):u,B=b=>{p?p(b)&&h(g,b):h(g,b)};if(c){const b=y(),$=C(b);let R=!1;return F(()=>e[n],L=>{R||(R=!0,$.value=m(L),ne(()=>R=!1))}),F($,L=>{!R&&(L!==e[n]||s)&&B(L)},{deep:s}),$}else return w({get(){return y()},set(b){B(b)}})}function et(e){return e?e.flatMap(n=>n.type===rn?et(n.children):[n]):[]}function X(){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 Fe(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Ke(e,n,t=".",o){if(!Fe(n))return Ke(e,{},t);const r=Object.assign({},n);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const l=e[i];l!=null&&(Array.isArray(l)&&Array.isArray(r[i])?r[i]=[...l,...r[i]]:Fe(l)&&Fe(r[i])?r[i]=Ke(l,r[i],(t?`${t}.`:"")+i.toString()):r[i]=l)}return r}function ho(e){return(...n)=>n.reduce((t,o)=>Ke(t,o,""),{})}const mo=ho(),[It,Tr]=le("ConfigProvider");let yo="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",go=(e=21)=>{let n="",t=e;for(;t--;)n+=yo[Math.random()*64|0];return n};const wo=to(()=>{const e=C(new Map),n=C(),t=w(()=>{for(const l of e.value.values())if(l)return!0;return!1}),o=It({scrollBody:C(!0)});let r=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=n.value??"",ct&&(r==null||r()),n.value=void 0};return F(t,(l,a)=>{var c;if(!Q)return;if(!l){a&&i();return}n.value===void 0&&(n.value=document.body.style.overflow);const d=window.innerWidth-document.documentElement.clientWidth,s={padding:d,margin:0},u=(c=o.scrollBody)!=null&&c.value?typeof o.scrollBody.value=="object"?mo({padding:o.scrollBody.value.padding===!0?d:o.scrollBody.value.padding,margin:o.scrollBody.value.margin===!0?d:o.scrollBody.value.margin},s):s:{padding:0,margin:0};d>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",`${d}px`),document.body.style.overflow="hidden"),ct&&(r=Te(document,"touchmove",p=>xo(p),{passive:!1})),ne(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function bo(e){const n=go(6),t=wo();t.value.set(n,e);const o=w({get:()=>t.value.get(n)??!1,set:r=>t.value.set(n,r)});return uo(()=>{t.value.delete(n)}),o}function kt(e){const n=window.getComputedStyle(e);if(n.overflowX==="scroll"||n.overflowY==="scroll"||n.overflowX==="auto"&&e.clientWidth1?!0:(n.preventDefault&&n.cancelable&&n.preventDefault(),!1)}function ye(e){const n=oe(),t=n==null?void 0:n.type.emits,o={};return t!=null&&t.length||console.warn(`No emitted event found. Please check component: ${n==null?void 0:n.type.__name}`),t==null||t.forEach(r=>{o[Zt(wt(r))]=(...i)=>e(r,...i)}),o}function Wt(e){const n=oe(),t=Object.keys((n==null?void 0:n.type.props)??{}).reduce((r,i)=>{const l=(n==null?void 0:n.type.props[i]).default;return l!==void 0&&(r[i]=l),r},{}),o=on(e);return w(()=>{const r={},i=(n==null?void 0:n.vnode.props)??{};return Object.keys(i).forEach(l=>{r[wt(l)]=i[l]}),Object.keys({...t,...r}).reduce((l,a)=>(o.value[a]!==void 0&&(l[a]=o.value[a]),l),{})})}function Ht(e,n){const t=Wt(e),o=n?ye(n):{};return w(()=>({...t.value,...o}))}function A(){const e=oe(),n=C(),t=w(()=>{var l,a;return["#text","#comment"].includes((l=n.value)==null?void 0:l.$el.nodeName)?(a=n.value)==null?void 0:a.$el.nextElementSibling:me(n)}),o=Object.assign({},e.exposed),r={};for(const l in e.props)Object.defineProperty(r,l,{enumerable:!0,configurable:!0,get:()=>e.props[l]});if(Object.keys(o).length>0)for(const l in o)Object.defineProperty(r,l,{enumerable:!0,configurable:!0,get:()=>o[l]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=r;function i(l){n.value=l,l&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>l instanceof Element?l:l.$el}),e.exposed=r)}return{forwardRef:i,currentRef:n,currentElement:t}}function Co(e,n){const t=so(!1,300),o=C(null),r=Zn();function i(){o.value=null,t.value=!1}function l(a,c){const d=a.currentTarget,s={x:a.clientX,y:a.clientY},u=Oo(s,d.getBoundingClientRect()),p=Eo(s,u),v=_o(c.getBoundingClientRect()),h=Bo([...p,...v]);o.value=h,t.value=!0}return M(a=>{if(e.value&&n.value){const c=s=>l(s,n.value),d=s=>l(s,e.value);e.value.addEventListener("pointerleave",c),n.value.addEventListener("pointerleave",d),a(()=>{var s,u;(s=e.value)==null||s.removeEventListener("pointerleave",c),(u=n.value)==null||u.removeEventListener("pointerleave",d)})}}),M(a=>{var c;if(o.value){const d=s=>{var u,p;if(!o.value)return;const v=s.target,h={x:s.clientX,y:s.clientY},g=((u=e.value)==null?void 0:u.contains(v))||((p=n.value)==null?void 0:p.contains(v)),m=!Do(h,o.value),y=!!v.closest("[data-grace-area-trigger]");g?i():(m||y)&&(i(),r.trigger())};(c=e.value)==null||c.ownerDocument.addEventListener("pointermove",d),a(()=>{var s;return(s=e.value)==null?void 0:s.ownerDocument.removeEventListener("pointermove",d)})}}),{isPointerInTransit:t,onPointerExit:r.on}}function Oo(e,n){const t=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),r=Math.abs(n.right-e.x),i=Math.abs(n.left-e.x);switch(Math.min(t,o,r,i)){case i:return"left";case r:return"right";case t:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Eo(e,n,t=5){const o=[];switch(n){case"top":o.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":o.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":o.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":o.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return o}function _o(e){const{top:n,right:t,bottom:o,left:r}=e;return[{x:r,y:n},{x:t,y:n},{x:t,y:o},{x:r,y:o}]}function Do(e,n){const{x:t,y:o}=e;let r=!1;for(let i=0,l=n.length-1;io!=s>o&&t<(d-a)*(o-c)/(s-c)+a&&(r=!r)}return r}function Bo(e){const n=e.slice();return n.sort((t,o)=>t.xo.x?1:t.yo.y?1:0),Ao(n)}function Ao(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o=2;){const i=n[n.length-1],l=n[n.length-2];if((i.x-l.x)*(r.y-l.y)>=(i.y-l.y)*(r.x-l.x))n.pop();else break}n.push(r)}n.pop();const t=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(r.y-l.y)>=(i.y-l.y)*(r.x-l.x))t.pop();else break}t.push(r)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}var To=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},ae=new WeakMap,Ee=new WeakMap,_e={},Le=0,jt=function(e){return e&&(e.host||jt(e.parentNode))},Po=function(e,n){return n.map(function(t){if(e.contains(t))return t;var o=jt(t);return o&&e.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},$o=function(e,n,t,o){var r=Po(n,Array.isArray(e)?e:[e]);_e[t]||(_e[t]=new WeakMap);var i=_e[t],l=[],a=new Set,c=new Set(r),d=function(u){!u||a.has(u)||(a.add(u),d(u.parentNode))};r.forEach(d);var s=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(p){if(a.has(p))s(p);else try{var v=p.getAttribute(o),h=v!==null&&v!=="false",g=(ae.get(p)||0)+1,m=(i.get(p)||0)+1;ae.set(p,g),i.set(p,m),l.push(p),g===1&&h&&Ee.set(p,!0),m===1&&p.setAttribute(t,"true"),h||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return s(n),a.clear(),Le++,function(){l.forEach(function(u){var p=ae.get(u)-1,v=i.get(u)-1;ae.set(u,p),i.set(u,v),p||(Ee.has(u)||u.removeAttribute(o),Ee.delete(u)),v||u.removeAttribute(t)}),Le--,Le||(ae=new WeakMap,ae=new WeakMap,Ee=new WeakMap,_e={})}},Ro=function(e,n,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=To(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),$o(o,r,t,"aria-hidden")):function(){return null}};function No(e){let n;F(()=>me(e),t=>{t?n=Ro(t):n&&n()}),bt(()=>{n&&n()})}let So=0;function Ve(e,n="radix"){const t=It({useId:void 0});return lt?`${n}-${lt()}`:t.useId?`${n}-${t.useId()}`:`${n}-${++So}`}function Fo(e){const n=C(),t=w(()=>{var r;return((r=n.value)==null?void 0:r.width)??0}),o=w(()=>{var r;return((r=n.value)==null?void 0:r.height)??0});return fe(()=>{const r=me(e);if(r){n.value={width:r.offsetWidth,height:r.offsetHeight};const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const a=l[0];let c,d;if("borderBoxSize"in a){const s=a.borderBoxSize,u=Array.isArray(s)?s[0]:s;c=u.inlineSize,d=u.blockSize}else c=r.offsetWidth,d=r.offsetHeight;n.value={width:c,height:d}});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else n.value=void 0}),{width:t,height:o}}function Lo(e,n){const t=C(e);function o(r){return n[t.value][r]??t.value}return{state:t,dispatch:r=>{t.value=o(r)}}}const Mo=O({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:n,slots:t}){return()=>{var o,r;if(!t.default)return null;const i=et(t.default()),l=i.findIndex(s=>s.type!==xt);if(l===-1)return i;const a=i[l];(o=a.props)==null||delete o.ref;const c=a.props?P(n,a.props):n;n.class&&(r=a.props)!=null&&r.class&&delete a.props.class;const d=ln(a,c);for(const s in c)s.startsWith("on")&&(d.props||(d.props={}),d.props[s]=c[s]);return i.length===1?d:(i[l]=d,i)}}}),W=O({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:n,slots:t}){const o=e.asChild?"template":e.as;return typeof o=="string"&&["area","img","input"].includes(o)?()=>Be(o,n):o!=="template"?()=>Be(e.as,n,{default:t.default}):()=>Be(Mo,n,{default:t.default})}});function Io(e,n){var t;const o=C({}),r=C("none"),i=C(e),l=e.value?"mounted":"unmounted";let a;const c=((t=n.value)==null?void 0:t.ownerDocument.defaultView)??Ze,{state:d,dispatch:s}=Lo(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=m=>{var y;if(Q){const B=new CustomEvent(m,{bubbles:!1,cancelable:!1});(y=n.value)==null||y.dispatchEvent(B)}};F(e,async(m,y)=>{var B;const b=y!==m;if(await ne(),b){const $=r.value,R=De(n.value);m?(s("MOUNT"),u("enter"),R==="none"&&u("after-enter")):R==="none"||((B=o.value)==null?void 0:B.display)==="none"?(s("UNMOUNT"),u("leave"),u("after-leave")):y&&$!==R?(s("ANIMATION_OUT"),u("leave")):(s("UNMOUNT"),u("after-leave"))}},{immediate:!0});const p=m=>{const y=De(n.value),B=y.includes(m.animationName),b=d.value==="mounted"?"enter":"leave";if(m.target===n.value&&B&&(u(`after-${b}`),s("ANIMATION_END"),!i.value)){const $=n.value.style.animationFillMode;n.value.style.animationFillMode="forwards",a=c==null?void 0:c.setTimeout(()=>{var R;((R=n.value)==null?void 0:R.style.animationFillMode)==="forwards"&&(n.value.style.animationFillMode=$)})}m.target===n.value&&y==="none"&&s("ANIMATION_END")},v=m=>{m.target===n.value&&(r.value=De(n.value))},h=F(n,(m,y)=>{m?(o.value=getComputedStyle(m),m.addEventListener("animationstart",v),m.addEventListener("animationcancel",p),m.addEventListener("animationend",p)):(s("ANIMATION_END"),a!==void 0&&(c==null||c.clearTimeout(a)),y==null||y.removeEventListener("animationstart",v),y==null||y.removeEventListener("animationcancel",p),y==null||y.removeEventListener("animationend",p))},{immediate:!0}),g=F(d,()=>{const m=De(n.value);r.value=d.value==="mounted"?m:"none"});return bt(()=>{h(),g()}),{isPresent:w(()=>["mounted","unmountSuspended"].includes(d.value))}}function De(e){return e&&getComputedStyle(e).animationName||"none"}const tt=O({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:n,expose:t}){var o;const{present:r,forceMount:i}=Ue(e),l=C(),{isPresent:a}=Io(r,l);t({present:a});let c=n.default({present:a});c=et(c||[]);const d=oe();if(c&&(c==null?void 0:c.length)>1){const s=(o=d==null?void 0:d.parent)!=null&&o.type.name?`<${d.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${s}\` 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()=>i.value||r.value||a.value?Be(n.default({present:a})[0],{ref:s=>{const u=me(s);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}}),[U,ko]=le("DialogRoot"),Wo=O({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:n}){const t=e,o=Mt(t,"open",n,{defaultValue:t.defaultOpen,passive:t.open===void 0}),r=C(),i=C(),{modal:l}=Ue(t);return ko({open:o,modal:l,openModal:()=>{o.value=!0},onOpenChange:a=>{o.value=a},onOpenToggle:()=>{o.value=!o.value},contentId:"",titleId:"",descriptionId:"",triggerElement:r,contentElement:i}),(a,c)=>E(a.$slots,"default",{open:f(o)})}}),nt=O({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const n=po();return(t,o)=>f(n)||t.forceMount?(_(),D(Qt,{key:0,to:t.to,disabled:t.disabled},[E(t.$slots,"default")],8,["to","disabled"])):gt("",!0)}}),Pr=O({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const n=e;return(t,o)=>(_(),D(f(nt),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),Ho="dismissableLayer.pointerDownOutside",jo="dismissableLayer.focusOutside";function Kt(e,n){const t=n.closest("[data-dismissable-layer]"),o=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),r=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(t&&o===t||r.indexOf(o){});return M(l=>{if(!Q)return;const a=async d=>{const s=d.target;if(n!=null&&n.value){if(Kt(n.value,s)){r.value=!1;return}if(d.target&&!r.value){let u=function(){Ft(Ho,e,p)};const p={originalEvent:d};d.pointerType==="touch"?(o.removeEventListener("click",i.value),i.value=u,o.addEventListener("click",i.value,{once:!0})):u()}else o.removeEventListener("click",i.value);r.value=!1}},c=window.setTimeout(()=>{o.addEventListener("pointerdown",a)},0);l(()=>{window.clearTimeout(c),o.removeEventListener("pointerdown",a),o.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>r.value=!0}}function Vo(e,n){var t;const o=((t=n==null?void 0:n.value)==null?void 0:t.ownerDocument)??(globalThis==null?void 0:globalThis.document),r=C(!1);return M(i=>{if(!Q)return;const l=async a=>{n!=null&&n.value&&(await ne(),!(!n.value||Kt(n.value,a.target))&&a.target&&!r.value&&Ft(jo,e,{originalEvent:a}))};o.addEventListener("focusin",l),i(()=>o.removeEventListener("focusin",l))}),{onFocusCapture:()=>r.value=!0,onBlurCapture:()=>r.value=!1}}const z=_t({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vt=O({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:n}){const t=e,o=n,{forwardRef:r,currentElement:i}=A(),l=w(()=>{var h;return((h=i.value)==null?void 0:h.ownerDocument)??globalThis.document}),a=w(()=>z.layersRoot),c=w(()=>i.value?Array.from(a.value).indexOf(i.value):-1),d=w(()=>z.layersWithOutsidePointerEventsDisabled.size>0),s=w(()=>{const h=Array.from(a.value),[g]=[...z.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(g);return c.value>=m}),u=Ko(async h=>{const g=[...z.branches].some(m=>m==null?void 0:m.contains(h.target));!s.value||g||(o("pointerDownOutside",h),o("interactOutside",h),await ne(),h.defaultPrevented||o("dismiss"))},i),p=Vo(h=>{[...z.branches].some(g=>g==null?void 0:g.contains(h.target))||(o("focusOutside",h),o("interactOutside",h),h.defaultPrevented||o("dismiss"))},i);fo("Escape",h=>{c.value===a.value.size-1&&(o("escapeKeyDown",h),h.defaultPrevented||o("dismiss"))});let v;return M(h=>{i.value&&(t.disableOutsidePointerEvents&&(z.layersWithOutsidePointerEventsDisabled.size===0&&(v=l.value.body.style.pointerEvents,l.value.body.style.pointerEvents="none"),z.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{t.disableOutsidePointerEvents&&z.layersWithOutsidePointerEventsDisabled.size===1&&(l.value.body.style.pointerEvents=v)}))}),M(h=>{h(()=>{i.value&&(a.value.delete(i.value),z.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,g)=>(_(),D(f(W),{ref:f(r),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:Ye({pointerEvents:d.value?s.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(u).onPointerDownCapture},{default:x(()=>[E(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Me="focusScope.autoFocusOnMount",Ie="focusScope.autoFocusOnUnmount",ft={bubbles:!1,cancelable:!0};function zo(e,{select:n=!1}={}){const t=X();for(const o of e)if(Y(o,{select:n}),X()!==t)return!0}function Uo(e){const n=zt(e),t=pt(n,e),o=pt(n.reverse(),e);return[t,o]}function zt(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function pt(e,n){for(const t of e)if(!Yo(t,{upTo:n}))return t}function Yo(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xo(e){return e instanceof HTMLInputElement&&"select"in e}function Y(e,{select:n=!1}={}){if(e&&e.focus){const t=X();e.focus({preventScroll:!0}),e!==t&&Xo(e)&&n&&e.select()}}const qo=eo(()=>C([]));function Go(){const e=qo();return{add(n){const t=e.value[0];n!==t&&(t==null||t.pause()),e.value=vt(e.value,n),e.value.unshift(n)},remove(n){var t;e.value=vt(e.value,n),(t=e.value[0])==null||t.resume()}}}function vt(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function Jo(e){return e.filter(n=>n.tagName!=="A")}const Qo=O({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:n}){const t=e,o=n,{currentRef:r,currentElement:i}=A(),l=C(null),a=Go(),c=_t({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});M(s=>{if(!Q)return;const u=i.value;if(!t.trapped)return;function p(m){if(c.paused||!u)return;const y=m.target;u.contains(y)?l.value=y:Y(l.value,{select:!0})}function v(m){if(c.paused||!u)return;const y=m.relatedTarget;y!==null&&(u.contains(y)||Y(l.value,{select:!0}))}function h(m){u.contains(l.value)||Y(u)}document.addEventListener("focusin",p),document.addEventListener("focusout",v);const g=new MutationObserver(h);u&&g.observe(u,{childList:!0,subtree:!0}),s(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),g.disconnect()})}),M(async s=>{const u=i.value;if(await ne(),!u)return;a.add(c);const p=X();if(!u.contains(p)){const v=new CustomEvent(Me,ft);u.addEventListener(Me,h=>o("mountAutoFocus",h)),u.dispatchEvent(v),v.defaultPrevented||(zo(Jo(zt(u)),{select:!0}),X()===p&&Y(u))}s(()=>{u.removeEventListener(Me,g=>o("mountAutoFocus",g));const v=new CustomEvent(Ie,ft),h=g=>{o("unmountAutoFocus",g)};u.addEventListener(Ie,h),u.dispatchEvent(v),setTimeout(()=>{v.defaultPrevented||Y(p??document.body,{select:!0}),u.removeEventListener(Ie,h),a.remove(c)},0)})});function d(s){if(!t.loop&&!t.trapped||c.paused)return;const u=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,p=X();if(u&&p){const v=s.currentTarget,[h,g]=Uo(v);h&&g?!s.shiftKey&&p===g?(s.preventDefault(),t.loop&&Y(h,{select:!0})):s.shiftKey&&p===h&&(s.preventDefault(),t.loop&&Y(g,{select:!0})):p===v&&s.preventDefault()}}return(s,u)=>(_(),D(f(W),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":s.asChild,as:s.as,onKeydown:d},{default:x(()=>[E(s.$slots,"default")]),_:3},8,["as-child","as"]))}});function Zo(e){return e?"open":"closed"}const Ut=O({__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:n}){const t=e,o=n,r=U(),{forwardRef:i,currentElement:l}=A();return r.titleId||(r.titleId=Ve(void 0,"radix-vue-dialog-title")),r.descriptionId||(r.descriptionId=Ve(void 0,"radix-vue-dialog-description")),fe(()=>{r.contentElement=l,X()!==document.body&&(r.triggerElement.value=X())}),(a,c)=>(_(),D(f(Qo),{"as-child":"",loop:"",trapped:t.trapFocus,onMountAutoFocus:c[5]||(c[5]=d=>o("openAutoFocus",d)),onUnmountAutoFocus:c[6]||(c[6]=d=>o("closeAutoFocus",d))},{default:x(()=>[ee(f(Vt),P({id:f(r).contentId,ref:f(i),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(r).descriptionId,"aria-labelledby":f(r).titleId,"data-state":f(Zo)(f(r).open.value)},a.$attrs,{onDismiss:c[0]||(c[0]=d=>f(r).onOpenChange(!1)),onEscapeKeyDown:c[1]||(c[1]=d=>o("escapeKeyDown",d)),onFocusOutside:c[2]||(c[2]=d=>o("focusOutside",d)),onInteractOutside:c[3]||(c[3]=d=>o("interactOutside",d)),onPointerDownOutside:c[4]||(c[4]=d=>o("pointerDownOutside",d))}),{default:x(()=>[E(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),er=O({__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:n}){const t=e,o=n,r=U(),i=ye(o),{forwardRef:l,currentElement:a}=A();return No(a),(c,d)=>(_(),D(Ut,P({...t,...f(i)},{ref:f(l),"trap-focus":f(r).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:d[0]||(d[0]=s=>{var u;s.defaultPrevented||(s.preventDefault(),(u=f(r).triggerElement.value)==null||u.focus())}),onPointerDownOutside:d[1]||(d[1]=s=>{const u=s.detail.originalEvent,p=u.button===0&&u.ctrlKey===!0;(u.button===2||p)&&s.preventDefault()}),onFocusOutside:d[2]||(d[2]=s=>{s.preventDefault()})}),{default:x(()=>[E(c.$slots,"default")]),_:3},16,["trap-focus"]))}}),tr=O({__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:n}){const t=e,o=ye(n);A();const r=U(),i=C(!1),l=C(!1);return(a,c)=>(_(),D(Ut,P({...t,...f(o)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=d=>{var s;d.defaultPrevented||(i.value||(s=f(r).triggerElement.value)==null||s.focus(),d.preventDefault()),i.value=!1,l.value=!1}),onInteractOutside:c[1]||(c[1]=d=>{var s;d.defaultPrevented||(i.value=!0,d.detail.originalEvent.type==="pointerdown"&&(l.value=!0));const u=d.target;(s=f(r).triggerElement.value)!=null&&s.contains(u)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&l.value&&d.preventDefault()})}),{default:x(()=>[E(a.$slots,"default")]),_:3},16))}}),nr=O({__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:n}){const t=e,o=n,r=U(),i=ye(o),{forwardRef:l}=A();return(a,c)=>(_(),D(f(tt),{present:a.forceMount||f(r).open.value},{default:x(()=>[f(r).modal.value?(_(),D(er,P({key:0,ref:f(l)},{...t,...f(i),...a.$attrs}),{default:x(()=>[E(a.$slots,"default")]),_:3},16)):(_(),D(tr,P({key:1,ref:f(l)},{...t,...f(i),...a.$attrs}),{default:x(()=>[E(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),or=O({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(e){const n=U();return bo(!0),A(),(t,o)=>(_(),D(f(W),{as:t.as,"as-child":t.asChild,"data-state":f(n).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:x(()=>[E(t.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),rr=O({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=U(),{forwardRef:t}=A();return(o,r)=>{var i;return(i=f(n))!=null&&i.modal.value?(_(),D(f(tt),{key:0,present:o.forceMount||f(n).open.value},{default:x(()=>[ee(or,P(o.$attrs,{ref:f(t),as:o.as,"as-child":o.asChild}),{default:x(()=>[E(o.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):gt("",!0)}}}),Yt=O({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const n=e;A();const t=U();return(o,r)=>(_(),D(f(W),P(n,{type:o.as==="button"?"button":void 0,onClick:r[0]||(r[0]=i=>f(t).onOpenChange(!1))}),{default:x(()=>[E(o.$slots,"default")]),_:3},16,["type"]))}}),lr=O({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const n=e,t=U();return A(),(o,r)=>(_(),D(f(W),P(n,{id:f(t).titleId}),{default:x(()=>[E(o.$slots,"default")]),_:3},16,["id"]))}}),ir=O({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const n=e;A();const t=U();return(o,r)=>(_(),D(f(W),P(n,{id:f(t).descriptionId}),{default:x(()=>[E(o.$slots,"default")]),_:3},16,["id"]))}}),$r=O({__name:"AlertDialogRoot",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:n}){const t=Ht(e,n);return A(),(o,r)=>(_(),D(f(Wo),P(f(t),{modal:!0}),{default:x(()=>[E(o.$slots,"default")]),_:3},16))}}),Rr=O({__name:"AlertDialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const n=e;return(t,o)=>(_(),D(f(nt),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),[ar,sr]=le("AlertDialogContent"),Nr=O({__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:n}){const t=e,o=ye(n);A();const r=C();return sr({onCancelElementChange:i=>{r.value=i}}),(i,l)=>(_(),D(f(nr),P({...t,...f(o)},{role:"alertdialog",onPointerDownOutside:l[0]||(l[0]=ke(()=>{},["prevent"])),onInteractOutside:l[1]||(l[1]=ke(()=>{},["prevent"])),onOpenAutoFocus:l[2]||(l[2]=()=>{ne(()=>{var a;(a=r.value)==null||a.focus({preventScroll:!0})})})}),{default:x(()=>[E(i.$slots,"default")]),_:3},16))}}),Sr=O({__name:"AlertDialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(rr),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),Fr=O({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const n=e,t=ar(),{forwardRef:o,currentElement:r}=A();return fe(()=>{t.onCancelElementChange(r.value)}),(i,l)=>(_(),D(f(Yt),P(n,{ref:f(o)}),{default:x(()=>[E(i.$slots,"default")]),_:3},16))}}),Lr=O({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(lr),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),Mr=O({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(ir),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),Ir=O({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(Yt),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),[Xt,ur]=le("PopperRoot"),dr=O({inheritAttrs:!1,__name:"PopperRoot",setup(e){const n=C();return ur({anchor:n,onAnchorChange:t=>n.value=t}),(t,o)=>E(t.$slots,"default")}}),cr=O({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(e){const n=e,{forwardRef:t,currentElement:o}=A(),r=Xt();return M(()=>{r.onAnchorChange(n.element??o.value)}),(i,l)=>(_(),D(f(W),{ref:f(t),as:i.as,"as-child":i.asChild},{default:x(()=>[E(i.$slots,"default")]),_:3},8,["as","as-child"]))}});function fr(e){return e!==null}function pr(e){return{name:"transformOrigin",options:e,fn(n){var t,o,r;const{placement:i,rects:l,middlewareData:a}=n,c=((t=a.arrow)==null?void 0:t.centerOffset)!==0,d=c?0:e.arrowWidth,s=c?0:e.arrowHeight,[u,p]=ze(i),v={start:"0%",center:"50%",end:"100%"}[p],h=(((o=a.arrow)==null?void 0:o.x)??0)+d/2,g=(((r=a.arrow)==null?void 0:r.y)??0)+s/2;let m="",y="";return u==="bottom"?(m=c?v:`${h}px`,y=`${-s}px`):u==="top"?(m=c?v:`${h}px`,y=`${l.floating.height+s}px`):u==="right"?(m=`${-s}px`,y=c?v:`${g}px`):u==="left"&&(m=`${l.floating.width+s}px`,y=c?v:`${g}px`),{data:{x:m,y}}}}}function ze(e){const[n,t="center"]=e.split("-");return[n,t]}const vr={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[hr,mr]=le("PopperContent"),yr=O({inheritAttrs:!1,__name:"PopperContent",props:cn({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...vr}),emits:["placed"],setup(e,{emit:n}){const t=e,o=n,r=Xt(),{forwardRef:i,currentElement:l}=A(),a=C(),c=C(),{width:d,height:s}=Fo(c),u=w(()=>t.side+(t.align!=="center"?`-${t.align}`:"")),p=w(()=>typeof t.collisionPadding=="number"?t.collisionPadding:{top:0,right:0,bottom:0,left:0,...t.collisionPadding}),v=w(()=>Array.isArray(t.collisionBoundary)?t.collisionBoundary:[t.collisionBoundary]),h=w(()=>({padding:p.value,boundary:v.value.filter(fr),altBoundary:v.value.length>0})),g=Qn(()=>[jn({mainAxis:t.sideOffset+s.value,alignmentAxis:t.alignOffset}),t.prioritizePosition&&t.avoidCollisions&&ut({...h.value}),t.avoidCollisions&&Kn({mainAxis:!0,crossAxis:!!t.prioritizePosition,limiter:t.sticky==="partial"?Yn():void 0,...h.value}),!t.prioritizePosition&&t.avoidCollisions&&ut({...h.value}),Vn({...h.value,apply:({elements:N,rects:rt,availableWidth:we,availableHeight:be})=>{const{width:xe,height:Jt}=rt.reference,Ce=N.floating.style;Ce.setProperty("--radix-popper-available-width",`${we}px`),Ce.setProperty("--radix-popper-available-height",`${be}px`),Ce.setProperty("--radix-popper-anchor-width",`${xe}px`),Ce.setProperty("--radix-popper-anchor-height",`${Jt}px`)}}),c.value&&Gn({element:c.value,padding:t.arrowPadding}),pr({arrowWidth:d.value,arrowHeight:s.value}),t.hideWhenDetached&&zn({strategy:"referenceHidden",...h.value})]),{floatingStyles:m,placement:y,isPositioned:B,middlewareData:b}=Jn(r.anchor,a,{strategy:"fixed",placement:u,whileElementsMounted:(...N)=>Hn(...N,{animationFrame:t.updatePositionStrategy==="always"}),middleware:g}),$=w(()=>ze(y.value)[0]),R=w(()=>ze(y.value)[1]);fn(()=>{B.value&&o("placed")});const L=w(()=>{var N;return((N=b.value.arrow)==null?void 0:N.centerOffset)!==0}),T=C("");M(()=>{l.value&&(T.value=window.getComputedStyle(l.value).zIndex)});const H=w(()=>{var N;return((N=b.value.arrow)==null?void 0:N.x)??0}),ge=w(()=>{var N;return((N=b.value.arrow)==null?void 0:N.y)??0});return mr({placedSide:$,onArrowChange:N=>c.value=N,arrowX:H,arrowY:ge,shouldHideArrow:L}),(N,rt)=>{var we,be,xe;return _(),Ot("div",{ref_key:"floatingRef",ref:a,"data-radix-popper-content-wrapper":"",style:Ye({...f(m),transform:f(B)?f(m).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T.value,"--radix-popper-transform-origin":[(we=f(b).transformOrigin)==null?void 0:we.x,(be=f(b).transformOrigin)==null?void 0:be.y].join(" "),...((xe=f(b).hide)==null?void 0:xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[ee(f(W),P({ref:f(i)},N.$attrs,{"as-child":t.asChild,as:N.as,"data-side":$.value,"data-align":R.value,style:{animation:f(B)?void 0:"none"}}),{default:x(()=>[E(N.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),gr=pn("polygon",{points:"0,0 30,0 15,10"},null,-1),wr=O({__name:"Arrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(W),P(n,{width:t.width,height:t.height,viewBox:t.asChild?void 0:"0 0 30 10",preserveAspectRatio:t.asChild?void 0:"none"}),{default:x(()=>[E(t.$slots,"default",{},()=>[gr])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),br={top:"bottom",right:"left",bottom:"top",left:"right"},xr=O({inheritAttrs:!1,__name:"PopperArrow",props:{width:{},height:{},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const{forwardRef:n}=A(),t=hr(),o=w(()=>br[t.placedSide.value]);return(r,i)=>{var l,a,c,d;return _(),Ot("span",{ref:s=>{f(t).onArrowChange(s)},style:Ye({position:"absolute",left:(l=f(t).arrowX)!=null&&l.value?`${(a=f(t).arrowX)==null?void 0:a.value}px`:void 0,top:(c=f(t).arrowY)!=null&&c.value?`${(d=f(t).arrowY)==null?void 0:d.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f(t).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f(t).placedSide.value],visibility:f(t).shouldHideArrow.value?"hidden":void 0})},[ee(wr,P(r.$attrs,{ref:f(n),style:{display:"block"},as:r.as,"as-child":r.asChild,width:r.width,height:r.height}),{default:x(()=>[E(r.$slots,"default")]),_:3},16,["as","as-child","width","height"])],4)}}}),Cr=O({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){return A(),(n,t)=>(_(),D(f(W),{as:n.as,"as-child":n.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:x(()=>[E(n.$slots,"default")]),_:3},8,["as","as-child"]))}});function Or(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}Or();const qt="tooltip.open",[ot,Er]=le("TooltipProvider"),kr=O({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 n=e,{delayDuration:t,skipDelayDuration:o,disableHoverableContent:r,disableClosingTrigger:i,ignoreNonKeyboardFocus:l,disabled:a}=Ue(n);A();const c=C(!0),d=C(!1),{start:s,stop:u}=Lt(()=>{c.value=!0},o,{immediate:!1});return Er({isOpenDelayed:c,delayDuration:t,onOpen(){u(),c.value=!1},onClose(){s()},isPointerInTransitRef:d,disableHoverableContent:r,disableClosingTrigger:i,disabled:a,ignoreNonKeyboardFocus:l}),(p,v)=>E(p.$slots,"default")}}),[Ne,_r]=le("TooltipRoot"),Wr=O({__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:n}){const t=e,o=n;A();const r=ot(),i=w(()=>t.disableHoverableContent??r.disableHoverableContent.value),l=w(()=>t.disableClosingTrigger??r.disableClosingTrigger.value),a=w(()=>t.disabled??r.disabled.value),c=w(()=>t.delayDuration??r.delayDuration.value),d=w(()=>t.ignoreNonKeyboardFocus??r.ignoreNonKeyboardFocus.value),s=Mt(t,"open",o,{defaultValue:t.defaultOpen,passive:t.open===void 0});F(s,b=>{r.onClose&&(b?(r.onOpen(),document.dispatchEvent(new CustomEvent(qt))):r.onClose())});const u=C(!1),p=C(),v=w(()=>s.value?u.value?"delayed-open":"instant-open":"closed"),{start:h,stop:g}=Lt(()=>{u.value=!0,s.value=!0},c,{immediate:!1});function m(){g(),u.value=!1,s.value=!0}function y(){g(),s.value=!1}function B(){h()}return _r({contentId:"",open:s,stateAttribute:v,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){r.isOpenDelayed.value?B():m()},onTriggerLeave(){i.value?y():g()},onOpen:m,onClose:y,disableHoverableContent:i,disableClosingTrigger:l,disabled:a,ignoreNonKeyboardFocus:d}),(b,$)=>(_(),D(f(dr),null,{default:x(()=>[E(b.$slots,"default",{open:f(s)})]),_:3}))}}),Hr=O({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const n=e,t=Ne(),o=ot();t.contentId||(t.contentId=Ve(void 0,"radix-vue-tooltip-content"));const{forwardRef:r,currentElement:i}=A(),l=C(!1),a=C(!1),c=w(()=>t.disabled.value?{}:{click:g,focus:v,pointermove:u,pointerleave:p,pointerdown:s,blur:h});fe(()=>{t.onTriggerChange(i.value)});function d(){setTimeout(()=>{l.value=!1},1)}function s(){l.value=!0,document.addEventListener("pointerup",d,{once:!0})}function u(m){m.pointerType!=="touch"&&!a.value&&!o.isPointerInTransitRef.value&&(t.onTriggerEnter(),a.value=!0)}function p(){t.onTriggerLeave(),a.value=!1}function v(m){var y,B;l.value||t.ignoreNonKeyboardFocus.value&&!((B=(y=m.target).matches)!=null&&B.call(y,":focus-visible"))||t.onOpen()}function h(){t.onClose()}function g(){t.disableClosingTrigger.value||t.onClose()}return(m,y)=>(_(),D(f(cr),{"as-child":""},{default:x(()=>[ee(f(W),P({ref:f(r),"aria-describedby":f(t).open.value?f(t).contentId:void 0,"data-state":f(t).stateAttribute.value,as:m.as,"as-child":n.asChild,"data-grace-area-trigger":""},tn(c.value)),{default:x(()=>[E(m.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),Gt=O({__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:n}){const t=e,o=n,r=Ne(),{forwardRef:i}=A(),l=an(),a=w(()=>{var s;return(s=l.default)==null?void 0:s.call(l)}),c=w(()=>{var s;if(t.ariaLabel)return t.ariaLabel;let u="";function p(v){typeof v.children=="string"&&v.type!==xt?u+=v.children:Array.isArray(v.children)&&v.children.forEach(h=>p(h))}return(s=a.value)==null||s.forEach(v=>p(v)),u}),d=w(()=>{const{ariaLabel:s,...u}=t;return u});return fe(()=>{Te(window,"scroll",s=>{const u=s.target;u!=null&&u.contains(r.trigger.value)&&r.onClose()}),Te(window,qt,r.onClose)}),(s,u)=>(_(),D(f(Vt),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:u[0]||(u[0]=p=>o("escapeKeyDown",p)),onPointerDownOutside:u[1]||(u[1]=p=>{var v;f(r).disableClosingTrigger.value&&(v=f(r).trigger.value)!=null&&v.contains(p.target)&&p.preventDefault(),o("pointerDownOutside",p)}),onFocusOutside:u[2]||(u[2]=ke(()=>{},["prevent"])),onDismiss:u[3]||(u[3]=p=>f(r).onClose())},{default:x(()=>[ee(f(yr),P({ref:f(i),"data-state":f(r).stateAttribute.value},{...s.$attrs,...d.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:x(()=>[E(s.$slots,"default"),ee(f(Cr),{id:f(r).contentId,role:"tooltip"},{default:x(()=>[sn(un(c.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),Dr=O({__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 n=Wt(e),{forwardRef:t,currentElement:o}=A(),{trigger:r,onClose:i}=Ne(),l=ot(),{isPointerInTransit:a,onPointerExit:c}=Co(r,o);return l.isPointerInTransitRef=a,c(()=>{i()}),(d,s)=>(_(),D(Gt,P({ref:f(t)},f(n)),{default:x(()=>[E(d.$slots,"default")]),_:3},16))}}),jr=O({__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:n}){const t=e,o=n,r=Ne(),i=Ht(t,o),{forwardRef:l}=A();return(a,c)=>(_(),D(f(tt),{present:a.forceMount||f(r).open.value},{default:x(()=>[(_(),D(nn(f(r).disableHoverableContent.value?Gt:Dr),P({ref:f(l)},f(i)),{default:x(()=>[E(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Kr=O({__name:"TooltipArrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(xr),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),Vr=O({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const n=e;return(t,o)=>(_(),D(f(nt),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}});export{rr as $,Rr as A,lr as B,Mr as F,Kr as G,kr as H,Pr as I,Fr as M,Ir as N,Nr as O,nr as P,$r as T,jr as U,Lr as V,Wr as W,Hr as j,Sr as k,Wo as n,Vr as q}; diff --git a/assets/index-CKmiAjHk.js b/assets/index-WDP_Z4A8.js similarity index 99% rename from assets/index-CKmiAjHk.js rename to assets/index-WDP_Z4A8.js index a026f6691978a84e8f8a9cb6dbe2f6a5925a1128..71e014f95c37c25e827d82dfe9b0aadcbe3adadc 100644 --- a/assets/index-CKmiAjHk.js +++ b/assets/index-WDP_Z4A8.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-BF6G54My.js","assets/HeaderLink-z0x7oVxU.js","assets/HeaderLink-DsxHr3rn.css","assets/settings-Bo72-vCu.js","assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js","assets/Stage-DmH5o-Hf.css","assets/three-vrm.module-D3hfVPJz.js","assets/emotions-DWNSb738.js","assets/mcp-CyJbhMv7.js","assets/providers-bTtvV6aX.js","assets/index-LHmcipjy.js","assets/Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js","assets/floating-ui.core-CgBsuaUc.js","assets/Select-BCJa5409.css","assets/index-BOlTDOOF.js","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-CRLeR9Bl.js","assets/queue-C8JDWgSn.js","assets/queues-CFrXkpuW.js","assets/index-Dpfqqu9L.js","assets/airi-card-COXfZI0a.js","assets/consciousness-C2QUWl48.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js","assets/Model.vue_vue_type_script_setup_true_lang-B6LSxDl2.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js","assets/Basic.vue_vue_type_script_setup_true_lang-Bm_AZiZR.js","assets/route-block-B_A1xBdJ.js","assets/index-gTqmS2cP.css","assets/background-remove-B_pMBWgQ.js","assets/InputFile.vue_vue_type_script_setup_true_lang-CToBF7WH.js","assets/chat-txh6jnNz.js","assets/image-M7z4Z5JL.js","assets/image-BhuwcwI9.css","assets/vibrant-D-dqfSBx.js","assets/browser-CkchkNbv.js","assets/queue-BgXr8__m.js","assets/index-GnxVOwEm.js","assets/IconItem-DbtcNtch.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-B0DnY9ij.js","assets/index-lxfFyMno.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DY8OXi6T.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DXbcrybA.js","assets/index-qrRTaw2W.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-CcH5wkMP.js","assets/CardDetailDialog-DjMm_Dzp.js","assets/CardListItem-BKoV0-r8.js","assets/DeleteCardDialog-BGXyTZBa.js","assets/index-pLLmzOw-.js","assets/color-scheme-CpTOavyA.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-nn7hoVat.js","assets/color-scheme-QyqrmPIG.css","assets/developer-BTVcsgZj.js","assets/CheckBar.vue_vue_type_script_setup_true_lang-BreKm1Zw.js","assets/general-DywEs7c1.js","assets/index-DHpf7rbn.js","assets/index-L-IUids0.js","assets/useIconAnimation-BW2D9qMM.js","assets/index-D_OwSkw4.css","assets/index-DIkUKy0M.js","assets/IconStatusItem-C0p8PHvr.js","assets/consciousness-zfnvAfyl.js","assets/RadioCardSimple-DYJ2lAWN.js","assets/Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js","assets/memory-long-term-DXaJ39hx.js","assets/memory-short-term-DJTXeVA_.js","assets/speech-D1OhdUDw.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-5-FhMpNA.js","assets/FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js","assets/Textarea.vue_vue_type_script_setup_true_lang-DlkitCQO.js","assets/index-Cw6hf1Dy.js","assets/alibaba-cloud-model-studio-B3PyfvNm.js","assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-9MhYiAWZ.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js","assets/anthropic-Bh6Yn43R.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js","assets/cloudflare-workers-ai-WSAnC8p9.js","assets/deepseek-B_VkuzDZ.js","assets/elevenlabs-TKIB81vh.js","assets/featherless-ai-jvb9kDLO.js","assets/fireworks-ai-DzrjGQik.js","assets/google-generative-ai-CYSSKC4y.js","assets/microsoft-speech-Bb6wLJYv.js","assets/mistral-ai-DHyb6HuW.js","assets/moonshot-ai-DpXzkCqX.js","assets/novita-ai-MNOoMFA2.js","assets/ollama-CZDUVFrx.js","assets/openai-BwYrxiTm.js","assets/openrouter-ai-C3gDliQZ.js","assets/together-ai-gg3b3dkM.js","assets/volcengine-BsEWGD5J.js","assets/xai-BVVGtFtr.js","assets/index-ClJ-JBDT.js","assets/filter-message-FlufMP-a.js","assets/delays-BfEew3MB.js","assets/emotions-DuCT_vyT.js","assets/messages-BPGABSXG.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-MxM0RvWC.js","assets/HeaderLink--5c4L7nq.js","assets/HeaderLink-DsxHr3rn.css","assets/settings-BZFpczgY.js","assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js","assets/Stage-DmH5o-Hf.css","assets/three-vrm.module-DIVMhp6T.js","assets/emotions-DWNSb738.js","assets/mcp-CVsSz3w1.js","assets/providers-7GsMyC_3.js","assets/index-LHmcipjy.js","assets/Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js","assets/floating-ui.core-CgBsuaUc.js","assets/Select-BCJa5409.css","assets/index-CHEHxPJb.js","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-DRmXCXwq.js","assets/queue-C50Iq5oO.js","assets/queues-DBvSyUSC.js","assets/index-Dpfqqu9L.js","assets/airi-card-Cgw9OiDq.js","assets/consciousness-CI5ipeHX.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js","assets/Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js","assets/Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js","assets/route-block-B_A1xBdJ.js","assets/index-gTqmS2cP.css","assets/background-remove-C-QrXCNT.js","assets/InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js","assets/chat-mn0JV4Kp.js","assets/image-CibzeZAR.js","assets/image-BhuwcwI9.css","assets/vibrant-C1qAY2sn.js","assets/browser-CkchkNbv.js","assets/queue-Bzd_iRYh.js","assets/index-Cqc4fKz2.js","assets/IconItem-CdLibJxT.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js","assets/index-aU1mpMhC.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js","assets/index-DeGbjSQn.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js","assets/CardDetailDialog-BlSfmRlS.js","assets/CardListItem-D2jkRHPP.js","assets/DeleteCardDialog-CzcmecCM.js","assets/index-BUHNZNXi.js","assets/color-scheme-DFRftciY.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js","assets/color-scheme-QyqrmPIG.css","assets/developer-B1AODhAI.js","assets/CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js","assets/general-D0FjssBx.js","assets/index-CKKZXq7c.js","assets/index-C9m14O1J.js","assets/useIconAnimation-B41IKS_9.js","assets/index-D_OwSkw4.css","assets/index-C7BBvJH7.js","assets/IconStatusItem-B9Mlqc3P.js","assets/consciousness-DTcES_Z6.js","assets/RadioCardSimple-BzEaEqwF.js","assets/Input.vue_vue_type_script_setup_true_lang-C4baR55j.js","assets/memory-long-term-DKoN_UYI.js","assets/memory-short-term-CGF6Nhl6.js","assets/speech-BnaLJ2Rn.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js","assets/FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js","assets/Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js","assets/index-CsewVBbh.js","assets/alibaba-cloud-model-studio-AJxwqJ9S.js","assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js","assets/anthropic-CRbvwdIi.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js","assets/cloudflare-workers-ai-Nzt67BKJ.js","assets/deepseek-C4C7ySbq.js","assets/elevenlabs-DfWVlghd.js","assets/featherless-ai-Abs5j3EH.js","assets/fireworks-ai-Cgaz7mYL.js","assets/google-generative-ai-Cvwii5l7.js","assets/microsoft-speech-BLOCaluL.js","assets/mistral-ai-jouO5dmJ.js","assets/moonshot-ai-DZvpNZty.js","assets/novita-ai-Bh1E0rHc.js","assets/ollama-r0UZT5nG.js","assets/openai-XNIcWilW.js","assets/openrouter-ai-CTdWmhtc.js","assets/together-ai-No2aAYf3.js","assets/volcengine-BRelq9N_.js","assets/xai-CoTXxIZ1.js","assets/index-ebacZR9F.js","assets/filter-message-BA3h9Pac.js","assets/delays-WpVM8VPm.js","assets/emotions-D8xwaz_1.js","assets/messages-DjywpylS.js"])))=>i.map(i=>d[i]); var aC=Object.defineProperty;var lC=(n,e,t)=>e in n?aC(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var fi=(n,e,t)=>lC(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 cC="modulepreload",uC=function(n){return"/"+n},yv={},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=uC(c),c in yv)return;yv[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":cC,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((d,p)=>{h.addEventListener("load",d),h.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.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -3846,11 +3846,11 @@ void main() { * pinia v3.0.3 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let Uw;const Wd=n=>Uw=n,Fw=Symbol();function Yg(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var Hl;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(Hl||(Hl={}));function Hz(){const n=M0(!0),e=n.run(()=>nt({}));let t=[],i=[];const s=C0({install(r){Wd(s),s._a=r,r.provide(Fw,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 kw=()=>{};function Sx(n,e,t,i=kw){n.push(e);const s=()=>{const r=n.indexOf(e);r>-1&&(n.splice(r,1),i())};return!t&&qh()&&S0(s),s}function na(n,...e){n.slice().forEach(t=>{t(...e)})}const Gz=n=>n(),Ex=Symbol(),Sm=Symbol();function jg(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];Yg(s)&&Yg(i)&&n.hasOwnProperty(t)&&!Lt(i)&&!Ls(i)?n[t]=jg(s,i):n[t]=i}return n}const Wz=Symbol();function Xz(n){return!Yg(n)||!Object.prototype.hasOwnProperty.call(n,Wz)}const{assign:rr}=Object;function $z(n){return!!(Lt(n)&&n.effect)}function qz(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=vS(t.state.value[n]);return rr(u,r,Object.keys(o||{}).reduce((f,h)=>(f[h]=C0(Ee(()=>{Wd(t);const d=t._s.get(n);return o[h].call(d,d)})),f),{}))}return l=Bw(n,c,e,t,i,!0),l}function Bw(n,e,t={},i,s,r){let o;const a=rr({actions:{}},t),l={deep:!0};let c,u,f=[],h=[],d;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={}),nt({});let _;function g(P){let M;c=u=!1,typeof P=="function"?(P(i.state.value[n]),M={type:Hl.patchFunction,storeId:n,events:d}):(jg(i.state.value[n],P),M={type:Hl.patchObject,payload:P,storeId:n,events:d});const E=_=Symbol();Ar().then(()=>{_===E&&(c=!0)}),u=!0,na(f,M,i.state.value[n])}const m=r?function(){const{state:M}=t,E=M?M():{};this.$patch(D=>{rr(D,E)})}:kw;function v(){o.stop(),f=[],h=[],i._s.delete(n)}const b=(P,M="")=>{if(Ex in P)return P[Sm]=M,P;const E=function(){Wd(i);const D=Array.from(arguments),B=[],z=[];function V(te){B.push(te)}function Q(te){z.push(te)}na(h,{args:D,name:E[Sm],store:T,after:V,onError:Q});let j;try{j=P.apply(this&&this.$id===n?this:T,D)}catch(te){throw na(z,te),te}return j instanceof Promise?j.then(te=>(na(B,te),te)).catch(te=>(na(z,te),Promise.reject(te))):(na(B,j),j)};return E[Ex]=!0,E[Sm]=M,E},y={_p:i,$id:n,$onAction:Sx.bind(null,h),$patch:g,$reset:m,$subscribe(P,M={}){const E=Sx(f,P,M.detached,()=>D()),D=o.run(()=>Ke(()=>i.state.value[n],B=>{(M.flush==="sync"?u:c)&&P({storeId:n,type:Hl.direct,events:d},B)},rr({},l,M)));return E},$dispose:v},T=xi(y);i._s.set(n,T);const S=(i._a&&i._a.runWithContext||Gz)(()=>i._e.run(()=>(o=M0()).run(()=>e({action:b}))));for(const P in S){const M=S[P];if(Lt(M)&&!$z(M)||Ls(M))r||(p&&Xz(M)&&(Lt(M)?M.value=p[P]:jg(M,p[P])),i.state.value[n][P]=M);else if(typeof M=="function"){const E=b(M,P);S[P]=E,a.actions[P]=M}}return rr(T,S),rr(ht(T),S),Object.defineProperty(T,"$state",{get:()=>i.state.value[n],set:P=>{g(M=>{rr(M,P)})}}),i._p.forEach(P=>{rr(T,o.run(()=>P({store:T,app:i._a,pinia:i,options:a})))}),p&&r&&t.hydrate&&t.hydrate(T.$state,p),c=!0,u=!0,T}/*! #__NO_SIDE_EFFECTS__ */function Yz(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(o,a){const l=Ic();return o=o||(l?_n(Fw,null):null),o&&Wd(o),o=Uw,o._s.has(n)||(s?Bw(n,e,i,o):qz(n,i,o)),o._s.get(n)}return r.$id=n,r}function jz(n){const e=ht(n),t={};for(const i in e){const s=e[i];s.effect?t[i]=Ee({get:()=>n[i],set(r){n[i]=r}}):(Lt(s)||Ls(s))&&(t[i]=yS(n,i))}return t}const Kz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>je(()=>import("./default-BF6G54My.js"),__vite__mapDeps([0,1,2])),"/src/layouts/settings.vue":()=>je(()=>import("./settings-Bo72-vCu.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,1,2])),"/src/layouts/stage.vue":()=>je(()=>import("./stage-Bt8C22lJ.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,h;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[(h=o.meta)==null?void 0:h.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return i(n)};/*! + */let Uw;const Wd=n=>Uw=n,Fw=Symbol();function Yg(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var Hl;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(Hl||(Hl={}));function Hz(){const n=M0(!0),e=n.run(()=>nt({}));let t=[],i=[];const s=C0({install(r){Wd(s),s._a=r,r.provide(Fw,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 kw=()=>{};function Sx(n,e,t,i=kw){n.push(e);const s=()=>{const r=n.indexOf(e);r>-1&&(n.splice(r,1),i())};return!t&&qh()&&S0(s),s}function na(n,...e){n.slice().forEach(t=>{t(...e)})}const Gz=n=>n(),Ex=Symbol(),Sm=Symbol();function jg(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];Yg(s)&&Yg(i)&&n.hasOwnProperty(t)&&!Lt(i)&&!Ls(i)?n[t]=jg(s,i):n[t]=i}return n}const Wz=Symbol();function Xz(n){return!Yg(n)||!Object.prototype.hasOwnProperty.call(n,Wz)}const{assign:rr}=Object;function $z(n){return!!(Lt(n)&&n.effect)}function qz(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=vS(t.state.value[n]);return rr(u,r,Object.keys(o||{}).reduce((f,h)=>(f[h]=C0(Ee(()=>{Wd(t);const d=t._s.get(n);return o[h].call(d,d)})),f),{}))}return l=Bw(n,c,e,t,i,!0),l}function Bw(n,e,t={},i,s,r){let o;const a=rr({actions:{}},t),l={deep:!0};let c,u,f=[],h=[],d;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={}),nt({});let _;function g(P){let M;c=u=!1,typeof P=="function"?(P(i.state.value[n]),M={type:Hl.patchFunction,storeId:n,events:d}):(jg(i.state.value[n],P),M={type:Hl.patchObject,payload:P,storeId:n,events:d});const E=_=Symbol();Ar().then(()=>{_===E&&(c=!0)}),u=!0,na(f,M,i.state.value[n])}const m=r?function(){const{state:M}=t,E=M?M():{};this.$patch(D=>{rr(D,E)})}:kw;function v(){o.stop(),f=[],h=[],i._s.delete(n)}const b=(P,M="")=>{if(Ex in P)return P[Sm]=M,P;const E=function(){Wd(i);const D=Array.from(arguments),B=[],z=[];function V(te){B.push(te)}function Q(te){z.push(te)}na(h,{args:D,name:E[Sm],store:T,after:V,onError:Q});let j;try{j=P.apply(this&&this.$id===n?this:T,D)}catch(te){throw na(z,te),te}return j instanceof Promise?j.then(te=>(na(B,te),te)).catch(te=>(na(z,te),Promise.reject(te))):(na(B,j),j)};return E[Ex]=!0,E[Sm]=M,E},y={_p:i,$id:n,$onAction:Sx.bind(null,h),$patch:g,$reset:m,$subscribe(P,M={}){const E=Sx(f,P,M.detached,()=>D()),D=o.run(()=>Ke(()=>i.state.value[n],B=>{(M.flush==="sync"?u:c)&&P({storeId:n,type:Hl.direct,events:d},B)},rr({},l,M)));return E},$dispose:v},T=xi(y);i._s.set(n,T);const S=(i._a&&i._a.runWithContext||Gz)(()=>i._e.run(()=>(o=M0()).run(()=>e({action:b}))));for(const P in S){const M=S[P];if(Lt(M)&&!$z(M)||Ls(M))r||(p&&Xz(M)&&(Lt(M)?M.value=p[P]:jg(M,p[P])),i.state.value[n][P]=M);else if(typeof M=="function"){const E=b(M,P);S[P]=E,a.actions[P]=M}}return rr(T,S),rr(ht(T),S),Object.defineProperty(T,"$state",{get:()=>i.state.value[n],set:P=>{g(M=>{rr(M,P)})}}),i._p.forEach(P=>{rr(T,o.run(()=>P({store:T,app:i._a,pinia:i,options:a})))}),p&&r&&t.hydrate&&t.hydrate(T.$state,p),c=!0,u=!0,T}/*! #__NO_SIDE_EFFECTS__ */function Yz(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(o,a){const l=Ic();return o=o||(l?_n(Fw,null):null),o&&Wd(o),o=Uw,o._s.has(n)||(s?Bw(n,e,i,o):qz(n,i,o)),o._s.get(n)}return r.$id=n,r}function jz(n){const e=ht(n),t={};for(const i in e){const s=e[i];s.effect?t[i]=Ee({get:()=>n[i],set(r){n[i]=r}}):(Lt(s)||Ls(s))&&(t[i]=yS(n,i))}return t}const Kz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>je(()=>import("./default-MxM0RvWC.js"),__vite__mapDeps([0,1,2])),"/src/layouts/settings.vue":()=>je(()=>import("./settings-BZFpczgY.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,1,2])),"/src/layouts/stage.vue":()=>je(()=>import("./stage-83WDclVc.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,h;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[(h=o.meta)==null?void 0:h.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 zw(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function Zz(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&zw(n.default)}const St=Object.assign;function Em(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 Gl=()=>{},Vi=Array.isArray,Vw=/#/g,Jz=/&/g,Qz=/\//g,eV=/=/g,tV=/\?/g,Hw=/\+/g,nV=/%5B/g,iV=/%5D/g,Gw=/%5E/g,sV=/%60/g,Ww=/%7B/g,rV=/%7C/g,Xw=/%7D/g,oV=/%20/g;function Y_(n){return encodeURI(""+n).replace(rV,"|").replace(nV,"[").replace(iV,"]")}function aV(n){return Y_(n).replace(Ww,"{").replace(Xw,"}").replace(Gw,"^")}function Kg(n){return Y_(n).replace(Hw,"%2B").replace(oV,"+").replace(Vw,"%23").replace(Jz,"%26").replace(sV,"`").replace(Ww,"{").replace(Xw,"}").replace(Gw,"^")}function lV(n){return Kg(n).replace(eV,"%3D")}function cV(n){return Y_(n).replace(Vw,"%23").replace(tV,"%3F")}function uV(n){return n==null?"":cV(n).replace(Qz,"%2F")}function Sc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const fV=/\/$/,hV=n=>n.replace(fV,"");function Tm(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=gV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:Sc(o)}}function dV(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function Tx(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function pV(n,e,t){const i=e.matched.length-1,s=t.matched.length-1;return i>-1&&i===s&&Da(e.matched[i],t.matched[s])&&$w(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Da(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function $w(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!mV(n[t],e[t]))return!1;return!0}function mV(n,e){return Vi(n)?wx(n,e):Vi(e)?wx(e,n):n===e}function wx(n,e){return Vi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function gV(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 ir={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ec;(function(n){n.pop="pop",n.push="push"})(Ec||(Ec={}));var Wl;(function(n){n.back="back",n.forward="forward",n.unknown=""})(Wl||(Wl={}));function _V(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),hV(n)}const vV=/^[^#]+#/;function yV(n,e){return n.replace(vV,"#")+e}function bV(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 Xd=()=>({left:window.scrollX,top:window.scrollY});function xV(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=bV(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 Ax(n,e){return(history.state?history.state.position-e:-1)+n}const Zg=new Map;function MV(n,e){Zg.set(n,e)}function SV(n){const e=Zg.get(n);return Zg.delete(n),e}let EV=()=>location.protocol+"//"+location.host;function qw(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),Tx(l,"")}return Tx(t,n)+i+s}function TV(n,e,t,i){let s=[],r=[],o=null;const a=({state:h})=>{const d=qw(n,location),p=t.value,_=e.value;let g=0;if(h){if(t.value=d,e.value=h,o&&o===p){o=null;return}g=_?h.position-_.position:0}else i(d);s.forEach(m=>{m(t.value,p,{delta:g,type:Ec.pop,direction:g?g>0?Wl.forward:Wl.back:Wl.unknown})})};function l(){o=t.value}function c(h){s.push(h);const d=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return r.push(d),d}function u(){const{history:h}=window;h.state&&h.replaceState(St({},h.state,{scroll:Xd()}),"")}function f(){for(const h of r)h();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 Cx(n,e,t,i=!1,s=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:s?Xd():null}}function wV(n){const{history:e,location:t}=window,i={value:qw(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("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:EV()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){const u=St({},e.state,Cx(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=St({},s.value,e.state,{forward:l,scroll:Xd()});r(u.current,u,!0);const f=St({},Cx(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 AV(n){n=_V(n);const e=wV(n),t=TV(n,e.state,e.location,e.replace);function i(r,o=!0){o||t.pauseListeners(),history.go(r)}const s=St({location:"",base:n,go:i,createHref:yV.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 CV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),AV(n)}function RV(n){return typeof n=="string"||n&&typeof n=="object"}function Yw(n){return typeof n=="string"||typeof n=="symbol"}const jw=Symbol("");var Rx;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(Rx||(Rx={}));function Oa(n,e){return St(new Error,{type:n,[jw]:!0},e)}function bs(n,e){return n instanceof Error&&jw in n&&(e==null||!!(n.type&e))}const Px="[^/]+?",PV={sensitive:!1,strict:!1,start:!0,end:!0},IV=/[.+*?^${}()[\]/\\]/g;function LV(n,e){const t=St({},PV,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 Kw(n,e){let t=0;const i=n.score,s=e.score;for(;t0&&e[e.length-1]<0}const OV={type:0,value:""},NV=/[a-zA-Z0-9_]/;function UV(n){if(!n)return[[]];if(n==="/")return[[OV]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(d){throw new Error(`ERR (${t})/"${c}": ${d}`)}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 h(){c+=l}for(;a{o(b)}:Gl}function o(f){if(Yw(f)){const h=i.get(f);h&&(i.delete(f),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(f);h>-1&&(t.splice(h,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 h=VV(f,t);t.splice(h,0,f),f.record.name&&!Ox(f)&&i.set(f.record.name,f)}function c(f,h){let d,p={},_,g;if("name"in f&&f.name){if(d=i.get(f.name),!d)throw Oa(1,{location:f});g=d.record.name,p=St(Lx(h.params,d.keys.filter(b=>!b.optional).concat(d.parent?d.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),f.params&&Lx(f.params,d.keys.map(b=>b.name))),_=d.stringify(p)}else if(f.path!=null)_=f.path,d=t.find(b=>b.re.test(_)),d&&(p=d.parse(_),g=d.record.name);else{if(d=h.name?i.get(h.name):t.find(b=>b.re.test(h.path)),!d)throw Oa(1,{location:f,currentLocation:h});g=d.record.name,p=St({},h.params,f.params),_=d.stringify(p)}const m=[];let v=d;for(;v;)m.unshift(v.record),v=v.parent;return{name:g,path:_,params:p,matched:m,meta:zV(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 Lx(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Dx(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:BV(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 BV(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 Ox(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function zV(n){return n.reduce((e,t)=>St(e,t.meta),{})}function Nx(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function VV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;Kw(n,e[r])<0?i=r:t=r+1}const s=HV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function HV(n){let e=n;for(;e=e.parent;)if(Zw(e)&&Kw(n,e)===0)return e}function Zw({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function GV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let s=0;sr&&Kg(r)):[i&&Kg(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function WV(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 XV=Symbol(""),Fx=Symbol(""),$d=Symbol(""),j_=Symbol(""),Jg=Symbol("");function hl(){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 fr(n,e,t,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(Oa(4,{from:t,to:e})):h instanceof Error?l(h):RV(h)?l(Oa(2,{from:e,to:h})):(o&&i.enterCallbacks[s]===o&&typeof h=="function"&&o.push(h),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(h=>l(h))})}function wm(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(zw(l)){const u=(l.__vccOpts||l)[e];u&&r.push(fr(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=Zz(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const d=(f.__vccOpts||f)[e];return d&&fr(d,t,i,o,a,s)()}))}}return r}function kx(n){const e=_n($d),t=_n(j_),i=Ee(()=>{const l=Ft(n.to);return e.resolve(l)}),s=Ee(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const h=f.findIndex(Da.bind(null,u));if(h>-1)return h;const d=Bx(l[c-2]);return c>1&&Bx(u)===d&&f[f.length-1].path!==d?f.findIndex(Da.bind(null,l[c-2])):h}),r=Ee(()=>s.value>-1&&KV(t.params,i.value.params)),o=Ee(()=>s.value>-1&&s.value===t.matched.length-1&&$w(t.params,i.value.params));function a(l={}){if(jV(l)){const c=e[Ft(n.replace)?"replace":"push"](Ft(n.to)).catch(Gl);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:Ee(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}function $V(n){return n.length===1?n[0]:n}const qV=hn({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:kx,setup(n,{slots:e}){const t=xi(kx(n)),{options:i}=_n($d),s=Ee(()=>({[zx(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[zx(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&$V(e.default(t));return n.custom?r:ks("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},r)}}}),YV=qV;function jV(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 KV(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 Bx(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const zx=(n,e,t)=>n??e??t,ZV=hn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=_n(Jg),s=Ee(()=>n.route||i.value),r=_n(Fx,0),o=Ee(()=>{let c=Ft(r);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Ee(()=>s.value.matched[o.value]);gr(Fx,Ee(()=>o.value+1)),gr(XV,a),gr(Jg,s);const l=nt();return Ke(()=>[l.value,a.value,n.name],([c,u,f],[h,d,p])=>{u&&(u.instances[f]=c,d&&d!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!Da(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return Vx(t.default,{Component:h,route:c});const d=f.props[u],p=d?d===!0?c.params:typeof d=="function"?d(c):d:null,g=ks(h,St({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Vx(t.default,{Component:g,route:c})||g}}});function Vx(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const Jw=ZV;function JV(n){const e=kV(n.routes,n),t=n.parseQuery||GV,i=n.stringifyQuery||Ux,s=n.history,r=hl(),o=hl(),a=hl(),l=Oe(ir);let c=ir;sa&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Em.bind(null,$=>""+$),f=Em.bind(null,uV),h=Em.bind(null,Sc);function d($,ae){let le,ue;return Yw($)?(le=e.getRecordMatcher($),ue=ae):ue=$,e.addRoute(ue,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=St({},ae||l.value),typeof $=="string"){const A=Tm(t,$,ae.path),W=e.resolve({path:A.path},ae),G=s.createHref(A.fullPath);return St(A,W,{params:h(W.params),hash:Sc(A.hash),redirectedFrom:void 0,href:G})}let le;if($.path!=null)le=St({},$,{path:Tm(t,$.path,ae.path).path});else{const A=St({},$.params);for(const W in A)A[W]==null&&delete A[W];le=St({},$,{params:f(A)}),ae.params=f(ae.params)}const ue=e.resolve(le,ae),$e=$.hash||"";ue.params=u(h(ue.params));const N=dV(i,St({},$,{hash:aV($e),path:ue.path})),U=s.createHref(N);return St({fullPath:N,hash:$e,query:i===Ux?WV($.query):$.query||{}},ue,{redirectedFrom:void 0,href:U})}function v($){return typeof $=="string"?Tm(t,$,l.value.path):St({},$)}function b($,ae){if(c!==$)return Oa(8,{from:ae,to:$})}function y($){return S($)}function T($){return y(St(v($),{replace:!0}))}function w($){const ae=$.matched[$.matched.length-1];if(ae&&ae.redirect){const{redirect:le}=ae;let ue=typeof le=="function"?le($):le;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=v(ue):{path:ue},ue.params={}),St({query:$.query,hash:$.hash,params:ue.path!=null?{}:$.params},ue)}}function S($,ae){const le=c=m($),ue=l.value,$e=$.state,N=$.force,U=$.replace===!0,A=w(le);if(A)return S(St(v(A),{state:typeof A=="object"?St({},$e,A.state):$e,force:N,replace:U}),ae||le);const W=le;W.redirectedFrom=ae;let G;return!N&&pV(i,ue,le)&&(G=Oa(16,{to:W,from:ue}),re(ue,ue,!0,!1)),(G?Promise.resolve(G):E(W,ue)).catch(X=>bs(X)?bs(X,2)?X:Me(X):Z(X,W,ue)).then(X=>{if(X){if(bs(X,2))return S(St({replace:U},v(X.to),{state:typeof X.to=="object"?St({},$e,X.to.state):$e,force:N}),ae||W)}else X=B(W,ue,!0,U,$e);return D(W,ue,X),X})}function P($,ae){const le=b($,ae);return le?Promise.reject(le):Promise.resolve()}function M($){const ae=oe.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext($):$()}function E($,ae){let le;const[ue,$e,N]=QV($,ae);le=wm(ue.reverse(),"beforeRouteLeave",$,ae);for(const A of ue)A.leaveGuards.forEach(W=>{le.push(fr(W,$,ae))});const U=P.bind(null,$,ae);return le.push(U),Se(le).then(()=>{le=[];for(const A of r.list())le.push(fr(A,$,ae));return le.push(U),Se(le)}).then(()=>{le=wm($e,"beforeRouteUpdate",$,ae);for(const A of $e)A.updateGuards.forEach(W=>{le.push(fr(W,$,ae))});return le.push(U),Se(le)}).then(()=>{le=[];for(const A of N)if(A.beforeEnter)if(Vi(A.beforeEnter))for(const W of A.beforeEnter)le.push(fr(W,$,ae));else le.push(fr(A.beforeEnter,$,ae));return le.push(U),Se(le)}).then(()=>($.matched.forEach(A=>A.enterCallbacks={}),le=wm(N,"beforeRouteEnter",$,ae,M),le.push(U),Se(le))).then(()=>{le=[];for(const A of o.list())le.push(fr(A,$,ae));return le.push(U),Se(le)}).catch(A=>bs(A,8)?A:Promise.reject(A))}function D($,ae,le){a.list().forEach(ue=>M(()=>ue($,ae,le)))}function B($,ae,le,ue,$e){const N=b($,ae);if(N)return N;const U=ae===ir,A=sa?history.state:{};le&&(ue||U?s.replace($.fullPath,St({scroll:U&&A&&A.scroll},$e)):s.push($.fullPath,$e)),l.value=$,re($,ae,le,U),Me()}let z;function V(){z||(z=s.listen(($,ae,le)=>{if(!ge.listening)return;const ue=m($),$e=w(ue);if($e){S(St($e,{replace:!0,force:!0}),ue).catch(Gl);return}c=ue;const N=l.value;sa&&MV(Ax(N.fullPath,le.delta),Xd()),E(ue,N).catch(U=>bs(U,12)?U:bs(U,2)?(S(St(v(U.to),{force:!0}),ue).then(A=>{bs(A,20)&&!le.delta&&le.type===Ec.pop&&s.go(-1,!1)}).catch(Gl),Promise.reject()):(le.delta&&s.go(-le.delta,!1),Z(U,ue,N))).then(U=>{U=U||B(ue,N,!1),U&&(le.delta&&!bs(U,8)?s.go(-le.delta,!1):le.type===Ec.pop&&bs(U,20)&&s.go(-1,!1)),D(ue,N,U)}).catch(Gl)}))}let Q=hl(),j=hl(),te;function Z($,ae,le){Me($);const ue=j.list();return ue.length?ue.forEach($e=>$e($,ae,le)):console.error($),Promise.reject($)}function pe(){return te&&l.value!==ir?Promise.resolve():new Promise(($,ae)=>{Q.add([$,ae])})}function Me($){return te||(te=!$,V(),Q.list().forEach(([ae,le])=>$?le($):ae()),Q.reset()),$}function re($,ae,le,ue){const{scrollBehavior:$e}=n;if(!sa||!$e)return Promise.resolve();const N=!le&&SV(Ax($.fullPath,0))||(ue||!le)&&history.state&&history.state.scroll||null;return Ar().then(()=>$e($,ae,N)).then(U=>U&&xV(U)).catch(U=>Z(U,$,ae))}const xe=$=>s.go($);let We;const oe=new Set,ge={currentRoute:l,listening:!0,addRoute:d,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:y,replace:T,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:j.add,isReady:pe,install($){const ae=this;$.component("RouterLink",YV),$.component("RouterView",Jw),$.config.globalProperties.$router=ae,Object.defineProperty($.config.globalProperties,"$route",{enumerable:!0,get:()=>Ft(l)}),sa&&!We&&l.value===ir&&(We=!0,y(s.location).catch($e=>{}));const le={};for(const $e in ir)Object.defineProperty(le,$e,{get:()=>l.value[$e],enumerable:!0});$.provide($d,ae),$.provide(j_,pS(le)),$.provide(Jg,l);const ue=$.unmount;oe.add($),$.unmount=function(){oe.delete($),oe.size<1&&(c=ir,z&&z(),z=null,l.value=ir,We=!1,te=!1),ue()}}};function Se($){return $.reduce((ae,le)=>ae.then(()=>M(le)),Promise.resolve())}return ge}function QV(n,e){const t=[],i=[],s=[],r=Math.max(e.matched.length,n.matched.length);for(let o=0;oDa(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Da(c,l))||s.push(l))}return[t,i,s]}function e6(){return _n($d)}function $G(n){return _n(j_)}const t6=[{path:"/",name:"/",component:()=>je(()=>import("./index-BOlTDOOF.js"),__vite__mapDeps([14,4,5,6,7,8,11,12,13,15,16,17,10,9,18,19,20,21,22,23,24,25,1,2,26,27,28])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>je(()=>import("./_...all_-Dto0bah3.js"),[])},{path:"/audio",name:"/audio",component:()=>je(()=>import("./audio-DfI-muF9.js"),[])},{path:"/devtools",children:[{path:"background-remove",name:"/devtools/background-remove",component:()=>je(()=>import("./background-remove-B_pMBWgQ.js"),__vite__mapDeps([29,11,12,13,30]))},{path:"chat",name:"/devtools/chat",component:()=>je(()=>import("./chat-txh6jnNz.js"),__vite__mapDeps([31,20,10]))},{path:"image",name:"/devtools/image",component:()=>je(()=>import("./image-M7z4Z5JL.js"),__vite__mapDeps([32,33]))},{path:"vibrant",name:"/devtools/vibrant",component:()=>je(()=>import("./vibrant-D-dqfSBx.js"),__vite__mapDeps([34,11,12,13,30,35]))}]},{path:"/queue",name:"/queue",component:()=>je(()=>import("./queue-BgXr8__m.js"),__vite__mapDeps([36,18]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>je(()=>import("./index-GnxVOwEm.js"),__vite__mapDeps([37,4,5,6,7,8,38,11,12,13,39,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>je(()=>import("./index-lxfFyMno.js"),__vite__mapDeps([40,6,7,8,21,22,9,10,17,11,12,13,30,41,42,43,4,5,44,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>je(()=>import("./CardDetailDialog-DjMm_Dzp.js"),__vite__mapDeps([45,41,42,43,12,4,5,6,7,8,21,22,9,10,17,11,13]))},{path:"CardListItem",name:"/settings/airi-card/components/CardListItem",component:()=>je(()=>import("./CardListItem-BKoV0-r8.js"),__vite__mapDeps([46,44,4,5,6,7,8,11,12,13]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>je(()=>import("./DeleteCardDialog-BGXyTZBa.js"),__vite__mapDeps([47,42,43,12]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>je(()=>import("./index-pLLmzOw-.js"),__vite__mapDeps([48,4,5,6,7,8,38,11,12,13,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"color-scheme",name:"/settings/appearance/color-scheme",component:()=>je(()=>import("./color-scheme-CpTOavyA.js"),__vite__mapDeps([49,4,5,6,7,8,11,12,13,50,25,23,43,27,51])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"developer",name:"/settings/appearance/developer",component:()=>je(()=>import("./developer-BTVcsgZj.js"),__vite__mapDeps([52,6,7,8,53,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"general",name:"/settings/appearance/general",component:()=>je(()=>import("./general-DywEs7c1.js"),__vite__mapDeps([54,6,7,8,53,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>je(()=>import("./index-DHpf7rbn.js"),__vite__mapDeps([55,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>je(()=>import("./index-L-IUids0.js"),__vite__mapDeps([56,4,5,24,6,7,8,11,12,13,35,39,50,25,23,43,57,27,58])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>je(()=>import("./index-DIkUKy0M.js"),__vite__mapDeps([59,4,5,6,7,8,60,11,12,13,39,57,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>je(()=>import("./consciousness-zfnvAfyl.js"),__vite__mapDeps([61,4,5,6,7,8,22,9,10,11,12,13,62,23,63,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>je(()=>import("./memory-long-term-DXaJ39hx.js"),__vite__mapDeps([64,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>je(()=>import("./memory-short-term-DJTXeVA_.js"),__vite__mapDeps([65,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>je(()=>import("./speech-D1OhdUDw.js"),__vite__mapDeps([66,67,4,5,11,12,13,6,7,8,9,10,17,68,63,69,26,62,23,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>je(()=>import("./index-Cw6hf1Dy.js"),__vite__mapDeps([70,4,5,6,7,8,9,10,60,11,12,13,57,27])),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-B3PyfvNm.js"),__vite__mapDeps([71,4,5,6,7,8,9,10,17,67,11,12,13,72,73,25,23,68,63,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>je(()=>import("./anthropic-Bh6Yn43R.js"),__vite__mapDeps([76,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>je(()=>import("./cloudflare-workers-ai-WSAnC8p9.js"),__vite__mapDeps([78,4,5,6,7,8,9,10,11,12,13,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>je(()=>import("./deepseek-B_VkuzDZ.js"),__vite__mapDeps([79,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>je(()=>import("./elevenlabs-TKIB81vh.js"),__vite__mapDeps([80,4,5,6,7,8,9,10,17,67,11,12,13,72,73,25,23,68,63,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>je(()=>import("./featherless-ai-jvb9kDLO.js"),__vite__mapDeps([81,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>je(()=>import("./fireworks-ai-DzrjGQik.js"),__vite__mapDeps([82,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>je(()=>import("./google-generative-ai-CYSSKC4y.js"),__vite__mapDeps([83,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>je(()=>import("./microsoft-speech-Bb6wLJYv.js"),__vite__mapDeps([84,4,5,6,7,8,9,10,17,68,63,67,11,12,13,72,73,25,23,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>je(()=>import("./mistral-ai-DHyb6HuW.js"),__vite__mapDeps([85,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>je(()=>import("./moonshot-ai-DpXzkCqX.js"),__vite__mapDeps([86,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>je(()=>import("./novita-ai-MNOoMFA2.js"),__vite__mapDeps([87,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"ollama",name:"/settings/providers/ollama",component:()=>je(()=>import("./ollama-CZDUVFrx.js"),__vite__mapDeps([88,4,5,6,7,8,9,10,63,11,12,13,73,25,23,68,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openai",name:"/settings/providers/openai",component:()=>je(()=>import("./openai-BwYrxiTm.js"),__vite__mapDeps([89,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>je(()=>import("./openrouter-ai-C3gDliQZ.js"),__vite__mapDeps([90,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>je(()=>import("./together-ai-gg3b3dkM.js"),__vite__mapDeps([91,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"volcengine",name:"/settings/providers/volcengine",component:()=>je(()=>import("./volcengine-BsEWGD5J.js"),__vite__mapDeps([92,4,5,6,7,8,9,10,17,68,63,67,11,12,13,72,73,25,23,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"xai",name:"/settings/providers/xai",component:()=>je(()=>import("./xai-BVVGtFtr.js"),__vite__mapDeps([93,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"scene",children:[{path:"",name:"/settings/scene/",component:()=>je(()=>import("./index-ClJ-JBDT.js"),__vite__mapDeps([94,57,6,7,8,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>je(()=>import("./filter-message-FlufMP-a.js"),__vite__mapDeps([95,11,12,13,69,26]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>je(()=>import("./delays-BfEew3MB.js"),__vite__mapDeps([96,6,19,7,18,11,12,13,69,26]))},{path:"emotions",name:"/test/queues/emotions",component:()=>je(()=>import("./emotions-DuCT_vyT.js"),__vite__mapDeps([97,18,19,7,11,12,13,69,26]))},{path:"messages",name:"/test/queues/messages",component:()=>je(()=>import("./messages-BPGABSXG.js"),__vite__mapDeps([98,18,19,7,11,12,13,69,26]))}]}]}],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}}},n6={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},i6=n=>Qw(n6[n.toLowerCase()],6),s6=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,r6=n=>{let e;return(e=n.match(s6))?Qw(parseInt(e[1],16),e[1].length):void 0},_r="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Xl=`${_r}%`,K_=`(?:${_r}%|${_r})`,o6=`(?:${_r}(deg|grad|rad|turn)|${_r})`,Na="\\s*,\\s*",a6=new RegExp(`^rgba?\\(\\s*${_r}${Na}${_r}${Na}${_r}\\s*(?:,\\s*${K_}\\s*)?\\)$`),l6=new RegExp(`^rgba?\\(\\s*${Xl}${Na}${Xl}${Na}${Xl}\\s*(?:,\\s*${K_}\\s*)?\\)$`),c6=n=>{let e={mode:"rgb"},t;if(t=n.match(a6))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(l6))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},u6=(n,e)=>n===void 0?void 0:typeof n!="object"?b6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,eA=(n="rgb")=>e=>(e=u6(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={},tA={},Oh=[],nA={},f6=n=>n,Tt=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=f6)}),tA[n.mode]=n,(n.parse||[]).forEach(e=>{d6(e,n.mode)}),eA(n.mode)),h6=n=>tA[n],d6=(n,e)=>{if(typeof n=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");nA[n]=e}else typeof n=="function"&&Oh.indexOf(n)<0&&Oh.push(n)},Qg=/[^\x00-\x7F]|[a-zA-Z_]/,p6=/[^\x00-\x7F]|[-\w]/,ye={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let Ze=0;function ff(n){let e=n[Ze],t=n[Ze+1];return e==="-"||e==="+"?/\d/.test(t)||t==="."&&/\d/.test(n[Ze+2]):e==="."?/\d/.test(t):/\d/.test(e)}function e0(n){if(Ze>=n.length)return!1;let e=n[Ze];if(Qg.test(e))return!0;if(e==="-"){if(n.length-Ze<2)return!1;let t=n[Ze+1];return!!(t==="-"||Qg.test(t))}return!1}const m6={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function dl(n){let e="";if((n[Ze]==="-"||n[Ze]==="+")&&(e+=n[Ze++]),e+=hf(n),n[Ze]==="."&&/\d/.test(n[Ze+1])&&(e+=n[Ze++]+hf(n)),(n[Ze]==="e"||n[Ze]==="E")&&((n[Ze+1]==="-"||n[Ze+1]==="+")&&/\d/.test(n[Ze+2])?e+=n[Ze++]+n[Ze++]+hf(n):/\d/.test(n[Ze+1])&&(e+=n[Ze++]+hf(n))),e0(n)){let t=Nh(n);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:ye.Hue,value:e*m6[t]}:void 0}return n[Ze]==="%"?(Ze++,{type:ye.Percentage,value:+e}):{type:ye.Number,value:+e}}function hf(n){let e="";for(;/\d/.test(n[Ze]);)e+=n[Ze++];return e}function Nh(n){let e="";for(;Ze{},Vi=Array.isArray,Vw=/#/g,Jz=/&/g,Qz=/\//g,eV=/=/g,tV=/\?/g,Hw=/\+/g,nV=/%5B/g,iV=/%5D/g,Gw=/%5E/g,sV=/%60/g,Ww=/%7B/g,rV=/%7C/g,Xw=/%7D/g,oV=/%20/g;function Y_(n){return encodeURI(""+n).replace(rV,"|").replace(nV,"[").replace(iV,"]")}function aV(n){return Y_(n).replace(Ww,"{").replace(Xw,"}").replace(Gw,"^")}function Kg(n){return Y_(n).replace(Hw,"%2B").replace(oV,"+").replace(Vw,"%23").replace(Jz,"%26").replace(sV,"`").replace(Ww,"{").replace(Xw,"}").replace(Gw,"^")}function lV(n){return Kg(n).replace(eV,"%3D")}function cV(n){return Y_(n).replace(Vw,"%23").replace(tV,"%3F")}function uV(n){return n==null?"":cV(n).replace(Qz,"%2F")}function Sc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const fV=/\/$/,hV=n=>n.replace(fV,"");function Tm(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=gV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:Sc(o)}}function dV(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function Tx(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function pV(n,e,t){const i=e.matched.length-1,s=t.matched.length-1;return i>-1&&i===s&&Da(e.matched[i],t.matched[s])&&$w(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Da(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function $w(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!mV(n[t],e[t]))return!1;return!0}function mV(n,e){return Vi(n)?wx(n,e):Vi(e)?wx(e,n):n===e}function wx(n,e){return Vi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function gV(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 ir={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ec;(function(n){n.pop="pop",n.push="push"})(Ec||(Ec={}));var Wl;(function(n){n.back="back",n.forward="forward",n.unknown=""})(Wl||(Wl={}));function _V(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),hV(n)}const vV=/^[^#]+#/;function yV(n,e){return n.replace(vV,"#")+e}function bV(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 Xd=()=>({left:window.scrollX,top:window.scrollY});function xV(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=bV(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 Ax(n,e){return(history.state?history.state.position-e:-1)+n}const Zg=new Map;function MV(n,e){Zg.set(n,e)}function SV(n){const e=Zg.get(n);return Zg.delete(n),e}let EV=()=>location.protocol+"//"+location.host;function qw(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),Tx(l,"")}return Tx(t,n)+i+s}function TV(n,e,t,i){let s=[],r=[],o=null;const a=({state:h})=>{const d=qw(n,location),p=t.value,_=e.value;let g=0;if(h){if(t.value=d,e.value=h,o&&o===p){o=null;return}g=_?h.position-_.position:0}else i(d);s.forEach(m=>{m(t.value,p,{delta:g,type:Ec.pop,direction:g?g>0?Wl.forward:Wl.back:Wl.unknown})})};function l(){o=t.value}function c(h){s.push(h);const d=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return r.push(d),d}function u(){const{history:h}=window;h.state&&h.replaceState(St({},h.state,{scroll:Xd()}),"")}function f(){for(const h of r)h();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 Cx(n,e,t,i=!1,s=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:s?Xd():null}}function wV(n){const{history:e,location:t}=window,i={value:qw(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("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:EV()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){const u=St({},e.state,Cx(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=St({},s.value,e.state,{forward:l,scroll:Xd()});r(u.current,u,!0);const f=St({},Cx(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 AV(n){n=_V(n);const e=wV(n),t=TV(n,e.state,e.location,e.replace);function i(r,o=!0){o||t.pauseListeners(),history.go(r)}const s=St({location:"",base:n,go:i,createHref:yV.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 CV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),AV(n)}function RV(n){return typeof n=="string"||n&&typeof n=="object"}function Yw(n){return typeof n=="string"||typeof n=="symbol"}const jw=Symbol("");var Rx;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(Rx||(Rx={}));function Oa(n,e){return St(new Error,{type:n,[jw]:!0},e)}function bs(n,e){return n instanceof Error&&jw in n&&(e==null||!!(n.type&e))}const Px="[^/]+?",PV={sensitive:!1,strict:!1,start:!0,end:!0},IV=/[.+*?^${}()[\]/\\]/g;function LV(n,e){const t=St({},PV,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 Kw(n,e){let t=0;const i=n.score,s=e.score;for(;t0&&e[e.length-1]<0}const OV={type:0,value:""},NV=/[a-zA-Z0-9_]/;function UV(n){if(!n)return[[]];if(n==="/")return[[OV]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(d){throw new Error(`ERR (${t})/"${c}": ${d}`)}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 h(){c+=l}for(;a{o(b)}:Gl}function o(f){if(Yw(f)){const h=i.get(f);h&&(i.delete(f),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(f);h>-1&&(t.splice(h,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 h=VV(f,t);t.splice(h,0,f),f.record.name&&!Ox(f)&&i.set(f.record.name,f)}function c(f,h){let d,p={},_,g;if("name"in f&&f.name){if(d=i.get(f.name),!d)throw Oa(1,{location:f});g=d.record.name,p=St(Lx(h.params,d.keys.filter(b=>!b.optional).concat(d.parent?d.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),f.params&&Lx(f.params,d.keys.map(b=>b.name))),_=d.stringify(p)}else if(f.path!=null)_=f.path,d=t.find(b=>b.re.test(_)),d&&(p=d.parse(_),g=d.record.name);else{if(d=h.name?i.get(h.name):t.find(b=>b.re.test(h.path)),!d)throw Oa(1,{location:f,currentLocation:h});g=d.record.name,p=St({},h.params,f.params),_=d.stringify(p)}const m=[];let v=d;for(;v;)m.unshift(v.record),v=v.parent;return{name:g,path:_,params:p,matched:m,meta:zV(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 Lx(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Dx(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:BV(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 BV(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 Ox(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function zV(n){return n.reduce((e,t)=>St(e,t.meta),{})}function Nx(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function VV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;Kw(n,e[r])<0?i=r:t=r+1}const s=HV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function HV(n){let e=n;for(;e=e.parent;)if(Zw(e)&&Kw(n,e)===0)return e}function Zw({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function GV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let s=0;sr&&Kg(r)):[i&&Kg(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function WV(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 XV=Symbol(""),Fx=Symbol(""),$d=Symbol(""),j_=Symbol(""),Jg=Symbol("");function hl(){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 fr(n,e,t,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(Oa(4,{from:t,to:e})):h instanceof Error?l(h):RV(h)?l(Oa(2,{from:e,to:h})):(o&&i.enterCallbacks[s]===o&&typeof h=="function"&&o.push(h),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(h=>l(h))})}function wm(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(zw(l)){const u=(l.__vccOpts||l)[e];u&&r.push(fr(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=Zz(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const d=(f.__vccOpts||f)[e];return d&&fr(d,t,i,o,a,s)()}))}}return r}function kx(n){const e=_n($d),t=_n(j_),i=Ee(()=>{const l=Ft(n.to);return e.resolve(l)}),s=Ee(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const h=f.findIndex(Da.bind(null,u));if(h>-1)return h;const d=Bx(l[c-2]);return c>1&&Bx(u)===d&&f[f.length-1].path!==d?f.findIndex(Da.bind(null,l[c-2])):h}),r=Ee(()=>s.value>-1&&KV(t.params,i.value.params)),o=Ee(()=>s.value>-1&&s.value===t.matched.length-1&&$w(t.params,i.value.params));function a(l={}){if(jV(l)){const c=e[Ft(n.replace)?"replace":"push"](Ft(n.to)).catch(Gl);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:Ee(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}function $V(n){return n.length===1?n[0]:n}const qV=hn({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:kx,setup(n,{slots:e}){const t=xi(kx(n)),{options:i}=_n($d),s=Ee(()=>({[zx(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[zx(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&$V(e.default(t));return n.custom?r:ks("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},r)}}}),YV=qV;function jV(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 KV(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 Bx(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const zx=(n,e,t)=>n??e??t,ZV=hn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=_n(Jg),s=Ee(()=>n.route||i.value),r=_n(Fx,0),o=Ee(()=>{let c=Ft(r);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Ee(()=>s.value.matched[o.value]);gr(Fx,Ee(()=>o.value+1)),gr(XV,a),gr(Jg,s);const l=nt();return Ke(()=>[l.value,a.value,n.name],([c,u,f],[h,d,p])=>{u&&(u.instances[f]=c,d&&d!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!Da(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return Vx(t.default,{Component:h,route:c});const d=f.props[u],p=d?d===!0?c.params:typeof d=="function"?d(c):d:null,g=ks(h,St({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Vx(t.default,{Component:g,route:c})||g}}});function Vx(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const Jw=ZV;function JV(n){const e=kV(n.routes,n),t=n.parseQuery||GV,i=n.stringifyQuery||Ux,s=n.history,r=hl(),o=hl(),a=hl(),l=Oe(ir);let c=ir;sa&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Em.bind(null,$=>""+$),f=Em.bind(null,uV),h=Em.bind(null,Sc);function d($,ae){let le,ue;return Yw($)?(le=e.getRecordMatcher($),ue=ae):ue=$,e.addRoute(ue,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=St({},ae||l.value),typeof $=="string"){const A=Tm(t,$,ae.path),W=e.resolve({path:A.path},ae),G=s.createHref(A.fullPath);return St(A,W,{params:h(W.params),hash:Sc(A.hash),redirectedFrom:void 0,href:G})}let le;if($.path!=null)le=St({},$,{path:Tm(t,$.path,ae.path).path});else{const A=St({},$.params);for(const W in A)A[W]==null&&delete A[W];le=St({},$,{params:f(A)}),ae.params=f(ae.params)}const ue=e.resolve(le,ae),$e=$.hash||"";ue.params=u(h(ue.params));const N=dV(i,St({},$,{hash:aV($e),path:ue.path})),U=s.createHref(N);return St({fullPath:N,hash:$e,query:i===Ux?WV($.query):$.query||{}},ue,{redirectedFrom:void 0,href:U})}function v($){return typeof $=="string"?Tm(t,$,l.value.path):St({},$)}function b($,ae){if(c!==$)return Oa(8,{from:ae,to:$})}function y($){return S($)}function T($){return y(St(v($),{replace:!0}))}function w($){const ae=$.matched[$.matched.length-1];if(ae&&ae.redirect){const{redirect:le}=ae;let ue=typeof le=="function"?le($):le;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=v(ue):{path:ue},ue.params={}),St({query:$.query,hash:$.hash,params:ue.path!=null?{}:$.params},ue)}}function S($,ae){const le=c=m($),ue=l.value,$e=$.state,N=$.force,U=$.replace===!0,A=w(le);if(A)return S(St(v(A),{state:typeof A=="object"?St({},$e,A.state):$e,force:N,replace:U}),ae||le);const W=le;W.redirectedFrom=ae;let G;return!N&&pV(i,ue,le)&&(G=Oa(16,{to:W,from:ue}),re(ue,ue,!0,!1)),(G?Promise.resolve(G):E(W,ue)).catch(X=>bs(X)?bs(X,2)?X:Me(X):Z(X,W,ue)).then(X=>{if(X){if(bs(X,2))return S(St({replace:U},v(X.to),{state:typeof X.to=="object"?St({},$e,X.to.state):$e,force:N}),ae||W)}else X=B(W,ue,!0,U,$e);return D(W,ue,X),X})}function P($,ae){const le=b($,ae);return le?Promise.reject(le):Promise.resolve()}function M($){const ae=oe.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext($):$()}function E($,ae){let le;const[ue,$e,N]=QV($,ae);le=wm(ue.reverse(),"beforeRouteLeave",$,ae);for(const A of ue)A.leaveGuards.forEach(W=>{le.push(fr(W,$,ae))});const U=P.bind(null,$,ae);return le.push(U),Se(le).then(()=>{le=[];for(const A of r.list())le.push(fr(A,$,ae));return le.push(U),Se(le)}).then(()=>{le=wm($e,"beforeRouteUpdate",$,ae);for(const A of $e)A.updateGuards.forEach(W=>{le.push(fr(W,$,ae))});return le.push(U),Se(le)}).then(()=>{le=[];for(const A of N)if(A.beforeEnter)if(Vi(A.beforeEnter))for(const W of A.beforeEnter)le.push(fr(W,$,ae));else le.push(fr(A.beforeEnter,$,ae));return le.push(U),Se(le)}).then(()=>($.matched.forEach(A=>A.enterCallbacks={}),le=wm(N,"beforeRouteEnter",$,ae,M),le.push(U),Se(le))).then(()=>{le=[];for(const A of o.list())le.push(fr(A,$,ae));return le.push(U),Se(le)}).catch(A=>bs(A,8)?A:Promise.reject(A))}function D($,ae,le){a.list().forEach(ue=>M(()=>ue($,ae,le)))}function B($,ae,le,ue,$e){const N=b($,ae);if(N)return N;const U=ae===ir,A=sa?history.state:{};le&&(ue||U?s.replace($.fullPath,St({scroll:U&&A&&A.scroll},$e)):s.push($.fullPath,$e)),l.value=$,re($,ae,le,U),Me()}let z;function V(){z||(z=s.listen(($,ae,le)=>{if(!ge.listening)return;const ue=m($),$e=w(ue);if($e){S(St($e,{replace:!0,force:!0}),ue).catch(Gl);return}c=ue;const N=l.value;sa&&MV(Ax(N.fullPath,le.delta),Xd()),E(ue,N).catch(U=>bs(U,12)?U:bs(U,2)?(S(St(v(U.to),{force:!0}),ue).then(A=>{bs(A,20)&&!le.delta&&le.type===Ec.pop&&s.go(-1,!1)}).catch(Gl),Promise.reject()):(le.delta&&s.go(-le.delta,!1),Z(U,ue,N))).then(U=>{U=U||B(ue,N,!1),U&&(le.delta&&!bs(U,8)?s.go(-le.delta,!1):le.type===Ec.pop&&bs(U,20)&&s.go(-1,!1)),D(ue,N,U)}).catch(Gl)}))}let Q=hl(),j=hl(),te;function Z($,ae,le){Me($);const ue=j.list();return ue.length?ue.forEach($e=>$e($,ae,le)):console.error($),Promise.reject($)}function pe(){return te&&l.value!==ir?Promise.resolve():new Promise(($,ae)=>{Q.add([$,ae])})}function Me($){return te||(te=!$,V(),Q.list().forEach(([ae,le])=>$?le($):ae()),Q.reset()),$}function re($,ae,le,ue){const{scrollBehavior:$e}=n;if(!sa||!$e)return Promise.resolve();const N=!le&&SV(Ax($.fullPath,0))||(ue||!le)&&history.state&&history.state.scroll||null;return Ar().then(()=>$e($,ae,N)).then(U=>U&&xV(U)).catch(U=>Z(U,$,ae))}const xe=$=>s.go($);let We;const oe=new Set,ge={currentRoute:l,listening:!0,addRoute:d,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:y,replace:T,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:j.add,isReady:pe,install($){const ae=this;$.component("RouterLink",YV),$.component("RouterView",Jw),$.config.globalProperties.$router=ae,Object.defineProperty($.config.globalProperties,"$route",{enumerable:!0,get:()=>Ft(l)}),sa&&!We&&l.value===ir&&(We=!0,y(s.location).catch($e=>{}));const le={};for(const $e in ir)Object.defineProperty(le,$e,{get:()=>l.value[$e],enumerable:!0});$.provide($d,ae),$.provide(j_,pS(le)),$.provide(Jg,l);const ue=$.unmount;oe.add($),$.unmount=function(){oe.delete($),oe.size<1&&(c=ir,z&&z(),z=null,l.value=ir,We=!1,te=!1),ue()}}};function Se($){return $.reduce((ae,le)=>ae.then(()=>M(le)),Promise.resolve())}return ge}function QV(n,e){const t=[],i=[],s=[],r=Math.max(e.matched.length,n.matched.length);for(let o=0;oDa(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Da(c,l))||s.push(l))}return[t,i,s]}function e6(){return _n($d)}function $G(n){return _n(j_)}const t6=[{path:"/",name:"/",component:()=>je(()=>import("./index-CHEHxPJb.js"),__vite__mapDeps([14,4,5,6,7,8,11,12,13,15,16,17,10,9,18,19,20,21,22,23,24,25,1,2,26,27,28])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>je(()=>import("./_...all_-ZSCTB34-.js"),[])},{path:"/audio",name:"/audio",component:()=>je(()=>import("./audio-DU0_kfqA.js"),[])},{path:"/devtools",children:[{path:"background-remove",name:"/devtools/background-remove",component:()=>je(()=>import("./background-remove-C-QrXCNT.js"),__vite__mapDeps([29,11,12,13,30]))},{path:"chat",name:"/devtools/chat",component:()=>je(()=>import("./chat-mn0JV4Kp.js"),__vite__mapDeps([31,20,10]))},{path:"image",name:"/devtools/image",component:()=>je(()=>import("./image-CibzeZAR.js"),__vite__mapDeps([32,33]))},{path:"vibrant",name:"/devtools/vibrant",component:()=>je(()=>import("./vibrant-C1qAY2sn.js"),__vite__mapDeps([34,11,12,13,30,35]))}]},{path:"/queue",name:"/queue",component:()=>je(()=>import("./queue-Bzd_iRYh.js"),__vite__mapDeps([36,18]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>je(()=>import("./index-Cqc4fKz2.js"),__vite__mapDeps([37,4,5,6,7,8,38,11,12,13,39,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>je(()=>import("./index-aU1mpMhC.js"),__vite__mapDeps([40,6,7,8,21,22,9,10,17,11,12,13,30,41,42,43,4,5,44,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>je(()=>import("./CardDetailDialog-BlSfmRlS.js"),__vite__mapDeps([45,41,42,43,12,4,5,6,7,8,21,22,9,10,17,11,13]))},{path:"CardListItem",name:"/settings/airi-card/components/CardListItem",component:()=>je(()=>import("./CardListItem-D2jkRHPP.js"),__vite__mapDeps([46,44,4,5,6,7,8,11,12,13]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>je(()=>import("./DeleteCardDialog-CzcmecCM.js"),__vite__mapDeps([47,42,43,12]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>je(()=>import("./index-BUHNZNXi.js"),__vite__mapDeps([48,4,5,6,7,8,38,11,12,13,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"color-scheme",name:"/settings/appearance/color-scheme",component:()=>je(()=>import("./color-scheme-DFRftciY.js"),__vite__mapDeps([49,4,5,6,7,8,11,12,13,50,25,23,43,27,51])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"developer",name:"/settings/appearance/developer",component:()=>je(()=>import("./developer-B1AODhAI.js"),__vite__mapDeps([52,6,7,8,53,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"general",name:"/settings/appearance/general",component:()=>je(()=>import("./general-D0FjssBx.js"),__vite__mapDeps([54,6,7,8,53,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>je(()=>import("./index-CKKZXq7c.js"),__vite__mapDeps([55,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>je(()=>import("./index-C9m14O1J.js"),__vite__mapDeps([56,4,5,24,6,7,8,11,12,13,35,39,50,25,23,43,57,27,58])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>je(()=>import("./index-C7BBvJH7.js"),__vite__mapDeps([59,4,5,6,7,8,60,11,12,13,39,57,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>je(()=>import("./consciousness-DTcES_Z6.js"),__vite__mapDeps([61,4,5,6,7,8,22,9,10,11,12,13,62,23,63,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>je(()=>import("./memory-long-term-DKoN_UYI.js"),__vite__mapDeps([64,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>je(()=>import("./memory-short-term-CGF6Nhl6.js"),__vite__mapDeps([65,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>je(()=>import("./speech-BnaLJ2Rn.js"),__vite__mapDeps([66,67,4,5,11,12,13,6,7,8,9,10,17,68,63,69,26,62,23,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>je(()=>import("./index-CsewVBbh.js"),__vite__mapDeps([70,4,5,6,7,8,9,10,60,11,12,13,57,27])),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-AJxwqJ9S.js"),__vite__mapDeps([71,4,5,6,7,8,9,10,17,67,11,12,13,72,73,25,23,68,63,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>je(()=>import("./anthropic-CRbvwdIi.js"),__vite__mapDeps([76,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>je(()=>import("./cloudflare-workers-ai-Nzt67BKJ.js"),__vite__mapDeps([78,4,5,6,7,8,9,10,11,12,13,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>je(()=>import("./deepseek-C4C7ySbq.js"),__vite__mapDeps([79,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>je(()=>import("./elevenlabs-DfWVlghd.js"),__vite__mapDeps([80,4,5,6,7,8,9,10,17,67,11,12,13,72,73,25,23,68,63,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>je(()=>import("./featherless-ai-Abs5j3EH.js"),__vite__mapDeps([81,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>je(()=>import("./fireworks-ai-Cgaz7mYL.js"),__vite__mapDeps([82,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>je(()=>import("./google-generative-ai-Cvwii5l7.js"),__vite__mapDeps([83,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>je(()=>import("./microsoft-speech-BLOCaluL.js"),__vite__mapDeps([84,4,5,6,7,8,9,10,17,68,63,67,11,12,13,72,73,25,23,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>je(()=>import("./mistral-ai-jouO5dmJ.js"),__vite__mapDeps([85,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>je(()=>import("./moonshot-ai-DZvpNZty.js"),__vite__mapDeps([86,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>je(()=>import("./novita-ai-Bh1E0rHc.js"),__vite__mapDeps([87,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"ollama",name:"/settings/providers/ollama",component:()=>je(()=>import("./ollama-r0UZT5nG.js"),__vite__mapDeps([88,4,5,6,7,8,9,10,63,11,12,13,73,25,23,68,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openai",name:"/settings/providers/openai",component:()=>je(()=>import("./openai-XNIcWilW.js"),__vite__mapDeps([89,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>je(()=>import("./openrouter-ai-CTdWmhtc.js"),__vite__mapDeps([90,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>je(()=>import("./together-ai-No2aAYf3.js"),__vite__mapDeps([91,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"volcengine",name:"/settings/providers/volcengine",component:()=>je(()=>import("./volcengine-BRelq9N_.js"),__vite__mapDeps([92,4,5,6,7,8,9,10,17,68,63,67,11,12,13,72,73,25,23,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"xai",name:"/settings/providers/xai",component:()=>je(()=>import("./xai-CoTXxIZ1.js"),__vite__mapDeps([93,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"scene",children:[{path:"",name:"/settings/scene/",component:()=>je(()=>import("./index-ebacZR9F.js"),__vite__mapDeps([94,57,6,7,8,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>je(()=>import("./filter-message-BA3h9Pac.js"),__vite__mapDeps([95,11,12,13,69,26]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>je(()=>import("./delays-WpVM8VPm.js"),__vite__mapDeps([96,6,19,7,18,11,12,13,69,26]))},{path:"emotions",name:"/test/queues/emotions",component:()=>je(()=>import("./emotions-D8xwaz_1.js"),__vite__mapDeps([97,18,19,7,11,12,13,69,26]))},{path:"messages",name:"/test/queues/messages",component:()=>je(()=>import("./messages-DjywpylS.js"),__vite__mapDeps([98,18,19,7,11,12,13,69,26]))}]}]}],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}}},n6={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},i6=n=>Qw(n6[n.toLowerCase()],6),s6=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,r6=n=>{let e;return(e=n.match(s6))?Qw(parseInt(e[1],16),e[1].length):void 0},_r="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Xl=`${_r}%`,K_=`(?:${_r}%|${_r})`,o6=`(?:${_r}(deg|grad|rad|turn)|${_r})`,Na="\\s*,\\s*",a6=new RegExp(`^rgba?\\(\\s*${_r}${Na}${_r}${Na}${_r}\\s*(?:,\\s*${K_}\\s*)?\\)$`),l6=new RegExp(`^rgba?\\(\\s*${Xl}${Na}${Xl}${Na}${Xl}\\s*(?:,\\s*${K_}\\s*)?\\)$`),c6=n=>{let e={mode:"rgb"},t;if(t=n.match(a6))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(l6))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},u6=(n,e)=>n===void 0?void 0:typeof n!="object"?b6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,eA=(n="rgb")=>e=>(e=u6(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={},tA={},Oh=[],nA={},f6=n=>n,Tt=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=f6)}),tA[n.mode]=n,(n.parse||[]).forEach(e=>{d6(e,n.mode)}),eA(n.mode)),h6=n=>tA[n],d6=(n,e)=>{if(typeof n=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");nA[n]=e}else typeof n=="function"&&Oh.indexOf(n)<0&&Oh.push(n)},Qg=/[^\x00-\x7F]|[a-zA-Z_]/,p6=/[^\x00-\x7F]|[-\w]/,ye={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let Ze=0;function ff(n){let e=n[Ze],t=n[Ze+1];return e==="-"||e==="+"?/\d/.test(t)||t==="."&&/\d/.test(n[Ze+2]):e==="."?/\d/.test(t):/\d/.test(e)}function e0(n){if(Ze>=n.length)return!1;let e=n[Ze];if(Qg.test(e))return!0;if(e==="-"){if(n.length-Ze<2)return!1;let t=n[Ze+1];return!!(t==="-"||Qg.test(t))}return!1}const m6={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function dl(n){let e="";if((n[Ze]==="-"||n[Ze]==="+")&&(e+=n[Ze++]),e+=hf(n),n[Ze]==="."&&/\d/.test(n[Ze+1])&&(e+=n[Ze++]+hf(n)),(n[Ze]==="e"||n[Ze]==="E")&&((n[Ze+1]==="-"||n[Ze+1]==="+")&&/\d/.test(n[Ze+2])?e+=n[Ze++]+n[Ze++]+hf(n):/\d/.test(n[Ze+1])&&(e+=n[Ze++]+hf(n))),e0(n)){let t=Nh(n);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:ye.Hue,value:e*m6[t]}:void 0}return n[Ze]==="%"?(Ze++,{type:ye.Percentage,value:+e}):{type:ye.Number,value:+e}}function hf(n){let e="";for(;/\d/.test(n[Ze]);)e+=n[Ze++];return e}function Nh(n){let e="";for(;Ze4)){if(t.length===4){if(t[3].type!==ye.Alpha)return;t[3]=t[3].value}return t.length===3&&t.push({type:ye.None,value:void 0}),t.every(s=>s.type!==ye.Alpha)?t:void 0}}function y6(n,e){n._i=0;let t=n[n._i++];if(!t||t.type!==ye.Function)return;let i=iA(n,e);if(i)return i.unshift(t.value),i}const b6=n=>{if(typeof n!="string")return;const e=_6(n),t=e?y6(e,!0):void 0;let i,s=0,r=Oh.length;for(;sn==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,S6=(n,e,t)=>n+t*(e-n),E6=n=>{let e=[];for(let t=0;te=>{let t=E6(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)}},Ce=T6(S6),an=n=>{let e=!1,t=n.map(i=>i!==void 0?(e=!0,i):1);return e?t:n},$a={mode:"rgb",channels:["r","g","b","alpha"],parse:[x6,r6,c6,i6,M6,"srgb"],serialize:"srgb",interpolate:{r:Ce,g:Ce,b:Ce,alpha:{use:Ce,fixup:an}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Am=(n=0)=>Math.pow(Math.abs(n),563/256)*Math.sign(n),Hx=n=>{let e=Am(n.r),t=Am(n.g),i=Am(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},Cm=n=>Math.pow(Math.abs(n),256/563)*Math.sign(n),Gx=({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:Cm(n*2.0415879038107465-e*.5650069742788597-.3447313507783297*t),g:Cm(n*-.9692436362808798+e*1.8759675015077206+.0415550574071756*t),b:Cm(n*.0134442806320312-e*.1183623922310184+1.0151749943912058*t)};return i!==void 0&&(s.alpha=i),s},Rm=(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)},qa=({r:n,g:e,b:t,alpha:i})=>{let s={mode:"lrgb",r:Rm(n),g:Rm(e),b:Rm(t)};return i!==void 0&&(s.alpha=i),s},Do=n=>{let{r:e,g:t,b:i,alpha:s}=qa(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},Pm=(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},Ya=({r:n,g:e,b:t,alpha:i},s="rgb")=>{let r={mode:s,r:Pm(n),g:Pm(e),b:Pm(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=Ya({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},w6={...$a,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:n=>Gx(Do(n)),xyz65:Gx},toMode:{rgb:n=>Oo(Hx(n)),xyz65:Hx}},xn=n=>(n=n%360)<0?n+360:n,A6=(n,e)=>n.map((t,i,s)=>{if(t===void 0)return t;let r=xn(t);return i===0||n[i-1]===void 0?r:e(r-xn(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),[]),qs=n=>A6(n,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),cn=[-.14861,1.78277,-.29227,-.90649,1.97294,0],C6=Math.PI/180,R6=180/Math.PI;let Wx=cn[3]*cn[4],Xx=cn[1]*cn[4],$x=cn[1]*cn[2]-cn[0]*cn[3];const P6=({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=($x*t+n*Wx-e*Xx)/($x+Wx-Xx),r=t-s,o=(cn[4]*(e-s)-cn[2]*r)/cn[3],a={mode:"cubehelix",l:s,s:s===0||s===1?void 0:Math.sqrt(r*r+o*o)/(cn[4]*s*(1-s))};return a.s&&(a.h=Math.atan2(o,r)*R6-120),i!==void 0&&(a.alpha=i),a},I6=({h:n,s:e,l:t,alpha:i})=>{let s={mode:"rgb"};n=(n===void 0?0:n+120)*C6,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*(cn[0]*o+cn[1]*a),s.g=t+r*(cn[2]*o+cn[3]*a),s.b=t+r*(cn[4]*o+cn[5]*a),i!==void 0&&(s.alpha=i),s},qd=(n,e)=>{if(n.h===void 0||e.h===void 0||!n.s||!e.s)return 0;let t=xn(n.h),i=xn(e.h),s=Math.sin((i-t+360)/2*Math.PI/180);return 2*Math.sqrt(n.s*e.s)*s},L6=(n,e)=>{if(n.h===void 0||e.h===void 0)return 0;let t=xn(n.h),i=xn(e.h);return Math.abs(i-t)>180?t-(i-360*Math.sign(i-t)):i-t},Yd=(n,e)=>{if(n.h===void 0||e.h===void 0||!n.c||!e.c)return 0;let t=xn(n.h),i=xn(e.h),s=Math.sin((i-t+360)/2*Math.PI/180);return 2*Math.sqrt(n.c*e.c)*s},Ys=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},D6={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:P6},toMode:{rgb:I6},interpolate:{h:{use:Ce,fixup:qs},s:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:qd},average:{h:Ys}},Tr=({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=xn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(o.alpha=i),o},wr=({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},sA=Math.pow(29,3)/Math.pow(3,3),rA=Math.pow(6,3)/Math.pow(29,3),en={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},ya={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Im=n=>Math.pow(n,3)>rA?Math.pow(n,3):(116*n-16)/sA;const oA=({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:Im(r)*ya.X,y:Im(s)*ya.Y,z:Im(o)*ya.Z};return i!==void 0&&(a.alpha=i),a},jd=n=>Oo(oA(n)),Lm=n=>n>rA?Math.cbrt(n):(sA*n+16)/116,aA=({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=Lm(n/ya.X),r=Lm(e/ya.Y),o=Lm(t/ya.Z),a={mode:"lab65",l:116*r-16,a:500*(s-r),b:200*(r-o)};return i!==void 0&&(a.alpha=i),a},Kd=n=>{let e=aA(Do(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},Uh=1,lA=1,Tc=26/180*Math.PI,Fh=Math.cos(Tc),kh=Math.sin(Tc),cA=100/Math.log(139/100),t0=({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*Uh/cA)-1)/.0039},r=(Math.exp(.0435*e*lA*Uh)-1)/.075,o=r*Math.cos(t/180*Math.PI-Tc),a=r*Math.sin(t/180*Math.PI-Tc);return s.a=o*Fh-a/.83*kh,s.b=o*kh+a/.83*Fh,i!==void 0&&(s.alpha=i),s},n0=({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*Fh+t*kh,r=.83*(t*Fh-e*kh),o=Math.sqrt(s*s+r*r),a={mode:"dlch",l:cA/Uh*Math.log(1+.0039*n),c:Math.log(1+.075*o)/(.0435*lA*Uh)};return a.c&&(a.h=xn((Math.atan2(r,s)+Tc)/Math.PI*180)),i!==void 0&&(a.alpha=i),a},qx=n=>t0(Tr(n,"dlch")),Yx=n=>wr(n0(n),"dlab"),O6={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:qx,rgb:n=>jd(qx(n))},fromMode:{lab65:Yx,rgb:n=>Yx(Kd(n))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ce,a:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},N6={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:t0,dlab:n=>wr(n,"dlab"),rgb:n=>jd(t0(n))},fromMode:{lab65:n0,dlab:n=>Tr(n,"dlch"),rgb:n=>n0(Kd(n))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ce,c:Ce,h:{use:Ce,fixup:qs},alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}};function U6({h:n,s:e,i:t,alpha:i}){n=xn(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 F6({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}},H6=new RegExp(`^hsla?\\(\\s*${o6}${Na}${Xl}${Na}${Xl}\\s*(?:,\\s*${K_}\\s*)?\\)$`),G6=n=>{let e=n.match(H6);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=V6(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 W6(n,e){if(!e||e[0]!=="hsl"&&e[0]!=="hsla")return;const t={mode:"hsl"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Percentage)return;t.h=i.value}if(s.type!==ye.None){if(s.type===ye.Hue)return;t.s=s.value/100}if(r.type!==ye.None){if(r.type===ye.Hue)return;t.l=r.value/100}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const uA={mode:"hsl",toMode:{rgb:B6},fromMode:{rgb:z6},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[W6,G6],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:Ce,fixup:qs},s:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:qd},average:{h:Ys}};function fA({h:n,s:e,v:t,alpha:i}){n=xn(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 hA({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 fA({h:n,s:t===1?1:1-e/(1-t),v:1-t,alpha:i})}function $6(n){let e=hA(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 q6(n,e){if(!e||e[0]!=="hwb")return;const t={mode:"hwb"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Percentage)return;t.h=i.value}if(s.type!==ye.None){if(s.type===ye.Hue)return;t.w=s.value/100}if(r.type!==ye.None){if(r.type===ye.Hue)return;t.b=r.value/100}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const Y6={mode:"hwb",toMode:{rgb:X6},fromMode:{rgb:$6},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[q6],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:Ce,fixup:qs},w:Ce,b:Ce,alpha:{use:Ce,fixup:an}},difference:{h:L6},average:{h:Ys}},pA=203,Zd=.1593017578125,mA=78.84375,Jd=.8359375,Qd=18.8515625,ep=18.6875;function Dm(n){if(n<0)return 0;const e=Math.pow(n,1/mA);return 1e4*Math.pow(Math.max(0,e-Jd)/(Qd-ep*e),1/Zd)}function Om(n){if(n<0)return 0;const e=Math.pow(n/1e4,Zd);return Math.pow((Jd+Qd*e)/(1+ep*e),mA)}const Nm=n=>Math.max(n/pA,0),jx=({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=Dm(n+.008609037037932761*e+.11102962500302593*t),r=Dm(n-.00860903703793275*e-.11102962500302599*t),o=Dm(n+.5600313357106791*e-.32062717498731885*t),a={mode:"xyz65",x:Nm(2.070152218389422*s-1.3263473389671556*r+.2066510476294051*o),y:Nm(.3647385209748074*s+.680566024947227*r-.0453045459220346*o),z:Nm(-.049747207535812*s-.0492609666966138*r+1.1880659249923042*o)};return i!==void 0&&(a.alpha=i),a},Um=(n=0)=>Math.max(n*pA,0),Kx=({x:n,y:e,z:t,alpha:i})=>{const s=Um(n),r=Um(e),o=Um(t),a=Om(.3592832590121217*s+.6976051147779502*r-.0358915932320289*o),l=Om(-.1920808463704995*s+1.1004767970374323*r+.0753748658519118*o),c=Om(.0070797844607477*s+.0748396662186366*r+.8433265453898765*o),u=.5*a+.5*l,f=1.61376953125*a-3.323486328125*l+1.709716796875*c,h=4.378173828125*a-4.24560546875*l-.132568359375*c,d={mode:"itp",i:u,t:f,p:h};return i!==void 0&&(d.alpha=i),d},j6={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:jx,rgb:n=>Oo(jx(n))},fromMode:{xyz65:Kx,rgb:n=>Kx(Do(n))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ce,t:Ce,p:Ce,alpha:{use:Ce,fixup:an}}},K6=134.03437499999998,Z6=16295499532821565e-27,Fm=n=>{if(n<0)return 0;let e=Math.pow(n/1e4,Zd);return Math.pow((Jd+Qd*e)/(1+ep*e),K6)},km=(n=0)=>Math.max(n*203,0),gA=({x:n,y:e,z:t,alpha:i})=>{n=km(n),e=km(e),t=km(t);let s=1.15*n-.15*t,r=.66*e+.34*n,o=Fm(.41478972*s+.579999*r+.014648*t),a=Fm(-.20151*s+1.120649*r+.0531008*t),l=Fm(-.0166008*s+.2648*r+.6684799*t),c=(o+a)/2,u={mode:"jab",j:.44*c/(1-.56*c)-Z6,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},J6=134.03437499999998,Zx=16295499532821565e-27,Bm=n=>{if(n<0)return 0;let e=Math.pow(n,1/J6);return 1e4*Math.pow((Jd-e)/(ep*e-Qd),1/Zd)},zm=n=>n/203,_A=({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+Zx)/(.44+.56*(n+Zx)),r=Bm(s+.13860504*e+.058047316*t),o=Bm(s-.13860504*e-.058047316*t),a=Bm(s-.096019242*e-.8118919*t),l={mode:"xyz65",x:zm(1.661373024652174*r-.914523081304348*o+.23136208173913045*a),y:zm(-.3250758611844533*r+1.571847026732543*o-.21825383453227928*a),z:zm(-.090982811*r-.31272829*o+1.5227666*a)};return i!==void 0&&(l.alpha=i),l},vA=n=>{let e=gA(Do(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},yA=n=>Oo(_A(n)),Q6={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:vA,xyz65:gA},toMode:{rgb:yA,xyz65:_A},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ce,a:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},Jx=({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=xn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(r.alpha=i),r},Qx=({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},eH={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Qx,rgb:n=>yA(Qx(n))},fromMode:{rgb:n=>Jx(vA(n)),jab:Jx},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ce,fixup:qs},c:Ce,j:Ce,alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}},tp=Math.pow(29,3)/Math.pow(3,3),Z_=Math.pow(6,3)/Math.pow(29,3);let Vm=n=>Math.pow(n,3)>Z_?Math.pow(n,3):(116*n-16)/tp;const J_=({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:Vm(r)*en.X,y:Vm(s)*en.Y,z:Vm(o)*en.Z};return i!==void 0&&(a.alpha=i),a},Qc=({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=Ya({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},bA=n=>Qc(J_(n)),eu=n=>{let{r:e,g:t,b:i,alpha:s}=qa(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},Hm=n=>n>Z_?Math.cbrt(n):(tp*n+16)/116,Q_=({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=Hm(n/en.X),r=Hm(e/en.Y),o=Hm(t/en.Z),a={mode:"lab",l:116*r-16,a:500*(s-r),b:200*(r-o)};return i!==void 0&&(a.alpha=i),a},xA=n=>{let e=Q_(eu(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e};function tH(n,e){if(!e||e[0]!=="lab")return;const t={mode:"lab"},[,i,s,r,o]=e;if(!(i.type===ye.Hue||s.type===ye.Hue||r.type===ye.Hue))return i.type!==ye.None&&(t.l=Math.min(Math.max(0,i.value),100)),s.type!==ye.None&&(t.a=s.type===ye.Number?s.value:s.value*125/100),r.type!==ye.None&&(t.b=r.type===ye.Number?r.value:r.value*125/100),o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const ev={mode:"lab",toMode:{xyz50:J_,rgb:bA},fromMode:{xyz50:Q_,rgb:xA},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[tH],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:Ce,a:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},nH={...ev,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:oA,rgb:jd},fromMode:{xyz65:aA,rgb:Kd},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function iH(n,e){if(!e||e[0]!=="lch")return;const t={mode:"lch"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Hue)return;t.l=Math.min(Math.max(0,i.value),100)}if(s.type!==ye.None&&(t.c=Math.max(0,s.type===ye.Number?s.value:s.value*150/100)),r.type!==ye.None){if(r.type===ye.Percentage)return;t.h=r.value}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const tv={mode:"lch",toMode:{lab:wr,rgb:n=>bA(wr(n))},fromMode:{rgb:n=>Tr(xA(n)),lab:Tr},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[iH],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:Ce,fixup:qs},c:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}},sH={...tv,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:n=>wr(n,"lab65"),rgb:n=>jd(wr(n,"lab65"))},fromMode:{rgb:n=>Tr(Kd(n),"lch65"),lab65:n=>Tr(n,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}},MA=({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=xn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(r.alpha=i),r},SA=({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},EA=(n,e,t)=>4*n/(n+15*e+3*t),TA=(n,e,t)=>9*e/(n+15*e+3*t),rH=EA(en.X,en.Y,en.Z),oH=TA(en.X,en.Y,en.Z),aH=n=>n<=Z_?tp*n:116*Math.cbrt(n)-16,i0=({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=aH(e/en.Y),r=EA(n,e,t),o=TA(n,e,t);!isFinite(r)||!isFinite(o)?s=r=o=0:(r=13*s*(r-rH),o=13*s*(o-oH));let a={mode:"luv",l:s,u:r,v:o};return i!==void 0&&(a.alpha=i),a},lH=(n,e,t)=>4*n/(n+15*e+3*t),cH=(n,e,t)=>9*e/(n+15*e+3*t),uH=lH(en.X,en.Y,en.Z),fH=cH(en.X,en.Y,en.Z),s0=({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)+uH,r=t/(13*n)+fH,o=en.Y*(n<=8?n/tp: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},hH=n=>MA(i0(eu(n))),dH=n=>Qc(s0(SA(n))),pH={mode:"lchuv",toMode:{luv:SA,rgb:dH},fromMode:{rgb:hH,luv:MA},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Ce,fixup:qs},c:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}},mH={...$a,mode:"lrgb",toMode:{rgb:Ya},fromMode:{rgb:qa},parse:["srgb-linear"],serialize:"srgb-linear"},gH={mode:"luv",toMode:{xyz50:s0,rgb:n=>Qc(s0(n))},fromMode:{xyz50:i0,rgb:n=>i0(eu(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:Ce,u:Ce,v:Ce,alpha:{use:Ce,fixup:an}}},wA=({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},np=n=>{let e=wA(qa(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},tu=({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},ip=n=>Ya(tu(n));function r0(n){const i=1.170873786407767;return .5*(i*n-.206+Math.sqrt((i*n-.206)*(i*n-.206)+4*.03*i*n))}function Bh(n){return(n*n+.206*n)/(1.170873786407767*(n+.03))}function _H(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,h=-.1055613458*n-.0638541728*e,d=-.0894841775*n-1.291485548*e;{let p=1+u*f,_=1+u*h,g=1+u*d,m=p*p*p,v=_*_*_,b=g*g*g,y=3*f*p*p,T=3*h*_*_,w=3*d*g*g,S=6*f*f*p,P=6*h*h*_,M=6*d*d*g,E=a*m+l*v+c*b,D=a*y+l*T+c*w,B=a*S+l*P+c*M;u=u-E*D/(D*D-.5*E*B)}return u}function nv(n,e){let t=_H(n,e),i=tu({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 vH(n,e,t,i,s,r=null){r||(r=nv(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,h=a+l*c,d=a+l*u,p=a+l*f;{let _=s*(1-o)+o*t,g=o*i,m=_+g*c,v=_+g*u,b=_+g*f,y=m*m*m,T=v*v*v,w=b*b*b,S=3*h*m*m,P=3*d*v*v,M=3*p*b*b,E=6*h*h*m,D=6*d*d*v,B=6*p*p*b,z=4.0767416621*y-3.3077115913*T+.2309699292*w-1,V=4.0767416621*S-3.3077115913*P+.2309699292*M,Q=4.0767416621*E-3.3077115913*D+.2309699292*B,j=V/(V*V-.5*z*Q),te=-z*j,Z=-1.2684380046*y+2.6097574011*T-.3413193965*w-1,pe=-1.2684380046*S+2.6097574011*P-.3413193965*M,Me=-1.2684380046*E+2.6097574011*D-.3413193965*B,re=pe/(pe*pe-.5*Z*Me),xe=-Z*re,We=-.0041960863*y-.7034186147*T+1.707614701*w-1,oe=-.0041960863*S-.7034186147*P+1.707614701*M,ge=-.0041960863*E-.7034186147*D+1.707614701*B,Se=oe/(oe*oe-.5*We*ge),$=-We*Se;te=j>=0?te:1e6,xe=re>=0?xe:1e6,$=Se>=0?$:1e6,o+=Math.min(te,Math.min(xe,$))}}}return o}function iv(n,e,t=null){t||(t=nv(n,e));let i=t[0],s=t[1];return[s/i,s/(1-i)]}function AA(n,e,t){let i=nv(e,t),s=vH(e,t,n,1,n,i),r=iv(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 eM(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:r0(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]=AA(e,t/r,i/r),c;if(reM(np(n))},toMode:{oklab:tM,rgb:n=>ip(tM(n))}};function nM(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]=iv(r,o),c=.5,u=1-c/a,f=l/(s+e*l),h=f*e,d=f*s,p=Bh(h),_=d*p/h,g=tu({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*r0(e)/e,e=r0(e);const v={mode:"okhsv",s:s?(c+l)*d/(l*c+l*u*d):0,v:e?e/h:0};return v.s&&(v.h=xn(Math.atan2(i,t)*180/Math.PI)),n.alpha!==void 0&&(v.alpha=n.alpha),v}function iM(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]=iv(r,o),c=.5,u=1-c/a,f=1-i*c/(c+l-l*u*i),h=i*l*c/(c+l-l*u*i),d=Bh(f),p=h*d/f,_=tu({l:d,a:r*p,b:o*p}),g=Math.cbrt(1/Math.max(_.r,_.g,_.b,0)),m=Bh(s*f),v=h*m/f;return e.l=m*g,e.a=v*r*g,e.b=v*o*g,e}const bH={...dA,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:nM,rgb:n=>nM(np(n))},toMode:{oklab:iM,rgb:n=>ip(iM(n))}};function xH(n,e){if(!e||e[0]!=="oklab")return;const t={mode:"oklab"},[,i,s,r,o]=e;if(!(i.type===ye.Hue||s.type===ye.Hue||r.type===ye.Hue))return i.type!==ye.None&&(t.l=Math.min(Math.max(0,i.type===ye.Number?i.value:i.value/100),1)),s.type!==ye.None&&(t.a=s.type===ye.Number?s.value:s.value*.4/100),r.type!==ye.None&&(t.b=r.type===ye.Number?r.value:r.value*.4/100),o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const MH={...ev,mode:"oklab",toMode:{lrgb:tu,rgb:ip},fromMode:{lrgb:wA,rgb:np},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[xH],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 SH(n,e){if(!e||e[0]!=="oklch")return;const t={mode:"oklch"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Hue)return;t.l=Math.min(Math.max(0,i.type===ye.Number?i.value:i.value/100),1)}if(s.type!==ye.None&&(t.c=Math.max(0,s.type===ye.Number?s.value:s.value*.4/100)),r.type!==ye.None){if(r.type===ye.Percentage)return;t.h=r.value}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const EH={...tv,mode:"oklch",toMode:{oklab:n=>wr(n,"oklab"),rgb:n=>ip(wr(n,"oklab"))},fromMode:{rgb:n=>Tr(np(n),"oklch"),oklab:n=>Tr(n,"oklch")},parse:[SH],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]}},sM=n=>{let{r:e,g:t,b:i,alpha:s}=qa(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},rM=({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=Ya({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},TH={...$a,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:n=>rM(Do(n)),xyz65:rM},toMode:{rgb:n=>Oo(sM(n)),xyz65:sM}},Gm=n=>{let e=Math.abs(n);return e>=1/512?Math.sign(n)*Math.pow(e,1/1.8):16*n},oM=({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:Gm(n*1.3457868816471585-e*.2555720873797946-.0511018649755453*t),g:Gm(n*-.5446307051249019+e*1.5082477428451466+.0205274474364214*t),b:Gm(n*0+e*0+1.2119675456389452*t)};return i!==void 0&&(s.alpha=i),s},Wm=(n=0)=>{let e=Math.abs(n);return e>=16/512?Math.sign(n)*Math.pow(e,1.8):n/16},aM=n=>{let e=Wm(n.r),t=Wm(n.g),i=Wm(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},wH={...$a,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:oM,rgb:n=>oM(eu(n))},toMode:{xyz50:aM,rgb:n=>Qc(aM(n))}},lM=1.09929682680944,AH=.018053968510807,Xm=n=>{const e=Math.abs(n);return e>AH?(Math.sign(n)||1)*(lM*Math.pow(e,.45)-(lM-1)):4.5*n},cM=({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:Xm(n*1.7166511879712683-e*.3556707837763925-.2533662813736599*t),g:Xm(n*-.6666843518324893+e*1.6164812366349395+.0157685458139111*t),b:Xm(n*.0176398574453108-e*.0427706132578085+.9421031212354739*t)};return i!==void 0&&(s.alpha=i),s},uM=1.09929682680944,CH=.018053968510807,$m=(n=0)=>{let e=Math.abs(n);return e{let e=$m(n.r),t=$m(n.g),i=$m(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},RH={...$a,mode:"rec2020",fromMode:{xyz65:cM,rgb:n=>cM(Do(n))},toMode:{xyz65:fM,rgb:n=>Oo(fM(n))},parse:["rec2020"],serialize:"rec2020"},bo=.0037930732552754493,CA=Math.cbrt(bo),qm=n=>Math.cbrt(n)-CA,PH=n=>{const{r:e,g:t,b:i,alpha:s}=qa(n),r=qm(.3*e+.622*t+.078*i+bo),o=qm(.23*e+.692*t+.078*i+bo),a=qm(.2434226892454782*e+.2047674442449682*t+.5518098665095535*i+bo),l={mode:"xyb",x:(r-o)/2,y:(r+o)/2,b:a-(r+o)/2};return s!==void 0&&(l.alpha=s),l},Ym=n=>Math.pow(n+CA,3),IH=({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=Ym(n+e)-bo,r=Ym(e-n)-bo,o=Ym(t+e)-bo,a=Ya({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},LH={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:IH},fromMode:{rgb:PH},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ce,y:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},DH={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Qc,lab:Q_},fromMode:{rgb:eu,lab:J_},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ce,y:Ce,z:Ce,alpha:{use:Ce,fixup:an}}},OH=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},NH=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},UH={mode:"xyz65",toMode:{rgb:Oo,xyz50:OH},fromMode:{rgb:Do,xyz50:NH},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:Ce,y:Ce,z:Ce,alpha:{use:Ce,fixup:an}}},FH=({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},kH=({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},BH={mode:"yiq",toMode:{rgb:kH},fromMode:{rgb:FH},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ce,i:Ce,q:Ce,alpha:{use:Ce,fixup:an}}};Tt(w6);Tt(D6);Tt(O6);Tt(N6);Tt(k6);Tt(uA);Tt(dA);Tt(Y6);Tt(j6);Tt(Q6);Tt(eH);Tt(ev);Tt(nH);Tt(tv);Tt(sH);Tt(pH);Tt(mH);Tt(gH);Tt(yH);Tt(bH);Tt(MH);Tt(EH);Tt(TH);Tt(wH);Tt(RH);Tt($a);Tt(LH);Tt(DH);Tt(UH);Tt(BH);const o0=220.44,zH=eA("oklch"),hM=n=>{var e;return n?(e=zH(n))==null?void 0:e.h:o0},VH=Yz("settings",()=>{const n=nt(),e=ys("settings/language","en-US"),t=ys("settings/stage/view/model-renderer","2d"),i=ys("settings/audio/input","false"),s=Ee(()=>{var w;return(w=n.value)==null?void 0:w.deviceId}),{audioInputs:r,ensurePermissions:o}=ZB({constraints:{audio:!0}}),a=nt(),l=nt("/assets/live2d/models/hiyori_pro_zh.zip"),c=nt("url"),u=nt(!1),f=ys("settings/live2d/position",{x:0,y:0}),h=nt({group:"Idle",index:0}),d=nt([]),p=ys("settings/live2d/motion-map",{}),_=ys("settings/disable-transitions",!0),g=ys("settings/use-page-specific-transitions",!0),m=ys("settings/theme/colors/hue",o0),v=ys("settings/theme/colors/hue-dynamic",!1);function b(w=o0){m.value=w,v.value=!1}function y(w){b(hM(w))}function T(w){if(v.value)return!1;const S=hM(w);if(!S)return!1;const P=Math.abs(S-m.value);return P<.01||P>359.99}return Ke(i,w=>{w==="false"&&(n.value=void 0),w==="true"&&o().then(()=>{n.value=r.value[0]})}),Ke(r,()=>{i.value==="true"&&!n.value&&(n.value=r.value[0])},{immediate:!0}),{live2dModelFile:a,live2dModelUrl:l,live2dLoadSource:c,live2dCurrentMotion:h,live2dPosition:f,availableLive2dMotions:d,live2dMotionMap:p,loadingLive2dModel:u,disableTransitions:_,usePageSpecificTransitions:g,language:e,stageView:t,themeColorsHue:m,themeColorsHueDynamic:v,isAudioInputOn:i,selectedAudioDevice:n,selectedAudioDeviceId:s,setThemeColorsHue:b,applyPrimaryColorFrom:y,isColorSelectedForPrimary:T}}),HH=hn({__name:"ArrowTransition",props:{stageTransition:{default:()=>({primaryColor:"#666",secondaryColor:"#ccc"})}},setup(n){const e=n,t=Ee(()=>e.stageTransition),i=Ee(()=>t.value.primaryColor||"#666"),s=Ee(()=>t.value.secondaryColor||"#ccc");return Gn(()=>{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)=>(vn(),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},GH=No(HH,[["__scopeId","data-v-df576df0"]]),WH=hn({__name:"BubbleWaveOutTransition",props:{stageTransition:null},setup(n){const e=n,t=Ee(()=>{var i;return((i=e.stageTransition)==null?void 0:i.colors)||["#eee","#ebcb8b","#c56370","#3f3b52"]});return Gn(()=>{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 vn(),yi("div",{class:"circle-expansion-transition",style:Si({zIndex:((r=n.stageTransition)==null?void 0:r.zIndex)||100})},[(vn(!0),yi(Zt,null,v2(t.value,(o,a)=>(vn(),yi("div",{key:a}))),128))],4)}}}),XH=No(WH,[["__scopeId","data-v-0c29056c"]]),$H=hn({__name:"FantasyFallTransition",props:{stageTransition:null},setup(n){const e=n,t=Ee(()=>{var s;return((s=e.stageTransition)==null?void 0:s.direction)||"up"}),i=Ee(()=>`fantasy-fall-${t.value}`);return Gn(()=>{var s,r,o,a,l,c,u,f,h;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",`${((h=(f=e.stageTransition)==null?void 0:f.borderRadius)==null?void 0:h.lg)||"50%"}`)}),(s,r)=>{var o;return vn(),yi("div",{class:ka(["fantasy-fall-transition",i.value]),style:Si({zIndex:((o=n.stageTransition)==null?void 0:o.zIndex)??100})},null,6)}}}),qH=No($H,[["__scopeId","data-v-e62bf496"]]),YH=hn({__name:"MultipleBlocksRevealTransition",props:{stageTransition:null},setup(n){const e=n,t=Ee(()=>e.stageTransition),i=Ee(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)||"#666"}),s=Ee(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)||"#ccc"});return Gn(()=>{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 vn(),yi("div",{class:"stage-transition-4",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},o[0]||(o[0]=[Z2('
',5)]),4)}}}),jH=No(YH,[["__scopeId","data-v-6d1179fc"]]),KH=hn({__name:"SlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Ee(()=>e.stageTransition),i=Ee(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)||"#666"}),s=Ee(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)||"#ccc"});return Ke([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)}),Gn(()=>{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 vn(),yi("div",{class:"stage-transition-1",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),ZH=No(KH,[["__scopeId","data-v-bf1d1566"]]),JH=hn({__name:"SlopeSlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Ee(()=>e.stageTransition),i=Ee(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)??"#666"}),s=Ee(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)??"#ccc"});return Gn(()=>{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 vn(),yi("div",{class:"stage-transition-2",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),QH=No(JH,[["__scopeId","data-v-8ff7120f"]]),e8=hn({__name:"RectanglesRotateTransition",props:{stageTransition:null},setup(n){const e=n;return Gn(()=>{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 vn(),yi("div",{class:"rectangle-rotate-transition",style:Si({zIndex:((s=n.stageTransition)==null?void 0:s.zIndex)??100})},i[0]||(i[0]=[lr("div",{class:"rectangle rectangle-rotate-1"},[lr("div")],-1),lr("div",{class:"rectangle rectangle-rotate-2"},[lr("div")],-1),lr("div",{class:"rectangle rectangle-rotate-3"},[lr("div")],-1)]),4)}}}),t8=No(e8,[["__scopeId","data-v-f4b1dc64"]]),n8=hn({__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=e6(),i=nt(!1),s=nt(),r=nt(""),o=nt(),a=Oe({slide:{component:ZH,duration:2700},"slope-slide":{component:QH,duration:2700},arrow:{component:GH,duration:2700},"multiple-blocks-reveal":{component:jH,duration:2800},"fantasy-fall":{component:qH,duration:2700},"rectangles-rotate":{component:t8,duration:2700},"bubble-wave-out":{component:XH,duration:1e3}}),l=nt([]);function c(d){return l.value.push(d),()=>{const p=l.value.indexOf(d);p>=0&&l.value.splice(p,1)}}async function u(d,p={}){s.value=d;for(const _ of l.value)try{await Promise.resolve(_(d,p))}catch(g){console.error(`Error in transition hook at stage "${d}":`,g)}}async function f(d,p,_){if(d.name==="none"||!d.name){p(),_();return}const g=a.value[d.name];if(!g){console.error(`Transition ${d.name} not found`),p(),_();return}const m=g.nextDelay!==void 0?g.nextDelay:g.duration/3;let v=!1;const y=c(T=>{T==="navigation"&&!v&&(v=!0,p())});try{await u("before-enter",{transitionName:d.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(w=>setTimeout(w,50))),r.value=d.name,o.value=d,i.value=!0,await u("enter-active",{transitionName:name}),setTimeout(async()=>{await u("navigation",{transitionName:d.name,config:g}),v||(v=!0,p())},m),setTimeout(async()=>{await u("after-enter",{transitionName:d.name})},g.duration),setTimeout(async()=>{await u("before-leave",{transitionName:d.name})},g.duration+10),setTimeout(async()=>{await u("leave-active",{transitionName:d.name})},g.duration+20);const T=g.exitDuration??0;setTimeout(async()=>{i.value=!1,r.value="",o.value=void 0,await u("after-leave",{transitionName:d.name}),_()},g.duration+T)}catch(T){console.error(T)}finally{y(),setTimeout(()=>{v||(v=!0,p())},g.duration*2)}}function h(d,p){return new Promise(_=>{f(d,p,_)})}return t.beforeEach((d,p,_)=>{if(e.disableTransitions){_();return}if(typeof d.meta.stageTransition!="object"){_();return}const g=d.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),h(g,_)}),(d,p)=>(vn(),yi(Zt,null,[y2(d.$slots,"default"),i.value?(vn(),yi(Zt,{key:0},[a.value[r.value]?(vn(),Jl(_2(a.value[r.value].component),{key:0,"stage-transition":o.value},null,8,["stage-transition"])):kv("",!0)],64)):kv("",!0)],64))}});/*! diff --git a/assets/index-lxfFyMno.js b/assets/index-aU1mpMhC.js similarity index 59% rename from assets/index-lxfFyMno.js rename to assets/index-aU1mpMhC.js index 7dc589045b537eca4be5271a8d30bf8abeaf90c2..dfb4d82789dfef9eb5aaa5a6c2585374916d5c04 100644 --- a/assets/index-lxfFyMno.js +++ b/assets/index-aU1mpMhC.js @@ -1 +1 @@ -import{d as q,cf as X,cg as Y,f as C,bk as T,o as i,bl as z,a,X as E,bh as G,ch as H,Y as u,c,c6 as A,c7 as F,ci as K,u as r,$ as Z,a0 as ee,e as x,w as te,c5 as ae,b as h,bm as O,cd as le,W as S}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as re}from"./airi-card-COXfZI0a.js";import{k as se}from"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as oe}from"./InputFile.vue_vue_type_script_setup_true_lang-CToBF7WH.js";import{_ as ne}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-DY8OXi6T.js";import{_ as ie}from"./CardListItem.vue_vue_type_script_setup_true_lang-CcH5wkMP.js";import{_ as de}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DXbcrybA.js";import{b as U}from"./route-block-B_A1xBdJ.js";import"./consciousness-C2QUWl48.js";import"./providers-bTtvV6aX.js";import"./index-LHmcipjy.js";import"./speech-CRLeR9Bl.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import"./index-qrRTaw2W.js";const ue={class:"flex-1 truncate"},ce={class:"min-w-[160px] flex flex-col gap-0.5 border border-neutral-200 rounded-lg bg-white p-1 shadow-lg dark:border-neutral-800 dark:bg-neutral-900"},me=["onClick"],pe=q({__name:"Select",props:X({options:null,placeholder:null,disabled:{type:Boolean},title:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(V){const s=V,p=Y(V,"modelValue"),y=C(()=>{const n=s.options.find(f=>f.value===p.value);return n?n.label:s.placeholder});function $(n){p.value=n}return(n,f)=>(i(),T(r(se),{"auto-size":"","auto-boundary-max-size":""},{popper:z(({hide:g})=>[a("div",ce,[(i(!0),c(A,null,F(s.options,d=>(i(),c("div",K({ref_for:!0},{...n.$attrs,class:null,style:null},{key:d.value,class:["cursor-pointer rounded px-2 py-1.5 text-sm text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800",{"bg-neutral-100 dark:bg-neutral-800":p.value===d.value}],onClick:b=>{$(d.value),g()}}),u(d.label),17,me))),128))])]),default:z(()=>[a("div",{class:E(["min-w-[160px] flex cursor-pointer items-center justify-between gap-2 border rounded-lg bg-white p-2.5 text-xs text-neutral-700 shadow-sm outline-none transition-colors disabled:cursor-not-allowed dark:border-neutral-800 dark:bg-neutral-900 disabled:bg-neutral-100 hover:bg-neutral-50 dark:text-neutral-200 disabled:text-neutral-400 focus:ring-2 focus:ring-black/10 dark:disabled:bg-neutral-800 dark:hover:bg-neutral-800 dark:disabled:text-neutral-600",{"pointer-events-none":s.disabled}])},[a("div",ue,[G(n.$slots,"default",{label:y.value},()=>[H(u(y.value),1)])]),f[0]||(f[0]=a("div",{"i-solar:alt-arrow-down-bold-duotone":"",class:"h-3.5 w-3.5 text-neutral-500 dark:text-neutral-400"},null,-1))],2)]),_:3}))}}),fe={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},ve={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},xe={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},ge=["placeholder"],be={class:"relative flex flex-row justify-start gap-2 lg:flex-col"},_e={class:"top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400"},ke={key:0,flex:"","flex-col":"","items-center":""},ye={"font-medium":"",text:"neutral-600 dark:neutral-300"},we={text:"neutral-500 dark:neutral-400","mt-2":"","text-sm":""},he={key:1,flex:"","flex-col":"","items-center":""},Ce={"font-medium":"",text:"primary-600 dark:primary-300"},Ve={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"},$e={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"},De={class:"flex flex-col"},Se={class:"font-medium"},ze={class:"text-sm text-amber-600 dark:text-amber-400"},Ae={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":""},Ne=q({__name:"index",setup(V){const{t:s}=Z(),p=re(),{addCard:y,removeCard:$}=p,{cards:n,activeCardId:f}=ee(p),g=x(""),d=x(!1),b=x(""),_=x("nameAsc"),D=x([]);te(D,async l=>{const e=l[0];if(e)try{const o=await e.text(),m=JSON.parse(o);g.value=y(m),d.value=!0}catch(o){console.error("Error processing card file:",o)}});const N=C(()=>Array.from(n.value.entries()).map(([l,e])=>({id:l,name:e.name,description:e.description}))),I=C(()=>{if(!b.value)return N.value;const l=b.value.toLowerCase();return N.value.filter(e=>e.name.toLowerCase().includes(l)||e.description&&e.description.toLowerCase().includes(l))}),j=C(()=>{const l=[...I.value];return _.value==="nameAsc"?l.sort((e,o)=>e.name.localeCompare(o.name)):_.value==="nameDesc"?l.sort((e,o)=>o.name.localeCompare(e.name)):_.value==="recent"?l.sort((e,o)=>o.id.localeCompare(e.id)):l}),w=x(!1),v=x(null);function J(){v.value&&($(v.value),v.value=null,w.value=!1)}function P(l){v.value=l,w.value=!0}function Q(l){g.value=l,d.value=!0}function R(l){f.value=l}function W(l){const e=n.value.get(l);return(e==null?void 0:e.version)||"1.0.0"}function B(l,e){var t,k,L,M;const o=n.value.get(l);if(!o||!((k=(t=o.extensions)==null?void 0:t.airi)!=null&&k.modules))return"default";const m=o.extensions.airi.modules;return e==="consciousness"?(L=m.consciousness)!=null&&L.model&&m.consciousness.model.split("-").pop()||"default":e==="voice"&&((M=m.speech)==null?void 0:M.voice_id)||"default"}return(l,e)=>{var m;const o=ae("motion");return i(),c(A,null,[a("div",fe,[a("div",ve,[a("div",xe,[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)),O(a("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>b.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(s)("settings.pages.card.search")},null,8,ge),[[le,b.value]])]),a("div",be,[a("div",_e,u(r(s)("settings.pages.card.sort_by"))+": ",1),h(pe,{modelValue:_.value,"onUpdate:modelValue":e[1]||(e[1]=t=>_.value=t),options:[{value:"nameAsc",label:r(s)("settings.pages.card.name_asc")},{value:"nameDesc",label:r(s)("settings.pages.card.name_desc")},{value:"recent",label:r(s)("settings.pages.card.recent")}],placeholder:"Select sort option",class:"min-w-[150px]"},null,8,["modelValue","options"])])]),a("div",{class:E(["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(n).size>0}])},[h(r(oe),{modelValue:D.value,"onUpdate:modelValue":e[2]||(e[2]=t=>D.value=t),accept:"*.json"},{default:z(({isDragging:t})=>[t?(i(),c("div",he,[e[8]||(e[8]=a("div",{"i-solar:upload-minimalistic-bold":"",class:"mb-2 text-5xl text-primary-500 dark:text-primary-400"},null,-1)),a("p",Ce,u(r(s)("settings.pages.card.drop_here")),1)])):(i(),c("div",ke,[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",ye,u(r(s)("settings.pages.card.upload")),1),a("p",we,u(r(s)("settings.pages.card.upload_desc")),1)]))]),_:1},8,["modelValue"]),r(n).size>0?(i(!0),c(A,{key:0},F(j.value,t=>(i(),T(ie,{id:t.id,key:t.id,name:t.name,description:t.description,"is-active":t.id===r(f),"is-selected":t.id===g.value&&d.value,version:W(t.id),"consciousness-model":B(t.id,"consciousness"),"voice-model":B(t.id,"voice"),onSelect:k=>Q(t.id),onActivate:k=>R(t.id),onDelete:k=>P(t.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):S("",!0),r(n).size===0?(i(),c("div",Ve,[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,u(r(s)("settings.pages.card.no_cards")),1)])):S("",!0),b.value&&j.value.length===0?(i(),c("div",$e,[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",De,[a("span",Se,u(r(s)("settings.pages.card.no_results")),1),a("span",ze,u(r(s)("settings.pages.card.try_different_search")),1)])])):S("",!0)],2)]),h(de,{modelValue:w.value,"onUpdate:modelValue":e[3]||(e[3]=t=>w.value=t),"card-name":v.value?(m=r(p).getCard(v.value))==null?void 0:m.name:"",onConfirm:J,onCancel:e[4]||(e[4]=t=>v.value=null)},null,8,["modelValue","card-name"]),h(ne,{modelValue:d.value,"onUpdate:modelValue":e[5]||(e[5]=t=>d.value=t),"card-id":g.value},null,8,["modelValue","card-id"]),O((i(),c("div",Ae,e[11]||(e[11]=[a("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof U=="function"&&U(Ne);export{Ne as default}; +import{d as q,cf as X,cg as Y,f as C,bk as T,o as i,bl as z,a,X as E,bh as G,ch as H,Y as u,c,c6 as A,c7 as F,ci as K,u as r,$ as Z,a0 as ee,e as x,w as te,c5 as ae,b as h,bm as O,cd as le,W as S}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as re}from"./airi-card-Cgw9OiDq.js";import{k as se}from"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as oe}from"./InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js";import{_ as ne}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js";import{_ as ie}from"./CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js";import{_ as de}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js";import{b as U}from"./route-block-B_A1xBdJ.js";import"./consciousness-CI5ipeHX.js";import"./providers-7GsMyC_3.js";import"./index-LHmcipjy.js";import"./speech-DRmXCXwq.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./index-DeGbjSQn.js";const ue={class:"flex-1 truncate"},ce={class:"min-w-[160px] flex flex-col gap-0.5 border border-neutral-200 rounded-lg bg-white p-1 shadow-lg dark:border-neutral-800 dark:bg-neutral-900"},me=["onClick"],pe=q({__name:"Select",props:X({options:null,placeholder:null,disabled:{type:Boolean},title:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(V){const s=V,p=Y(V,"modelValue"),y=C(()=>{const n=s.options.find(f=>f.value===p.value);return n?n.label:s.placeholder});function $(n){p.value=n}return(n,f)=>(i(),T(r(se),{"auto-size":"","auto-boundary-max-size":""},{popper:z(({hide:g})=>[a("div",ce,[(i(!0),c(A,null,F(s.options,d=>(i(),c("div",K({ref_for:!0},{...n.$attrs,class:null,style:null},{key:d.value,class:["cursor-pointer rounded px-2 py-1.5 text-sm text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800",{"bg-neutral-100 dark:bg-neutral-800":p.value===d.value}],onClick:b=>{$(d.value),g()}}),u(d.label),17,me))),128))])]),default:z(()=>[a("div",{class:E(["min-w-[160px] flex cursor-pointer items-center justify-between gap-2 border rounded-lg bg-white p-2.5 text-xs text-neutral-700 shadow-sm outline-none transition-colors disabled:cursor-not-allowed dark:border-neutral-800 dark:bg-neutral-900 disabled:bg-neutral-100 hover:bg-neutral-50 dark:text-neutral-200 disabled:text-neutral-400 focus:ring-2 focus:ring-black/10 dark:disabled:bg-neutral-800 dark:hover:bg-neutral-800 dark:disabled:text-neutral-600",{"pointer-events-none":s.disabled}])},[a("div",ue,[G(n.$slots,"default",{label:y.value},()=>[H(u(y.value),1)])]),f[0]||(f[0]=a("div",{"i-solar:alt-arrow-down-bold-duotone":"",class:"h-3.5 w-3.5 text-neutral-500 dark:text-neutral-400"},null,-1))],2)]),_:3}))}}),fe={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},ve={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},xe={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},ge=["placeholder"],be={class:"relative flex flex-row justify-start gap-2 lg:flex-col"},_e={class:"top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400"},ke={key:0,flex:"","flex-col":"","items-center":""},ye={"font-medium":"",text:"neutral-600 dark:neutral-300"},we={text:"neutral-500 dark:neutral-400","mt-2":"","text-sm":""},he={key:1,flex:"","flex-col":"","items-center":""},Ce={"font-medium":"",text:"primary-600 dark:primary-300"},Ve={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"},$e={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"},De={class:"flex flex-col"},Se={class:"font-medium"},ze={class:"text-sm text-amber-600 dark:text-amber-400"},Ae={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":""},Ne=q({__name:"index",setup(V){const{t:s}=Z(),p=re(),{addCard:y,removeCard:$}=p,{cards:n,activeCardId:f}=ee(p),g=x(""),d=x(!1),b=x(""),_=x("nameAsc"),D=x([]);te(D,async l=>{const e=l[0];if(e)try{const o=await e.text(),m=JSON.parse(o);g.value=y(m),d.value=!0}catch(o){console.error("Error processing card file:",o)}});const N=C(()=>Array.from(n.value.entries()).map(([l,e])=>({id:l,name:e.name,description:e.description}))),I=C(()=>{if(!b.value)return N.value;const l=b.value.toLowerCase();return N.value.filter(e=>e.name.toLowerCase().includes(l)||e.description&&e.description.toLowerCase().includes(l))}),j=C(()=>{const l=[...I.value];return _.value==="nameAsc"?l.sort((e,o)=>e.name.localeCompare(o.name)):_.value==="nameDesc"?l.sort((e,o)=>o.name.localeCompare(e.name)):_.value==="recent"?l.sort((e,o)=>o.id.localeCompare(e.id)):l}),w=x(!1),v=x(null);function J(){v.value&&($(v.value),v.value=null,w.value=!1)}function P(l){v.value=l,w.value=!0}function Q(l){g.value=l,d.value=!0}function R(l){f.value=l}function W(l){const e=n.value.get(l);return(e==null?void 0:e.version)||"1.0.0"}function B(l,e){var t,k,L,M;const o=n.value.get(l);if(!o||!((k=(t=o.extensions)==null?void 0:t.airi)!=null&&k.modules))return"default";const m=o.extensions.airi.modules;return e==="consciousness"?(L=m.consciousness)!=null&&L.model&&m.consciousness.model.split("-").pop()||"default":e==="voice"&&((M=m.speech)==null?void 0:M.voice_id)||"default"}return(l,e)=>{var m;const o=ae("motion");return i(),c(A,null,[a("div",fe,[a("div",ve,[a("div",xe,[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)),O(a("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>b.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(s)("settings.pages.card.search")},null,8,ge),[[le,b.value]])]),a("div",be,[a("div",_e,u(r(s)("settings.pages.card.sort_by"))+": ",1),h(r(pe),{modelValue:_.value,"onUpdate:modelValue":e[1]||(e[1]=t=>_.value=t),options:[{value:"nameAsc",label:r(s)("settings.pages.card.name_asc")},{value:"nameDesc",label:r(s)("settings.pages.card.name_desc")},{value:"recent",label:r(s)("settings.pages.card.recent")}],placeholder:"Select sort option",class:"min-w-[150px]"},null,8,["modelValue","options"])])]),a("div",{class:E(["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(n).size>0}])},[h(r(oe),{modelValue:D.value,"onUpdate:modelValue":e[2]||(e[2]=t=>D.value=t),accept:"*.json"},{default:z(({isDragging:t})=>[t?(i(),c("div",he,[e[8]||(e[8]=a("div",{"i-solar:upload-minimalistic-bold":"",class:"mb-2 text-5xl text-primary-500 dark:text-primary-400"},null,-1)),a("p",Ce,u(r(s)("settings.pages.card.drop_here")),1)])):(i(),c("div",ke,[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",ye,u(r(s)("settings.pages.card.upload")),1),a("p",we,u(r(s)("settings.pages.card.upload_desc")),1)]))]),_:1},8,["modelValue"]),r(n).size>0?(i(!0),c(A,{key:0},F(j.value,t=>(i(),T(ie,{id:t.id,key:t.id,name:t.name,description:t.description,"is-active":t.id===r(f),"is-selected":t.id===g.value&&d.value,version:W(t.id),"consciousness-model":B(t.id,"consciousness"),"voice-model":B(t.id,"voice"),onSelect:k=>Q(t.id),onActivate:k=>R(t.id),onDelete:k=>P(t.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):S("",!0),r(n).size===0?(i(),c("div",Ve,[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,u(r(s)("settings.pages.card.no_cards")),1)])):S("",!0),b.value&&j.value.length===0?(i(),c("div",$e,[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",De,[a("span",Se,u(r(s)("settings.pages.card.no_results")),1),a("span",ze,u(r(s)("settings.pages.card.try_different_search")),1)])])):S("",!0)],2)]),h(de,{modelValue:w.value,"onUpdate:modelValue":e[3]||(e[3]=t=>w.value=t),"card-name":v.value?(m=r(p).getCard(v.value))==null?void 0:m.name:"",onConfirm:J,onCancel:e[4]||(e[4]=t=>v.value=null)},null,8,["modelValue","card-name"]),h(ne,{modelValue:d.value,"onUpdate:modelValue":e[5]||(e[5]=t=>d.value=t),"card-id":g.value},null,8,["modelValue","card-id"]),O((i(),c("div",Ae,e[11]||(e[11]=[a("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof U=="function"&&U(Ne);export{Ne as default}; diff --git a/assets/index-ClJ-JBDT.js b/assets/index-ebacZR9F.js similarity index 79% rename from assets/index-ClJ-JBDT.js rename to assets/index-ebacZR9F.js index d761c0e2677178f291830f13e1d03a4814b12617..a5ec465d7de3c61b100e0d7c87758cd7503d330d 100644 --- a/assets/index-ClJ-JBDT.js +++ b/assets/index-ebacZR9F.js @@ -1 +1 @@ -import{u as d}from"./useIconAnimation-BW2D9qMM.js";import{d as u,a2 as p,c5 as f,c as n,o as e,a as i,bk as v,bm as x,u as o,c6 as _}from"./index-CKmiAjHk.js";import{b as r}from"./route-block-B_A1xBdJ.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.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=u({__name:"index",setup(b){const{iconAnimationStarted:a,showIconAnimation:s,animationIcon:c}=d("i-solar:armchair-2-bold-duotone");return(h,t)=>{const l=p("IconAnimation"),m=f("motion");return e(),n(_,null,[t[1]||(t[1]=i("div",null," Scene ",-1)),o(s)?(e(),v(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"])):x((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{u as d}from"./useIconAnimation-B41IKS_9.js";import{d as u,a2 as p,c5 as f,c as n,o as e,a as i,bk as v,bm as x,u as o,c6 as _}from"./index-WDP_Z4A8.js";import{b as r}from"./route-block-B_A1xBdJ.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.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=u({__name:"index",setup(b){const{iconAnimationStarted:a,showIconAnimation:s,animationIcon:c}=d("i-solar:armchair-2-bold-duotone");return(h,t)=>{const l=p("IconAnimation"),m=f("motion");return e(),n(_,null,[t[1]||(t[1]=i("div",null," Scene ",-1)),o(s)?(e(),v(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"])):x((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/mcp-CyJbhMv7.js b/assets/mcp-CVsSz3w1.js similarity index 99% rename from assets/mcp-CyJbhMv7.js rename to assets/mcp-CVsSz3w1.js index 9f3554c822a6e432391f51f77052bdd7240b7de8..e1bc9b6240a0ee5acd7f5624d40015bc4db43552 100644 --- a/assets/mcp-CyJbhMv7.js +++ b/assets/mcp-CVsSz3w1.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/effect-WSjEuzC9-fUavg5P7.js","assets/index-CKmiAjHk.js","assets/index-zBe9gvvY.css","assets/sury-DmrZ3_Oj-CGjWzrFK.js","assets/valibot-CQk-M5rL-rd3w1i8_.js","assets/zod-Db63SLXj-_dMk2pG0.js"])))=>i.map(i=>d[i]); -import{cP as L}from"./index-CKmiAjHk.js";const Ce="https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies",ut=async(s,e)=>{try{return await s}catch{throw new Error(`xsschema: Missing dependencies "${e}". see ${Ce}`)}},Se=async s=>{switch(s){case"arktype":return L(()=>import("./arktype-C-GObzDh-1xlRyYUo.js"),[]).then(async({getToJsonSchemaFn:e})=>e());case"effect":return L(()=>import("./effect-WSjEuzC9-fUavg5P7.js"),__vite__mapDeps([0,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"sury":return L(()=>import("./sury-DmrZ3_Oj-CGjWzrFK.js"),__vite__mapDeps([3,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"valibot":return L(()=>import("./valibot-CQk-M5rL-rd3w1i8_.js"),__vite__mapDeps([4,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"zod":return L(()=>import("./zod-Db63SLXj-_dMk2pG0.js"),__vite__mapDeps([5,1,2])).then(async({getToJsonSchemaFn:e})=>e());default:throw new Error(`xsschema: Unsupported schema vendor "${s}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},Oe=async s=>Se(s["~standard"].vendor).then(async e=>e(s)),D=async({description:s,execute:e,name:t,parameters:r})=>{const n=await Oe(r);return{execute:e,function:{description:s,name:t,parameters:{...n,additionalProperties:!1},strict:!0},type:"function"}};var g;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(g||(g={}));var ae;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(ae||(ae={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),C=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},c=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,h=0;for(;ht.message){const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=s=>new T(s);const X=(s,e)=>{let t;switch(s.code){case c.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,g.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(s.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(s.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(s.options)}, received '${s.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:g.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case c.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case c.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(s)}return{message:t}};let Ae=X;function Ne(){return Ae}const Ze=s=>{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)o=f(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}};function d(s,e){const t=Ne(),r=Ze({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===X?void 0:X].filter(n=>!!n)});s.common.issues.push(r)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return k.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),U=s=>({status:"dirty",value:s}),b=s=>({status:"valid",value:s}),ie=s=>s.status==="aborted",oe=s=>s.status==="dirty",I=s=>s.status==="valid",W=s=>typeof Promise<"u"&&s instanceof Promise;var l;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(l||(l={}));class A{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ce=(s,e)=>{if(I(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new T(s.common.issues);return this._error=t,this._error}}};function _(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{const{message:h}=s;return i.code==="invalid_enum_value"?{message:h??o.defaultError}:typeof o.data>"u"?{message:h??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:h??t??o.defaultError}},description:n}}class y{get description(){return this._def.description}_getType(e){return C(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:C(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:C(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(W(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},n=this._parseSync({data:e,path:r.path,parent:r});return ce(r,n)}"~validate"(e){var r,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return I(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>I(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},n=this._parse({data:e,path:r.path,parent:r}),a=await(W(n)?n:Promise.resolve(n));return ce(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:c.custom,...r(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(h=>h?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new P({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return O.create(this,this._def)}nullable(){return M.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w.create(this)}promise(){return G.create(this,this._def)}or(e){return J.create([this,e],this._def)}and(e){return Y.create(this,e,this._def)}transform(e){return new P({..._(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new te({..._(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new Ke({typeName:p.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new se({..._(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ne.create(this,e)}readonly(){return re.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Re=/^c[^\s-]{8,}$/i,Ee=/^[0-9a-z]+$/,Ie=/^[0-9A-HJKMNP-TV-Z]{26}$/i,je=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$e=/^[a-z0-9_-]{21}$/i,Pe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Me=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ve=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Le="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Q;const ze=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,De=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ue=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Be=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,We=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ke="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",qe=new RegExp(`^${ke}$`);function be(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Je(s){return new RegExp(`^${be(s)}$`)}function Ye(s){let e=`${ke}T${be(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ge(s,e){return!!((e==="v4"||!e)&&ze.test(s)||(e==="v6"||!e)&&Ue.test(s))}function He(s,e){if(!Pe.test(s))return!1;try{const[t]=s.split("."),r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Qe(s,e){return!!((e==="v4"||!e)&&De.test(s)||(e==="v6"||!e)&&Be.test(s))}class S extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.string,received:a.parsedType}),m}const r=new k;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(n),{validation:t,code:c.invalid_string,...l.errToObj(r)})}_addCheck(e){return new S({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...l.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...l.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...l.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new S({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew S({checks:[],typeName:p.ZodString,coerce:(s==null?void 0:s.coerce)??!1,..._(s)});function Xe(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class j extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.number,received:a.parsedType}),m}let r;const n=new k;for(const a of this._def.checks)a.kind==="int"?g.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Xe(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_finite,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new j({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew j({checks:[],typeName:p.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,..._(s)});class B extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const n=new k;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew B({checks:[],typeName:p.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,..._(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.boolean,received:r.parsedType}),m}return b(e.data)}}K.create=s=>new K({typeName:p.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,..._(s)});class q extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_date}),m}const r=new k;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):g.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew q({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:p.ZodDate,..._(s)});class de extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.symbol,received:r.parsedType}),m}return b(e.data)}}de.create=s=>new de({typeName:p.ZodSymbol,..._(s)});class ue extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.undefined,received:r.parsedType}),m}return b(e.data)}}ue.create=s=>new ue({typeName:p.ZodUndefined,..._(s)});class le extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.null,received:r.parsedType}),m}return b(e.data)}}le.create=s=>new le({typeName:p.ZodNull,..._(s)});class he extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}he.create=s=>new he({typeName:p.ZodAny,..._(s)});class fe extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}fe.create=s=>new fe({typeName:p.ZodUnknown,..._(s)});class N extends y{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}}N.create=s=>new N({typeName:p.ZodNever,..._(s)});class me extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.void,received:r.parsedType}),m}return b(e.data)}}me.create=s=>new me({typeName:p.ZodVoid,..._(s)});class w extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return d(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.lengthn.maxLength.value&&(d(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new A(t,i,t.path,o)))).then(i=>k.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new A(t,i,t.path,o)));return k.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new w({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new w({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new w({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}w.create=(s,e)=>new w({type:s,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function E(s){if(s instanceof x){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=O.create(E(r))}return new x({...s._def,shape:()=>e})}else return s instanceof w?new w({...s._def,type:E(s.element)}):s instanceof O?O.create(E(s.unwrap())):s instanceof M?M.create(E(s.unwrap())):s instanceof R?R.create(s.items.map(e=>E(e))):s}class x extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const f=this._getOrReturnCtx(e);return d(f,{code:c.invalid_type,expected:u.object,received:f.parsedType}),m}const{status:r,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip"))for(const f in n.data)i.includes(f)||o.push(f);const h=[];for(const f of i){const v=a[f],V=n.data[f];h.push({key:{status:"valid",value:f},value:v._parse(new A(n,V,n.path,f)),alwaysSet:f in n.data})}if(this._def.catchall instanceof N){const f=this._def.unknownKeys;if(f==="passthrough")for(const v of o)h.push({key:{status:"valid",value:v},value:{status:"valid",value:n.data[v]}});else if(f==="strict")o.length>0&&(d(n,{code:c.unrecognized_keys,keys:o}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const v of o){const V=n.data[v];h.push({key:{status:"valid",value:v},value:f._parse(new A(n,V,n.path,v)),alwaysSet:v in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of h){const V=await v.key,Te=await v.value;f.push({key:V,value:Te,alwaysSet:v.alwaysSet})}return f}).then(f=>k.mergeObjectSync(r,f)):k.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:l.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const r of g.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const r of g.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}deepPartial(){return E(this)}partial(e){const t={};for(const r of g.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const r of g.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof O;)a=a._def.innerType;t[r]=a}return new x({...this._def,shape:()=>t})}keyof(){return we(g.objectKeys(this.shape))}}x.create=(s,e)=>new x({shape:()=>s,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,..._(e)});x.strictCreate=(s,e)=>new x({shape:()=>s,unknownKeys:"strict",catchall:N.create(),typeName:p.ZodObject,..._(e)});x.lazycreate=(s,e)=>new x({shape:s,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,..._(e)});class J extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new T(o.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const h of r){const f={...t,common:{...t.common,issues:[]},parent:null},v=h._parseSync({data:t.data,path:t.path,parent:f});if(v.status==="valid")return v;v.status==="dirty"&&!a&&(a={result:v,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(h=>new T(h));return d(t,{code:c.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}J.create=(s,e)=>new J({options:s,typeName:p.ZodUnion,..._(e)});function ee(s,e){const t=C(s),r=C(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const n=g.objectKeys(e),a=g.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};for(const o of a){const h=ee(s[o],e[o]);if(!h.valid)return{valid:!1};i[o]=h.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let a=0;a{if(ie(a)||ie(i))return m;const o=ee(a.value,i.value);return o.valid?((oe(a)||oe(i))&&t.dirty(),{status:t.value,value:o.data}):(d(r,{code:c.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Y.create=(s,e,t)=>new Y({left:s,right:e,typeName:p.ZodIntersection,..._(t)});class R extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return d(r,{code:c.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(d(r,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map((i,o)=>{const h=this._def.items[o]||this._def.rest;return h?h._parse(new A(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>k.mergeArray(t,i)):k.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:s,typeName:p.ZodTuple,rest:null,..._(e)})};class pe extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return d(r,{code:c.invalid_type,expected:u.map,received:r.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,h],f)=>({key:n._parse(new A(r,o,r.path,[f,"key"])),value:a._parse(new A(r,h,r.path,[f,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const h of i){const f=await h.key,v=await h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(f.value,v.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const h of i){const f=h.key,v=h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(f.value,v.value)}return{status:t.value,value:o}}}}pe.create=(s,e,t)=>new pe({valueType:e,keyType:s,typeName:p.ZodMap,..._(t)});class F extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return d(r,{code:c.invalid_type,expected:u.set,received:r.parsedType}),m;const n=this._def;n.minSize!==null&&r.data.sizen.maxSize.value&&(d(r,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(h){const f=new Set;for(const v of h){if(v.status==="aborted")return m;v.status==="dirty"&&t.dirty(),f.add(v.value)}return{status:t.value,value:f}}const o=[...r.data.values()].map((h,f)=>a._parse(new A(r,h,r.path,f)));return r.common.async?Promise.all(o).then(h=>i(h)):i(o)}min(e,t){return new F({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new F({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}F.create=(s,e)=>new F({valueType:s,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class _e extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_e.create=(s,e)=>new _e({getter:s,typeName:p.ZodLazy,..._(e)});class ye extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}ye.create=(s,e)=>new ye({value:s,typeName:p.ZodLiteral,..._(e)});function we(s,e){return new $({values:s,typeName:p.ZodEnum,..._(e)})}class $ extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{expected:g.joinValues(r),received:t.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:r}),m}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return $.create(e,{...this._def,...t})}exclude(e,t=this._def){return $.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}$.create=we;class ge extends y{_parse(e){const t=g.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const n=g.objectValues(t);return d(r,{expected:g.joinValues(n),received:r.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(g.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=g.objectValues(t);return d(r,{received:r.data,code:c.invalid_enum_value,options:n}),m}return b(e.data)}get enum(){return this._def.values}}ge.create=(s,e)=>new ge({values:s,typeName:p.ZodNativeEnum,..._(e)});class G extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}G.create=(s,e)=>new G({type:s,typeName:p.ZodPromise,..._(e)});class P extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{d(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const h=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return h.status==="aborted"?m:h.status==="dirty"||t.value==="dirty"?U(h.value):h});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?U(o.value):o}}if(n.type==="refinement"){const i=o=>{const h=n.refinement(o,a);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!I(i))return m;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>I(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);g.assertNever(n)}}P.create=(s,e,t)=>new P({schema:s,typeName:p.ZodEffects,effect:e,..._(t)});P.createWithPreprocess=(s,e,t)=>new P({schema:e,effect:{type:"preprocess",transform:s},typeName:p.ZodEffects,..._(t)});class O extends y{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}O.create=(s,e)=>new O({innerType:s,typeName:p.ZodOptional,..._(e)});class M extends y{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}M.create=(s,e)=>new M({innerType:s,typeName:p.ZodNullable,..._(e)});class te extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}te.create=(s,e)=>new te({innerType:s,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class se extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return W(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}se.create=(s,e)=>new se({innerType:s,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class ve extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}ve.create=s=>new ve({typeName:p.ZodNaN,..._(s)});class Ke extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ne extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),U(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ne({in:e,out:t,typeName:p.ZodPipeline})}}class re extends y{_parse(e){const t=this._def.innerType._parse(e),r=n=>(I(n)&&(n.value=Object.freeze(n.value)),n);return W(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}re.create=(s,e)=>new re({innerType:s,typeName:p.ZodReadonly,..._(e)});var p;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(p||(p={}));const z=S.create,et=j.create,tt=K.create;N.create;const xe=w.create,Z=x.create,st=J.create;Y.create;R.create;$.create;G.create;O.create;M.create;const rt=[D({name:"debug_random_number",description:"Generate a random number between 0 and 1",execute:async()=>new Promise(s=>{setTimeout(()=>{s(Math.random().toString())},1e3)}),parameters:Z({})})],lt=async()=>Promise.all(rt);async function H(s,e={},t){return window.__TAURI_INTERNALS__.invoke(s,e,t)}async function nt(s,e){await H("plugin:mcp|connect_server",{command:s,args:e})}async function at(){await H("plugin:mcp|disconnect_server")}async function it(){return await H("plugin:mcp|list_tools")}async function ot(s,e){return await H("plugin:mcp|call_tool",{name:s,args:e})}const ct=[D({name:"mcp_list_tools",description:"List all tools available on the MCP server",execute:async(s,e)=>await it(),parameters:Z({})}),D({name:"mcp_connect_server",description:'Connect to the MCP server. If "success", the connection to the MCP server is successful. Otherwise, the connection fails.',execute:async({command:s,args:e})=>(await nt(s,e),"success"),parameters:Z({command:z().describe("The command to connect to the MCP server"),args:xe(z()).describe("The arguments to pass to the MCP server")})}),D({name:"mcp_disconnect_server",description:'Disconnect from the MCP server. If "success", the disconnection from the MCP server is successful. Otherwise, the disconnection fails.',execute:async()=>(await at(),"success"),parameters:Z({})}),D({name:"mcp_call_tool",description:"Call a tool on the MCP server. The result is a list of content and a boolean indicating whether the tool call is an error.",execute:async({name:s,parameters:e})=>{const t=Object.fromEntries(e.map(({name:n,value:a})=>[n,a]));return await ot(s,t)},parameters:Z({name:z().describe("The name of the tool to call"),parameters:xe(Z({name:z().describe("The name of the parameter"),value:st([z(),et(),tt(),Z({})]).describe("The value of the parameter, it can be a string, a number, a boolean, or an object")})).describe("The parameters to pass to the tool")})})],ht=async()=>Promise.all(ct);export{p as Z,Ce as a,O as b,lt as d,ht as m,ut as t}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/effect-WSjEuzC9-Dq66khSv.js","assets/index-WDP_Z4A8.js","assets/index-zBe9gvvY.css","assets/sury-DmrZ3_Oj-CYYeWtlB.js","assets/valibot-CQk-M5rL-Bzl_-bg9.js","assets/zod-Db63SLXj-IXQs-Vsk.js"])))=>i.map(i=>d[i]); +import{cP as L}from"./index-WDP_Z4A8.js";const Ce="https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies",ut=async(s,e)=>{try{return await s}catch{throw new Error(`xsschema: Missing dependencies "${e}". see ${Ce}`)}},Se=async s=>{switch(s){case"arktype":return L(()=>import("./arktype-C-GObzDh-1xlRyYUo.js"),[]).then(async({getToJsonSchemaFn:e})=>e());case"effect":return L(()=>import("./effect-WSjEuzC9-Dq66khSv.js"),__vite__mapDeps([0,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"sury":return L(()=>import("./sury-DmrZ3_Oj-CYYeWtlB.js"),__vite__mapDeps([3,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"valibot":return L(()=>import("./valibot-CQk-M5rL-Bzl_-bg9.js"),__vite__mapDeps([4,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"zod":return L(()=>import("./zod-Db63SLXj-IXQs-Vsk.js"),__vite__mapDeps([5,1,2])).then(async({getToJsonSchemaFn:e})=>e());default:throw new Error(`xsschema: Unsupported schema vendor "${s}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},Oe=async s=>Se(s["~standard"].vendor).then(async e=>e(s)),D=async({description:s,execute:e,name:t,parameters:r})=>{const n=await Oe(r);return{execute:e,function:{description:s,name:t,parameters:{...n,additionalProperties:!1},strict:!0},type:"function"}};var g;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(g||(g={}));var ae;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(ae||(ae={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),C=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},c=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,h=0;for(;ht.message){const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=s=>new T(s);const X=(s,e)=>{let t;switch(s.code){case c.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,g.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(s.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(s.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(s.options)}, received '${s.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:g.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case c.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case c.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(s)}return{message:t}};let Ae=X;function Ne(){return Ae}const Ze=s=>{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)o=f(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}};function d(s,e){const t=Ne(),r=Ze({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===X?void 0:X].filter(n=>!!n)});s.common.issues.push(r)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return k.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),U=s=>({status:"dirty",value:s}),b=s=>({status:"valid",value:s}),ie=s=>s.status==="aborted",oe=s=>s.status==="dirty",I=s=>s.status==="valid",W=s=>typeof Promise<"u"&&s instanceof Promise;var l;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(l||(l={}));class A{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ce=(s,e)=>{if(I(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new T(s.common.issues);return this._error=t,this._error}}};function _(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{const{message:h}=s;return i.code==="invalid_enum_value"?{message:h??o.defaultError}:typeof o.data>"u"?{message:h??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:h??t??o.defaultError}},description:n}}class y{get description(){return this._def.description}_getType(e){return C(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:C(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:C(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(W(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},n=this._parseSync({data:e,path:r.path,parent:r});return ce(r,n)}"~validate"(e){var r,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return I(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>I(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},n=this._parse({data:e,path:r.path,parent:r}),a=await(W(n)?n:Promise.resolve(n));return ce(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:c.custom,...r(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(h=>h?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new P({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return O.create(this,this._def)}nullable(){return M.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w.create(this)}promise(){return G.create(this,this._def)}or(e){return J.create([this,e],this._def)}and(e){return Y.create(this,e,this._def)}transform(e){return new P({..._(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new te({..._(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new Ke({typeName:p.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new se({..._(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ne.create(this,e)}readonly(){return re.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Re=/^c[^\s-]{8,}$/i,Ee=/^[0-9a-z]+$/,Ie=/^[0-9A-HJKMNP-TV-Z]{26}$/i,je=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$e=/^[a-z0-9_-]{21}$/i,Pe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Me=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ve=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Le="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Q;const ze=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,De=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ue=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Be=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,We=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ke="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",qe=new RegExp(`^${ke}$`);function be(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Je(s){return new RegExp(`^${be(s)}$`)}function Ye(s){let e=`${ke}T${be(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ge(s,e){return!!((e==="v4"||!e)&&ze.test(s)||(e==="v6"||!e)&&Ue.test(s))}function He(s,e){if(!Pe.test(s))return!1;try{const[t]=s.split("."),r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Qe(s,e){return!!((e==="v4"||!e)&&De.test(s)||(e==="v6"||!e)&&Be.test(s))}class S extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.string,received:a.parsedType}),m}const r=new k;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(n),{validation:t,code:c.invalid_string,...l.errToObj(r)})}_addCheck(e){return new S({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...l.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...l.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...l.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new S({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew S({checks:[],typeName:p.ZodString,coerce:(s==null?void 0:s.coerce)??!1,..._(s)});function Xe(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class j extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.number,received:a.parsedType}),m}let r;const n=new k;for(const a of this._def.checks)a.kind==="int"?g.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Xe(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_finite,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new j({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew j({checks:[],typeName:p.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,..._(s)});class B extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const n=new k;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew B({checks:[],typeName:p.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,..._(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.boolean,received:r.parsedType}),m}return b(e.data)}}K.create=s=>new K({typeName:p.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,..._(s)});class q extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_date}),m}const r=new k;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):g.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew q({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:p.ZodDate,..._(s)});class de extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.symbol,received:r.parsedType}),m}return b(e.data)}}de.create=s=>new de({typeName:p.ZodSymbol,..._(s)});class ue extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.undefined,received:r.parsedType}),m}return b(e.data)}}ue.create=s=>new ue({typeName:p.ZodUndefined,..._(s)});class le extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.null,received:r.parsedType}),m}return b(e.data)}}le.create=s=>new le({typeName:p.ZodNull,..._(s)});class he extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}he.create=s=>new he({typeName:p.ZodAny,..._(s)});class fe extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}fe.create=s=>new fe({typeName:p.ZodUnknown,..._(s)});class N extends y{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}}N.create=s=>new N({typeName:p.ZodNever,..._(s)});class me extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.void,received:r.parsedType}),m}return b(e.data)}}me.create=s=>new me({typeName:p.ZodVoid,..._(s)});class w extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return d(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.lengthn.maxLength.value&&(d(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new A(t,i,t.path,o)))).then(i=>k.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new A(t,i,t.path,o)));return k.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new w({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new w({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new w({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}w.create=(s,e)=>new w({type:s,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function E(s){if(s instanceof x){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=O.create(E(r))}return new x({...s._def,shape:()=>e})}else return s instanceof w?new w({...s._def,type:E(s.element)}):s instanceof O?O.create(E(s.unwrap())):s instanceof M?M.create(E(s.unwrap())):s instanceof R?R.create(s.items.map(e=>E(e))):s}class x extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const f=this._getOrReturnCtx(e);return d(f,{code:c.invalid_type,expected:u.object,received:f.parsedType}),m}const{status:r,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip"))for(const f in n.data)i.includes(f)||o.push(f);const h=[];for(const f of i){const v=a[f],V=n.data[f];h.push({key:{status:"valid",value:f},value:v._parse(new A(n,V,n.path,f)),alwaysSet:f in n.data})}if(this._def.catchall instanceof N){const f=this._def.unknownKeys;if(f==="passthrough")for(const v of o)h.push({key:{status:"valid",value:v},value:{status:"valid",value:n.data[v]}});else if(f==="strict")o.length>0&&(d(n,{code:c.unrecognized_keys,keys:o}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const v of o){const V=n.data[v];h.push({key:{status:"valid",value:v},value:f._parse(new A(n,V,n.path,v)),alwaysSet:v in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of h){const V=await v.key,Te=await v.value;f.push({key:V,value:Te,alwaysSet:v.alwaysSet})}return f}).then(f=>k.mergeObjectSync(r,f)):k.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:l.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const r of g.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const r of g.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}deepPartial(){return E(this)}partial(e){const t={};for(const r of g.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const r of g.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof O;)a=a._def.innerType;t[r]=a}return new x({...this._def,shape:()=>t})}keyof(){return we(g.objectKeys(this.shape))}}x.create=(s,e)=>new x({shape:()=>s,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,..._(e)});x.strictCreate=(s,e)=>new x({shape:()=>s,unknownKeys:"strict",catchall:N.create(),typeName:p.ZodObject,..._(e)});x.lazycreate=(s,e)=>new x({shape:s,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,..._(e)});class J extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new T(o.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const h of r){const f={...t,common:{...t.common,issues:[]},parent:null},v=h._parseSync({data:t.data,path:t.path,parent:f});if(v.status==="valid")return v;v.status==="dirty"&&!a&&(a={result:v,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(h=>new T(h));return d(t,{code:c.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}J.create=(s,e)=>new J({options:s,typeName:p.ZodUnion,..._(e)});function ee(s,e){const t=C(s),r=C(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const n=g.objectKeys(e),a=g.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};for(const o of a){const h=ee(s[o],e[o]);if(!h.valid)return{valid:!1};i[o]=h.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let a=0;a{if(ie(a)||ie(i))return m;const o=ee(a.value,i.value);return o.valid?((oe(a)||oe(i))&&t.dirty(),{status:t.value,value:o.data}):(d(r,{code:c.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Y.create=(s,e,t)=>new Y({left:s,right:e,typeName:p.ZodIntersection,..._(t)});class R extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return d(r,{code:c.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(d(r,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map((i,o)=>{const h=this._def.items[o]||this._def.rest;return h?h._parse(new A(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>k.mergeArray(t,i)):k.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:s,typeName:p.ZodTuple,rest:null,..._(e)})};class pe extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return d(r,{code:c.invalid_type,expected:u.map,received:r.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,h],f)=>({key:n._parse(new A(r,o,r.path,[f,"key"])),value:a._parse(new A(r,h,r.path,[f,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const h of i){const f=await h.key,v=await h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(f.value,v.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const h of i){const f=h.key,v=h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(f.value,v.value)}return{status:t.value,value:o}}}}pe.create=(s,e,t)=>new pe({valueType:e,keyType:s,typeName:p.ZodMap,..._(t)});class F extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return d(r,{code:c.invalid_type,expected:u.set,received:r.parsedType}),m;const n=this._def;n.minSize!==null&&r.data.sizen.maxSize.value&&(d(r,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(h){const f=new Set;for(const v of h){if(v.status==="aborted")return m;v.status==="dirty"&&t.dirty(),f.add(v.value)}return{status:t.value,value:f}}const o=[...r.data.values()].map((h,f)=>a._parse(new A(r,h,r.path,f)));return r.common.async?Promise.all(o).then(h=>i(h)):i(o)}min(e,t){return new F({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new F({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}F.create=(s,e)=>new F({valueType:s,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class _e extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_e.create=(s,e)=>new _e({getter:s,typeName:p.ZodLazy,..._(e)});class ye extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}ye.create=(s,e)=>new ye({value:s,typeName:p.ZodLiteral,..._(e)});function we(s,e){return new $({values:s,typeName:p.ZodEnum,..._(e)})}class $ extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{expected:g.joinValues(r),received:t.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:r}),m}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return $.create(e,{...this._def,...t})}exclude(e,t=this._def){return $.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}$.create=we;class ge extends y{_parse(e){const t=g.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const n=g.objectValues(t);return d(r,{expected:g.joinValues(n),received:r.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(g.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=g.objectValues(t);return d(r,{received:r.data,code:c.invalid_enum_value,options:n}),m}return b(e.data)}get enum(){return this._def.values}}ge.create=(s,e)=>new ge({values:s,typeName:p.ZodNativeEnum,..._(e)});class G extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}G.create=(s,e)=>new G({type:s,typeName:p.ZodPromise,..._(e)});class P extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{d(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const h=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return h.status==="aborted"?m:h.status==="dirty"||t.value==="dirty"?U(h.value):h});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?U(o.value):o}}if(n.type==="refinement"){const i=o=>{const h=n.refinement(o,a);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!I(i))return m;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>I(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);g.assertNever(n)}}P.create=(s,e,t)=>new P({schema:s,typeName:p.ZodEffects,effect:e,..._(t)});P.createWithPreprocess=(s,e,t)=>new P({schema:e,effect:{type:"preprocess",transform:s},typeName:p.ZodEffects,..._(t)});class O extends y{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}O.create=(s,e)=>new O({innerType:s,typeName:p.ZodOptional,..._(e)});class M extends y{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}M.create=(s,e)=>new M({innerType:s,typeName:p.ZodNullable,..._(e)});class te extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}te.create=(s,e)=>new te({innerType:s,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class se extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return W(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}se.create=(s,e)=>new se({innerType:s,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class ve extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}ve.create=s=>new ve({typeName:p.ZodNaN,..._(s)});class Ke extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ne extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),U(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ne({in:e,out:t,typeName:p.ZodPipeline})}}class re extends y{_parse(e){const t=this._def.innerType._parse(e),r=n=>(I(n)&&(n.value=Object.freeze(n.value)),n);return W(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}re.create=(s,e)=>new re({innerType:s,typeName:p.ZodReadonly,..._(e)});var p;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(p||(p={}));const z=S.create,et=j.create,tt=K.create;N.create;const xe=w.create,Z=x.create,st=J.create;Y.create;R.create;$.create;G.create;O.create;M.create;const rt=[D({name:"debug_random_number",description:"Generate a random number between 0 and 1",execute:async()=>new Promise(s=>{setTimeout(()=>{s(Math.random().toString())},1e3)}),parameters:Z({})})],lt=async()=>Promise.all(rt);async function H(s,e={},t){return window.__TAURI_INTERNALS__.invoke(s,e,t)}async function nt(s,e){await H("plugin:mcp|connect_server",{command:s,args:e})}async function at(){await H("plugin:mcp|disconnect_server")}async function it(){return await H("plugin:mcp|list_tools")}async function ot(s,e){return await H("plugin:mcp|call_tool",{name:s,args:e})}const ct=[D({name:"mcp_list_tools",description:"List all tools available on the MCP server",execute:async(s,e)=>await it(),parameters:Z({})}),D({name:"mcp_connect_server",description:'Connect to the MCP server. If "success", the connection to the MCP server is successful. Otherwise, the connection fails.',execute:async({command:s,args:e})=>(await nt(s,e),"success"),parameters:Z({command:z().describe("The command to connect to the MCP server"),args:xe(z()).describe("The arguments to pass to the MCP server")})}),D({name:"mcp_disconnect_server",description:'Disconnect from the MCP server. If "success", the disconnection from the MCP server is successful. Otherwise, the disconnection fails.',execute:async()=>(await at(),"success"),parameters:Z({})}),D({name:"mcp_call_tool",description:"Call a tool on the MCP server. The result is a list of content and a boolean indicating whether the tool call is an error.",execute:async({name:s,parameters:e})=>{const t=Object.fromEntries(e.map(({name:n,value:a})=>[n,a]));return await ot(s,t)},parameters:Z({name:z().describe("The name of the tool to call"),parameters:xe(Z({name:z().describe("The name of the parameter"),value:st([z(),et(),tt(),Z({})]).describe("The value of the parameter, it can be a string, a number, a boolean, or an object")})).describe("The parameters to pass to the tool")})})],ht=async()=>Promise.all(ct);export{p as Z,Ce as a,O as b,lt as d,ht as m,ut as t}; diff --git a/assets/memory-long-term-DXaJ39hx.js b/assets/memory-long-term-DKoN_UYI.js similarity index 71% rename from assets/memory-long-term-DXaJ39hx.js rename to assets/memory-long-term-DKoN_UYI.js index 555401a6522a4e06c98a37c2919b681cf5495c1f..af2342c264fbc6a11652ee37b7262bfdbb371b8a 100644 --- a/assets/memory-long-term-DXaJ39hx.js +++ b/assets/memory-long-term-DKoN_UYI.js @@ -1 +1 @@ -import{d as o,c as t,o as n}from"./index-CKmiAjHk.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-WDP_Z4A8.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-DJTXeVA_.js b/assets/memory-short-term-CGF6Nhl6.js similarity index 71% rename from assets/memory-short-term-DJTXeVA_.js rename to assets/memory-short-term-CGF6Nhl6.js index 47f21ffea6fe02ebcd8e72521868ba68a6a440fb..e9e9b1f7ec405c9bd7d3597dfa11d6159599e80b 100644 --- a/assets/memory-short-term-DJTXeVA_.js +++ b/assets/memory-short-term-CGF6Nhl6.js @@ -1 +1 @@ -import{d as o,c as t,o as r}from"./index-CKmiAjHk.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-WDP_Z4A8.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-BPGABSXG.js b/assets/messages-DjywpylS.js similarity index 68% rename from assets/messages-BPGABSXG.js rename to assets/messages-DjywpylS.js index 49091b2cfd8268db107d79a20eae119bb52f18ef..578727001ff6da0bd4040d0b3bb9e1d5d4e14fc2 100644 --- a/assets/messages-BPGABSXG.js +++ b/assets/messages-DjywpylS.js @@ -1 +1 @@ -import{u as f}from"./queue-C8JDWgSn.js";import{u as g,l as _}from"./queues-CFrXkpuW.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as v}from"./Textarea.vue_vue_type_script_setup_true_lang-DlkitCQO.js";import{d as x,e as o,c as l,o as u,a as e,b,u as k,Y as p,c6 as h,c7 as w}from"./index-CKmiAjHk.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Bm_AZiZR.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":""},M={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},L=x({__name:"messages",setup(B){const s=o(""),r=o([]),n=o(!1),m=f({handlers:[async i=>{r.value.push(i.data)}]}),d=g(m);async function c(){n.value=!0,d.add(s.value),d.add(_),s.value="",n.value=!1}return(i,t)=>(u(),l("div",S,[e("div",V,[b(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:c},null,8,["modelValue"]),e("button",y,p(n.value?"Processing...":"Send"),1)]),e("div",M,[e("div",Q,[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{L as default}; +import{u as f}from"./queue-C50Iq5oO.js";import{u as g,l as _}from"./queues-DBvSyUSC.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as v}from"./Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js";import{d as x,e as o,c as l,o as u,a as e,b,u as k,Y as p,c6 as h,c7 as w}from"./index-WDP_Z4A8.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.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":""},M={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},L=x({__name:"messages",setup(B){const s=o(""),r=o([]),n=o(!1),m=f({handlers:[async i=>{r.value.push(i.data)}]}),d=g(m);async function c(){n.value=!0,d.add(s.value),d.add(_),s.value="",n.value=!1}return(i,t)=>(u(),l("div",S,[e("div",V,[b(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:c},null,8,["modelValue"]),e("button",y,p(n.value?"Processing...":"Send"),1)]),e("div",M,[e("div",Q,[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{L as default}; diff --git a/assets/microsoft-speech-Bb6wLJYv.js b/assets/microsoft-speech-BLOCaluL.js similarity index 71% rename from assets/microsoft-speech-Bb6wLJYv.js rename to assets/microsoft-speech-BLOCaluL.js index 8d628b69047682e563f796d4ee40c8ca0e39bc89..eedbe45873416b63a5cf9ea35911f4a1e8f4b021 100644 --- a/assets/microsoft-speech-Bb6wLJYv.js +++ b/assets/microsoft-speech-BLOCaluL.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as B,$ as F,a0 as M,e as v,f as g,T,w as K,bk as N,o as q,bl as b,b as n,u as o,a as z}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as E}from"./providers-bTtvV6aX.js";import{u as G}from"./speech-CRLeR9Bl.js";import{_ as H}from"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import{_ as h}from"./FieldRange.vue_vue_type_script_setup_true_lang-5-FhMpNA.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as R,a as j}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-9MhYiAWZ.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.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=E(),{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]||[]);T(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 $=w.value.find(f=>f.id===i);if($){const f=r.generateSSML(s,$,{...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)=>(q(),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(()=>[z("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 k=="function"&&k(D);export{D as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as B,$ as F,a0 as M,e as v,f as g,T,w as K,bk as N,o as q,bl as b,b as n,u as o,a as z}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as E}from"./providers-7GsMyC_3.js";import{u as G}from"./speech-DRmXCXwq.js";import{_ as H}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import{_ as h}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as R,a as j}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.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=E(),{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]||[]);T(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 $=w.value.find(f=>f.id===i);if($){const f=r.generateSSML(s,$,{...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)=>(q(),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(()=>[z("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 k=="function"&&k(D);export{D as default}; diff --git a/assets/mistral-ai-DHyb6HuW.js b/assets/mistral-ai-jouO5dmJ.js similarity index 64% rename from assets/mistral-ai-DHyb6HuW.js rename to assets/mistral-ai-jouO5dmJ.js index 0297c2d94c3ca19a8df0b4c7c65f073de4a1830b..cc45916f451ebb356273d34705b3f3511c1e318b 100644 --- a/assets/mistral-ai-DHyb6HuW.js +++ b/assets/mistral-ai-jouO5dmJ.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as k,$ as U,V as $,a0 as y,f as c,T as K,w as h,bk as w,o as x,bl as p,b as l,u as t}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as z}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const a="mistral-ai",B=k({__name:"mistral-ai",setup(I){const{t:u}=U(),b=$(),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}});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]=V=>r.value=V),"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_686f6999_lang-Br6hYQpP.js";import{d as k,$ as U,V as $,a0 as y,f as c,T as K,w as h,bk as w,o as x,bl as p,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="mistral-ai",B=k({__name:"mistral-ai",setup(I){const{t:u}=U(),b=$(),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}});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]=V=>r.value=V),"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-DpXzkCqX.js b/assets/moonshot-ai-DZvpNZty.js similarity index 64% rename from assets/moonshot-ai-DpXzkCqX.js rename to assets/moonshot-ai-DZvpNZty.js index e04cc3dc9dea65dc194b76e9681f2daa5cae5f05..40793784e473c66cc42ea95ad38999b779959612 100644 --- a/assets/moonshot-ai-DpXzkCqX.js +++ b/assets/moonshot-ai-DZvpNZty.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as k,$ as U,V as $,a0 as h,f as c,T as y,w as K,bk as w,o as x,bl as p,b as l,u as t}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as z}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const a="moonshot-ai",C=k({__name:"moonshot-ai",setup(I){const{t:u}=U(),b=$(),d=z(),{providers:o}=h(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}});y(()=>{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(),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:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"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:s.value,"onUpdate:modelValue":i[1]||(i[1]=m=>s.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_686f6999_lang-Br6hYQpP.js";import{d as k,$ as U,V as $,a0 as h,f as c,T as y,w as K,bk as w,o as x,bl as p,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="moonshot-ai",C=k({__name:"moonshot-ai",setup(I){const{t:u}=U(),b=$(),d=z(),{providers:o}=h(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}});y(()=>{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(),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:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"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:s.value,"onUpdate:modelValue":i[1]||(i[1]=m=>s.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-MNOoMFA2.js b/assets/novita-ai-Bh1E0rHc.js similarity index 64% rename from assets/novita-ai-MNOoMFA2.js rename to assets/novita-ai-Bh1E0rHc.js index 9cd5b5cb8cf8d3de697b42fdfed505e25dd5a988..52c5fea33dc1ade048799ee9259b4da76e656dc5 100644 --- a/assets/novita-ai-MNOoMFA2.js +++ b/assets/novita-ai-Bh1E0rHc.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as k,$ as U,V as $,a0 as y,f as v,T as K,w as h,bk as w,o as x,bl as u,b as l,u as t}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as z}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const a="novita-ai",B=k({__name:"novita-ai",setup(I){const{t:m}=U(),b=$(),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}});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]=V=>r.value=V),"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_686f6999_lang-Br6hYQpP.js";import{d as k,$ as U,V as $,a0 as y,f as v,T as K,w as h,bk as w,o as x,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="novita-ai",B=k({__name:"novita-ai",setup(I){const{t:m}=U(),b=$(),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}});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]=V=>r.value=V),"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-CZDUVFrx.js b/assets/ollama-r0UZT5nG.js similarity index 85% rename from assets/ollama-CZDUVFrx.js rename to assets/ollama-r0UZT5nG.js index de8f6d8b507cf20c790c915a8801d4d359d5540e..96ac79d7548f8795c198bb1748017b3e61890b65 100644 --- a/assets/ollama-CZDUVFrx.js +++ b/assets/ollama-r0UZT5nG.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as P,cf as x,cg as U,c as g,o as f,b as m,e as K,w as B,c5 as O,a as _,bm as R,ch as S,W as z,Y as w,c6 as D,c7 as I,$ as T,V as F,a0 as A,f as M,T as E,bk as L,bl as V,u as a}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as W}from"./providers-bTtvV6aX.js";import{_ as q}from"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{a as Y,_ as j}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as G,a as H}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as J}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as C}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";const Q={flex:"~ gap-2"},X=P({__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(),g("div",Q,[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"])]))}}),Z={"max-w-full":""},ee={flex:"~ col gap-2"},le={class:"flex items-center gap-1 text-sm font-medium"},te={key:0,class:"text-red-500"},ae={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},oe={flex:"~ col gap-2"},re=["onClick"],se=P({__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=K(""),i=K("");return B([t,i],()=>{u("add",t.value,i.value)}),($,p)=>{const b=O("auto-animate");return f(),g("div",Z,[_("label",ee,[_("div",null,[_("div",le,[S(w(s.label)+" ",1),s.required!==!1?(f(),g("span",te,"*")):z("",!0)]),_("div",ae,w(s.description),1)]),R((f(),g("div",oe,[(f(!0),g(D,null,I(r.value,(y,l)=>(f(),g("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(X,{"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,re)]))),128))])),[[b]])])])}}}),d="ollama",ie=P({__name:"ollama",setup(v){const{t:o}=T(),s=F(),u=W(),{providers:r}=A(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}});E(()=>{var l,e,n,h;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)||"",(h=r.value[d])!=null&&h.headers||(r.value[d].headers={})});function $(){var l;r.value[d]={...(l=t.value)==null?void 0:l.defaultOptions}}const p=K([{key:"",value:""}]);function b(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 B(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,h;return f(),L(a(J),{"provider-name":(n=t.value)==null?void 0:n.localizedName,"provider-icon":(h=t.value)==null?void 0:h.icon,"on-back":()=>a(s).back()},{default:V(()=>[m(a(G),null,{default:V(()=>[m(a(H),{title:a(o)("settings.pages.providers.common.section.basic.title"),description:a(o)("settings.pages.providers.common.section.basic.description"),"on-reset":$},{default:V(()=>{var c,k;return[m(a(Y),{modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=N=>i.value=N),placeholder:((k=(c=t.value)==null?void 0:c.defaultOptions)==null?void 0:k.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title","description"]),m(a(j),{title:a(o)("settings.pages.providers.common.section.advanced.title")},{default:V(()=>[m(a(se),{modelValue:p.value,"onUpdate:modelValue":e[1]||(e[1]=c=>p.value=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,k)=>b(p.value,c,k)),onRemove:e[3]||(e[3]=c=>y(c,p.value))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof C=="function"&&C(ie);export{ie as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as P,cf as x,cg as U,c as g,o as f,b as m,e as K,w as B,c5 as O,a as _,bm as R,ch as S,W as z,Y as w,c6 as D,c7 as I,$ as T,V as F,a0 as A,f as M,T as E,bk as L,bl as V,u as a}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as W}from"./providers-7GsMyC_3.js";import{_ as q}from"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{a as Y,_ as j}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as G,a as H}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as J}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as C}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";const Q={flex:"~ gap-2"},X=P({__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(),g("div",Q,[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"])]))}}),Z={"max-w-full":""},ee={flex:"~ col gap-2"},le={class:"flex items-center gap-1 text-sm font-medium"},te={key:0,class:"text-red-500"},ae={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},oe={flex:"~ col gap-2"},re=["onClick"],se=P({__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=K(""),i=K("");return B([t,i],()=>{u("add",t.value,i.value)}),($,p)=>{const b=O("auto-animate");return f(),g("div",Z,[_("label",ee,[_("div",null,[_("div",le,[S(w(s.label)+" ",1),s.required!==!1?(f(),g("span",te,"*")):z("",!0)]),_("div",ae,w(s.description),1)]),R((f(),g("div",oe,[(f(!0),g(D,null,I(r.value,(y,l)=>(f(),g("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(X,{"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,re)]))),128))])),[[b]])])])}}}),d="ollama",ie=P({__name:"ollama",setup(v){const{t:o}=T(),s=F(),u=W(),{providers:r}=A(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}});E(()=>{var l,e,n,h;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)||"",(h=r.value[d])!=null&&h.headers||(r.value[d].headers={})});function $(){var l;r.value[d]={...(l=t.value)==null?void 0:l.defaultOptions}}const p=K([{key:"",value:""}]);function b(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 B(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,h;return f(),L(a(J),{"provider-name":(n=t.value)==null?void 0:n.localizedName,"provider-icon":(h=t.value)==null?void 0:h.icon,"on-back":()=>a(s).back()},{default:V(()=>[m(a(G),null,{default:V(()=>[m(a(H),{title:a(o)("settings.pages.providers.common.section.basic.title"),description:a(o)("settings.pages.providers.common.section.basic.description"),"on-reset":$},{default:V(()=>{var c,k;return[m(a(Y),{modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=N=>i.value=N),placeholder:((k=(c=t.value)==null?void 0:c.defaultOptions)==null?void 0:k.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title","description"]),m(a(j),{title:a(o)("settings.pages.providers.common.section.advanced.title")},{default:V(()=>[m(a(se),{modelValue:p.value,"onUpdate:modelValue":e[1]||(e[1]=c=>p.value=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,k)=>b(p.value,c,k)),onRemove:e[3]||(e[3]=c=>y(c,p.value))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof C=="function"&&C(ie);export{ie as default}; diff --git a/assets/openai-BwYrxiTm.js b/assets/openai-XNIcWilW.js similarity index 63% rename from assets/openai-BwYrxiTm.js rename to assets/openai-XNIcWilW.js index 1189066977d936de764319427687bab1f62fcc1a..722932b2ed0df39291d05ef307b4be03ea5972aa 100644 --- a/assets/openai-BwYrxiTm.js +++ b/assets/openai-XNIcWilW.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as h,$ as k,V,a0 as $,f as c,T as y,w as K,bk as I,o as w,bl as n,b as p,u as t}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as x}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as R}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as S,a as z}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as A}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const e="openai",B=h({__name:"openai",setup(C){const{t:m}=k(),b=V(),v=x(),{providers:a}=$(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}});y(()=>{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(()=>[p(t(S),null,{default:n(()=>[p(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 l;return[p(t(R),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=U=>s.value=U),"provider-name":((l=u.value)==null?void 0:l.localizedName)||"OpenAI",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),p(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:n(()=>[p(t(N),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=l=>r.value=l),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_686f6999_lang-Br6hYQpP.js";import{d as h,$ as k,V,a0 as $,f as c,T as y,w as K,bk as I,o as w,bl as n,b as p,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as x}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as R}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as S,a as z}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as A}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const e="openai",B=h({__name:"openai",setup(C){const{t:m}=k(),b=V(),v=x(),{providers:a}=$(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}});y(()=>{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(()=>[p(t(S),null,{default:n(()=>[p(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 l;return[p(t(R),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=U=>s.value=U),"provider-name":((l=u.value)==null?void 0:l.localizedName)||"OpenAI",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),p(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:n(()=>[p(t(N),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=l=>r.value=l),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-C3gDliQZ.js b/assets/openrouter-ai-CTdWmhtc.js similarity index 65% rename from assets/openrouter-ai-C3gDliQZ.js rename to assets/openrouter-ai-CTdWmhtc.js index 88381e3899dafb597b79b160374fc3d29968aed4..1c4a0e86e051b12a6ffaccd22633e071b99706e0 100644 --- a/assets/openrouter-ai-C3gDliQZ.js +++ b/assets/openrouter-ai-CTdWmhtc.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as V,$,V as y,a0 as K,f as _,T as O,w as h,bk as w,o as x,bl as v,b as d,u as r}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as z}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const a="openrouter-ai",C=V({__name:"openrouter-ai",setup(I){const{t:c}=$(),U=y(),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_686f6999_lang-Br6hYQpP.js";import{d as V,$,V as y,a0 as K,f as _,T as O,w as h,bk as w,o as x,bl as v,b as d,u as r}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="openrouter-ai",C=V({__name:"openrouter-ai",setup(I){const{t:c}=$(),U=y(),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-bTtvV6aX.js b/assets/providers-7GsMyC_3.js similarity index 99% rename from assets/providers-bTtvV6aX.js rename to assets/providers-7GsMyC_3.js index 12da11632366abfb0244fb6aacdcd0d32babf2d3..97269bf9a82e2a4320894851cd27ff48567c173c 100644 --- a/assets/providers-bTtvV6aX.js +++ b/assets/providers-7GsMyC_3.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 z=(a,i,n)=>de(a,typeof i!="symbol"?i+"":i,n);import{a4 as ce,cc as pe,$ as ue,e as E,w as ge,f as P}from"./index-CKmiAjHk.js";import{r as me,a as ve,e as _e,o as G}from"./index-LHmcipjy.js";const _=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),h=a=>({chat:i=>Object.assign(a,{model:i})}),w=a=>({embed:i=>Object.assign(a,{model:i})}),he=a=>({image:i=>Object.assign(a,{model:i})}),y=a=>({model:()=>a}),fe=a=>({speech:i=>Object.assign(a,{model:i})}),ye=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"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),N=(a,i="https://api.deepseek.com/")=>m(g("deepseek"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),D=(a,i="https://api.fireworks.ai/inference/v1/")=>m(g("fireworks"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),V=(a,i="https://generativelanguage.googleapis.com/v1beta/openai/")=>m(g("google-generative-ai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),W=(a,i="https://api.mistral.ai/v1/")=>m(g("mistral"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),H=(a,i="https://api.moonshot.cn/v1/")=>m(g("moonshot"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),J=(a,i="https://api.novita.ai/v3/openai/")=>m(g("novita"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),K=(a,i="https://api.openai.com/v1/")=>m(g("openai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),he({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i}),fe({apiKey:a,baseURL:i}),ye({apiKey:a,baseURL:i})),xe=(a,i="")=>m(g("openrouter"),{chat:(n,l)=>{const f={apiKey:a,baseURL:i,model:n};return{...l?(({extraHeaders:s,models:v,provider:u})=>{s!=null&&(f.headers??(f.headers={}),Object.assign(f.headers,s));let c;return u!=null&&(c=G(u)),G({models:v,provider:c})})(l):{},...f}}},y({apiKey:a,baseURL:i})),ke=(a,i="https://api.perplexity.ai/")=>m(g("perplexity"),h({apiKey:a,baseURL:i})),X=(a,i="https://api.together.xyz/v1/")=>m(g("together-ai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({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"),h({apiKey:a,baseURL:n}),w({apiKey:a,baseURL:n}))},Z=(a,i="https://api.x.ai/v1/")=>m(g("xai"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),C=(a="http://localhost:11434/v1/")=>m(g("ollama"),h({baseURL:a}),w({baseURL:a}),y({baseURL:a})),A=(...a)=>Object.assign(a[0],...a.slice(1));class j extends Error{constructor(n,l){super(n);z(this,"response");this.name="XSAIError",this.response=l}}const we=a=>a.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`),M=a=>Object.fromEntries(Object.entries(a).map(([i,n])=>[we(i),n])),Ke=a=>Object.fromEntries(Object.entries(a).filter(([,i])=>i!==void 0)),Me=(a,i)=>Ke({Authorization:i!==void 0?`Bearer ${i}`:void 0,...a}),Ce=(a,i)=>{const n=i.toString();return new URL(a,n.endsWith("/")?n:`${n}/`)},Oe=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},Ue=async a=>Oe(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 Q=(a,i="http://localhost:5933/v1/")=>{const n=({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:b,pronunciationDictionaryLocators:x,seed:O,voiceSettings:U})=>({extraBody:M({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:b,pronunciationDictionaryLocators:x?x.map(B=>M(B)):void 0,seed:O,voiceSettings:M(U??{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})})},Y=(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:M(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})})},R=(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:M(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})})},ee=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{sampleRate:s,volume:v,rate:u,pitch:c}=t,b={sampleRate:s,volume:v,rate:u,pitch:c};return Object.keys(b).forEach(x=>b[x]===void 0&&delete b[x]),{extraBody:M(b)}};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)(Ce(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:Me({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(Ue).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"}],je=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",category:"chat",tasks:["text-generation"],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=>xe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>n(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},ollama:{id:"ollama",category:"chat",tasks:["text-generation"],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=>C(e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...C(e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},"ollama-embedding":{id:"ollama-embedding",category:"embed",tasks:["text-feature-extraction"],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=>C(e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...C(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",category:"chat",tasks:["text-generation"],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=>C(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",category:"chat",tasks:["text-generation"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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}},"openai-audio-speech":{id:"openai-audio-speech",category:"speech",tasks:["text-to-speech"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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",category:"chat",tasks:["text-generation"],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",category:"chat",tasks:["text-generation"],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=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...V(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",category:"chat",tasks:["text-generation"],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=>Z(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...Z(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:{category:"chat",tasks:["text-generation"],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=>N(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...N(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",category:"speech",tasks:["text-to-speech"],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=>Q(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=Q(e.apiKey.trim(),e.baseUrl.trim()),d=await q({...r.voice()}),o=d.findIndex(k=>k.name.includes("Aria")),p=d.findIndex(k=>k.name.includes("Bill")),$=o!==-1?o:0,I=p!==-1?p:d.length-1,F=Math.min($,I),L=Math.max($,I);return[...d.slice(0,F),...d.slice(L+1),...d.slice(F,L+1)].map(k=>({id:k.id,name:k.name,provider:"elevenlabs",previewURL:k.preview_audio_url,languages:k.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:"microsoft-speech",category:"speech",tasks:["text-to-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=>Y(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=Y(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",category:"speech",tasks:["text-to-speech"],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=>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:"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",category:"speech",tasks:["text-to-speech"],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=>R(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=R(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",category:"chat",tasks:["text-generation"],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=>X(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...X(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",category:"chat",tasks:["text-generation"],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=>J(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...J(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",category:"chat",tasks:["text-generation"],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=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...D(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",category:"chat",tasks:["text-generation"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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",category:"chat",tasks:["text-generation"],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",category:"chat",tasks:["text-generation"],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=>ke(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",category:"chat",tasks:["text-generation"],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=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...W(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",category:"chat",tasks:["text-generation"],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=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...H(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 f(e){const r=a.value[e];if(!r)return!1;const d=l[e];return d?await d.validators.validateProviderConfig(r):!1}const t=E({});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 f(e)}))}v(),ge(a,v,{deep:!0});const u=P(()=>Object.keys(l).filter(e=>t.value[e])),c=E({}),b=E({}),x=E({});async function O(e){const r=a.value[e];if(!r)return[];const d=l[e];if(!d)return[];b.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{b.value[e]=!1}}function U(e){return c.value[e]||[]}const B=P(()=>{const e=[];for(const r of u.value)e.push(...c.value[r]||[]);return e});async function ae(){for(const e of u.value)l[e].capabilities.listModels&&await O(e)}function T(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 S=P(()=>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 ie(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 re=P(()=>u.value.map(e=>T(e))),te=P(()=>S.value.filter(e=>e.category==="chat")),ne=P(()=>S.value.filter(e=>e.category==="speech")),se=P(()=>S.value.filter(e=>e.category==="transcription"));function oe(e){return a.value[e]}return{providers:a,getProviderConfig:oe,availableProviders:u,configuredProviders:t,providerMetadata:l,getProviderMetadata:T,allProvidersMetadata:S,initializeProvider:s,validateProvider:f,availableModels:c,isLoadingModels:b,modelLoadError:x,fetchModelsForProvider:O,getModelsForProvider:U,allAvailableModels:B,loadModelsForConfiguredProviders:ae,getProviderInstance:ie,availableProvidersMetadata:re,allChatProvidersMetadata:te,allAudioSpeechProvidersMetadata:ne,allAudioTranscriptionProvidersMetadata:se}});export{_ as l,je 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 z=(a,i,n)=>de(a,typeof i!="symbol"?i+"":i,n);import{a4 as ce,cc as pe,$ as ue,e as E,w as ge,f as P}from"./index-WDP_Z4A8.js";import{r as me,a as ve,e as _e,o as G}from"./index-LHmcipjy.js";const _=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),h=a=>({chat:i=>Object.assign(a,{model:i})}),w=a=>({embed:i=>Object.assign(a,{model:i})}),he=a=>({image:i=>Object.assign(a,{model:i})}),y=a=>({model:()=>a}),fe=a=>({speech:i=>Object.assign(a,{model:i})}),ye=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"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),N=(a,i="https://api.deepseek.com/")=>m(g("deepseek"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),D=(a,i="https://api.fireworks.ai/inference/v1/")=>m(g("fireworks"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),V=(a,i="https://generativelanguage.googleapis.com/v1beta/openai/")=>m(g("google-generative-ai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),W=(a,i="https://api.mistral.ai/v1/")=>m(g("mistral"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),H=(a,i="https://api.moonshot.cn/v1/")=>m(g("moonshot"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),J=(a,i="https://api.novita.ai/v3/openai/")=>m(g("novita"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),K=(a,i="https://api.openai.com/v1/")=>m(g("openai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),he({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i}),fe({apiKey:a,baseURL:i}),ye({apiKey:a,baseURL:i})),xe=(a,i="")=>m(g("openrouter"),{chat:(n,l)=>{const f={apiKey:a,baseURL:i,model:n};return{...l?(({extraHeaders:s,models:v,provider:u})=>{s!=null&&(f.headers??(f.headers={}),Object.assign(f.headers,s));let c;return u!=null&&(c=G(u)),G({models:v,provider:c})})(l):{},...f}}},y({apiKey:a,baseURL:i})),ke=(a,i="https://api.perplexity.ai/")=>m(g("perplexity"),h({apiKey:a,baseURL:i})),X=(a,i="https://api.together.xyz/v1/")=>m(g("together-ai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({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"),h({apiKey:a,baseURL:n}),w({apiKey:a,baseURL:n}))},Z=(a,i="https://api.x.ai/v1/")=>m(g("xai"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),C=(a="http://localhost:11434/v1/")=>m(g("ollama"),h({baseURL:a}),w({baseURL:a}),y({baseURL:a})),A=(...a)=>Object.assign(a[0],...a.slice(1));class j extends Error{constructor(n,l){super(n);z(this,"response");this.name="XSAIError",this.response=l}}const we=a=>a.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`),M=a=>Object.fromEntries(Object.entries(a).map(([i,n])=>[we(i),n])),Ke=a=>Object.fromEntries(Object.entries(a).filter(([,i])=>i!==void 0)),Me=(a,i)=>Ke({Authorization:i!==void 0?`Bearer ${i}`:void 0,...a}),Ce=(a,i)=>{const n=i.toString();return new URL(a,n.endsWith("/")?n:`${n}/`)},Oe=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},Ue=async a=>Oe(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 Q=(a,i="http://localhost:5933/v1/")=>{const n=({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:b,pronunciationDictionaryLocators:x,seed:O,voiceSettings:U})=>({extraBody:M({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:b,pronunciationDictionaryLocators:x?x.map(B=>M(B)):void 0,seed:O,voiceSettings:M(U??{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})})},Y=(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:M(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})})},R=(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:M(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})})},ee=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{sampleRate:s,volume:v,rate:u,pitch:c}=t,b={sampleRate:s,volume:v,rate:u,pitch:c};return Object.keys(b).forEach(x=>b[x]===void 0&&delete b[x]),{extraBody:M(b)}};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)(Ce(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:Me({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(Ue).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"}],je=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",category:"chat",tasks:["text-generation"],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=>xe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>n(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},ollama:{id:"ollama",category:"chat",tasks:["text-generation"],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=>C(e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...C(e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},"ollama-embedding":{id:"ollama-embedding",category:"embed",tasks:["text-feature-extraction"],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=>C(e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...C(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",category:"chat",tasks:["text-generation"],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=>C(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",category:"chat",tasks:["text-generation"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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}},"openai-audio-speech":{id:"openai-audio-speech",category:"speech",tasks:["text-to-speech"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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",category:"chat",tasks:["text-generation"],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",category:"chat",tasks:["text-generation"],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=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...V(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",category:"chat",tasks:["text-generation"],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=>Z(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...Z(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:{category:"chat",tasks:["text-generation"],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=>N(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...N(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",category:"speech",tasks:["text-to-speech"],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=>Q(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=Q(e.apiKey.trim(),e.baseUrl.trim()),d=await q({...r.voice()}),o=d.findIndex(k=>k.name.includes("Aria")),p=d.findIndex(k=>k.name.includes("Bill")),$=o!==-1?o:0,I=p!==-1?p:d.length-1,F=Math.min($,I),L=Math.max($,I);return[...d.slice(0,F),...d.slice(L+1),...d.slice(F,L+1)].map(k=>({id:k.id,name:k.name,provider:"elevenlabs",previewURL:k.preview_audio_url,languages:k.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:"microsoft-speech",category:"speech",tasks:["text-to-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=>Y(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=Y(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",category:"speech",tasks:["text-to-speech"],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=>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:"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",category:"speech",tasks:["text-to-speech"],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=>R(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=R(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",category:"chat",tasks:["text-generation"],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=>X(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...X(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",category:"chat",tasks:["text-generation"],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=>J(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...J(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",category:"chat",tasks:["text-generation"],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=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...D(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",category:"chat",tasks:["text-generation"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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",category:"chat",tasks:["text-generation"],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",category:"chat",tasks:["text-generation"],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=>ke(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",category:"chat",tasks:["text-generation"],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=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...W(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",category:"chat",tasks:["text-generation"],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=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...H(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 f(e){const r=a.value[e];if(!r)return!1;const d=l[e];return d?await d.validators.validateProviderConfig(r):!1}const t=E({});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 f(e)}))}v(),ge(a,v,{deep:!0});const u=P(()=>Object.keys(l).filter(e=>t.value[e])),c=E({}),b=E({}),x=E({});async function O(e){const r=a.value[e];if(!r)return[];const d=l[e];if(!d)return[];b.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{b.value[e]=!1}}function U(e){return c.value[e]||[]}const B=P(()=>{const e=[];for(const r of u.value)e.push(...c.value[r]||[]);return e});async function ae(){for(const e of u.value)l[e].capabilities.listModels&&await O(e)}function T(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 S=P(()=>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 ie(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 re=P(()=>u.value.map(e=>T(e))),te=P(()=>S.value.filter(e=>e.category==="chat")),ne=P(()=>S.value.filter(e=>e.category==="speech")),se=P(()=>S.value.filter(e=>e.category==="transcription"));function oe(e){return a.value[e]}return{providers:a,getProviderConfig:oe,availableProviders:u,configuredProviders:t,providerMetadata:l,getProviderMetadata:T,allProvidersMetadata:S,initializeProvider:s,validateProvider:f,availableModels:c,isLoadingModels:b,modelLoadError:x,fetchModelsForProvider:O,getModelsForProvider:U,allAvailableModels:B,loadModelsForConfiguredProviders:ae,getProviderInstance:ie,availableProvidersMetadata:re,allChatProvidersMetadata:te,allAudioSpeechProvidersMetadata:ne,allAudioTranscriptionProvidersMetadata:se}});export{_ as l,je as u}; diff --git a/assets/queue-BgXr8__m.js b/assets/queue-Bzd_iRYh.js similarity index 90% rename from assets/queue-BgXr8__m.js rename to assets/queue-Bzd_iRYh.js index e4ca370223f22c42938a618d5318feb6bd1d47f0..cb159aeee3fe1e3e44674aa84be3aa43c7776aa5 100644 --- a/assets/queue-BgXr8__m.js +++ b/assets/queue-Bzd_iRYh.js @@ -1 +1 @@ -import{u as o}from"./queue-C8JDWgSn.js";import{d as v,e as h,T as k,c as w,o as g,a as I}from"./index-CKmiAjHk.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-C50Iq5oO.js";import{d as v,e as h,T as k,c as w,o as g,a as I}from"./index-WDP_Z4A8.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-C8JDWgSn.js b/assets/queue-C50Iq5oO.js similarity index 91% rename from assets/queue-C8JDWgSn.js rename to assets/queue-C50Iq5oO.js index d6ed0dcae4151f814ef495815bbe3f380c1b15c1..6a2c3490a02099cdfb21b1a6b70b74f74fcb40f5 100644 --- a/assets/queue-C8JDWgSn.js +++ b/assets/queue-C50Iq5oO.js @@ -1 +1 @@ -import{e as l}from"./index-CKmiAjHk.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{e as l}from"./index-WDP_Z4A8.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-CFrXkpuW.js b/assets/queues-DBvSyUSC.js similarity index 94% rename from assets/queues-CFrXkpuW.js rename to assets/queues-DBvSyUSC.js index 2243fb0bb62850e050a29251b3fcc0741b32ea39..8a9988a28e2eb9c1cffef37075ce03cda2465330 100644 --- a/assets/queues-CFrXkpuW.js +++ b/assets/queues-DBvSyUSC.js @@ -1 +1 @@ -import{c as i}from"./emotions-DWNSb738.js";import{u as s}from"./queue-C8JDWgSn.js";import{e as d}from"./index-CKmiAjHk.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{c as i}from"./emotions-DWNSb738.js";import{u as s}from"./queue-C50Iq5oO.js";import{e as d}from"./index-WDP_Z4A8.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-Bo72-vCu.js b/assets/settings-BZFpczgY.js similarity index 97% rename from assets/settings-Bo72-vCu.js rename to assets/settings-BZFpczgY.js index c7c64078b45acf0c7f466f63a81c46f5df036ad7..80709f2fc8618faf1bc0a4839032f7c7dc5bf169 100644 --- a/assets/settings-Bo72-vCu.js +++ b/assets/settings-BZFpczgY.js @@ -1 +1 @@ -var rt=Object.defineProperty;var ot=(t,s,e)=>s in t?rt(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var m=(t,s,e)=>ot(t,typeof s!="symbol"?s+"":s,e);import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{r as D,w as b,u as A,e as g,f as B,i as at,g as lt,h as y,j as J,n as ut,k as V,l as M,p as l,m as $,q as O,s as S,t as v,v as ct,x as ft,y as pt,z as U,A as dt,B as mt,C as gt,D as ht,E as bt,F as yt,G as vt,H as xt,I as Tt,J as At,K as Ot,L as wt,M as kt,N as Bt,O as Et,P as St,Q as jt,S as Pt,d as Q,T as Vt,U as Ct,c as j,a as k,V as Nt,W,X as Rt,Y as X,o as P,Z as _,_ as Y,$ as Mt,a0 as zt,b as C,R as Dt}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as Lt}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{H as Ft}from"./HeaderLink-z0x7oVxU.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";const T={};class Ht{constructor(){m(this,"subscriptions",new Set)}add(s){return this.subscriptions.add(s),()=>this.subscriptions.delete(s)}notify(s,e,n){if(this.subscriptions.size)for(const i of this.subscriptions)i(s,e,n)}clear(){this.subscriptions.clear()}}function Z(t){return!Number.isNaN(Number.parseFloat(t))}class $t{constructor(s){m(this,"current");m(this,"prev");m(this,"timeDelta",0);m(this,"lastUpdated",0);m(this,"updateSubscribers",new Ht);m(this,"stopAnimation");m(this,"canTrackVelocity",!1);m(this,"updateAndNotify",s=>{this.prev=this.current,this.current=s;const{delta:e,timestamp:n}=pt();this.lastUpdated!==n&&(this.timeDelta=e,this.lastUpdated=n),U.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)});m(this,"scheduleVelocityCheck",()=>U.postRender(this.velocityCheck));m(this,"velocityCheck",({timestamp:s})=>{this.canTrackVelocity||(this.canTrackVelocity=Z(this.current)),s!==this.lastUpdated&&(this.prev=this.current)});this.prev=this.current=s,this.canTrackVelocity=Z(this.current)}onChange(s){return this.updateSubscribers.add(s)}clearListeners(){this.updateSubscribers.clear()}set(s){this.updateAndNotify(s)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?dt(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(s){return this.stop(),new Promise(e=>{const{stop:n}=s(e);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}}function Ut(t){return new $t(t)}const{isArray:Wt}=Array;function Xt(){const t=g({}),s=n=>{const i=r=>{t.value[r]&&(t.value[r].stop(),t.value[r].destroy(),delete t.value[r])};n?Wt(n)?n.forEach(i):i(n):Object.keys(t.value).forEach(i)},e=(n,i,r)=>{if(t.value[n])return t.value[n];const o=Ut(i);return o.onChange(a=>r[n]=a),t.value[n]=o,o};return jt(s),{motionValues:t,get:e,stop:s}}function Yt(t){return Array.isArray(t)}function w(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function N(t){return{type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function Zt(t){return{type:"spring",stiffness:550,damping:t===0?100:30,restDelta:.01,restSpeed:10}}function R(){return{type:"keyframes",ease:"linear",duration:300}}function It(t){return{type:"keyframes",duration:800,values:t}}const I={default:Zt,x:w,y:w,z:w,rotate:w,rotateX:w,rotateY:w,rotateZ:w,scaleX:N,scaleY:N,scale:N,backgroundColor:R,color:R,opacity:R};function tt(t,s){let e;return Yt(s)?e=It:e=I[t]||I.default,{to:s,...e(s)}}const K={...ut,transform:Math.round},et={color:v,backgroundColor:v,outlineColor:v,fill:v,stroke:v,borderColor:v,borderTopColor:v,borderRightColor:v,borderBottomColor:v,borderLeftColor:v,borderWidth:l,borderTopWidth:l,borderRightWidth:l,borderBottomWidth:l,borderLeftWidth:l,borderRadius:l,radius:l,borderTopLeftRadius:l,borderTopRightRadius:l,borderBottomRightRadius:l,borderBottomLeftRadius:l,width:l,maxWidth:l,height:l,maxHeight:l,size:l,top:l,right:l,bottom:l,left:l,padding:l,paddingTop:l,paddingRight:l,paddingBottom:l,paddingLeft:l,margin:l,marginTop:l,marginRight:l,marginBottom:l,marginLeft:l,rotate:O,rotateX:O,rotateY:O,rotateZ:O,scale:S,scaleX:S,scaleY:S,scaleZ:S,skew:O,skewX:O,skewY:O,distance:l,translateX:l,translateY:l,translateZ:l,x:l,y:l,z:l,perspective:l,transformPerspective:l,opacity:V,originX:$,originY:$,originZ:l,zIndex:K,filter:M,WebkitFilter:M,fillOpacity:V,strokeOpacity:V,numOctaves:K},L=t=>et[t];function z(t,s){return s&&typeof t=="number"&&s.transform?s.transform(t):t}function Kt(t,s){let e=L(t);return e!==M&&(e=J),e.getAnimatableNone?e.getAnimatableNone(s):void 0}const qt={linear:St,easeIn:Et,easeInOut:Bt,easeOut:kt,circIn:wt,circInOut:Ot,circOut:At,backIn:Tt,backInOut:xt,backOut:vt,anticipate:yt,bounceIn:bt,bounceInOut:ht,bounceOut:gt};function q(t){if(Array.isArray(t)){const[s,e,n,i]=t;return mt(s,e,n,i)}else if(typeof t=="string")return qt[t];return t}function Gt(t){return Array.isArray(t)&&typeof t[0]!="number"}function G(t,s){return t==="zIndex"?!1:!!(typeof s=="number"||Array.isArray(s)||typeof s=="string"&&J.test(s)&&!s.startsWith("url("))}function Jt(t){return Array.isArray(t.to)&&t.to[0]===null&&(t.to=[...t.to],t.to[0]=t.from),t}function Qt({ease:t,times:s,delay:e,...n}){const i={...n};return s&&(i.offset=s),t&&(i.ease=Gt(t)?t.map(q):q(t)),e&&(i.elapsed=-e),i}function _t(t,s,e){return Array.isArray(s.to)&&(t.duration||(t.duration=800)),Jt(s),te(t)||(t={...t,...tt(e,s.to)}),{...s,...Qt(t)}}function te({delay:t,repeat:s,repeatType:e,repeatDelay:n,from:i,...r}){return!!Object.keys(r).length}function ee(t,s){return t[s]||t.default||t}function se(t,s,e,n,i){const r=ee(n,t);let o=r.from===null||r.from===void 0?s.get():r.from;const a=G(t,e);o==="none"&&a&&typeof e=="string"&&(o=Kt(t,e));const c=G(t,o);function p(f){const d={from:o,to:e,velocity:n.velocity?n.velocity:s.getVelocity(),onUpdate:x=>s.set(x)};return r.type==="inertia"||r.type==="decay"?ct({...d,...r}):ft({..._t(r,d,t),onUpdate:x=>{d.onUpdate(x),r.onUpdate&&r.onUpdate(x)},onComplete:()=>{i&&i(),f&&f()}})}function u(f){return s.set(e),i&&i(),f&&f(),{stop:()=>{}}}return!c||!a||r.type===!1?u:p}function ie(){const{motionValues:t,stop:s,get:e}=Xt();return{motionValues:t,stop:s,push:(i,r,o,a={},c)=>{const p=o[i],u=e(i,p,o);if(a&&a.immediate){u.set(r);return}const f=se(i,u,r,a,c);u.start(f)}}}function ne(t,s={},{motionValues:e,push:n,stop:i}=ie()){const r=A(s),o=g(!1);b(e,f=>{o.value=Object.values(f).filter(d=>d.isAnimating()).length>0},{immediate:!0,deep:!0});const a=f=>{if(!r||!r[f])throw new Error(`The variant ${f} does not exist.`);return r[f]},c=f=>{typeof f=="string"&&(f=a(f));const d=Object.entries(f).map(([h,E])=>{if(h!=="transition")return new Promise(nt=>n(h,E,t,f.transition||tt(h,f[h]),nt))}).filter(Boolean);async function x(){var h,E;await Promise.all(d),(E=(h=f.transition)==null?void 0:h.onComplete)==null||E.call(h)}return Promise.all([x()])};return{isAnimating:o,apply:c,set:f=>{const d=at(f)?f:a(f);Object.entries(d).forEach(([x,h])=>{x!=="transition"&&n(x,h,t,{immediate:!0})})},leave:async f=>{let d;if(r&&(r.leave&&(d=r.leave),!r.leave&&r.initial&&(d=r.initial)),!d){f();return}await c(d),f()},stop:i}}const F=typeof window<"u",re=()=>F&&(window.onpointerdown===null||(T==null?void 0:T.TEST)),oe=()=>F&&(window.ontouchstart===null||(T==null?void 0:T.TEST)),ae=()=>F&&(window.onmousedown===null||(T==null?void 0:T.TEST));function le({target:t,state:s,variants:e,apply:n}){const i=A(e),r=g(!1),o=g(!1),a=g(!1),c=B(()=>{let u=[...Object.keys(s.value||{})];return i&&(i.hovered&&(u=[...u,...Object.keys(i.hovered)]),i.tapped&&(u=[...u,...Object.keys(i.tapped)]),i.focused&&(u=[...u,...Object.keys(i.focused)])),u}),p=B(()=>{const u={};Object.assign(u,s.value),r.value&&i.hovered&&Object.assign(u,i.hovered),o.value&&i.tapped&&Object.assign(u,i.tapped),a.value&&i.focused&&Object.assign(u,i.focused);for(const f in u)c.value.includes(f)||delete u[f];return u});i.hovered&&(y(t,"mouseenter",()=>r.value=!0),y(t,"mouseleave",()=>{r.value=!1,o.value=!1})),i.tapped&&(ae()&&(y(t,"mousedown",()=>o.value=!0),y(t,"mouseup",()=>o.value=!1)),re()&&(y(t,"pointerdown",()=>o.value=!0),y(t,"pointerup",()=>o.value=!1)),oe()&&(y(t,"touchstart",()=>o.value=!0),y(t,"touchend",()=>o.value=!1))),i.focused&&(y(t,"focus",()=>a.value=!0),y(t,"blur",()=>a.value=!1)),b([r,o,a],()=>{n(p.value)})}function ue({set:t,target:s,variants:e,variant:n}){const i=A(e);b(()=>s,()=>{i&&(i.initial&&(t("initial"),n.value="initial"),i.enter&&(n.value="enter"))},{immediate:!0,flush:"pre"})}function ce({state:t,apply:s}){b(t,e=>{e&&s(e)},{immediate:!0})}function fe({target:t,variants:s,variant:e}){const n=A(s);n&&(n.visible||n.visibleOnce)&<(t,([{isIntersecting:i}])=>{n.visible?i?e.value="visible":e.value="initial":n.visibleOnce&&(i&&e.value!=="visibleOnce"?e.value="visibleOnce":e.value||(e.value="initial"))})}function pe(t,s={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){s.lifeCycleHooks&&ue(t),s.syncVariants&&ce(t),s.visibilityHooks&&fe(t),s.eventListeners&&le(t)}function de(t={}){const s=D({...t}),e=g({});return b(s,()=>{const n={};for(const[i,r]of Object.entries(s)){const o=L(i),a=z(r,o);n[i]=a}e.value=n},{immediate:!0,deep:!0}),{state:s,style:e}}function H(t,s){b(()=>Pt(t),e=>{e&&s(e)},{immediate:!0})}const me={x:"translateX",y:"translateY",z:"translateZ"};function ge(t={},s=!0){const e=D({...t}),n=g("");return b(e,i=>{let r="",o=!1;if(s&&(i.x||i.y||i.z)){const a=[i.x||0,i.y||0,i.z||0].map(c=>z(c,l)).join(",");r+=`translate3d(${a}) `,o=!0}for(const[a,c]of Object.entries(i)){if(s&&(a==="x"||a==="y"||a==="z"))continue;const p=L(a),u=z(c,p);r+=`${me[a]||a}(${u}) `}s&&!o&&(r+="translateZ(0px) "),n.value=r.trim()},{immediate:!0,deep:!0}),{state:e,transform:n}}const he=["","X","Y","Z"],be=["perspective","translate","scale","rotate","skew"],st=["transformPerspective","x","y","z"];be.forEach(t=>{he.forEach(s=>{const e=t+s;st.push(e)})});const ye=new Set(st);function it(t){return ye.has(t)}const ve=new Set(["originX","originY","originZ"]);function xe(t){return ve.has(t)}function Te(t,s){let e,n;const{state:i,style:r}=de();return H(t,o=>{n=o;for(const a of Object.keys(et))o.style[a]===null||o.style[a]===""||it(a)||xe(a)||(i[a]=o.style[a]);e&&Object.entries(e).forEach(([a,c])=>o.style[a]=c),s&&s(i)}),b(r,o=>{if(!n){e=o;return}for(const a in o)n.style[a]=o[a]},{immediate:!0}),{style:i}}function Ae(t){const s=t.trim().split(/\) |\)/);if(s.length===1)return{};const e=n=>n.endsWith("px")||n.endsWith("deg")?Number.parseFloat(n):Number.isNaN(Number(n))?Number(n):n;return s.reduce((n,i)=>{if(!i)return n;const[r,o]=i.split("("),c=o.split(",").map(u=>e(u.endsWith(")")?u.replace(")",""):u.trim())),p=c.length===1?c[0]:c;return{...n,[r]:p}},{})}function Oe(t,s){Object.entries(Ae(s)).forEach(([e,n])=>{const i=["x","y","z"];if(e==="translate3d"){if(n===0){i.forEach(r=>t[r]=0);return}n.forEach((r,o)=>t[i[o]]=r);return}if(n=Number.parseFloat(`${n}`),e==="translateX"){t.x=n;return}if(e==="translateY"){t.y=n;return}if(e==="translateZ"){t.z=n;return}t[e]=n})}function we(t,s){let e,n;const{state:i,transform:r}=ge();return H(t,o=>{n=o,o.style.transform&&Oe(i,o.style.transform),e&&(o.style.transform=e),s&&s(i)}),b(r,o=>{if(!n){e=o;return}n.style.transform=o},{immediate:!0}),{transform:i}}function ke(t){return Object.entries(t)}function Be(t,s){const e=D({}),n=o=>Object.entries(o).forEach(([a,c])=>e[a]=c),{style:i}=Te(t,n),{transform:r}=we(t,n);return b(e,o=>{ke(o).forEach(([a,c])=>{const p=it(a)?r:i;p[a]&&p[a]===c||(p[a]=c)})},{immediate:!0,deep:!0}),H(t,()=>s),{motionProperties:e,style:i,transform:r}}function Ee(t={}){const s=A(t),e=g();return{state:B(()=>{if(e.value)return s[e.value]}),variant:e}}function Se(t,s={},e){const{motionProperties:n}=Be(t),{variant:i,state:r}=Ee(s),o=ne(n,s),a={target:t,variant:i,variants:s,state:r,motionProperties:n,...o};return pe(a,e),a}const je={relative:""},Pe={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},Ve={text:"neutral-300 dark:neutral-500","text-nowrap":""},Ce={"text-nowrap":"","text-3xl":"","font-semibold":""},Ne=Q({__name:"PageHeader",props:{title:null,subtitle:null,showBackButton:{type:Boolean,default:!0},disableBackButton:{type:Boolean,default:!1}},setup(t){const s=t,e=Nt(),n=_(),i=g(),r=g(s.title),o=g(s.subtitle),a=g(s.disableBackButton),{apply:c}=Se(i,{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 Vt(async()=>{await c("initial"),await c("enter")}),Ct(async()=>{await c("leave"),a.value=!0}),b([()=>s.title,()=>s.subtitle,n],async()=>{await c("leave"),await Y(),a.value=s.disableBackButton,r.value=s.title,o.value=s.subtitle,await Y(),await c("initial"),await c("enter")}),(p,u)=>(P(),j("div",{ref_key:"pageHeaderRef",ref:i,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"},[k("button",{onClick:u[0]||(u[0]=f=>A(e).back())},[a.value?W("",!0):(P(),j("div",{key:0,"i-solar:alt-arrow-left-line-duotone":"","text-2xl":"",class:Rt({"pointer-events-none op-0":!t.showBackButton})},null,2))]),k("h1",je,[o.value?(P(),j("div",Pe,[k("span",Ve,X(o.value),1)])):W("",!0),k("div",Ce,X(r.value),1)])],512))}}),Re={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)"}},Me={class:"px-0 py-1 md:px-3 md:py-3","w-full":"","gap-2":"",bg:"$bg-color"},ze={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col","mx-auto":"","max-w-screen-xl":""},Ke=Q({__name:"settings",setup(t){const s=_(),{t:e}=Mt(),n=Lt(),{allProvidersMetadata:i}=zt(n),r=B(()=>{const a={"/settings/airi-card":{subtitle:e("settings.title"),title:e("settings.pages.card.title")},"/settings/appearance":{subtitle:e("settings.title"),title:e("settings.pages.themes.title")},"/settings/appearance/general":{subtitle:e("settings.title"),title:e("settings.pages.themes.general.title")},"/settings/appearance/color-scheme":{subtitle:e("settings.title"),title:e("settings.pages.themes.color-scheme.title")},"/settings/appearance/developer":{subtitle:e("settings.title"),title:e("settings.pages.themes.developer.title")},"/settings/memory":{subtitle:e("settings.title"),title:e("settings.pages.memory.title")},"/settings/models":{subtitle:e("settings.title"),title:e("settings.pages.models.title")},"/settings/modules":{subtitle:e("settings.title"),title:e("settings.pages.modules.title")},"/settings/modules/consciousness":{subtitle:e("settings.title"),title:e("settings.pages.modules.consciousness.title")},"/settings/modules/speech":{subtitle:e("settings.title"),title:e("settings.pages.modules.speech.title")},"/settings/modules/hearing":{subtitle:e("settings.title"),title:e("settings.pages.modules.hearing.title")},"/settings/modules/memory-short-term":{subtitle:e("settings.title"),title:e("settings.pages.modules.memory-short-term.title")},"/settings/modules/memory-long-term":{subtitle:e("settings.title"),title:e("settings.pages.modules.memory-long-term.title")},"/settings/modules/messaging-discord":{subtitle:e("settings.title"),title:e("settings.pages.modules.messaging-discord.title")},"/settings/modules/x":{subtitle:e("settings.title"),title:e("settings.pages.modules.x.title")},"/settings/modules/gaming-minecraft":{subtitle:e("settings.title"),title:e("settings.pages.modules.gaming-minecraft.title")},"/settings/modules/gaming-factorio":{subtitle:e("settings.title"),title:e("settings.pages.modules.gaming-factorio.title")},"/settings/providers":{subtitle:e("settings.title"),title:e("settings.pages.providers.title")},"/settings/scene":{subtitle:e("settings.title"),title:e("settings.pages.scene.title")},"/settings":{title:e("settings.title")}};for(const c of i.value)a[`/settings/providers/${c.id}`]={subtitle:e("settings.title"),title:e(c.nameKey)};return a}),o=B(()=>r.value[s.path]);return(a,c)=>{var p,u;return P(),j("div",Re,[k("div",Me,[C(Ft)]),k("div",ze,[C(A(Ne),{title:(p=o.value)==null?void 0:p.title,subtitle:(u=o.value)==null?void 0:u.subtitle},null,8,["title","subtitle"]),C(A(Dt))])])}}});export{Ke as default}; +var rt=Object.defineProperty;var ot=(t,s,e)=>s in t?rt(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var m=(t,s,e)=>ot(t,typeof s!="symbol"?s+"":s,e);import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{r as D,w as b,u as A,e as g,f as B,i as at,g as lt,h as y,j as J,n as ut,k as V,l as M,p as l,m as $,q as O,s as S,t as v,v as ct,x as ft,y as pt,z as U,A as dt,B as mt,C as gt,D as ht,E as bt,F as yt,G as vt,H as xt,I as Tt,J as At,K as Ot,L as wt,M as kt,N as Bt,O as Et,P as St,Q as jt,S as Pt,d as Q,T as Vt,U as Ct,c as j,a as k,V as Nt,W,X as Rt,Y as X,o as P,Z as _,_ as Y,$ as Mt,a0 as zt,b as C,R as Dt}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as Lt}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{H as Ft}from"./HeaderLink--5c4L7nq.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";const T={};class Ht{constructor(){m(this,"subscriptions",new Set)}add(s){return this.subscriptions.add(s),()=>this.subscriptions.delete(s)}notify(s,e,n){if(this.subscriptions.size)for(const i of this.subscriptions)i(s,e,n)}clear(){this.subscriptions.clear()}}function Z(t){return!Number.isNaN(Number.parseFloat(t))}class $t{constructor(s){m(this,"current");m(this,"prev");m(this,"timeDelta",0);m(this,"lastUpdated",0);m(this,"updateSubscribers",new Ht);m(this,"stopAnimation");m(this,"canTrackVelocity",!1);m(this,"updateAndNotify",s=>{this.prev=this.current,this.current=s;const{delta:e,timestamp:n}=pt();this.lastUpdated!==n&&(this.timeDelta=e,this.lastUpdated=n),U.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)});m(this,"scheduleVelocityCheck",()=>U.postRender(this.velocityCheck));m(this,"velocityCheck",({timestamp:s})=>{this.canTrackVelocity||(this.canTrackVelocity=Z(this.current)),s!==this.lastUpdated&&(this.prev=this.current)});this.prev=this.current=s,this.canTrackVelocity=Z(this.current)}onChange(s){return this.updateSubscribers.add(s)}clearListeners(){this.updateSubscribers.clear()}set(s){this.updateAndNotify(s)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?dt(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(s){return this.stop(),new Promise(e=>{const{stop:n}=s(e);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}}function Ut(t){return new $t(t)}const{isArray:Wt}=Array;function Xt(){const t=g({}),s=n=>{const i=r=>{t.value[r]&&(t.value[r].stop(),t.value[r].destroy(),delete t.value[r])};n?Wt(n)?n.forEach(i):i(n):Object.keys(t.value).forEach(i)},e=(n,i,r)=>{if(t.value[n])return t.value[n];const o=Ut(i);return o.onChange(a=>r[n]=a),t.value[n]=o,o};return jt(s),{motionValues:t,get:e,stop:s}}function Yt(t){return Array.isArray(t)}function w(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function N(t){return{type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function Zt(t){return{type:"spring",stiffness:550,damping:t===0?100:30,restDelta:.01,restSpeed:10}}function R(){return{type:"keyframes",ease:"linear",duration:300}}function It(t){return{type:"keyframes",duration:800,values:t}}const I={default:Zt,x:w,y:w,z:w,rotate:w,rotateX:w,rotateY:w,rotateZ:w,scaleX:N,scaleY:N,scale:N,backgroundColor:R,color:R,opacity:R};function tt(t,s){let e;return Yt(s)?e=It:e=I[t]||I.default,{to:s,...e(s)}}const K={...ut,transform:Math.round},et={color:v,backgroundColor:v,outlineColor:v,fill:v,stroke:v,borderColor:v,borderTopColor:v,borderRightColor:v,borderBottomColor:v,borderLeftColor:v,borderWidth:l,borderTopWidth:l,borderRightWidth:l,borderBottomWidth:l,borderLeftWidth:l,borderRadius:l,radius:l,borderTopLeftRadius:l,borderTopRightRadius:l,borderBottomRightRadius:l,borderBottomLeftRadius:l,width:l,maxWidth:l,height:l,maxHeight:l,size:l,top:l,right:l,bottom:l,left:l,padding:l,paddingTop:l,paddingRight:l,paddingBottom:l,paddingLeft:l,margin:l,marginTop:l,marginRight:l,marginBottom:l,marginLeft:l,rotate:O,rotateX:O,rotateY:O,rotateZ:O,scale:S,scaleX:S,scaleY:S,scaleZ:S,skew:O,skewX:O,skewY:O,distance:l,translateX:l,translateY:l,translateZ:l,x:l,y:l,z:l,perspective:l,transformPerspective:l,opacity:V,originX:$,originY:$,originZ:l,zIndex:K,filter:M,WebkitFilter:M,fillOpacity:V,strokeOpacity:V,numOctaves:K},L=t=>et[t];function z(t,s){return s&&typeof t=="number"&&s.transform?s.transform(t):t}function Kt(t,s){let e=L(t);return e!==M&&(e=J),e.getAnimatableNone?e.getAnimatableNone(s):void 0}const qt={linear:St,easeIn:Et,easeInOut:Bt,easeOut:kt,circIn:wt,circInOut:Ot,circOut:At,backIn:Tt,backInOut:xt,backOut:vt,anticipate:yt,bounceIn:bt,bounceInOut:ht,bounceOut:gt};function q(t){if(Array.isArray(t)){const[s,e,n,i]=t;return mt(s,e,n,i)}else if(typeof t=="string")return qt[t];return t}function Gt(t){return Array.isArray(t)&&typeof t[0]!="number"}function G(t,s){return t==="zIndex"?!1:!!(typeof s=="number"||Array.isArray(s)||typeof s=="string"&&J.test(s)&&!s.startsWith("url("))}function Jt(t){return Array.isArray(t.to)&&t.to[0]===null&&(t.to=[...t.to],t.to[0]=t.from),t}function Qt({ease:t,times:s,delay:e,...n}){const i={...n};return s&&(i.offset=s),t&&(i.ease=Gt(t)?t.map(q):q(t)),e&&(i.elapsed=-e),i}function _t(t,s,e){return Array.isArray(s.to)&&(t.duration||(t.duration=800)),Jt(s),te(t)||(t={...t,...tt(e,s.to)}),{...s,...Qt(t)}}function te({delay:t,repeat:s,repeatType:e,repeatDelay:n,from:i,...r}){return!!Object.keys(r).length}function ee(t,s){return t[s]||t.default||t}function se(t,s,e,n,i){const r=ee(n,t);let o=r.from===null||r.from===void 0?s.get():r.from;const a=G(t,e);o==="none"&&a&&typeof e=="string"&&(o=Kt(t,e));const c=G(t,o);function p(f){const d={from:o,to:e,velocity:n.velocity?n.velocity:s.getVelocity(),onUpdate:x=>s.set(x)};return r.type==="inertia"||r.type==="decay"?ct({...d,...r}):ft({..._t(r,d,t),onUpdate:x=>{d.onUpdate(x),r.onUpdate&&r.onUpdate(x)},onComplete:()=>{i&&i(),f&&f()}})}function u(f){return s.set(e),i&&i(),f&&f(),{stop:()=>{}}}return!c||!a||r.type===!1?u:p}function ie(){const{motionValues:t,stop:s,get:e}=Xt();return{motionValues:t,stop:s,push:(i,r,o,a={},c)=>{const p=o[i],u=e(i,p,o);if(a&&a.immediate){u.set(r);return}const f=se(i,u,r,a,c);u.start(f)}}}function ne(t,s={},{motionValues:e,push:n,stop:i}=ie()){const r=A(s),o=g(!1);b(e,f=>{o.value=Object.values(f).filter(d=>d.isAnimating()).length>0},{immediate:!0,deep:!0});const a=f=>{if(!r||!r[f])throw new Error(`The variant ${f} does not exist.`);return r[f]},c=f=>{typeof f=="string"&&(f=a(f));const d=Object.entries(f).map(([h,E])=>{if(h!=="transition")return new Promise(nt=>n(h,E,t,f.transition||tt(h,f[h]),nt))}).filter(Boolean);async function x(){var h,E;await Promise.all(d),(E=(h=f.transition)==null?void 0:h.onComplete)==null||E.call(h)}return Promise.all([x()])};return{isAnimating:o,apply:c,set:f=>{const d=at(f)?f:a(f);Object.entries(d).forEach(([x,h])=>{x!=="transition"&&n(x,h,t,{immediate:!0})})},leave:async f=>{let d;if(r&&(r.leave&&(d=r.leave),!r.leave&&r.initial&&(d=r.initial)),!d){f();return}await c(d),f()},stop:i}}const F=typeof window<"u",re=()=>F&&(window.onpointerdown===null||(T==null?void 0:T.TEST)),oe=()=>F&&(window.ontouchstart===null||(T==null?void 0:T.TEST)),ae=()=>F&&(window.onmousedown===null||(T==null?void 0:T.TEST));function le({target:t,state:s,variants:e,apply:n}){const i=A(e),r=g(!1),o=g(!1),a=g(!1),c=B(()=>{let u=[...Object.keys(s.value||{})];return i&&(i.hovered&&(u=[...u,...Object.keys(i.hovered)]),i.tapped&&(u=[...u,...Object.keys(i.tapped)]),i.focused&&(u=[...u,...Object.keys(i.focused)])),u}),p=B(()=>{const u={};Object.assign(u,s.value),r.value&&i.hovered&&Object.assign(u,i.hovered),o.value&&i.tapped&&Object.assign(u,i.tapped),a.value&&i.focused&&Object.assign(u,i.focused);for(const f in u)c.value.includes(f)||delete u[f];return u});i.hovered&&(y(t,"mouseenter",()=>r.value=!0),y(t,"mouseleave",()=>{r.value=!1,o.value=!1})),i.tapped&&(ae()&&(y(t,"mousedown",()=>o.value=!0),y(t,"mouseup",()=>o.value=!1)),re()&&(y(t,"pointerdown",()=>o.value=!0),y(t,"pointerup",()=>o.value=!1)),oe()&&(y(t,"touchstart",()=>o.value=!0),y(t,"touchend",()=>o.value=!1))),i.focused&&(y(t,"focus",()=>a.value=!0),y(t,"blur",()=>a.value=!1)),b([r,o,a],()=>{n(p.value)})}function ue({set:t,target:s,variants:e,variant:n}){const i=A(e);b(()=>s,()=>{i&&(i.initial&&(t("initial"),n.value="initial"),i.enter&&(n.value="enter"))},{immediate:!0,flush:"pre"})}function ce({state:t,apply:s}){b(t,e=>{e&&s(e)},{immediate:!0})}function fe({target:t,variants:s,variant:e}){const n=A(s);n&&(n.visible||n.visibleOnce)&<(t,([{isIntersecting:i}])=>{n.visible?i?e.value="visible":e.value="initial":n.visibleOnce&&(i&&e.value!=="visibleOnce"?e.value="visibleOnce":e.value||(e.value="initial"))})}function pe(t,s={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){s.lifeCycleHooks&&ue(t),s.syncVariants&&ce(t),s.visibilityHooks&&fe(t),s.eventListeners&&le(t)}function de(t={}){const s=D({...t}),e=g({});return b(s,()=>{const n={};for(const[i,r]of Object.entries(s)){const o=L(i),a=z(r,o);n[i]=a}e.value=n},{immediate:!0,deep:!0}),{state:s,style:e}}function H(t,s){b(()=>Pt(t),e=>{e&&s(e)},{immediate:!0})}const me={x:"translateX",y:"translateY",z:"translateZ"};function ge(t={},s=!0){const e=D({...t}),n=g("");return b(e,i=>{let r="",o=!1;if(s&&(i.x||i.y||i.z)){const a=[i.x||0,i.y||0,i.z||0].map(c=>z(c,l)).join(",");r+=`translate3d(${a}) `,o=!0}for(const[a,c]of Object.entries(i)){if(s&&(a==="x"||a==="y"||a==="z"))continue;const p=L(a),u=z(c,p);r+=`${me[a]||a}(${u}) `}s&&!o&&(r+="translateZ(0px) "),n.value=r.trim()},{immediate:!0,deep:!0}),{state:e,transform:n}}const he=["","X","Y","Z"],be=["perspective","translate","scale","rotate","skew"],st=["transformPerspective","x","y","z"];be.forEach(t=>{he.forEach(s=>{const e=t+s;st.push(e)})});const ye=new Set(st);function it(t){return ye.has(t)}const ve=new Set(["originX","originY","originZ"]);function xe(t){return ve.has(t)}function Te(t,s){let e,n;const{state:i,style:r}=de();return H(t,o=>{n=o;for(const a of Object.keys(et))o.style[a]===null||o.style[a]===""||it(a)||xe(a)||(i[a]=o.style[a]);e&&Object.entries(e).forEach(([a,c])=>o.style[a]=c),s&&s(i)}),b(r,o=>{if(!n){e=o;return}for(const a in o)n.style[a]=o[a]},{immediate:!0}),{style:i}}function Ae(t){const s=t.trim().split(/\) |\)/);if(s.length===1)return{};const e=n=>n.endsWith("px")||n.endsWith("deg")?Number.parseFloat(n):Number.isNaN(Number(n))?Number(n):n;return s.reduce((n,i)=>{if(!i)return n;const[r,o]=i.split("("),c=o.split(",").map(u=>e(u.endsWith(")")?u.replace(")",""):u.trim())),p=c.length===1?c[0]:c;return{...n,[r]:p}},{})}function Oe(t,s){Object.entries(Ae(s)).forEach(([e,n])=>{const i=["x","y","z"];if(e==="translate3d"){if(n===0){i.forEach(r=>t[r]=0);return}n.forEach((r,o)=>t[i[o]]=r);return}if(n=Number.parseFloat(`${n}`),e==="translateX"){t.x=n;return}if(e==="translateY"){t.y=n;return}if(e==="translateZ"){t.z=n;return}t[e]=n})}function we(t,s){let e,n;const{state:i,transform:r}=ge();return H(t,o=>{n=o,o.style.transform&&Oe(i,o.style.transform),e&&(o.style.transform=e),s&&s(i)}),b(r,o=>{if(!n){e=o;return}n.style.transform=o},{immediate:!0}),{transform:i}}function ke(t){return Object.entries(t)}function Be(t,s){const e=D({}),n=o=>Object.entries(o).forEach(([a,c])=>e[a]=c),{style:i}=Te(t,n),{transform:r}=we(t,n);return b(e,o=>{ke(o).forEach(([a,c])=>{const p=it(a)?r:i;p[a]&&p[a]===c||(p[a]=c)})},{immediate:!0,deep:!0}),H(t,()=>s),{motionProperties:e,style:i,transform:r}}function Ee(t={}){const s=A(t),e=g();return{state:B(()=>{if(e.value)return s[e.value]}),variant:e}}function Se(t,s={},e){const{motionProperties:n}=Be(t),{variant:i,state:r}=Ee(s),o=ne(n,s),a={target:t,variant:i,variants:s,state:r,motionProperties:n,...o};return pe(a,e),a}const je={relative:""},Pe={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},Ve={text:"neutral-300 dark:neutral-500","text-nowrap":""},Ce={"text-nowrap":"","text-3xl":"","font-semibold":""},Ne=Q({__name:"PageHeader",props:{title:null,subtitle:null,showBackButton:{type:Boolean,default:!0},disableBackButton:{type:Boolean,default:!1}},setup(t){const s=t,e=Nt(),n=_(),i=g(),r=g(s.title),o=g(s.subtitle),a=g(s.disableBackButton),{apply:c}=Se(i,{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 Vt(async()=>{await c("initial"),await c("enter")}),Ct(async()=>{await c("leave"),a.value=!0}),b([()=>s.title,()=>s.subtitle,n],async()=>{await c("leave"),await Y(),a.value=s.disableBackButton,r.value=s.title,o.value=s.subtitle,await Y(),await c("initial"),await c("enter")}),(p,u)=>(P(),j("div",{ref_key:"pageHeaderRef",ref:i,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"},[k("button",{onClick:u[0]||(u[0]=f=>A(e).back())},[a.value?W("",!0):(P(),j("div",{key:0,"i-solar:alt-arrow-left-line-duotone":"","text-2xl":"",class:Rt({"pointer-events-none op-0":!t.showBackButton})},null,2))]),k("h1",je,[o.value?(P(),j("div",Pe,[k("span",Ve,X(o.value),1)])):W("",!0),k("div",Ce,X(r.value),1)])],512))}}),Re={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)"}},Me={class:"px-0 py-1 md:px-3 md:py-3","w-full":"","gap-2":"",bg:"$bg-color"},ze={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col","mx-auto":"","max-w-screen-xl":""},Ke=Q({__name:"settings",setup(t){const s=_(),{t:e}=Mt(),n=Lt(),{allProvidersMetadata:i}=zt(n),r=B(()=>{const a={"/settings/airi-card":{subtitle:e("settings.title"),title:e("settings.pages.card.title")},"/settings/appearance":{subtitle:e("settings.title"),title:e("settings.pages.themes.title")},"/settings/appearance/general":{subtitle:e("settings.title"),title:e("settings.pages.themes.general.title")},"/settings/appearance/color-scheme":{subtitle:e("settings.title"),title:e("settings.pages.themes.color-scheme.title")},"/settings/appearance/developer":{subtitle:e("settings.title"),title:e("settings.pages.themes.developer.title")},"/settings/memory":{subtitle:e("settings.title"),title:e("settings.pages.memory.title")},"/settings/models":{subtitle:e("settings.title"),title:e("settings.pages.models.title")},"/settings/modules":{subtitle:e("settings.title"),title:e("settings.pages.modules.title")},"/settings/modules/consciousness":{subtitle:e("settings.title"),title:e("settings.pages.modules.consciousness.title")},"/settings/modules/speech":{subtitle:e("settings.title"),title:e("settings.pages.modules.speech.title")},"/settings/modules/hearing":{subtitle:e("settings.title"),title:e("settings.pages.modules.hearing.title")},"/settings/modules/memory-short-term":{subtitle:e("settings.title"),title:e("settings.pages.modules.memory-short-term.title")},"/settings/modules/memory-long-term":{subtitle:e("settings.title"),title:e("settings.pages.modules.memory-long-term.title")},"/settings/modules/messaging-discord":{subtitle:e("settings.title"),title:e("settings.pages.modules.messaging-discord.title")},"/settings/modules/x":{subtitle:e("settings.title"),title:e("settings.pages.modules.x.title")},"/settings/modules/gaming-minecraft":{subtitle:e("settings.title"),title:e("settings.pages.modules.gaming-minecraft.title")},"/settings/modules/gaming-factorio":{subtitle:e("settings.title"),title:e("settings.pages.modules.gaming-factorio.title")},"/settings/providers":{subtitle:e("settings.title"),title:e("settings.pages.providers.title")},"/settings/scene":{subtitle:e("settings.title"),title:e("settings.pages.scene.title")},"/settings":{title:e("settings.title")}};for(const c of i.value)a[`/settings/providers/${c.id}`]={subtitle:e("settings.title"),title:e(c.nameKey)};return a}),o=B(()=>r.value[s.path]);return(a,c)=>{var p,u;return P(),j("div",Re,[k("div",Me,[C(Ft)]),k("div",ze,[C(A(Ne),{title:(p=o.value)==null?void 0:p.title,subtitle:(u=o.value)==null?void 0:u.subtitle},null,8,["title","subtitle"]),C(A(Dt))])])}}});export{Ke as default}; diff --git a/assets/speech-D1OhdUDw.js b/assets/speech-BnaLJ2Rn.js similarity index 96% rename from assets/speech-D1OhdUDw.js rename to assets/speech-BnaLJ2Rn.js index 3f01ef4b0ad4f1574bd91de0656acc5985663731..f1e75472071de613fbe00b58355396caf927bae1 100644 --- a/assets/speech-D1OhdUDw.js +++ b/assets/speech-BnaLJ2Rn.js @@ -1 +1 @@ -import{d as D,e as V,T as ae,w as K,bh as re,c as u,o as i,c6 as H,c7 as W,a as e,a3 as ve,X as $,cf as X,cg as G,bm as Q,c9 as me,W as U,Y as y,b as S,u as t,bl as I,c2 as Z,f as pe,cJ as fe,cd as ne,bk as Y,$ as ge,a0 as te,U as xe,c5 as he,c3 as be,bI as F,cl as ye}from"./index-CKmiAjHk.js";import{_ as se,a as le,b as ke}from"./FieldRange.vue_vue_type_script_setup_true_lang-5-FhMpNA.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as we}from"./providers-bTtvV6aX.js";import{u as _e,g as Se}from"./speech-CRLeR9Bl.js";import{_ as Ve}from"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as Me}from"./Textarea.vue_vue_type_script_setup_true_lang-DlkitCQO.js";import{R as Ce,a as $e}from"./RadioCardSimple-DYJ2lAWN.js";import{_ as Ue}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import{_ as Pe}from"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";import{b as oe}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Bm_AZiZR.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()}),K(()=>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 h=v.frequencyBinCount,M=new Uint8Array(h),p=c.sampleRate/v.fftSize,k=Math.floor(o.minFreq/p),P=Math.floor(o.maxFreq/p),q=P-k,T=Math.floor(q/o.bars),E=()=>{try{requestAnimationFrame(E),v.getByteFrequencyData(M);const R=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":""},Re=5,Te=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*Re*v))}return(c,f)=>(i(),u("div",qe,[(i(!0),u(H,null,W(l.frequencies,(v,h)=>(i(),u("div",{key:h,"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,h)}%`})},null,6)]))),128))]))}}),Ae={class:"p-3"},Ee={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"},Ie={key:1,class:"i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ne={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:""},Je={key:0,class:"h-16 px-3 pb-2"},Ye=D({__name:"VoiceCard",props:X({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:X(["togglePlayback"],["update:voice-id","update:custom-voice-name"]),setup(l,{emit:o}){const g=l,m=o,c=G(l,"voice-id"),f=G(l,"custom-voice-name");function v(b){return b.previewURL||b.preview_audio_url}function h(b){var k,P,q;const p=[];if((k=b.labels)!=null&&k.gender&&p.push(b.labels.gender),(P=b.labels)!=null&&P.age&&p.push(b.labels.age),(q=b.labels)!=null&&q.accent&&p.push(b.labels.accent),b.languages&&b.languages.length>0){const T=b.languages.map(E=>E.name).join(", ");p.push(T)}return p}function M(){m("togglePlayback",g.voice)}return(b,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",Ae,[e("div",Ee,[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",Ie))],2)):(i(),u("div",Ne," 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)]),h(l.voice).length>0?(i(),u("div",Oe,[(i(!0),u(H,null,W(h(l.voice),(k,P)=>(i(),u("span",{key:P,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))])):U("",!0),l.voice.customizable&&c.value===l.voice.id?(i(),u("div",Qe,[S(t(Pe),{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"])])):U("",!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)):U("",!0)])])]),e("div",He,[S(t(Ue),null,{default:I(()=>[l.showVisualizer&&l.currentlyPlayingId===l.voice.id&&l.audioStream?(i(),u("div",Je,[S(t(Le),{stream:l.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:I(({frequencies:k})=>[S(t(Te),{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"])])):U("",!0)]),_:1})])],2))}}),Ge=Z(Ye,[["__scopeId","data-v-a5ae8da9"]]),We={class:"voice-preview-player"},Xe={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Ke=["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:X({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),h=V(new Map),M=V(null);function b(){return M.value||(M.value=new(window.AudioContext||window.webkitAudioContext)),M.value}const p=G(l,"search-query"),k=G(l,"voice-id"),P=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 T(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 E(a,r){try{if(f.value.has(r))return f.value.get(r)||null;const n=b();if(h.value.has(r)){const C=h.value.get(r),_=n.createMediaStreamDestination();C.connect(_);const j=_.stream;return f.value.set(r,j),j}const x=n.createMediaElementSource(a);h.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 R(a){try{if(!q(a))return;const n=T(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)&&E(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(),h.value.clear(),m.value=void 0}K(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",We,[l.searchable?(i(),u("div",Xe,[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,Ke),[[ne,p.value]])])):U("",!0),e("div",Ze,[p.value?(i(),u("div",et,y(l.searchResultsText.replace("{count}",P.value.length.toString()).replace("{total}",l.voices.length.toString())),1)):U("",!0),p.value&&P.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)])])):U("",!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,W(P.value,n=>(i(),Y(Ge,{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:R},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},ht={flex:"~ col gap-4"},bt={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"},Ut={class:"text-sm text-amber-600 dark:text-amber-400"},Pt={key:0},Lt={flex:"~ col gap-4"},qt={key:0},Rt={class:"flex flex-col gap-4"},Tt={flex:"~ row gap-4"},At={key:1,class:"space-y-6"},Et={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"},It={flex:"~ col gap-4"},Nt={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":""},Jt={class:"inline-flex items-center gap-4"},Yt={flex:"~ col gap-4"},Gt={flex:"~ row","gap-4":""},Wt=["disabled"],Xt={flex:"~ row","items-center":"","gap-2":""},Kt=["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,allAudioSpeechProvidersMetadata:f}=te(g),{activeSpeechProvider:v,activeSpeechModel:h,activeSpeechVoice:M,activeSpeechVoiceId:b,pitch:p,isLoadingSpeechProviderVoices:k,supportsModelListing:P,providerModels:q,isLoadingActiveProviderModels:T,activeProviderModelError:E,modelSearchQuery:R,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)}),K(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(!h.value){console.error("No model selected");return}if(!M.value){console.error("No voice selected");return}const A=g.getProviderInstance(v.value);if(!A){console.error("Failed to initialize speech provider");return}const s=g.getProviderConfig(v.value);L.value=!0,j.value="";try{C.value&&ee();const N=n.value?w.value:m.generateSSML(x.value,M.value,{...s,pitch:p.value}),J=await Se({...A.speech(h.value,s),input:N,voice:M.value.id});C.value=URL.createObjectURL(new Blob([J])),setTimeout(()=>{_.value&&_.value.play()},100)}catch(N){console.error("Error generating speech:",N),j.value=N instanceof Error?N.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(A){M.value={id:A,name:A,description:A,previewURL:A,languages:[{code:"en",title:"English"}],provider:v.value,gender:"male"}}function de(A){h.value=A}return(A,s)=>{var J;const N=he("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,W(t(f),d=>(i(),Y(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(be),{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:I(()=>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,__:[13]})]))])]),e("div",null,[t(v)&&t(P)?(i(),u("div",xt,[e("div",ht,[e("div",null,[e("h2",bt,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(T)?(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(E)?(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(E)),1)])])):t(q).length===0&&!t(T)?(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",Ut,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):t(q).length>0?(i(),Y(t(Ce),{key:3,modelValue:t(h),"onUpdate:modelValue":s[1]||(s[1]=d=>F(h)?h.value=d:null),"search-query":t(R),"onUpdate:searchQuery":s[2]||(s[2]=d=>F(R)?R.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(R)}),"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"])):U("",!0)])])):U("",!0)])]),t(v)?(i(),u("div",Pt,[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",Rt,[S(t(O),{class:"w-full rounded-lg p-2.5 text-sm"},{default:I(()=>s[17]||(s[17]=[e("div",{class:"h-1lh"},null,-1)])),_:1,__:[17]}),e("div",Tt,[S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[18]||(s[18]=[e("div",{class:"h-1lh"},null,-1)])),_:1,__:[18]}),S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[19]||(s[19]=[e("div",{class:"h-1lh"},null,-1)])),_:1,__:[19]}),S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[20]||(s[20]=[e("div",{class:"h-1lh"},null,-1)])),_:1,__:[20]})]),S(t(O),{class:"w-full rounded-lg p-3 text-sm"},{default:I(()=>s[21]||(s[21]=[e("div",{class:"h-1lh"},null,-1)])),_:1,__:[21]})])])):t(a)[t(v)]&&t(a)[t(v)].length>0?(i(),u("div",At,[S(t(nt),{"search-query":r.value,"onUpdate:searchQuery":s[3]||(s[3]=d=>r.value=d),"voice-id":t(b),"onUpdate:voiceId":s[4]||(s[4]=d=>F(b)?b.value=d:null),voices:(J=t(a)[t(v)])==null?void 0:J.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",Et,[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",It,[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",Nt,[S(t(Ve),{modelValue:t(b),"onUpdate:modelValue":s[7]||(s[7]=d=>F(b)?b.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(h)?h.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(h)]])])):U("",!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"])])])):U("",!0)])])):U("",!0)]),e("div",Ot,[e("div",Qt,[e("h2",Ht,[e("div",Jt,[S(t(ke)),e("div",null,y(t(o)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",Yt,[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(),Y(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",Gt,[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",Xt,[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,Wt),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)]))):U("",!0)]),C.value?(i(),u("audio",{key:2,ref_key:"audioPlayer",ref:_,src:C.value,controls:"",class:"mt-2 w-full"},null,8,Kt)):U("",!0)])])])]),Q((i(),u("div",Zt,s[30]||(s[30]=[e("div",{text:"60","i-solar:user-speak-rounded-bold-duotone":""},null,-1)]))),[[N]])],64)}}});typeof oe=="function"&&oe(es);export{es as default}; +import{d as D,e as V,T as ae,w as K,bh as re,c as u,o as i,c6 as H,c7 as W,a as e,a3 as ve,X as $,cf as X,cg as G,bm as Q,c9 as me,W as U,Y as y,b as S,u as t,bl as I,c2 as Z,f as pe,cJ as fe,cd as ne,bk as Y,$ as ge,a0 as te,U as xe,c5 as he,c3 as be,bI as F,cl as ye}from"./index-WDP_Z4A8.js";import{_ as se,a as le,b as ke}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as we}from"./providers-7GsMyC_3.js";import{u as _e,g as Se}from"./speech-DRmXCXwq.js";import{_ as Ve}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as Me}from"./Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js";import{R as Ce,a as $e}from"./RadioCardSimple-BzEaEqwF.js";import{_ as Ue}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import{_ as Pe}from"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import{b as oe}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.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()}),K(()=>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 h=v.frequencyBinCount,M=new Uint8Array(h),p=c.sampleRate/v.fftSize,k=Math.floor(o.minFreq/p),P=Math.floor(o.maxFreq/p),q=P-k,T=Math.floor(q/o.bars),E=()=>{try{requestAnimationFrame(E),v.getByteFrequencyData(M);const R=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":""},Re=5,Te=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*Re*v))}return(c,f)=>(i(),u("div",qe,[(i(!0),u(H,null,W(l.frequencies,(v,h)=>(i(),u("div",{key:h,"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,h)}%`})},null,6)]))),128))]))}}),Ae={class:"p-3"},Ee={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"},Ie={key:1,class:"i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ne={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:""},Je={key:0,class:"h-16 px-3 pb-2"},Ye=D({__name:"VoiceCard",props:X({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:X(["togglePlayback"],["update:voice-id","update:custom-voice-name"]),setup(l,{emit:o}){const g=l,m=o,c=G(l,"voice-id"),f=G(l,"custom-voice-name");function v(b){return b.previewURL||b.preview_audio_url}function h(b){var k,P,q;const p=[];if((k=b.labels)!=null&&k.gender&&p.push(b.labels.gender),(P=b.labels)!=null&&P.age&&p.push(b.labels.age),(q=b.labels)!=null&&q.accent&&p.push(b.labels.accent),b.languages&&b.languages.length>0){const T=b.languages.map(E=>E.name).join(", ");p.push(T)}return p}function M(){m("togglePlayback",g.voice)}return(b,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",Ae,[e("div",Ee,[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",Ie))],2)):(i(),u("div",Ne," 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)]),h(l.voice).length>0?(i(),u("div",Oe,[(i(!0),u(H,null,W(h(l.voice),(k,P)=>(i(),u("span",{key:P,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))])):U("",!0),l.voice.customizable&&c.value===l.voice.id?(i(),u("div",Qe,[S(t(Pe),{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"])])):U("",!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)):U("",!0)])])]),e("div",He,[S(t(Ue),null,{default:I(()=>[l.showVisualizer&&l.currentlyPlayingId===l.voice.id&&l.audioStream?(i(),u("div",Je,[S(t(Le),{stream:l.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:I(({frequencies:k})=>[S(t(Te),{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"])])):U("",!0)]),_:1})])],2))}}),Ge=Z(Ye,[["__scopeId","data-v-a5ae8da9"]]),We={class:"voice-preview-player"},Xe={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Ke=["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:X({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),h=V(new Map),M=V(null);function b(){return M.value||(M.value=new(window.AudioContext||window.webkitAudioContext)),M.value}const p=G(l,"search-query"),k=G(l,"voice-id"),P=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 T(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 E(a,r){try{if(f.value.has(r))return f.value.get(r)||null;const n=b();if(h.value.has(r)){const C=h.value.get(r),_=n.createMediaStreamDestination();C.connect(_);const j=_.stream;return f.value.set(r,j),j}const x=n.createMediaElementSource(a);h.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 R(a){try{if(!q(a))return;const n=T(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)&&E(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(),h.value.clear(),m.value=void 0}K(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",We,[l.searchable?(i(),u("div",Xe,[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,Ke),[[ne,p.value]])])):U("",!0),e("div",Ze,[p.value?(i(),u("div",et,y(l.searchResultsText.replace("{count}",P.value.length.toString()).replace("{total}",l.voices.length.toString())),1)):U("",!0),p.value&&P.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)])])):U("",!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,W(P.value,n=>(i(),Y(Ge,{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:R},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},ht={flex:"~ col gap-4"},bt={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"},Ut={class:"text-sm text-amber-600 dark:text-amber-400"},Pt={key:0},Lt={flex:"~ col gap-4"},qt={key:0},Rt={class:"flex flex-col gap-4"},Tt={flex:"~ row gap-4"},At={key:1,class:"space-y-6"},Et={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"},It={flex:"~ col gap-4"},Nt={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":""},Jt={class:"inline-flex items-center gap-4"},Yt={flex:"~ col gap-4"},Gt={flex:"~ row","gap-4":""},Wt=["disabled"],Xt={flex:"~ row","items-center":"","gap-2":""},Kt=["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,allAudioSpeechProvidersMetadata:f}=te(g),{activeSpeechProvider:v,activeSpeechModel:h,activeSpeechVoice:M,activeSpeechVoiceId:b,pitch:p,isLoadingSpeechProviderVoices:k,supportsModelListing:P,providerModels:q,isLoadingActiveProviderModels:T,activeProviderModelError:E,modelSearchQuery:R,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)}),K(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(!h.value){console.error("No model selected");return}if(!M.value){console.error("No voice selected");return}const A=g.getProviderInstance(v.value);if(!A){console.error("Failed to initialize speech provider");return}const s=g.getProviderConfig(v.value);L.value=!0,j.value="";try{C.value&&ee();const N=n.value?w.value:m.generateSSML(x.value,M.value,{...s,pitch:p.value}),J=await Se({...A.speech(h.value,s),input:N,voice:M.value.id});C.value=URL.createObjectURL(new Blob([J])),setTimeout(()=>{_.value&&_.value.play()},100)}catch(N){console.error("Error generating speech:",N),j.value=N instanceof Error?N.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(A){M.value={id:A,name:A,description:A,previewURL:A,languages:[{code:"en",title:"English"}],provider:v.value,gender:"male"}}function de(A){h.value=A}return(A,s)=>{var J;const N=he("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,W(t(f),d=>(i(),Y(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(be),{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:I(()=>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,__:[13]})]))])]),e("div",null,[t(v)&&t(P)?(i(),u("div",xt,[e("div",ht,[e("div",null,[e("h2",bt,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(T)?(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(E)?(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(E)),1)])])):t(q).length===0&&!t(T)?(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",Ut,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):t(q).length>0?(i(),Y(t(Ce),{key:3,modelValue:t(h),"onUpdate:modelValue":s[1]||(s[1]=d=>F(h)?h.value=d:null),"search-query":t(R),"onUpdate:searchQuery":s[2]||(s[2]=d=>F(R)?R.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(R)}),"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"])):U("",!0)])])):U("",!0)])]),t(v)?(i(),u("div",Pt,[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",Rt,[S(t(O),{class:"w-full rounded-lg p-2.5 text-sm"},{default:I(()=>s[17]||(s[17]=[e("div",{class:"h-1lh"},null,-1)])),_:1,__:[17]}),e("div",Tt,[S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[18]||(s[18]=[e("div",{class:"h-1lh"},null,-1)])),_:1,__:[18]}),S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[19]||(s[19]=[e("div",{class:"h-1lh"},null,-1)])),_:1,__:[19]}),S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[20]||(s[20]=[e("div",{class:"h-1lh"},null,-1)])),_:1,__:[20]})]),S(t(O),{class:"w-full rounded-lg p-3 text-sm"},{default:I(()=>s[21]||(s[21]=[e("div",{class:"h-1lh"},null,-1)])),_:1,__:[21]})])])):t(a)[t(v)]&&t(a)[t(v)].length>0?(i(),u("div",At,[S(t(nt),{"search-query":r.value,"onUpdate:searchQuery":s[3]||(s[3]=d=>r.value=d),"voice-id":t(b),"onUpdate:voiceId":s[4]||(s[4]=d=>F(b)?b.value=d:null),voices:(J=t(a)[t(v)])==null?void 0:J.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",Et,[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",It,[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",Nt,[S(t(Ve),{modelValue:t(b),"onUpdate:modelValue":s[7]||(s[7]=d=>F(b)?b.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(h)?h.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(h)]])])):U("",!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"])])])):U("",!0)])])):U("",!0)]),e("div",Ot,[e("div",Qt,[e("h2",Ht,[e("div",Jt,[S(t(ke)),e("div",null,y(t(o)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",Yt,[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(),Y(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",Gt,[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",Xt,[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,Wt),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)]))):U("",!0)]),C.value?(i(),u("audio",{key:2,ref_key:"audioPlayer",ref:_,src:C.value,controls:"",class:"mt-2 w-full"},null,8,Kt)):U("",!0)])])])]),Q((i(),u("div",Zt,s[30]||(s[30]=[e("div",{text:"60","i-solar:user-speak-rounded-bold-duotone":""},null,-1)]))),[[N]])],64)}}});typeof oe=="function"&&oe(es);export{es as default}; diff --git a/assets/speech-CRLeR9Bl.js b/assets/speech-DRmXCXwq.js similarity index 98% rename from assets/speech-CRLeR9Bl.js rename to assets/speech-DRmXCXwq.js index 6d49a4b887539408e458e7a5ff0d2ebc6e0ae48f..691ef54919bec5aa36949458a342a58b5e0d7167 100644 --- a/assets/speech-CRLeR9Bl.js +++ b/assets/speech-DRmXCXwq.js @@ -1,2 +1,2 @@ -import{a4 as te,cc as g,e as b,f as p,w as P,T as re}from"./index-CKmiAjHk.js";import{r as ne,a as ae,b as oe,d as se}from"./index-LHmcipjy.js";import{u as ce}from"./providers-bTtvV6aX.js";const ie=/["&'<>`]/g,ue=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,le=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,de=/[|\\{}()[\]^$+*?.]/g,U=new WeakMap;function D(e,t){if(e=e.replace(t.subset?me(t.subset):ie,n),t.subset||t.escapeOnly)return e;return e.replace(ue,r).replace(le,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 me(e){let t=U.get(e);return t||(t=fe(e),U.set(e,t)),t}function fe(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:"€"},be=["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 Se=/[^\dA-Za-z]/;function xe(e,t,r,n){const a=String.fromCharCode(e);if(j.call(L,a)){const s=L[a],l="&"+s;return r&&ye.includes(s)&&!be.includes(s)&&(!n||t&&t!==61&&Se.test(String.fromCharCode(t)))?l:l+";"}return""}function Ee(e,t,r){let n=pe(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=xe(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const s=ve(e,t,r.omitOptionalSemicolons);s.length(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()),qe=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;function y(e,t,r){const n=Pe(e);return r?n.replace(r,a):a(n);function a(s){return Ae(s,{subset:t})}}function Pe(e){return String(e||"").replace(qe,"")}const Ce=/]]>/g,Te=[">"];function Le(e){return""}function Me(e){return""}const Re=[" ",` +import{a4 as te,cc as g,e as b,f as p,w as P,T as re}from"./index-WDP_Z4A8.js";import{r as ne,a as ae,b as oe,d as se}from"./index-LHmcipjy.js";import{u as ce}from"./providers-7GsMyC_3.js";const ie=/["&'<>`]/g,ue=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,le=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,de=/[|\\{}()[\]^$+*?.]/g,U=new WeakMap;function D(e,t){if(e=e.replace(t.subset?me(t.subset):ie,n),t.subset||t.escapeOnly)return e;return e.replace(ue,r).replace(le,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 me(e){let t=U.get(e);return t||(t=fe(e),U.set(e,t)),t}function fe(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:"€"},be=["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 Se=/[^\dA-Za-z]/;function xe(e,t,r,n){const a=String.fromCharCode(e);if(j.call(L,a)){const s=L[a],l="&"+s;return r&&ye.includes(s)&&!be.includes(s)&&(!n||t&&t!==61&&Se.test(String.fromCharCode(t)))?l:l+";"}return""}function Ee(e,t,r){let n=pe(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=xe(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const s=ve(e,t,r.omitOptionalSemicolons);s.length(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()),qe=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;function y(e,t,r){const n=Pe(e);return r?n.replace(r,a):a(n);function a(s){return Ae(s,{subset:t})}}function Pe(e){return String(e||"").replace(qe,"")}const Ce=/]]>/g,Te=[">"];function Le(e){return""}function Me(e){return""}const Re=[" ",` `," ",'"',"&","'","/","<","=",">"];function x(e){return y(e,Re)}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),X=p(()=>e.modelLoadError[t.value]||null),G=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 Oe({...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:X,filteredModels:G,speech:Q,loadVoicesForProvider:q,getVoicesForProvider:K,generateSSML:Z,isSpeechProvider:O}});export{F as c,Oe as g,_e as s,Ke as u}; diff --git a/assets/stage-Bt8C22lJ.js b/assets/stage-83WDclVc.js similarity index 85% rename from assets/stage-Bt8C22lJ.js rename to assets/stage-83WDclVc.js index ecee90ca3ae1ad03164d97be48ca8fbf80d70c7e..011a695e267f1d3bc8470681ff399efb2498c4d4 100644 --- a/assets/stage-Bt8C22lJ.js +++ b/assets/stage-83WDclVc.js @@ -1 +1 @@ -import{d as p,a1 as s,c,b as d,a2 as i,a3 as m,u as e,o as l}from"./index-CKmiAjHk.js";const x=p({__name:"stage",setup(u){const{top:t,right:a,bottom:o,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(a)}px`,paddingBottom:`${e(o)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default}; +import{d as p,a1 as s,c,b as d,a2 as i,a3 as m,u as e,o as l}from"./index-WDP_Z4A8.js";const x=p({__name:"stage",setup(u){const{top:t,right:a,bottom:o,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(a)}px`,paddingBottom:`${e(o)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default}; diff --git a/assets/sury-DmrZ3_Oj-CGjWzrFK.js b/assets/sury-DmrZ3_Oj-CYYeWtlB.js similarity index 50% rename from assets/sury-DmrZ3_Oj-CGjWzrFK.js rename to assets/sury-DmrZ3_Oj-CYYeWtlB.js index a583dd20cb7702916eb2d04df8eea927af0180aa..c5ab4d814092e9454ef58f132a5c05e8790c40b0 100644 --- a/assets/sury-DmrZ3_Oj-CGjWzrFK.js +++ b/assets/sury-DmrZ3_Oj-CYYeWtlB.js @@ -1 +1 @@ -import{cP as r}from"./index-CKmiAjHk.js";import{t as a}from"./mcp-CyJbhMv7.js";const s=async()=>{const{toJSONSchema:t}=await a(r(()=>import("./__vite-optional-peer-dep_sury_xsschema-BIHI7g3E.js"),[]),"sury");return o=>t(o)};export{s as getToJsonSchemaFn}; +import{cP as r}from"./index-WDP_Z4A8.js";import{t as a}from"./mcp-CVsSz3w1.js";const s=async()=>{const{toJSONSchema:t}=await a(r(()=>import("./__vite-optional-peer-dep_sury_xsschema-BIHI7g3E.js"),[]),"sury");return o=>t(o)};export{s as getToJsonSchemaFn}; diff --git a/assets/three-vrm.module-D3hfVPJz.js b/assets/three-vrm.module-DIVMhp6T.js similarity index 99% rename from assets/three-vrm.module-D3hfVPJz.js rename to assets/three-vrm.module-DIVMhp6T.js index 580da5300398f5d4cf641e01fa885326524a61bb..18a362118d336f78bb88e1590cc3da99093f89e2 100644 --- a/assets/three-vrm.module-D3hfVPJz.js +++ b/assets/three-vrm.module-DIVMhp6T.js @@ -1,4 +1,4 @@ -import{cQ as getAugmentedNamespace,ai as Color,ah as Vector2,ap as Vector3,at as Object3D,bC as Euler,a_ as AnimationClip,ar as Quaternion,b5 as NumberKeyframeTrack,aX as MathUtils,b6 as QuaternionKeyframeTrack,ao as Matrix4,cR as Matrix3,aI as Material,bz as BackSide,aV as Group,aM as MeshBasicMaterial,aL as DoubleSide,aQ as Mesh,aJ as LineBasicMaterial,aR as LineSegments,cS as ImageLoader,by as ShaderMaterial,cT as TangentSpaceNormalMap,bA as UniformsUtils,cU as UniformsLib,aw as BufferAttribute,cV as DynamicDrawUsage,aO as BufferGeometry,aS as Line,aP as SkinnedMesh,cW as GLBufferAttribute,aZ as Skeleton,cX as AxesHelper,bN as REVISION}from"./index-CKmiAjHk.js";const EYE_SACCADE_INT_STEP=400,EYE_SACCADE_INT_P=[[.075,800],[.11,0],[.125,0],[.14,0],[.125,0],[.05,0],[.04,0],[.03,0],[.02,0],[1,0]];for(let f=1;ffetch(r).then(c=>c.arrayBuffer());return defaultModelFetcher.defaultModelFetcher=f,defaultModelFetcher}var frameProcessor={},logging={},hasRequiredLogging;function requireLogging(){return hasRequiredLogging||(hasRequiredLogging=1,function(f){Object.defineProperty(f,"__esModule",{value:!0}),f.log=f.LOG_PREFIX=void 0,f.LOG_PREFIX="[VAD]";const r=["error","debug","warn"];function c(l){return(...m)=>{console[l](f.LOG_PREFIX,...m)}}const d=r.reduce((l,m)=>(l[m]=c(m),l),{});f.log=d}(logging)),logging}var messages={},hasRequiredMessages;function requireMessages(){if(hasRequiredMessages)return messages;hasRequiredMessages=1,Object.defineProperty(messages,"__esModule",{value:!0}),messages.Message=void 0;var f;return function(r){r.AudioFrame="AUDIO_FRAME",r.SpeechStart="SPEECH_START",r.VADMisfire="VAD_MISFIRE",r.SpeechEnd="SPEECH_END",r.SpeechStop="SPEECH_STOP",r.SpeechRealStart="SPEECH_REAL_START",r.FrameProcessed="FRAME_PROCESSED"}(f||(messages.Message=f={})),messages}var hasRequiredFrameProcessor;function requireFrameProcessor(){if(hasRequiredFrameProcessor)return frameProcessor;hasRequiredFrameProcessor=1,Object.defineProperty(frameProcessor,"__esModule",{value:!0}),frameProcessor.FrameProcessor=frameProcessor.validateOptions=frameProcessor.defaultV5FrameProcessorOptions=frameProcessor.defaultLegacyFrameProcessorOptions=void 0;const f=requireLogging(),r=requireMessages(),c=[512,1024,1536];frameProcessor.defaultLegacyFrameProcessorOptions={positiveSpeechThreshold:.5,negativeSpeechThreshold:.5-.15,preSpeechPadFrames:1,redemptionFrames:8,frameSamples:1536,minSpeechFrames:3,submitUserSpeechOnPause:!1},frameProcessor.defaultV5FrameProcessorOptions={positiveSpeechThreshold:.5,negativeSpeechThreshold:.5-.15,preSpeechPadFrames:3,redemptionFrames:24,frameSamples:512,minSpeechFrames:9,submitUserSpeechOnPause:!1};function d(s){c.includes(s.frameSamples)||f.log.warn("You are using an unusual frame size"),(s.positiveSpeechThreshold<0||s.positiveSpeechThreshold>1)&&f.log.error("positiveSpeechThreshold should be a number between 0 and 1"),(s.negativeSpeechThreshold<0||s.negativeSpeechThreshold>s.positiveSpeechThreshold)&&f.log.error("negativeSpeechThreshold should be between 0 and positiveSpeechThreshold"),s.preSpeechPadFrames<0&&f.log.error("preSpeechPadFrames should be positive"),s.redemptionFrames<0&&f.log.error("redemptionFrames should be positive")}frameProcessor.validateOptions=d;const l=s=>{const h=s.reduce((a,o)=>(a.push(a.at(-1)+o.length),a),[0]),p=new Float32Array(h.at(-1));return s.forEach((a,o)=>{const t=h[o];p.set(a,t)}),p};class m{constructor(h,p,a){this.modelProcessFunc=h,this.modelResetFunc=p,this.options=a,this.speaking=!1,this.redemptionCounter=0,this.speechFrameCount=0,this.active=!1,this.speechRealStartFired=!1,this.reset=()=>{this.speaking=!1,this.speechRealStartFired=!1,this.audioBuffer=[],this.modelResetFunc(),this.redemptionCounter=0,this.speechFrameCount=0},this.pause=o=>{this.active=!1,this.options.submitUserSpeechOnPause?this.endSegment(o):this.reset()},this.resume=()=>{this.active=!0},this.endSegment=o=>{const t=this.audioBuffer;this.audioBuffer=[];const e=this.speaking;if(this.reset(),e)if(t.reduce((i,u)=>u.isSpeech?i+1:i,0)>=this.options.minSpeechFrames){const i=l(t.map(u=>u.frame));o({msg:r.Message.SpeechEnd,audio:i})}else o({msg:r.Message.VADMisfire});return{}},this.process=async(o,t)=>{if(!this.active)return;const e=await this.modelProcessFunc(o),n=e.isSpeech>=this.options.positiveSpeechThreshold;if(t({probs:e,msg:r.Message.FrameProcessed,frame:o}),this.audioBuffer.push({frame:o,isSpeech:n}),n&&(this.speechFrameCount++,this.redemptionCounter=0),n&&!this.speaking&&(this.speaking=!0,t({msg:r.Message.SpeechStart})),this.speaking&&this.speechFrameCount===this.options.minSpeechFrames&&!this.speechRealStartFired&&(this.speechRealStartFired=!0,t({msg:r.Message.SpeechRealStart})),e.isSpeech=this.options.redemptionFrames){this.redemptionCounter=0,this.speechFrameCount=0,this.speaking=!1,this.speechRealStartFired=!1;const i=this.audioBuffer;if(this.audioBuffer=[],i.reduce((g,b)=>b.isSpeech?g+1:g,0)>=this.options.minSpeechFrames){const g=l(i.map(b=>b.frame));t({msg:r.Message.SpeechEnd,audio:g})}else t({msg:r.Message.VADMisfire})}if(!this.speaking){for(;this.audioBuffer.length>this.options.preSpeechPadFrames;)this.audioBuffer.shift();this.speechFrameCount=0}},this.audioBuffer=[],this.reset()}}return frameProcessor.FrameProcessor=m,frameProcessor}var nonRealTimeVad={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(f,r,c)=>{if(r&&typeof r.init=="function"&&typeof r.createSessionHandler=="function"){const d=backends[f];if(d===void 0)backends[f]={backend:r,priority:c};else{if(d.priority>c)return;if(d.priority===c&&d.backend!==r)throw new Error(`cannot register backend "${f}" using priority ${c}`)}if(c>=0){const l=backendsSortedByPriority.indexOf(f);l!==-1&&backendsSortedByPriority.splice(l,1);for(let m=0;m{const r=f.length===0?backendsSortedByPriority:f,c=[];for(const d of r){const l=backends[d];if(l){if(l.initialized)return l.backend;if(l.aborted)continue;const m=!!l.initPromise;try{return m||(l.initPromise=l.backend.init()),await l.initPromise,l.initialized=!0,l.backend}catch(s){m||c.push({name:d,err:s}),l.aborted=!0}finally{delete l.initPromise}}}throw new Error(`no available backend found. ERR: ${c.map(d=>`[${d.name}] ${d.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(r){if(r!==void 0){if(typeof r!="string"||["verbose","info","warning","error","fatal"].indexOf(r)===-1)throw new Error(`Unsupported logging level: ${r}`);this.logLevelInternal=r}}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=f=>{let r=1;for(let c=0;c{const t=document.createElement("canvas"),e=t.getContext("2d");if(!r||!e)return o();const n=new Image;n.crossOrigin="Anonymous",n.src=r,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const i=e.getImageData(0,0,t.width,t.height);if(c!==void 0){if(c.height!==void 0&&c.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(p.height=t.height,c.width!==void 0&&c.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");p.width=t.width}else p.height=t.height,p.width=t.width;a(St.bufferToTensor(i.data,p))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(h!==void 0)return St.bufferToTensor(h,p);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(r){var c,d;const l=document.createElement("canvas").getContext("2d");let m;if(l!=null){const s=this.dims[3],h=this.dims[2],p=this.dims[1],a=r!==void 0&&r.format!==void 0?r.format:"RGB",o=r!==void 0&&((c=r.norm)===null||c===void 0?void 0:c.mean)!==void 0?r.norm.mean:255,t=r!==void 0&&((d=r.norm)===null||d===void 0?void 0:d.bias)!==void 0?r.norm.bias:0,e=h*s;if(r!==void 0){if(r.height!==void 0&&r.height!==h)throw new Error("Image output config height doesn't match tensor height");if(r.width!==void 0&&r.width!==s)throw new Error("Image output config width doesn't match tensor width");if(r.format!==void 0&&p===4&&r.format!=="RGBA"||p===3&&r.format!=="RGB"&&r.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let i=0,u=1,g=2,b=3,y=0,_=e,v=e*2,w=-1;a==="RGBA"?(y=0,_=e,v=e*2,w=e*3):a==="RGB"?(y=0,_=e,v=e*2):a==="RBG"&&(y=0,v=e,_=e*2),m=l.createImageData(s,h);for(let T=0;T"u")throw new Error(`input '${a}' is missing in 'feeds'.`);if(s)for(const a of this.outputNames)l[a]=null;const h=await this.handler.run(r,l,m),p={};for(const a in h)Object.hasOwnProperty.call(h,a)&&(p[a]=new Tensor(h[a].type,h[a].data,h[a].dims));return p}static async create(r,c,d,l){let m,s={};if(typeof r=="string"){if(m=r,typeof c=="object"&&c!==null)s=c;else if(typeof c<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(m=r,typeof c=="object"&&c!==null)s=c;else if(typeof c<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){const t=r;let e=0,n=r.byteLength;if(typeof c=="object"&&c!==null)s=c;else if(typeof c=="number"){if(e=c,!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=r.byteLength-e,typeof d=="number"){if(n=d,!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 l=="object"&&l!==null)s=l;else if(typeof l<"u")throw new TypeError("'options' must be an object.")}else if(typeof d<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof c<"u")throw new TypeError("'options' must be an object.");m=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const p=(s.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),o=await(await resolveBackend(p)).createSessionHandler(m,s);return new fn(o)}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{cQ as getAugmentedNamespace,ai as Color,ah as Vector2,ap as Vector3,at as Object3D,bC as Euler,a_ as AnimationClip,ar as Quaternion,b5 as NumberKeyframeTrack,aX as MathUtils,b6 as QuaternionKeyframeTrack,ao as Matrix4,cR as Matrix3,aI as Material,bz as BackSide,aV as Group,aM as MeshBasicMaterial,aL as DoubleSide,aQ as Mesh,aJ as LineBasicMaterial,aR as LineSegments,cS as ImageLoader,by as ShaderMaterial,cT as TangentSpaceNormalMap,bA as UniformsUtils,cU as UniformsLib,aw as BufferAttribute,cV as DynamicDrawUsage,aO as BufferGeometry,aS as Line,aP as SkinnedMesh,cW as GLBufferAttribute,aZ as Skeleton,cX as AxesHelper,bN as REVISION}from"./index-WDP_Z4A8.js";const EYE_SACCADE_INT_STEP=400,EYE_SACCADE_INT_P=[[.075,800],[.11,0],[.125,0],[.14,0],[.125,0],[.05,0],[.04,0],[.03,0],[.02,0],[1,0]];for(let f=1;ffetch(r).then(c=>c.arrayBuffer());return defaultModelFetcher.defaultModelFetcher=f,defaultModelFetcher}var frameProcessor={},logging={},hasRequiredLogging;function requireLogging(){return hasRequiredLogging||(hasRequiredLogging=1,function(f){Object.defineProperty(f,"__esModule",{value:!0}),f.log=f.LOG_PREFIX=void 0,f.LOG_PREFIX="[VAD]";const r=["error","debug","warn"];function c(l){return(...m)=>{console[l](f.LOG_PREFIX,...m)}}const d=r.reduce((l,m)=>(l[m]=c(m),l),{});f.log=d}(logging)),logging}var messages={},hasRequiredMessages;function requireMessages(){if(hasRequiredMessages)return messages;hasRequiredMessages=1,Object.defineProperty(messages,"__esModule",{value:!0}),messages.Message=void 0;var f;return function(r){r.AudioFrame="AUDIO_FRAME",r.SpeechStart="SPEECH_START",r.VADMisfire="VAD_MISFIRE",r.SpeechEnd="SPEECH_END",r.SpeechStop="SPEECH_STOP",r.SpeechRealStart="SPEECH_REAL_START",r.FrameProcessed="FRAME_PROCESSED"}(f||(messages.Message=f={})),messages}var hasRequiredFrameProcessor;function requireFrameProcessor(){if(hasRequiredFrameProcessor)return frameProcessor;hasRequiredFrameProcessor=1,Object.defineProperty(frameProcessor,"__esModule",{value:!0}),frameProcessor.FrameProcessor=frameProcessor.validateOptions=frameProcessor.defaultV5FrameProcessorOptions=frameProcessor.defaultLegacyFrameProcessorOptions=void 0;const f=requireLogging(),r=requireMessages(),c=[512,1024,1536];frameProcessor.defaultLegacyFrameProcessorOptions={positiveSpeechThreshold:.5,negativeSpeechThreshold:.5-.15,preSpeechPadFrames:1,redemptionFrames:8,frameSamples:1536,minSpeechFrames:3,submitUserSpeechOnPause:!1},frameProcessor.defaultV5FrameProcessorOptions={positiveSpeechThreshold:.5,negativeSpeechThreshold:.5-.15,preSpeechPadFrames:3,redemptionFrames:24,frameSamples:512,minSpeechFrames:9,submitUserSpeechOnPause:!1};function d(s){c.includes(s.frameSamples)||f.log.warn("You are using an unusual frame size"),(s.positiveSpeechThreshold<0||s.positiveSpeechThreshold>1)&&f.log.error("positiveSpeechThreshold should be a number between 0 and 1"),(s.negativeSpeechThreshold<0||s.negativeSpeechThreshold>s.positiveSpeechThreshold)&&f.log.error("negativeSpeechThreshold should be between 0 and positiveSpeechThreshold"),s.preSpeechPadFrames<0&&f.log.error("preSpeechPadFrames should be positive"),s.redemptionFrames<0&&f.log.error("redemptionFrames should be positive")}frameProcessor.validateOptions=d;const l=s=>{const h=s.reduce((a,o)=>(a.push(a.at(-1)+o.length),a),[0]),p=new Float32Array(h.at(-1));return s.forEach((a,o)=>{const t=h[o];p.set(a,t)}),p};class m{constructor(h,p,a){this.modelProcessFunc=h,this.modelResetFunc=p,this.options=a,this.speaking=!1,this.redemptionCounter=0,this.speechFrameCount=0,this.active=!1,this.speechRealStartFired=!1,this.reset=()=>{this.speaking=!1,this.speechRealStartFired=!1,this.audioBuffer=[],this.modelResetFunc(),this.redemptionCounter=0,this.speechFrameCount=0},this.pause=o=>{this.active=!1,this.options.submitUserSpeechOnPause?this.endSegment(o):this.reset()},this.resume=()=>{this.active=!0},this.endSegment=o=>{const t=this.audioBuffer;this.audioBuffer=[];const e=this.speaking;if(this.reset(),e)if(t.reduce((i,u)=>u.isSpeech?i+1:i,0)>=this.options.minSpeechFrames){const i=l(t.map(u=>u.frame));o({msg:r.Message.SpeechEnd,audio:i})}else o({msg:r.Message.VADMisfire});return{}},this.process=async(o,t)=>{if(!this.active)return;const e=await this.modelProcessFunc(o),n=e.isSpeech>=this.options.positiveSpeechThreshold;if(t({probs:e,msg:r.Message.FrameProcessed,frame:o}),this.audioBuffer.push({frame:o,isSpeech:n}),n&&(this.speechFrameCount++,this.redemptionCounter=0),n&&!this.speaking&&(this.speaking=!0,t({msg:r.Message.SpeechStart})),this.speaking&&this.speechFrameCount===this.options.minSpeechFrames&&!this.speechRealStartFired&&(this.speechRealStartFired=!0,t({msg:r.Message.SpeechRealStart})),e.isSpeech=this.options.redemptionFrames){this.redemptionCounter=0,this.speechFrameCount=0,this.speaking=!1,this.speechRealStartFired=!1;const i=this.audioBuffer;if(this.audioBuffer=[],i.reduce((g,b)=>b.isSpeech?g+1:g,0)>=this.options.minSpeechFrames){const g=l(i.map(b=>b.frame));t({msg:r.Message.SpeechEnd,audio:g})}else t({msg:r.Message.VADMisfire})}if(!this.speaking){for(;this.audioBuffer.length>this.options.preSpeechPadFrames;)this.audioBuffer.shift();this.speechFrameCount=0}},this.audioBuffer=[],this.reset()}}return frameProcessor.FrameProcessor=m,frameProcessor}var nonRealTimeVad={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(f,r,c)=>{if(r&&typeof r.init=="function"&&typeof r.createSessionHandler=="function"){const d=backends[f];if(d===void 0)backends[f]={backend:r,priority:c};else{if(d.priority>c)return;if(d.priority===c&&d.backend!==r)throw new Error(`cannot register backend "${f}" using priority ${c}`)}if(c>=0){const l=backendsSortedByPriority.indexOf(f);l!==-1&&backendsSortedByPriority.splice(l,1);for(let m=0;m{const r=f.length===0?backendsSortedByPriority:f,c=[];for(const d of r){const l=backends[d];if(l){if(l.initialized)return l.backend;if(l.aborted)continue;const m=!!l.initPromise;try{return m||(l.initPromise=l.backend.init()),await l.initPromise,l.initialized=!0,l.backend}catch(s){m||c.push({name:d,err:s}),l.aborted=!0}finally{delete l.initPromise}}}throw new Error(`no available backend found. ERR: ${c.map(d=>`[${d.name}] ${d.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(r){if(r!==void 0){if(typeof r!="string"||["verbose","info","warning","error","fatal"].indexOf(r)===-1)throw new Error(`Unsupported logging level: ${r}`);this.logLevelInternal=r}}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=f=>{let r=1;for(let c=0;c{const t=document.createElement("canvas"),e=t.getContext("2d");if(!r||!e)return o();const n=new Image;n.crossOrigin="Anonymous",n.src=r,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const i=e.getImageData(0,0,t.width,t.height);if(c!==void 0){if(c.height!==void 0&&c.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(p.height=t.height,c.width!==void 0&&c.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");p.width=t.width}else p.height=t.height,p.width=t.width;a(St.bufferToTensor(i.data,p))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(h!==void 0)return St.bufferToTensor(h,p);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(r){var c,d;const l=document.createElement("canvas").getContext("2d");let m;if(l!=null){const s=this.dims[3],h=this.dims[2],p=this.dims[1],a=r!==void 0&&r.format!==void 0?r.format:"RGB",o=r!==void 0&&((c=r.norm)===null||c===void 0?void 0:c.mean)!==void 0?r.norm.mean:255,t=r!==void 0&&((d=r.norm)===null||d===void 0?void 0:d.bias)!==void 0?r.norm.bias:0,e=h*s;if(r!==void 0){if(r.height!==void 0&&r.height!==h)throw new Error("Image output config height doesn't match tensor height");if(r.width!==void 0&&r.width!==s)throw new Error("Image output config width doesn't match tensor width");if(r.format!==void 0&&p===4&&r.format!=="RGBA"||p===3&&r.format!=="RGB"&&r.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let i=0,u=1,g=2,b=3,y=0,_=e,v=e*2,w=-1;a==="RGBA"?(y=0,_=e,v=e*2,w=e*3):a==="RGB"?(y=0,_=e,v=e*2):a==="RBG"&&(y=0,v=e,_=e*2),m=l.createImageData(s,h);for(let T=0;T"u")throw new Error(`input '${a}' is missing in 'feeds'.`);if(s)for(const a of this.outputNames)l[a]=null;const h=await this.handler.run(r,l,m),p={};for(const a in h)Object.hasOwnProperty.call(h,a)&&(p[a]=new Tensor(h[a].type,h[a].data,h[a].dims));return p}static async create(r,c,d,l){let m,s={};if(typeof r=="string"){if(m=r,typeof c=="object"&&c!==null)s=c;else if(typeof c<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(m=r,typeof c=="object"&&c!==null)s=c;else if(typeof c<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){const t=r;let e=0,n=r.byteLength;if(typeof c=="object"&&c!==null)s=c;else if(typeof c=="number"){if(e=c,!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=r.byteLength-e,typeof d=="number"){if(n=d,!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 l=="object"&&l!==null)s=l;else if(typeof l<"u")throw new TypeError("'options' must be an object.")}else if(typeof d<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof c<"u")throw new TypeError("'options' must be an object.");m=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const p=(s.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),o=await(await resolveBackend(p)).createSessionHandler(m,s);return new fn(o)}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/together-ai-gg3b3dkM.js b/assets/together-ai-No2aAYf3.js similarity index 64% rename from assets/together-ai-gg3b3dkM.js rename to assets/together-ai-No2aAYf3.js index d7c21914320ea83d551b3a26632423eae237f6e9..2d041ca742f33cc9c8cc4783560a38f8dc50866d 100644 --- a/assets/together-ai-gg3b3dkM.js +++ b/assets/together-ai-No2aAYf3.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as h,$ as k,V as y,a0 as U,f as c,T as $,w as K,bk as x,o as z,bl as u,b as l,u as t}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as w}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const a="together-ai",B=h({__name:"together-ai",setup(I){const{t:m}=k(),b=y(),d=w(),{providers:o}=U(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 g(){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(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:i.value,"onUpdate:modelValue":r[0]||(r[0]=V=>i.value=V),"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_686f6999_lang-Br6hYQpP.js";import{d as h,$ as k,V as y,a0 as U,f as c,T as $,w as K,bk as x,o as z,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as w}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="together-ai",B=h({__name:"together-ai",setup(I){const{t:m}=k(),b=y(),d=w(),{providers:o}=U(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 g(){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(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:i.value,"onUpdate:modelValue":r[0]||(r[0]=V=>i.value=V),"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-BW2D9qMM.js b/assets/useIconAnimation-B41IKS_9.js similarity index 58% rename from assets/useIconAnimation-BW2D9qMM.js rename to assets/useIconAnimation-B41IKS_9.js index 044e1ecadd549f71c81365e0f52505e2424be3af..dc75f3d42de1df1d99be913c6aefc95c538ec245 100644 --- a/assets/useIconAnimation-BW2D9qMM.js +++ b/assets/useIconAnimation-B41IKS_9.js @@ -1 +1 @@ -import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{e as t,bj as r,f as u,T as m,U as c}from"./index-CKmiAjHk.js";function v(s){const n=t(!1),o=t(!1),a=t(s),e=r(),i=u(()=>o.value&&!e.disableTransitions&&e.usePageSpecificTransitions);return m(()=>{o.value=!0,requestAnimationFrame(()=>{n.value=!0})}),c(()=>{n.value=!1,o.value=!1}),{iconAnimationStarted:n,showIconAnimation:i,animationIcon:a}}export{v as u}; +import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{e as t,bj as r,f as u,T as m,U as c}from"./index-WDP_Z4A8.js";function v(s){const n=t(!1),o=t(!1),a=t(s),e=r(),i=u(()=>o.value&&!e.disableTransitions&&e.usePageSpecificTransitions);return m(()=>{o.value=!0,requestAnimationFrame(()=>{n.value=!0})}),c(()=>{n.value=!1,o.value=!1}),{iconAnimationStarted:n,showIconAnimation:i,animationIcon:a}}export{v as u}; diff --git a/assets/valibot-CQk-M5rL-Bzl_-bg9.js b/assets/valibot-CQk-M5rL-Bzl_-bg9.js new file mode 100644 index 0000000000000000000000000000000000000000..5e5c81a073af7738db2014d26f53026b9d5da96e --- /dev/null +++ b/assets/valibot-CQk-M5rL-Bzl_-bg9.js @@ -0,0 +1 @@ +import{cP as r}from"./index-WDP_Z4A8.js";import{t as a}from"./mcp-CVsSz3w1.js";const s=async()=>{const{toJsonSchema:o}=await a(r(()=>import("./index-CShXCEpO.js"),[]),"@valibot/to-json-schema");return t=>o(t)};export{s as getToJsonSchemaFn}; diff --git a/assets/valibot-CQk-M5rL-rd3w1i8_.js b/assets/valibot-CQk-M5rL-rd3w1i8_.js deleted file mode 100644 index 147f214282093c9e1940384cbb54433195007972..0000000000000000000000000000000000000000 --- a/assets/valibot-CQk-M5rL-rd3w1i8_.js +++ /dev/null @@ -1 +0,0 @@ -import{cP as r}from"./index-CKmiAjHk.js";import{t as a}from"./mcp-CyJbhMv7.js";const s=async()=>{const{toJsonSchema:o}=await a(r(()=>import("./index-CShXCEpO.js"),[]),"@valibot/to-json-schema");return t=>o(t)};export{s as getToJsonSchemaFn}; diff --git a/assets/vibrant-D-dqfSBx.js b/assets/vibrant-C1qAY2sn.js similarity index 88% rename from assets/vibrant-D-dqfSBx.js rename to assets/vibrant-C1qAY2sn.js index 5c04868829e35e8cda0e62a61df7d09db8cc72cd..a18af25dddab98ec38f73b9fd2a34de86225ae21 100644 --- a/assets/vibrant-D-dqfSBx.js +++ b/assets/vibrant-C1qAY2sn.js @@ -1 +1 @@ -import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as p}from"./InputFile.vue_vue_type_script_setup_true_lang-CToBF7WH.js";import{V as g}from"./browser-CkchkNbv.js";import{d as v,e as n,w as _,c as r,o,a as s,c6 as b,c7 as h,Y as k,b as w,u as x,W as y,a3 as V}from"./index-CKmiAjHk.js";import"./floating-ui.core-CgBsuaUc.js";const j={flex:"","flex-col":"","gap-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={border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","w-full":"",flex:"","gap-2":"","rounded-lg":"","p-4":""},N={flex:"","gap-2":""},O={"h-60":"",border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","rounded-lg":""},B=["src"],R=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 g(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",C,[(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",L,k(i.value),1),s("div",N,[w(x(p),{modelValue:u.value,"onUpdate:modelValue":a[0]||(a[0]=e=>u.value=e),"h-60":"","w-full":""},null,8,["modelValue"])]),s("div",O,[t.value?(o(),r("img",{key:0,src:t.value.src,"h-full":"","w-full":"","object-contain":""},null,8,B)):y("",!0)])]))}});export{R as default}; +import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as p}from"./InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js";import{V as g}from"./browser-CkchkNbv.js";import{d as v,e as n,w as _,c as r,o,a as s,c6 as b,c7 as h,Y as k,b as w,u as x,W as y,a3 as V}from"./index-WDP_Z4A8.js";import"./floating-ui.core-CgBsuaUc.js";const j={flex:"","flex-col":"","gap-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={border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","w-full":"",flex:"","gap-2":"","rounded-lg":"","p-4":""},N={flex:"","gap-2":""},O={"h-60":"",border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","rounded-lg":""},B=["src"],R=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 g(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",C,[(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",L,k(i.value),1),s("div",N,[w(x(p),{modelValue:u.value,"onUpdate:modelValue":a[0]||(a[0]=e=>u.value=e),"h-60":"","w-full":""},null,8,["modelValue"])]),s("div",O,[t.value?(o(),r("img",{key:0,src:t.value.src,"h-full":"","w-full":"","object-contain":""},null,8,B)):y("",!0)])]))}});export{R as default}; diff --git a/assets/volcengine-BsEWGD5J.js b/assets/volcengine-BRelq9N_.js similarity index 68% rename from assets/volcengine-BsEWGD5J.js rename to assets/volcengine-BRelq9N_.js index 523cd6334dce23df64ddb03305418a6fdb64d578..28642e459bd82e330683c07d21b8c7f988a51cad 100644 --- a/assets/volcengine-BsEWGD5J.js +++ b/assets/volcengine-BRelq9N_.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as y,e as w,a0 as M,$ as I,f as c,T as S,w as g,bk as k,o as x,bl as v,b as f,u as r,a as F}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as $}from"./providers-bTtvV6aX.js";import{u as B}from"./speech-CRLeR9Bl.js";import{_ as R}from"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import{_ as T}from"./FieldRange.vue_vue_type_script_setup_true_lang-5-FhMpNA.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as E,a as K}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-9MhYiAWZ.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";const L={flex:"~ col gap-4"},o="volcengine",b="v1",N=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(K),{"provider-id":o,"default-model":b},{"basic-settings":v(()=>[F("div",L,[f(r(R),{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(T),{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(E),{"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"&&_(N);export{N as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as y,e as w,a0 as M,$ as I,f as c,T as S,w as g,bk as k,o as x,bl as v,b as f,u as r,a as F}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as $}from"./providers-7GsMyC_3.js";import{u as B}from"./speech-DRmXCXwq.js";import{_ as R}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import{_ as T}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as E,a as K}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";const L={flex:"~ col gap-4"},o="volcengine",b="v1",N=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(K),{"provider-id":o,"default-model":b},{"basic-settings":v(()=>[F("div",L,[f(r(R),{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(T),{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(E),{"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"&&_(N);export{N as default}; diff --git a/assets/xai-BVVGtFtr.js b/assets/xai-CoTXxIZ1.js similarity index 64% rename from assets/xai-BVVGtFtr.js rename to assets/xai-CoTXxIZ1.js index d936fd02e3b96727a6400ad8897c1416fc73de6c..22d257e072102f7257239f9166d10ae944464e45 100644 --- a/assets/xai-BVVGtFtr.js +++ b/assets/xai-CoTXxIZ1.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-CCzUWnwG.js";import{d as k,$ as x,V as U,a0 as $,f as v,T as y,w as K,bk as h,o as w,bl as u,b as l,u as t}from"./index-CKmiAjHk.js";import"./three-vrm.module-D3hfVPJz.js";import"./emotions-DWNSb738.js";import"./mcp-CyJbhMv7.js";import{u as z}from"./providers-bTtvV6aX.js";import"./Select.vue_vue_type_style_index_0_lang-vWkCf5E7.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-49JiiyS1.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DxlJLTzJ.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-4lG7ew5n.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B4sh3Fs1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BSNSI8mf.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D12tvAkn.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CUtkk7vB.js";import"./Input.vue_vue_type_script_setup_true_lang-BWElyLM-.js";const a="xai",C=k({__name:"xai",setup(I){const{t:m}=x(),b=U(),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}});y(()=>{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]=V=>r.value=V),"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_686f6999_lang-Br6hYQpP.js";import{d as k,$ as x,V as U,a0 as $,f as v,T as y,w as K,bk as h,o as w,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="xai",C=k({__name:"xai",setup(I){const{t:m}=x(),b=U(),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}});y(()=>{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]=V=>r.value=V),"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/assets/zod-Db63SLXj-_dMk2pG0.js b/assets/zod-Db63SLXj-IXQs-Vsk.js similarity index 66% rename from assets/zod-Db63SLXj-_dMk2pG0.js rename to assets/zod-Db63SLXj-IXQs-Vsk.js index 999e8a90bf26c276e626afd8454719f09e27c464..0c85b7af99bf7d6cfed3ca0f4dd2c9562c79277a 100644 --- a/assets/zod-Db63SLXj-_dMk2pG0.js +++ b/assets/zod-Db63SLXj-IXQs-Vsk.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-tA0UiLFB.js","assets/mcp-CyJbhMv7.js","assets/index-CKmiAjHk.js","assets/index-zBe9gvvY.css"])))=>i.map(i=>d[i]); -import{cP as n}from"./index-CKmiAjHk.js";import{a as t}from"./mcp-CyJbhMv7.js";const i=async()=>{let r=e=>{throw new Error(`xsschema: Missing zod v4 dependencies "zod". see ${t}`)},s=e=>{throw new Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${t}`)};try{const{toJSONSchema:e}=await n(async()=>{const{toJSONSchema:o}=await import("./index-BwLPbeOe.js");return{toJSONSchema:o}},[]);r=e}catch(e){e instanceof Error&&console.error(e.message)}try{const{zodToJsonSchema:e}=await n(async()=>{const{zodToJsonSchema:o}=await import("./index-tA0UiLFB.js");return{zodToJsonSchema:o}},__vite__mapDeps([0,1,2,3]));s=e}catch(e){e instanceof Error&&console.error(e.message)}return async e=>"_zod"in e?r(e):s(e)};export{i as getToJsonSchemaFn}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CDTTBfwQ.js","assets/mcp-CVsSz3w1.js","assets/index-WDP_Z4A8.js","assets/index-zBe9gvvY.css"])))=>i.map(i=>d[i]); +import{cP as n}from"./index-WDP_Z4A8.js";import{a as t}from"./mcp-CVsSz3w1.js";const i=async()=>{let r=e=>{throw new Error(`xsschema: Missing zod v4 dependencies "zod". see ${t}`)},s=e=>{throw new Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${t}`)};try{const{toJSONSchema:e}=await n(async()=>{const{toJSONSchema:o}=await import("./index-BwLPbeOe.js");return{toJSONSchema:o}},[]);r=e}catch(e){e instanceof Error&&console.error(e.message)}try{const{zodToJsonSchema:e}=await n(async()=>{const{zodToJsonSchema:o}=await import("./index-CDTTBfwQ.js");return{zodToJsonSchema:o}},__vite__mapDeps([0,1,2,3]));s=e}catch(e){e instanceof Error&&console.error(e.message)}return async e=>"_zod"in e?r(e):s(e)};export{i as getToJsonSchemaFn}; diff --git a/index.html b/index.html index 688e5ee0b23768c2337876643385e734ba2ce01d..7bf345bde04bfe29e69c544409065abbab5734b6 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@ src="/remote-assets/page-external-data/js/script.js" > - +