diff --git a/assets/Basic.vue_vue_type_script_setup_true_lang-Badg0BE8.js b/assets/Basic.vue_vue_type_script_setup_true_lang-DAk2Pfwq.js similarity index 74% rename from assets/Basic.vue_vue_type_script_setup_true_lang-Badg0BE8.js rename to assets/Basic.vue_vue_type_script_setup_true_lang-DAk2Pfwq.js index c3fe0bf72e875a960fc5697e583a3c1e4f6dfb3a..cfa057dd3382061553c48c8a29b084b07bc4532a 100644 --- a/assets/Basic.vue_vue_type_script_setup_true_lang-Badg0BE8.js +++ b/assets/Basic.vue_vue_type_script_setup_true_lang-DAk2Pfwq.js @@ -1 +1 @@ -import{d as c,ce as d,cf as f,e as s,w as p,bm as v,cc as x,o as h,c as y,a3 as _}from"./index-DP0FGIAR.js";const g=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{g 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-D14Zran9.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-BfFWXE3W.js b/assets/CardDetailDialog-BfFWXE3W.js deleted file mode 100644 index f4277b9f516670edcbcb739a9d0def8450a46f7e..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-BfFWXE3W.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-pyEPGJ_d.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-B1A4lEPM.js";import"./index-DP0FGIAR.js";import"./index-BEkOKozM.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import"./airi-card-DKhKg3ic.js";import"./consciousness-uzzh2yDH.js";import"./providers-CCXVXsM2.js";import"./index-LHmcipjy.js";import"./speech-RC4pJLrT.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";export{o as default}; diff --git a/assets/CardDetailDialog-DwxgCXTp.js b/assets/CardDetailDialog-DwxgCXTp.js new file mode 100644 index 0000000000000000000000000000000000000000..e1201e1193d5b78a6aff09e0b3cc6f6ce554d682 --- /dev/null +++ b/assets/CardDetailDialog-DwxgCXTp.js @@ -0,0 +1 @@ +import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-C9PVsW9y.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-Dd8N9atm.js";import"./index-D14Zran9.js";import"./index-MbWgqiI-.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import"./airi-card-DyPOejN4.js";import"./consciousness-CmIiKxQ0.js";import"./providers-Bnxi0hpg.js";import"./index-LHmcipjy.js";import"./speech-BGwkIM3M.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";export{o as default}; diff --git a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-pyEPGJ_d.js b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-C9PVsW9y.js similarity index 94% rename from assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-pyEPGJ_d.js rename to assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-C9PVsW9y.js index 667a5df7fab94aba6e7ef16eb6cf7a3544906e3f..c3b859c7eb572cfad1c990d2e9c8d2523c0279a5 100644 --- a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-pyEPGJ_d.js +++ b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-C9PVsW9y.js @@ -1 +1 @@ -import{a as O,_ as E}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-B1A4lEPM.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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,cg as u,Y as i,X as L,c7 as D}from"./index-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as R}from"./airi-card-DKhKg3ic.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{n as W,I as X,$ as Y,P as G,B as J}from"./index-BEkOKozM.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-Dd8N9atm.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as R}from"./airi-card-DyPOejN4.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{n as W,I as X,$ as Y,P as G,B as J}from"./index-MbWgqiI-.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-B5AqVhT4.js b/assets/CardListItem-B5AqVhT4.js deleted file mode 100644 index ed6c26a4d88fac8cb5e48e01f1d43868784bcca3..0000000000000000000000000000000000000000 --- a/assets/CardListItem-B5AqVhT4.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardListItem.vue_vue_type_script_setup_true_lang-nVeVvXRd.js";import"./index-DP0FGIAR.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/CardListItem-IHOaqPwL.js b/assets/CardListItem-IHOaqPwL.js new file mode 100644 index 0000000000000000000000000000000000000000..a840fef9d9ddfee32f2952b2a426895e3eebb544 --- /dev/null +++ b/assets/CardListItem-IHOaqPwL.js @@ -0,0 +1 @@ +import{_ as o}from"./CardListItem.vue_vue_type_script_setup_true_lang-CXLs8j9C.js";import"./index-D14Zran9.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/CardListItem.vue_vue_type_script_setup_true_lang-nVeVvXRd.js b/assets/CardListItem.vue_vue_type_script_setup_true_lang-CXLs8j9C.js similarity index 91% rename from assets/CardListItem.vue_vue_type_script_setup_true_lang-nVeVvXRd.js rename to assets/CardListItem.vue_vue_type_script_setup_true_lang-CXLs8j9C.js index aa44429ca4ecde8d92abca2b00d9c00e0f103238..094bb3a69eaefafab57f8f8bcfc6b16d34451ecf 100644 --- a/assets/CardListItem.vue_vue_type_script_setup_true_lang-nVeVvXRd.js +++ b/assets/CardListItem.vue_vue_type_script_setup_true_lang-CXLs8j9C.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,cj as k,X as h,u as V}from"./index-DP0FGIAR.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.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,j=50-f+(50-m),A=.5+Math.abs(j)*.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=A}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-D14Zran9.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.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/Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.js b/assets/Collapsable.vue_vue_type_script_setup_true_lang-CarTVdmi.js similarity index 77% rename from assets/Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.js rename to assets/Collapsable.vue_vue_type_script_setup_true_lang-CarTVdmi.js index 6bd224c822429d19b863319d8bee39f0f7e7b279..54afa80fed0fb0b887d7bfeb398b79ddc2ef500a 100644 --- a/assets/Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.js +++ b/assets/Collapsable.vue_vue_type_script_setup_true_lang-CarTVdmi.js @@ -1 +1 @@ -import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{d as p,ce as m,cf as c,bK as f,c as b,o as v,bh as r,b as V,a as s,cg as g,Y as u,ct as i,cu as y,u as k,bl as x,W as C,ch as B}from"./index-DP0FGIAR.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-yludE2Yh.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.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-D14Zran9.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-DRDqJuVs.js b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-Ct_bDzLr.js similarity index 57% rename from assets/ColorPalette.vue_vue_type_script_setup_true_lang-DRDqJuVs.js rename to assets/ColorPalette.vue_vue_type_script_setup_true_lang-Ct_bDzLr.js index 476ba7ca1fa19c49f88cc267bbf6e0a7ae27cd97..71bb06bce4f0e02a815161ad0a5de5c634d838f7 100644 --- a/assets/ColorPalette.vue_vue_type_script_setup_true_lang-DRDqJuVs.js +++ b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-Ct_bDzLr.js @@ -1 +1 @@ -import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.js";import{d,bk as m,o as i,bl as l,a as n,X as u,bh as k,cg as f,Y as g,bj as y,c,W as C,c6 as h,c7 as v,b as s,u as e,a3 as x,cr as w}from"./index-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{W as S,j as $,q as B,U as E,G as V,H as j}from"./index-BEkOKozM.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=>[n("button",{class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",onClick:a=>o.setVisible(!o.visible)},[n("div",F,[n("div",{class:u(t.icon),"size-6":""},null,2),f(" "+g(t.title),1)]),n("div",{"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-250",class:u({"rotate-180":o.visible})},null,2)],8,z)]),default:l(()=>[n("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(()=>[s(e(S),null,{default:l(()=>[s(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"]),s(e(B),null,{default:l(()=>[s(e(E),{bg:"white dark:neutral-800","rounded-lg":"","px-3":"","py-1.5":"","text-sm":"","shadow-md":""},{default:l(()=>[f(g(_)+" ",1),s(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-CarTVdmi.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{W as S,j as $,q as B,U as E,G as V,H as j}from"./index-MbWgqiI-.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-Ce4rxuq4.js b/assets/DeleteCardDialog-Ce4rxuq4.js deleted file mode 100644 index f7819bf56bb388c413a66e5e879c0f1b6877c33f..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-Ce4rxuq4.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-B1A4lEPM.js";import"./index-DP0FGIAR.js";import"./index-BEkOKozM.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/DeleteCardDialog-YApE2agS.js b/assets/DeleteCardDialog-YApE2agS.js new file mode 100644 index 0000000000000000000000000000000000000000..1b4d783dd58e328b669f54a792a48886548df59e --- /dev/null +++ b/assets/DeleteCardDialog-YApE2agS.js @@ -0,0 +1 @@ +import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-Dd8N9atm.js";import"./index-D14Zran9.js";import"./index-MbWgqiI-.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-B1A4lEPM.js b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-Dd8N9atm.js similarity index 93% rename from assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-B1A4lEPM.js rename to assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-Dd8N9atm.js index 46de067d248533fd2972a2824978648d405521b3..4e9e3cf193b9352f5c333ddaf3a68681a128b6e6 100644 --- a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-B1A4lEPM.js +++ b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-Dd8N9atm.js @@ -1 +1 @@ -import{d as k,f as p,c as r,o as d,X as g,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,cg as x}from"./index-DP0FGIAR.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-BEkOKozM.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},y=k({__name:"Button",props:{icon:null,label:null,disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:"primary"},size:{default:"md"},block:{type:Boolean,default:!1}},setup(a){const s=a,l=p(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 text-white"},c={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u=p(()=>["rounded-lg font-medium outline-none transition-all duration-200 ease-in-out","disabled:cursor-not-allowed disabled:opacity-50",s.block?"w-full":"",c[s.size],o[s.variant],{"opacity-50 cursor-not-allowed":l.value},"focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900","focus:ring-primary-500/50 dark:focus:ring-primary-400/50"]);return(b,f)=>(d(),r("button",{disabled:l.value,class:g(u.value)},[m("div",j,[a.loading?(d(),r("div",A)):a.icon?(d(),r("div",{key:1,class:g(a.icon)},null,2)):h("",!0),a.label?(d(),r("span",F,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),I={class:"flex flex-row justify-end gap-3"},H=k({__name:"DeleteCardDialog",props:{modelValue:{type:Boolean},cardName:null},emits:["update:modelValue","confirm","cancel"],setup(a,{emit:s}){const l=s,{t:o}=w();function c(){l("update:modelValue",!1),l("cancel")}function u(){l("update:modelValue",!1),l("confirm")}return(b,f)=>(d(),C(e(S),{open:a.modelValue,"onUpdate:open":f[0]||(f[0]=v=>l("update:modelValue",v))},{default:n(()=>[t(e(V),null,{default:n(()=>[t(e(B),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-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(()=>[x(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",I,[t(e($),{"as-child":""},{default:n(()=>[t(e(y),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(y),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{H as _,y as a}; +import{d as k,f as p,c as r,o as d,X as g,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 x}from"./index-D14Zran9.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-MbWgqiI-.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},y=k({__name:"Button",props:{icon:null,label:null,disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:"primary"},size:{default:"md"},block:{type:Boolean,default:!1}},setup(a){const s=a,l=p(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 text-white"},c={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u=p(()=>["rounded-lg font-medium outline-none transition-all duration-200 ease-in-out","disabled:cursor-not-allowed disabled:opacity-50",s.block?"w-full":"",c[s.size],o[s.variant],{"opacity-50 cursor-not-allowed":l.value},"focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900","focus:ring-primary-500/50 dark:focus:ring-primary-400/50"]);return(b,f)=>(d(),r("button",{disabled:l.value,class:g(u.value)},[m("div",j,[a.loading?(d(),r("div",A)):a.icon?(d(),r("div",{key:1,class:g(a.icon)},null,2)):h("",!0),a.label?(d(),r("span",F,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),I={class:"flex flex-row justify-end gap-3"},H=k({__name:"DeleteCardDialog",props:{modelValue:{type:Boolean},cardName:null},emits:["update:modelValue","confirm","cancel"],setup(a,{emit:s}){const l=s,{t:o}=w();function c(){l("update:modelValue",!1),l("cancel")}function u(){l("update:modelValue",!1),l("confirm")}return(b,f)=>(d(),C(e(S),{open:a.modelValue,"onUpdate:open":f[0]||(f[0]=v=>l("update:modelValue",v))},{default:n(()=>[t(e(V),null,{default:n(()=>[t(e(B),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-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(()=>[x(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",I,[t(e($),{"as-child":""},{default:n(()=>[t(e(y),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(y),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{H as _,y as a}; diff --git a/assets/FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js b/assets/FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js similarity index 87% rename from assets/FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js rename to assets/FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js index bfa7e2494ac145402e1b34572a5aeb3399bd0c44..e66ac605d49f57779373657caea68fb4ac66bb31 100644 --- a/assets/FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js +++ b/assets/FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js @@ -1 +1 @@ -import{_ as c}from"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js";import{d as u,ce as i,cf as p,c as o,o as d,a as l,b as m,cg as _,W as x,Y as n,X as f}from"./index-DP0FGIAR.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-BVqHkvwn.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-D14Zran9.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-7V-hK3UG.js b/assets/FieldRange.vue_vue_type_script_setup_true_lang-B7PpkYTo.js similarity index 86% rename from assets/FieldRange.vue_vue_type_script_setup_true_lang-7V-hK3UG.js rename to assets/FieldRange.vue_vue_type_script_setup_true_lang-B7PpkYTo.js index 24bb9c96b93d9c450fca64109ff98702ad7e1a0a..bcffcda496217d13c65b4f4eb081e1d6d83ee610 100644 --- a/assets/FieldRange.vue_vue_type_script_setup_true_lang-7V-hK3UG.js +++ b/assets/FieldRange.vue_vue_type_script_setup_true_lang-B7PpkYTo.js @@ -1 +1 @@ -import{d as c,c as g,o as d,a3 as M,bh as k,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,cD as D,ch as w,cE as N,cA as S,u as i,cz as z,cM as L,f as v,d0 as j,cw as U,d1 as H,w as K,c7 as Y,bq as G,d2 as W,W as X,cZ as Z,cj as J,cf as C,ce as q,Y as x,bm as Q,cc as ee}from"./index-DP0FGIAR.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.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})},[k(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)=>k(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!==D);if(l===-1)return o;const r=o[l];(m=r.props)==null||delete m.ref;const n=r.props?w(e,r.props):e,u=N({...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:_(()=>[k(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=z(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=>(L(o,n),n)]}function I(){const t=U(),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,w({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,w({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,w({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),w(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:Z(J(n,["prevent"]),["enter"])}),{default:_(()=>[k(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:_(()=>[k(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"],we=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)=>Q((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}]])}}),ke=B(we,[["__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,[$(ke,{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-D14Zran9.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.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-BXBXXYzg.js b/assets/HeaderLink-BlO6oj_N.js similarity index 90% rename from assets/HeaderLink-BXBXXYzg.js rename to assets/HeaderLink-BlO6oj_N.js index 38f3ba73f65013a5a7f87bb38d5c57d00774c37f..b74d6c6532d437e6a919974708c54ea6e7d886b5 100644 --- a/assets/HeaderLink-BXBXXYzg.js +++ b/assets/HeaderLink-BlO6oj_N.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-DP0FGIAR.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-D14Zran9.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-Bk0lr96q.js b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-D4aBVanH.js similarity index 95% rename from assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bk0lr96q.js rename to assets/IconAnimation.vue_vue_type_script_setup_true_lang-D4aBVanH.js index 7d3e3d6a360ed27e2635df1a3a1718aad951e003..37f0f446820e89b29c2e9db17d0dfc7a039e15e5 100644 --- a/assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bk0lr96q.js +++ b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-D4aBVanH.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-DP0FGIAR.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-D14Zran9.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/IconStatusItem-DVX2kjJz.js b/assets/IconStatusItem-BcJ0TKRl.js similarity index 94% rename from assets/IconStatusItem-DVX2kjJz.js rename to assets/IconStatusItem-BcJ0TKRl.js index 3f4d1954e52c4e4a7355278906be4fa7e3a65492..399c82a51887cb3e942126f4de11e2a47725aee3 100644 --- a/assets/IconStatusItem-DVX2kjJz.js +++ b/assets/IconStatusItem-BcJ0TKRl.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-DP0FGIAR.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-D14Zran9.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.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-BK6T0eKF.js b/assets/Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js similarity index 67% rename from assets/Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js rename to assets/Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js index 535620ea425c5ebf154a8c4b174ebcc339a29414..8d46ab5846d7cfb0282fdf097443da6440235532 100644 --- a/assets/Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js +++ b/assets/Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js @@ -1 +1 @@ -import{d as r,ce as n,cf as u,bm as s,c$ as d,o as i,c as m}from"./index-DP0FGIAR.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)=>s((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)),[[d,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-D14Zran9.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-BxywhVG8.js b/assets/InputFile.vue_vue_type_script_setup_true_lang-DwkwVH8j.js similarity index 73% rename from assets/InputFile.vue_vue_type_script_setup_true_lang-BxywhVG8.js rename to assets/InputFile.vue_vue_type_script_setup_true_lang-DwkwVH8j.js index 524fc34104bdc8c0ab4702368211e45f4c399389..2ff834139cb4d1d736b67a499263c5678c31fcce 100644 --- a/assets/InputFile.vue_vue_type_script_setup_true_lang-BxywhVG8.js +++ b/assets/InputFile.vue_vue_type_script_setup_true_lang-DwkwVH8j.js @@ -1 +1 @@ -import{d as g,ce as b,cf as v,e as p,ci as y,c as s,o as n,X as m,u as t,a as l,bh as x}from"./index-DP0FGIAR.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(i){const e=i.target;e.files&&e.files.length>0&&(u.value=e.files[0]),d.value=Array.from(e.files||[]),a.value=!1}return(i,e)=>(n(),s("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(i.$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(),s("p",h," Release to upload ")):(n(),s("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-D14Zran9.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-CvHqwux7.js b/assets/Model.vue_vue_type_script_setup_true_lang-CvHqwux7.js deleted file mode 100644 index e88cae19e1833e8a92181566c1e622e52717bed8..0000000000000000000000000000000000000000 --- a/assets/Model.vue_vue_type_script_setup_true_lang-CvHqwux7.js +++ /dev/null @@ -1 +0,0 @@ -import{e as P,T as Y,A as re,L as C,a as $,D as ue,I as se,l as T,M as de,b as R}from"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import{co as ce,d as j,e as f,w as p,T as q,U as N,c as X,o as G,bh as U,a8 as z,f as O,ca as ve,be as pe,bs as fe,a0 as he,bj as me,cp as ge,cq as Me,c6 as we,a as ye,bi as be}from"./index-DP0FGIAR.js";import{r as Se}from"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";const xe=o=>Math.max(0,Math.min(1,o||0)),F=o=>Math.round(xe(o)*255),Be=ce("rgb"),Fe=o=>{if(o===void 0)return;let l=F(o.r),t=F(o.g),d=F(o.b);return"#"+(1<<24|l<<16|t<<8|d).toString(16).slice(1)},Pe=o=>Fe(Be(o)),Ee=j({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:l}){const t=o,d=f(),e=f(),i=f();async function c(n){C.registerTicker($),P.add(Y),e.value=new re({width:t.width,height:t.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),i.value=e.value.view,i.value.style.objectFit="contain",n.appendChild(e.value.view)}function y(){var n;e.value&&e.value.renderer.resize(t.width,t.height),(n=e.value)!=null&&n.view&&(e.value.view.width=t.width,e.value.view.height=t.height)}p([()=>t.width,()=>t.height],()=>y()),q(async()=>d.value&&await c(d.value)),N(()=>{var n;return(n=e.value)==null?void 0:n.destroy()});async function B(){return new Promise(g=>{if(!i.value||!e.value)return g(null);e.value.render(),i.value.toBlob(g)})}return l({captureFrame:B}),(n,g)=>(G(),X("div",{ref_key:"containerRef",ref:d,"h-full":"","w-full":""},[U(n.$slots,"default",{app:e.value})],512))}});function V(o,l,t){return(1-t)*o+t*l}function H(o,l){return o+Math.random()*(l-o)}function Ce(){let o=-1,l,t=-1;function d(e,i){(i>=o||il.app),d=z(()=>l.paused),e=f(),i=f(0),c=f(0),y=O(()=>Math.max(0,Math.min(100,l.mouthOpenSize))),B=ve(),n=pe(be),g=O(()=>n.between("sm","md").value||n.smaller("sm").value),W=Ce(),I=fe(new ue({alpha:.2,blur:0,distance:20,rotation:45}));function J(){return e.value.internalModel.coreModel}function D(a){if(!a.value)return;let r=2.2;g.value&&(r=2.2);const h=l.height*.95/c.value*r,s=l.width*.95/i.value*r,m=Math.min(h,s);a.value.scale.set(m,m)}const{live2dModelFile:b,loadingLive2dModel:M,live2dCurrentMotion:K,availableLive2dMotions:Q,live2dLoadSource:S,live2dModelUrl:k,themeColorsHue:Z,themeColorsHueDynamic:_}=he(me()),ee=f({group:"Idle",index:0});async function ae(){var L;if(!t.value)return;e.value&&(t.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new C;S.value==="file"?await R.setupLive2DModel(a,[b.value]):S.value==="url"&&await R.setupLive2DModel(a,k.value),e.value=a,t.value.stage.addChild(e.value),i.value=e.value.width,c.value=e.value.height,e.value.x=l.width/2,e.value.y=l.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),D(e),e.value.on("hit",v=>{e.value&&v.includes("body")&&e.value.motion("tap_body")});const r=e.value.internalModel,h=r.coreModel,s=r.motionManager;h.setParameterValueById("ParamMouthOpenY",y.value),Q.value=Object.entries(s.definitions).flatMap(([v,u])=>u?u.map((ie,ne)=>({motionName:v,motionIndex:ne,fileName:ie.File})):[]).filter(Boolean),s.groups.idle&&((L=s.motionGroups[s.groups.idle])==null||L.forEach(v=>{v._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const m=s.update;s.update=function(v,u){return m==null||m.call(this,v,u),s.state.currentGroup===s.groups.idle&&W.update(r,u),!0},s.on("motionStart",(v,u)=>{ee.value={group:v,index:u}}),b.value&&await T.setItem("live2dModel",b.value),M.value=!1}async function te(){if(!t.value)return;C.registerTicker($),P.add(Y),P.add(se);const a=await T.getItem("live2dModel");if(a){b.value=a,S.value="file",M.value=!0;return}if(k.value){S.value="url",M.value=!0;return}M.value=!1}async function le(a,r){await e.value.motion(a,r,de.FORCE)}const oe=ge(()=>{e.value&&(e.value.x=l.width/2,e.value.y=l.height,D(e))},100),A=f(),w=f(0);function x(){if(e.value){const a=getComputedStyle(A.value).backgroundColor;I.value.color=Number(Pe(a).replace("#","0x")),e.value.filters=[I.value]}}p([()=>l.width,()=>l.height],()=>oe()),p(B,x,{immediate:!0}),p([e,Z],x);function E(){x(),w.value=requestAnimationFrame(E)}return p(_,()=>{_.value?w.value=requestAnimationFrame(E):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),p(y,a=>J().setParameterValueById("ParamMouthOpenY",a)),p(t,te),p(K,a=>le(a.group,a.index)),p(d,a=>{var r,h;a?(r=t.value)==null||r.stop():(h=t.value)==null||h.start()}),Me(M,a=>{a&&ae()},{debounce:1e3}),q(x),N(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=t.value)==null||a.stage.removeChild(e.value))}),(a,r)=>(G(),X(we,null,[ye("div",{ref_key:"dropShadowColorComputer",ref:A,hidden:"",bg:"primary-400 dark:primary-500"},null,512),U(a.$slots,"default")],64))}});export{Le as _,Ee as a,H as r}; diff --git a/assets/Model.vue_vue_type_script_setup_true_lang-y8QkX-HC.js b/assets/Model.vue_vue_type_script_setup_true_lang-y8QkX-HC.js new file mode 100644 index 0000000000000000000000000000000000000000..0beeead96d1b54d31ac80da9e0009e7e28bfb64e --- /dev/null +++ b/assets/Model.vue_vue_type_script_setup_true_lang-y8QkX-HC.js @@ -0,0 +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-B-Ahwwhs.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-D14Zran9.js";import{r as xe}from"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.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-BKdqzfcT.js b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js similarity index 71% rename from assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js rename to assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js index 95ab7051024c30e4a9cb986b6d3cc9fdfc79411f..3635e11786fc70a98e23ddd9cfe7121371dbbf07 100644 --- a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js +++ b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js @@ -1 +1 @@ -import{_ as t}from"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{d as u,ce as n,$ as p,cf as m,f as c,bk as f,o as v,u as a}from"./index-DP0FGIAR.js";const k=u({__name:"ProviderApiKeyInput",props:n({providerName:null,placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,{t:d}=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{k as _}; +import{_ as t}from"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.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-D14Zran9.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-DvCdsRql.js b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js similarity index 74% rename from assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js rename to assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js index e679a62b9d0042ceb79cfe8c4830761edf6aebb1..8f0c98420c6feb6d9c5b88c0933b2c046e598616 100644 --- a/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js +++ b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js @@ -1 +1 @@ -import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.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,ce as v,cf as V,u as g}from"./index-DP0FGIAR.js";import{_ as x}from"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.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=V(l,"modelValue");return(r,o)=>(c(),u(g(x),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i),label:t.label||"Base URL",description:t.description||"Custom base URL (optional)",placeholder:t.placeholder,required:t.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}});export{U as _,$ as a}; +import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-CarTVdmi.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-D14Zran9.js";import{_ as x}from"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.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-B7h72Jpi.js b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js similarity index 94% rename from assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js rename to assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js index 2b10d6e95e0dfd925877c84126918c863996c662..9af4ff8294b612f9ded6c5be26976476f6e144bf 100644 --- a/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js +++ b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.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-DP0FGIAR.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-D14Zran9.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-DTBC5zp8.js b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.js similarity index 90% rename from assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.js rename to assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.js index a1dc5fc9541344dfbf7709414a1d2ccb33e40751..e95ab0137d3b3b36c8cadcd814d99c79d2a63e85 100644 --- a/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.js +++ b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-DP0FGIAR.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-D14Zran9.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-NVMpaHqJ.js b/assets/RadioCardSimple-tg_w8gEX.js similarity index 95% rename from assets/RadioCardSimple-NVMpaHqJ.js rename to assets/RadioCardSimple-tg_w8gEX.js index f3069458d0fafd9263b0541edb50e79ae004d7e3..cab3047177de93348ae63a1e0c412d517abaec35 100644 --- a/assets/RadioCardSimple-NVMpaHqJ.js +++ b/assets/RadioCardSimple-tg_w8gEX.js @@ -1 +1 @@ -import{d as g,ce as b,cf 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,cj as k,u as B,c2 as C,f as T,cc as z,c6 as E,c7 as N,bk as D}from"./index-DP0FGIAR.js";import{_ as P}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import{_ as U}from"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-D14Zran9.js";import{_ as P}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import{_ as U}from"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.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-Bnz-rUl0.js b/assets/Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js similarity index 97% rename from assets/Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js rename to assets/Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js index 8c9becb68c7eabee68b92bab1e0d8c39921d3444..03d130487b1a931ad32506e549ed59d0fe10f712 100644 --- a/assets/Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js +++ b/assets/Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js @@ -1 +1 @@ -import{d as X,cX as je,cY 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,cZ as Ge,X as ze,_ as Xe,c_ as Ue,bl as fe,b as Ye,ch as Ke,ct as Ze,cu as Qe}from"./index-DP0FGIAR.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 U(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)&&U(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||[],U(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"||U(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"||U(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=()=>X({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(),Xe(()=>{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=Ue();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=X({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=X({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});X({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-D14Zran9.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-Er5TxWy_.js b/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DKByP4k1.js similarity index 92% rename from assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Er5TxWy_.js rename to assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DKByP4k1.js index 2c8367fb22a0cb4f6d1d25c64c6f2d47d0425185..1110cd0719e421b55fa90cd7be1cfee9c9708672 100644 --- a/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Er5TxWy_.js +++ b/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DKByP4k1.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,cc 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,ct as E,cu as A,cp as ie}from"./index-DP0FGIAR.js";import{b as ne,a as ue}from"./FieldRange.vue_vue_type_script_setup_true_lang-7V-hK3UG.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as de,g as ce}from"./speech-RC4pJLrT.js";import{u as ve}from"./providers-CCXVXsM2.js";import{_ as pe,a as me}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as fe}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as ge,a as be}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.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,cm 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-D14Zran9.js";import{b as ne,a as ue}from"./FieldRange.vue_vue_type_script_setup_true_lang-B7PpkYTo.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as de,g as ce}from"./speech-BGwkIM3M.js";import{u as ve}from"./providers-Bnxi0hpg.js";import{_ as pe,a as me}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as fe}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as ge,a as be}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.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-Btkvlizu.css b/assets/Stage-CR1KeiH6.css similarity index 98% rename from assets/Stage-Btkvlizu.css rename to assets/Stage-CR1KeiH6.css index 9f7e9a315b85a6651c89ac8354a49c193ac6b151..a41ce865e7dbc264effa1ee5d28493e75185e5bf 100644 --- a/assets/Stage-Btkvlizu.css +++ b/assets/Stage-CR1KeiH6.css @@ -1 +1 @@ -.volumed[data-v-568551bc]{transform-style:preserve-3d;width:fit-content;height:fit-content}.test-dummy-flat[data-v-b4ef37ac]{display:inline-block;position:relative}.test-dummy-flat .marker[data-v-b4ef37ac]{position:absolute;top:0;right:0;bottom:0;left:0;background:conic-gradient(#ffeb3b,#ffeb3b 90deg,#000 90deg,#000 180deg,#ffeb3b 180deg,#ffeb3b 270deg,#000 270deg,#000 360deg);border-radius:50%;box-shadow:0 4px 12px #b9b9b933}.dark .test-dummy-flat .marker[data-v-b4ef37ac]{box-shadow:0 4px 12px #0003}.menu-icon-item[data-v-b1037d36]{position:relative;overflow:hidden}.menu-icon-item[data-v-b1037d36]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;width:25%;height:100%;-webkit-mask-image:linear-gradient(120deg,white 30%,transparent 50%);mask-image:linear-gradient(120deg,white 30%,transparent 50%);opacity:0;transition:all .4s ease-in-out}.dark .menu-icon-item[data-v-b1037d36]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.menu-icon-item[data-v-b1037d36]:hover:before,.menu-icon-item._hover[data-v-b1037d36]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .menu-icon-item[data-v-b1037d36]:hover:before,.dark .menu-icon-item._hover[data-v-b1037d36]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.menu-icon-item[data-v-b1037d36]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.6;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-2;width:100%;height:100%;background-size:10px 10px;content:"";-webkit-mask-image:linear-gradient(165deg,white 30%,transparent 50%);mask-image:linear-gradient(165deg,white 30%,transparent 50%);transition:all .4s ease-in-out}.menu-icon-item[data-v-b1037d36]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}.dark .menu-icon-item[data-v-b1037d36]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.25}.dark .menu-icon-item[data-v-b1037d36]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.2}.menu-icon-item-icon[data-v-b1037d36]{opacity:.5}.menu-icon-item:hover .menu-icon-item-title[data-v-b1037d36],.menu-icon-item._hover .menu-icon-item-title[data-v-b1037d36]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-item:hover .menu-icon-item-description[data-v-b1037d36],.menu-icon-item._hover .menu-icon-item-description[data-v-b1037d36]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.menu-icon-item:hover .menu-icon-item-icon[data-v-b1037d36],.menu-icon-item._hover .menu-icon-item-icon[data-v-b1037d36]{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));scale:1.2}.dark .menu-icon-item:hover .menu-icon-item-title[data-v-b1037d36],.dark .menu-icon-item._hover .menu-icon-item-title[data-v-b1037d36]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .menu-icon-item:hover .menu-icon-item-description[data-v-b1037d36],.dark .menu-icon-item._hover .menu-icon-item-description[data-v-b1037d36]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.dark .menu-icon-item:hover .menu-icon-item-icon[data-v-b1037d36],.dark .menu-icon-item._hover .menu-icon-item-icon[data-v-b1037d36]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-status-item[data-v-f23cce59]{position:relative;overflow:hidden}.menu-icon-status-item[data-v-f23cce59]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .4s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .menu-icon-status-item[data-v-f23cce59]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.menu-icon-status-item[data-v-f23cce59]:hover:before,.menu-icon-status-item._hover[data-v-f23cce59]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:50%;opacity:1}.dark .menu-icon-status-item[data-v-f23cce59]:hover:before,.dark .menu-icon-status-item._hover[data-v-f23cce59]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.menu-icon-status-item-link[data-v-f23cce59]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.8;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-2;width:100%;height:100%;background-size:10px 10px;content:"";-webkit-mask-image:linear-gradient(165deg,white 30%,transparent 50%);mask-image:linear-gradient(165deg,white 30%,transparent 50%);transition:all .4s ease-in-out}.menu-icon-status-item-link[data-v-f23cce59]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}.dark .menu-icon-status-item-link[data-v-f23cce59]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.4}.dark .menu-icon-status-item-link[data-v-f23cce59]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.2}.menu-icon-status-item-icon-color[data-v-f23cce59]{opacity:.5}.menu-icon-status-item:hover .menu-icon-status-item-title[data-v-f23cce59],.menu-icon-status-item._hover .menu-icon-status-item-title[data-v-f23cce59]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-status-item:hover .menu-icon-status-item-description[data-v-f23cce59],.menu-icon-status-item._hover .menu-icon-status-item-description[data-v-f23cce59]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-f23cce59],.menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-f23cce59],.menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-f23cce59],.menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-f23cce59]{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));scale:1.2}.dark .menu-icon-status-item:hover .menu-icon-status-item-title[data-v-f23cce59],.dark .menu-icon-status-item._hover .menu-icon-status-item-title[data-v-f23cce59]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .menu-icon-status-item:hover .menu-icon-status-item-description[data-v-f23cce59],.dark .menu-icon-status-item._hover .menu-icon-status-item-description[data-v-f23cce59]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.dark .menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-f23cce59],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-f23cce59],.dark .menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-f23cce59],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-f23cce59]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.form_radio-card-detail[data-v-01e1298e]{position:relative;overflow:hidden}.form_radio-card-detail[data-v-01e1298e]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_radio-card-detail[data-v-01e1298e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_radio-card-detail[data-v-01e1298e]:hover:before,.form_radio-card-detail._hover[data-v-01e1298e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_radio-card-detail[data-v-01e1298e]:hover:before,.dark .form_radio-card-detail._hover[data-v-01e1298e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_radio-card-detail-active[data-v-01e1298e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:.5}.dark .form_radio-card-detail-active[data-v-01e1298e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}input[type=search][data-v-7ad6d626]::-webkit-search-cancel-button{display:none}.form_radio-card-simple[data-v-50bfb5e4]{position:relative;overflow:hidden}.form_radio-card-simple[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_radio-card-simple[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_radio-card-simple[data-v-50bfb5e4]:hover:before,.form_radio-card-simple._hover[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_radio-card-simple[data-v-50bfb5e4]:hover:before,.dark .form_radio-card-simple._hover[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_radio-card-simple-active[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:.5}.dark .form_radio-card-simple-active[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_voice-card[data-v-a5ae8da9]{position:relative;overflow:hidden;display:flex;flex-direction:column}.form_voice-card[data-v-a5ae8da9]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_voice-card[data-v-a5ae8da9]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_voice-card[data-v-a5ae8da9]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_voice-card[data-v-a5ae8da9]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}input[type=search][data-v-4dd3b9e2]::-webkit-search-cancel-button{display:none}.voice-card[data-v-4dd3b9e2]{position:relative;overflow:hidden;display:flex;flex-direction:column}.voice-card[data-v-4dd3b9e2]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .voice-card[data-v-4dd3b9e2]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.voice-card[data-v-4dd3b9e2]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .voice-card[data-v-4dd3b9e2]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.skeleton[data-v-f404da2a]{position:relative;transition:all .2s ease-in-out}.skeleton-pulse[data-v-f404da2a]{animation:skeleton-pulse-f404da2a 1.5s ease-in-out .5s infinite}@keyframes skeleton-pulse-f404da2a{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.skeleton-wave[data-v-f404da2a]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);animation:skeleton-wave-f404da2a 1.5s infinite;border-radius:inherit}.dark .skeleton-wave[data-v-f404da2a]:after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.1),transparent)}@keyframes skeleton-wave-f404da2a{0%{transform:translate(-100%)}60%{transform:translate(100%)}to{transform:translate(100%)}}.card-hover-effect[data-v-895421da]{transform-style:preserve-3d;transform-origin:center;will-change:transform;transition:transform .3s cubic-bezier(.23,1,.32,1)}.card-hover-effect[data-v-895421da]:before,.card-hover-effect[data-v-895421da]:after{content:"";position:absolute;left:0;right:0;bottom:0;top:0;background-repeat:no-repeat;transition:all .33s ease;pointer-events:none}.card-hover-effect[data-v-895421da]:before{background-position:var(--card-position-x) var(--card-position-y);background-size:300% 300%;background-image:linear-gradient(115deg,transparent 0%,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 25%,transparent 47%,transparent 53%,rgba(var(--color-primary-600),calc(.3 * var(--effect-intensity))) 75%,transparent 100%);opacity:calc(.5 * var(--effect-intensity));filter:brightness(.5) contrast(1);z-index:1;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:after{background-position:var(--sparkle-position-x) var(--sparkle-position-y);background-size:160%;background-image:linear-gradient(125deg,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 15%,rgba(var(--color-primary-400),calc(.25 * var(--effect-intensity))) 30%,rgba(var(--color-primary-300),calc(.2 * var(--effect-intensity))) 40%,rgba(var(--color-primary-200),calc(.1 * var(--effect-intensity))) 60%,rgba(var(--color-primary-400),calc(.25 * var(--effect-intensity))) 70%,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 85%);background-blend-mode:overlay;opacity:calc(var(--sparkle-opacity) * var(--effect-intensity));filter:brightness(1) contrast(1);z-index:2;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:hover:before{opacity:calc(.88 * var(--effect-intensity));filter:brightness(.66) contrast(1.33)}.card-hover-effect[data-v-895421da]:hover:after{opacity:var(--effect-intensity);filter:brightness(1.1) contrast(1.2)}.animate-stripe[data-v-b4de1d75]{background-image:repeating-linear-gradient(-45deg,#f472b6,#f472b6 25px,#f9a8d4 25px,#f9a8d4 50px);animation:progress-b4de1d75 2s linear infinite;background-size:150% 100%}@-webkit-keyframes progress-b4de1d75{0%{background-position:0 0}to{background-position:-75px 0px}}@-moz-keyframes progress-b4de1d75{0%{background-position:0 0}to{background-position:-75px 0px}}@-ms-keyframes progress-b4de1d75{0%{background-position:0 0}to{background-position:-75px 0px}}@keyframes progress-b4de1d75{0%{background-position:0 0}to{background-position:-70px 0px}} +.volumed[data-v-568551bc]{transform-style:preserve-3d;width:fit-content;height:fit-content}.test-dummy-flat[data-v-b4ef37ac]{display:inline-block;position:relative}.test-dummy-flat .marker[data-v-b4ef37ac]{position:absolute;top:0;right:0;bottom:0;left:0;background:conic-gradient(#ffeb3b,#ffeb3b 90deg,#000 90deg,#000 180deg,#ffeb3b 180deg,#ffeb3b 270deg,#000 270deg,#000 360deg);border-radius:50%;box-shadow:0 4px 12px #b9b9b933}.dark .test-dummy-flat .marker[data-v-b4ef37ac]{box-shadow:0 4px 12px #0003}.menu-icon-item[data-v-b1037d36]{position:relative;overflow:hidden}.menu-icon-item[data-v-b1037d36]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;width:25%;height:100%;-webkit-mask-image:linear-gradient(120deg,white 30%,transparent 50%);mask-image:linear-gradient(120deg,white 30%,transparent 50%);opacity:0;transition:all .4s ease-in-out}.dark .menu-icon-item[data-v-b1037d36]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.menu-icon-item[data-v-b1037d36]:hover:before,.menu-icon-item._hover[data-v-b1037d36]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .menu-icon-item[data-v-b1037d36]:hover:before,.dark .menu-icon-item._hover[data-v-b1037d36]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.menu-icon-item[data-v-b1037d36]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.6;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-2;width:100%;height:100%;background-size:10px 10px;content:"";-webkit-mask-image:linear-gradient(165deg,white 30%,transparent 50%);mask-image:linear-gradient(165deg,white 30%,transparent 50%);transition:all .4s ease-in-out}.menu-icon-item[data-v-b1037d36]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}.dark .menu-icon-item[data-v-b1037d36]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.25}.dark .menu-icon-item[data-v-b1037d36]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.2}.menu-icon-item-icon[data-v-b1037d36]{opacity:.5}.menu-icon-item:hover .menu-icon-item-title[data-v-b1037d36],.menu-icon-item._hover .menu-icon-item-title[data-v-b1037d36]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-item:hover .menu-icon-item-description[data-v-b1037d36],.menu-icon-item._hover .menu-icon-item-description[data-v-b1037d36]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.menu-icon-item:hover .menu-icon-item-icon[data-v-b1037d36],.menu-icon-item._hover .menu-icon-item-icon[data-v-b1037d36]{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));scale:1.2}.dark .menu-icon-item:hover .menu-icon-item-title[data-v-b1037d36],.dark .menu-icon-item._hover .menu-icon-item-title[data-v-b1037d36]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .menu-icon-item:hover .menu-icon-item-description[data-v-b1037d36],.dark .menu-icon-item._hover .menu-icon-item-description[data-v-b1037d36]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.dark .menu-icon-item:hover .menu-icon-item-icon[data-v-b1037d36],.dark .menu-icon-item._hover .menu-icon-item-icon[data-v-b1037d36]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-status-item[data-v-f23cce59]{position:relative;overflow:hidden}.menu-icon-status-item[data-v-f23cce59]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .4s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .menu-icon-status-item[data-v-f23cce59]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.menu-icon-status-item[data-v-f23cce59]:hover:before,.menu-icon-status-item._hover[data-v-f23cce59]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:50%;opacity:1}.dark .menu-icon-status-item[data-v-f23cce59]:hover:before,.dark .menu-icon-status-item._hover[data-v-f23cce59]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.menu-icon-status-item-link[data-v-f23cce59]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.8;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-2;width:100%;height:100%;background-size:10px 10px;content:"";-webkit-mask-image:linear-gradient(165deg,white 30%,transparent 50%);mask-image:linear-gradient(165deg,white 30%,transparent 50%);transition:all .4s ease-in-out}.menu-icon-status-item-link[data-v-f23cce59]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}.dark .menu-icon-status-item-link[data-v-f23cce59]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.4}.dark .menu-icon-status-item-link[data-v-f23cce59]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.2}.menu-icon-status-item-icon-color[data-v-f23cce59]{opacity:.5}.menu-icon-status-item:hover .menu-icon-status-item-title[data-v-f23cce59],.menu-icon-status-item._hover .menu-icon-status-item-title[data-v-f23cce59]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-status-item:hover .menu-icon-status-item-description[data-v-f23cce59],.menu-icon-status-item._hover .menu-icon-status-item-description[data-v-f23cce59]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-f23cce59],.menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-f23cce59],.menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-f23cce59],.menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-f23cce59]{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));scale:1.2}.dark .menu-icon-status-item:hover .menu-icon-status-item-title[data-v-f23cce59],.dark .menu-icon-status-item._hover .menu-icon-status-item-title[data-v-f23cce59]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .menu-icon-status-item:hover .menu-icon-status-item-description[data-v-f23cce59],.dark .menu-icon-status-item._hover .menu-icon-status-item-description[data-v-f23cce59]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.dark .menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-f23cce59],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-f23cce59],.dark .menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-f23cce59],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-f23cce59]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.form_radio-card-detail[data-v-01e1298e]{position:relative;overflow:hidden}.form_radio-card-detail[data-v-01e1298e]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_radio-card-detail[data-v-01e1298e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_radio-card-detail[data-v-01e1298e]:hover:before,.form_radio-card-detail._hover[data-v-01e1298e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_radio-card-detail[data-v-01e1298e]:hover:before,.dark .form_radio-card-detail._hover[data-v-01e1298e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_radio-card-detail-active[data-v-01e1298e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:.5}.dark .form_radio-card-detail-active[data-v-01e1298e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}input[type=search][data-v-7ad6d626]::-webkit-search-cancel-button{display:none}.form_radio-card-simple[data-v-50bfb5e4]{position:relative;overflow:hidden}.form_radio-card-simple[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_radio-card-simple[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_radio-card-simple[data-v-50bfb5e4]:hover:before,.form_radio-card-simple._hover[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_radio-card-simple[data-v-50bfb5e4]:hover:before,.dark .form_radio-card-simple._hover[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_radio-card-simple-active[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:.5}.dark .form_radio-card-simple-active[data-v-50bfb5e4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_voice-card[data-v-a5ae8da9]{position:relative;overflow:hidden;display:flex;flex-direction:column}.form_voice-card[data-v-a5ae8da9]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_voice-card[data-v-a5ae8da9]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_voice-card[data-v-a5ae8da9]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_voice-card[data-v-a5ae8da9]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}input[type=search][data-v-4dd3b9e2]::-webkit-search-cancel-button{display:none}.voice-card[data-v-4dd3b9e2]{position:relative;overflow:hidden;display:flex;flex-direction:column}.voice-card[data-v-4dd3b9e2]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .voice-card[data-v-4dd3b9e2]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.voice-card[data-v-4dd3b9e2]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .voice-card[data-v-4dd3b9e2]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.skeleton[data-v-f404da2a]{position:relative;transition:all .2s ease-in-out}.skeleton-pulse[data-v-f404da2a]{animation:skeleton-pulse-f404da2a 1.5s ease-in-out .5s infinite}@keyframes skeleton-pulse-f404da2a{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.skeleton-wave[data-v-f404da2a]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);animation:skeleton-wave-f404da2a 1.5s infinite;border-radius:inherit}.dark .skeleton-wave[data-v-f404da2a]:after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.1),transparent)}@keyframes skeleton-wave-f404da2a{0%{transform:translate(-100%)}60%{transform:translate(100%)}to{transform:translate(100%)}}.card-hover-effect[data-v-895421da]{transform-style:preserve-3d;transform-origin:center;will-change:transform;transition:transform .3s cubic-bezier(.23,1,.32,1)}.card-hover-effect[data-v-895421da]:before,.card-hover-effect[data-v-895421da]:after{content:"";position:absolute;left:0;right:0;bottom:0;top:0;background-repeat:no-repeat;transition:all .33s ease;pointer-events:none}.card-hover-effect[data-v-895421da]:before{background-position:var(--card-position-x) var(--card-position-y);background-size:300% 300%;background-image:linear-gradient(115deg,transparent 0%,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 25%,transparent 47%,transparent 53%,rgba(var(--color-primary-600),calc(.3 * var(--effect-intensity))) 75%,transparent 100%);opacity:calc(.5 * var(--effect-intensity));filter:brightness(.5) contrast(1);z-index:1;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:after{background-position:var(--sparkle-position-x) var(--sparkle-position-y);background-size:160%;background-image:linear-gradient(125deg,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 15%,rgba(var(--color-primary-400),calc(.25 * var(--effect-intensity))) 30%,rgba(var(--color-primary-300),calc(.2 * var(--effect-intensity))) 40%,rgba(var(--color-primary-200),calc(.1 * var(--effect-intensity))) 60%,rgba(var(--color-primary-400),calc(.25 * var(--effect-intensity))) 70%,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 85%);background-blend-mode:overlay;opacity:calc(var(--sparkle-opacity) * var(--effect-intensity));filter:brightness(1) contrast(1);z-index:2;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:hover:before{opacity:calc(.88 * var(--effect-intensity));filter:brightness(.66) contrast(1.33)}.card-hover-effect[data-v-895421da]:hover:after{opacity:var(--effect-intensity);filter:brightness(1.1) contrast(1.2)}.animate-stripe[data-v-686f6999]{background-image:repeating-linear-gradient(-45deg,#f472b6,#f472b6 25px,#f9a8d4 25px,#f9a8d4 50px);animation:progress-686f6999 2s linear infinite;background-size:150% 100%}@-webkit-keyframes progress-686f6999{0%{background-position:0 0}to{background-position:-75px 0px}}@-moz-keyframes progress-686f6999{0%{background-position:0 0}to{background-position:-75px 0px}}@-ms-keyframes progress-686f6999{0%{background-position:0 0}to{background-position:-75px 0px}}@keyframes progress-686f6999{0%{background-position:0 0}to{background-position:-70px 0px}} diff --git a/assets/Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js b/assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js similarity index 99% rename from assets/Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js rename to assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js index dda034ad835f2232c7714a6320e2ac2265a51c79..ab951b12ac1fecc644def2c544ce95c0aa7e782d 100644 --- a/assets/Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js +++ b/assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-CvfxQD5q.js","assets/index-DP0FGIAR.js","assets/index-BNiX87JN.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,cN as vi,a6 as Bx,cO as cn}from"./index-DP0FGIAR.js";/*! +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-DCzzxLJl.js","assets/index-D14Zran9.js","assets/index-BNiX87JN.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-D14Zran9.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-CvfxQD5q.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-DCzzxLJl.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-CvfxQD5q.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-DCzzxLJl.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-CSSBrXdz.js b/assets/Textarea.vue_vue_type_script_setup_true_lang-BCWeHGz1.js similarity index 75% rename from assets/Textarea.vue_vue_type_script_setup_true_lang-CSSBrXdz.js rename to assets/Textarea.vue_vue_type_script_setup_true_lang-BCWeHGz1.js index c960cfabbe0fb19831139689fdbcf0e224a9c675..0ec67faca45a18fc2fd2bab997ea259d066d8e04 100644 --- a/assets/Textarea.vue_vue_type_script_setup_true_lang-CSSBrXdz.js +++ b/assets/Textarea.vue_vue_type_script_setup_true_lang-BCWeHGz1.js @@ -1 +1 @@ -import{_ as r}from"./Basic.vue_vue_type_script_setup_true_lang-Badg0BE8.js";import{d as t,cf as u,bk as d,o as n}from"./index-DP0FGIAR.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-DAk2Pfwq.js";import{d as t,cg as u,bk as d,o as n}from"./index-D14Zran9.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-Dq6t2KM2.js b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js similarity index 93% rename from assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js rename to assets/TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js index 065c940cbd9df1d1df57d1400603399a4c4601d6..68cafe6e002201d7e5a80dab17f412e5ed600489 100644 --- a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js +++ b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js @@ -1 +1 @@ -import{d as l,bk as T,o as m,ck as b,bl as B,bh as v}from"./index-DP0FGIAR.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)=>(m(),T(b,{css:!1,onEnter:u,onLeave:f},{default:B(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _}; +import{d as l,bk as T,o as m,cl as b,bl as B,bh as v}from"./index-D14Zran9.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)=>(m(),T(b,{css:!1,onEnter:u,onLeave:f},{default:B(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _}; diff --git a/assets/_...all_-BrpHL_jO.js b/assets/_...all_-BiHZQIsr.js similarity index 63% rename from assets/_...all_-BrpHL_jO.js rename to assets/_...all_-BiHZQIsr.js index e9e1caf174169d8e5506ba096bdc4e412462473c..9158dd6c1cde75dc8e302cada4a422c35b294a76 100644 --- a/assets/_...all_-BrpHL_jO.js +++ b/assets/_...all_-BiHZQIsr.js @@ -1 +1 @@ -import{c2 as e,c,o as n}from"./index-DP0FGIAR.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-D14Zran9.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-DKhKg3ic.js b/assets/airi-card-DyPOejN4.js similarity index 85% rename from assets/airi-card-DKhKg3ic.js rename to assets/airi-card-DyPOejN4.js index 899b19164b53eb140980310f9a23658f3667dc5b..842e35ef8632fd708e97cfa31ba316f825e77558 100644 --- a/assets/airi-card-DKhKg3ic.js +++ b/assets/airi-card-DyPOejN4.js @@ -1,7 +1,7 @@ -import{a4 as W,cb as L,f as g,a0 as O,T as b,$ as D,w as G}from"./index-DP0FGIAR.js";import{c as H}from"./emotions-DWNSb738.js";import{u as N}from"./consciousness-uzzh2yDH.js";import{u as k}from"./speech-RC4pJLrT.js";function q(a,u){return{role:"system",content:[a,H.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-D14Zran9.js";import{c as N}from"./emotions-DWNSb738.js";import{u as b}from"./consciousness-CmIiKxQ0.js";import{u as k}from"./speech-BGwkIM3M.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=N(),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(` +`)}}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(` `).filter(Boolean).map(o=>o.split(` -`).map(t=>{if(t.startsWith("{{char}}:")||t.startsWith("{{user}}:"))return t;throw new Error(`Invalid message example format: ${t}`)})):[],tags:e.data.tags??[],extensions:{airi:v(e),...e.data.extensions}}}return{...s,extensions:{airi:v(s),...s.extensions}}}return b(()=>{const{t:s}=D();a.value.set("default",f({name:"ReLU",version:"1.0.0",description:q(s("prompt.prefix"),s("prompt.suffix")).content}))}),G(n,s=>{var o,t,r,i,c,d;if(!s)return;const e=v(s);e&&(l.value=(t=(o=e==null?void 0:e.modules)==null?void 0:o.consciousness)==null?void 0:t.model,p.value=(i=(r=e==null?void 0:e.modules)==null?void 0:r.speech)==null?void 0:i.model,m.value=(d=(c=e==null?void 0:e.modules)==null?void 0:c.speech)==null?void 0:d.voice_id)}),{cards:a,activeCard:n,activeCardId:u,addCard:$,removeCard:B,getCard:V,currentModels:g(()=>({consciousness:{model:l.value},speech:{model:p.value,voice_id:m.value}})),systemPrompt:g(()=>{const s=n.value;return s?[s.systemPrompt,s.description,s.personality].filter(Boolean).join(` +`).map(t=>{if(t.startsWith("{{char}}:")||t.startsWith("{{user}}:"))return t;throw new Error(`Invalid message example format: ${t}`)})):[],tags:e.data.tags??[],extensions:{airi:v(e),...e.data.extensions}}}return{...s,extensions:{airi:v(s),...s.extensions}}}return D(()=>{const{t:s}=G();a.value.set("default",f({name:"ReLU",version:"1.0.0",description:q(s("prompt.prefix"),s("prompt.suffix")).content}))}),H(n,s=>{var o,t,r,i,c,d;if(!s)return;const e=v(s);e&&(l.value=(t=(o=e==null?void 0:e.modules)==null?void 0:o.consciousness)==null?void 0:t.model,p.value=(i=(r=e==null?void 0:e.modules)==null?void 0:r.speech)==null?void 0:i.model,m.value=(d=(c=e==null?void 0:e.modules)==null?void 0:c.speech)==null?void 0:d.voice_id)}),{cards:a,activeCard:n,activeCardId:u,addCard:$,removeCard:B,getCard:V,currentModels:g(()=>({consciousness:{model:l.value},speech:{model:p.value,voice_id:m.value}})),systemPrompt:g(()=>{const s=n.value;return s?[s.systemPrompt,s.description,s.personality].filter(Boolean).join(` `):""})}});export{Q as u}; diff --git a/assets/alibaba-cloud-model-studio-Cagj-QoZ.js b/assets/alibaba-cloud-model-studio-_AbXbWJU.js similarity index 71% rename from assets/alibaba-cloud-model-studio-Cagj-QoZ.js rename to assets/alibaba-cloud-model-studio-_AbXbWJU.js index 3c1a62323ddb151b7720122c349c26676de890f0..0443b2bd97f84f8e2b4c547b62ce52b5eb5424f9 100644 --- a/assets/alibaba-cloud-model-studio-Cagj-QoZ.js +++ b/assets/alibaba-cloud-model-studio-_AbXbWJU.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as U}from"./providers-CCXVXsM2.js";import{u as E}from"./speech-RC4pJLrT.js";import{_ as f}from"./FieldRange.vue_vue_type_script_setup_true_lang-7V-hK3UG.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as K,a as L}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Er5TxWy_.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-DvCdsRql.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as U}from"./providers-Bnxi0hpg.js";import{u as E}from"./speech-BGwkIM3M.js";import{_ as f}from"./FieldRange.vue_vue_type_script_setup_true_lang-B7PpkYTo.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as K,a as L}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DKByP4k1.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-BnX1KDA5.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.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-juwkGSIG.js b/assets/anthropic-lNQKhFGe.js similarity index 70% rename from assets/anthropic-juwkGSIG.js rename to assets/anthropic-lNQKhFGe.js index 6f8f0b291ac023d7c5f4fd52513d5db9dc2026df..ee702d85645a147243479218666b07bdf23e76a3 100644 --- a/assets/anthropic-juwkGSIG.js +++ b/assets/anthropic-lNQKhFGe.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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,cg as p,u as a}from"./index-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as $}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as O,a as A}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as I}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as N,a as T}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js";const e="anthropic",z=S({__name:"anthropic",setup(M){const{t:u}=x(),g=U(),f=$(),{providers:o}=V(f),m=v(()=>f.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 h,b;return R(),K(a(B),{"provider-name":((h=m.value)==null?void 0:h.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as $}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as O,a as A}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as I}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as N,a as T}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-BJdX6ujY.js b/assets/audio-w3xz7y-w.js similarity index 88% rename from assets/audio-BJdX6ujY.js rename to assets/audio-w3xz7y-w.js index 4b0ba6188d990d86d62e2972bcbae5dd768d9951..2a2c61dcc37b276982bb6f0c76efd9ff659e2333 100644 --- a/assets/audio-BJdX6ujY.js +++ b/assets/audio-w3xz7y-w.js @@ -1 +1 @@ -import{d as s,e as f,c as d,o as p,a as t}from"./index-DP0FGIAR.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-D14Zran9.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-DaFTGomF.js b/assets/background-remove-CWrjzMNd.js similarity index 99% rename from assets/background-remove-DaFTGomF.js rename to assets/background-remove-CWrjzMNd.js index 39937e427a75f6dc5f9fa2ba488f7fec5b4bfa0d..6f7d9a4000d68a476559f9102ec112cb030859cd 100644 --- a/assets/background-remove-DaFTGomF.js +++ b/assets/background-remove-CWrjzMNd.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-Bnz-rUl0.js";import{_ as wv}from"./InputFile.vue_vue_type_script_setup_true_lang-BxywhVG8.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-DP0FGIAR.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-ji6OjjEm.js";import{_ as wv}from"./InputFile.vue_vue_type_script_setup_true_lang-DwkwVH8j.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-D14Zran9.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-LqG22_61.js b/assets/chat-CpNt1NMw.js similarity index 98% rename from assets/chat-LqG22_61.js rename to assets/chat-CpNt1NMw.js index 19c736b43098d05935e46984d98490f48d1cb895..fec7baef8b23d7c1e8a727992f3787e5ce4f13eb 100644 --- a/assets/chat-LqG22_61.js +++ b/assets/chat-CpNt1NMw.js @@ -1 +1 @@ -import{d as P,cb as W,e as S,c as h,o as y,a as i,bm as C,cc as E,u as M,bI as A,c6 as q,c7 as z,bd as D,W as U,Y as $}from"./index-DP0FGIAR.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-D14Zran9.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-DjQjUR2r.js b/assets/cloudflare-workers-ai-Cf2g_ZuT.js similarity index 69% rename from assets/cloudflare-workers-ai-DjQjUR2r.js rename to assets/cloudflare-workers-ai-Cf2g_ZuT.js index 62d7f312798924570c5e890523d4e3d8e3f433d7..6001f725791aa9c53d9033e7818d2a8be0702eaf 100644 --- a/assets/cloudflare-workers-ai-DjQjUR2r.js +++ b/assets/cloudflare-workers-ai-Cf2g_ZuT.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import{d as k,ce as y,cf 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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as z}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as A}from"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import{_ as B}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as C,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-BK6T0eKF.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 _,b;return h(),I(l(R),{"provider-name":(_=t.value)==null?void 0:_.localizedName,"provider-icon-color":(b=t.value)==null?void 0:b.iconColor,"on-back":()=>l(u).back()},{default:f(()=>[c(l(C),null,{default:f(()=>[c(l(N),{title:l(r)("settings.pages.providers.common.section.basic.title"),description:l(r)("settings.pages.providers.common.section.basic.description"),"on-reset":w},{default:f(()=>{var g;return[c(l(B),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=m=>s.value=m),"provider-name":(g=t.value)==null?void 0:g.localizedName,placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder")},null,8,["modelValue","provider-name","placeholder"]),c(l(S),{modelValue:d.value,"onUpdate:modelValue":i[1]||(i[1]=m=>d.value=m),label:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label"),description:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description"),placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder")},null,8,["modelValue","label","description","placeholder"])]}),_:1},8,["title","description"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof V=="function"&&V(U);export{U as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as z}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as A}from"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import{_ as B}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as C,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-BVqHkvwn.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/consciousness-uzzh2yDH.js b/assets/consciousness-CmIiKxQ0.js similarity index 90% rename from assets/consciousness-uzzh2yDH.js rename to assets/consciousness-CmIiKxQ0.js index 56c8e006ff15d7bcf661d442d19279484981c9cf..f5a1b33af0015ba4a92a715c138745848434159f 100644 --- a/assets/consciousness-uzzh2yDH.js +++ b/assets/consciousness-CmIiKxQ0.js @@ -1 +1 @@ -import{a4 as P,cb as n,e as M,f as r,w as L}from"./index-DP0FGIAR.js";import{u as w}from"./providers-CCXVXsM2.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-D14Zran9.js";import{u as w}from"./providers-Bnxi0hpg.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-dGzQjYcs.js b/assets/consciousness-aLswuYDU.js similarity index 93% rename from assets/consciousness-dGzQjYcs.js rename to assets/consciousness-aLswuYDU.js index 902bad6c4b22609ac75fc8487ccf729c6e6bcbf5..1d82166c4e39e958edb763ee586d2bdaaa9c82f5 100644 --- a/assets/consciousness-dGzQjYcs.js +++ b/assets/consciousness-aLswuYDU.js @@ -1 +1 @@ -import{d as R,a0 as h,$ as U,T as z,c5 as B,c as r,o as l,a as s,bm as f,W as k,Y as i,u as e,c6 as y,c7 as D,b as T,bl as q,c3 as j,bk as M,bI as u,cc as E}from"./index-DP0FGIAR.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as F}from"./consciousness-uzzh2yDH.js";import{u as I}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{R as Q,a as A}from"./RadioCardSimple-NVMpaHqJ.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-Dq6t2KM2.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js";const G={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},W={flex:"~ col gap-4"},Y={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},$={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"},ne={class:"text-sm text-red-600 dark:text-red-400"},le={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},re={class:"flex flex-col"},de={class:"font-medium"},ae={class:"text-sm text-amber-600 dark:text-amber-400"},ce={key:1},ue={flex:"~ col gap-4"},pe={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},me={text:"neutral-400 dark:neutral-500"},xe={class:"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"},be={class:"mt-2"},he={class:"mb-1 block text-sm font-medium"},fe=["placeholder"],ke={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},ye=R({__name:"consciousness",setup(Me){const V=I(),x=F(),{availableProviders:C,availableTextGenerationsProvidersMetadata:P}=h(V),{activeProvider:a,activeModel:d,customModelName:S,modelSearchQuery:c,supportsModelListing:v,providerModels:p,isLoadingActiveProviderModels:g,activeProviderModelError:_}=h(x),{t}=U();z(async()=>{await x.loadModelsForProvider(a.value)});function N(b){S.value=b}return(b,o)=>{const L=B("motion");return l(),r(y,null,[s("div",G,[s("div",null,[s("div",W,[s("div",null,[s("h2",Y,i(e(t)("settings.pages.providers.title")),1),s("div",$,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),s("div",H,[e(C).length>0?(l(),r("fieldset",J,[(l(!0),r(y,null,D(e(P),n=>(l(),M(e(A),{id:n.id,key:n.id,modelValue:e(a),"onUpdate:modelValue":o[0]||(o[0]=m=>u(a)?a.value=m:null),name:"provider",value:n.id,title:n.localizedName,description:n.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(l(),r("div",K,[T(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:q(()=>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)?(l(),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)?(l(),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(_)?(l(),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",ne,i(e(_)),1)])])):e(p).length===0&&!e(g)?(l(),r("div",le,[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?(l(),M(e(Q),{key:3,modelValue:e(d),"onUpdate:modelValue":o[1]||(o[1]=n=>u(d)?d.value=n:null),"search-query":e(c),"onUpdate:searchQuery":o[2]||(o[2]=n=>u(c)?c.value=n:null),items:e(p).sort((n,m)=>n.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)?(l(),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",be,[s("label",he,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]=n=>u(d)?d.value=n: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((l(),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 h,$ as U,T as z,c5 as B,c as r,o as l,a as s,bm as f,W as k,Y as i,u as e,c6 as y,c7 as D,b as T,bl as q,c3 as j,bk as M,bI as u,cd as E}from"./index-D14Zran9.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as F}from"./consciousness-CmIiKxQ0.js";import{u as I}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{R as Q,a as A}from"./RadioCardSimple-tg_w8gEX.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-yludE2Yh.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js";const G={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},W={flex:"~ col gap-4"},Y={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},$={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"},ne={class:"text-sm text-red-600 dark:text-red-400"},le={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},re={class:"flex flex-col"},de={class:"font-medium"},ae={class:"text-sm text-amber-600 dark:text-amber-400"},ce={key:1},ue={flex:"~ col gap-4"},pe={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},me={text:"neutral-400 dark:neutral-500"},xe={class:"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"},be={class:"mt-2"},he={class:"mb-1 block text-sm font-medium"},fe=["placeholder"],ke={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},ye=R({__name:"consciousness",setup(Me){const V=I(),x=F(),{availableProviders:C,availableTextGenerationsProvidersMetadata:P}=h(V),{activeProvider:a,activeModel:d,customModelName:S,modelSearchQuery:c,supportsModelListing:v,providerModels:p,isLoadingActiveProviderModels:g,activeProviderModelError:_}=h(x),{t}=U();z(async()=>{await x.loadModelsForProvider(a.value)});function N(b){S.value=b}return(b,o)=>{const L=B("motion");return l(),r(y,null,[s("div",G,[s("div",null,[s("div",W,[s("div",null,[s("h2",Y,i(e(t)("settings.pages.providers.title")),1),s("div",$,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),s("div",H,[e(C).length>0?(l(),r("fieldset",J,[(l(!0),r(y,null,D(e(P),n=>(l(),M(e(A),{id:n.id,key:n.id,modelValue:e(a),"onUpdate:modelValue":o[0]||(o[0]=m=>u(a)?a.value=m:null),name:"provider",value:n.id,title:n.localizedName,description:n.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(l(),r("div",K,[T(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:q(()=>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)?(l(),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)?(l(),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(_)?(l(),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",ne,i(e(_)),1)])])):e(p).length===0&&!e(g)?(l(),r("div",le,[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?(l(),M(e(Q),{key:3,modelValue:e(d),"onUpdate:modelValue":o[1]||(o[1]=n=>u(d)?d.value=n:null),"search-query":e(c),"onUpdate:searchQuery":o[2]||(o[2]=n=>u(c)?c.value=n:null),items:e(p).sort((n,m)=>n.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)?(l(),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",be,[s("label",he,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]=n=>u(d)?d.value=n: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((l(),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-CJMkm8eL.js b/assets/deepseek-CrDEniHj.js similarity index 64% rename from assets/deepseek-CJMkm8eL.js rename to assets/deepseek-CrDEniHj.js index a13ea284eff6944063db7e09cbf5de4564da8ae0..baa241fca5c81924ed5805e9a42709181c9e5a52 100644 --- a/assets/deepseek-CJMkm8eL.js +++ b/assets/deepseek-CrDEniHj.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as z}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as z}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-BuTQd-U2.js b/assets/default-DvMNFI2s.js similarity index 89% rename from assets/default-BuTQd-U2.js rename to assets/default-DvMNFI2s.js index c76991706a0e497a4fe9a5e178c080abe374f512..e14d86541a60f13f93648b41c66dd01b0a772720 100644 --- a/assets/default-BuTQd-U2.js +++ b/assets/default-DvMNFI2s.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-DP0FGIAR.js";import{H as d}from"./HeaderLink-BXBXXYzg.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-D14Zran9.js";import{H as d}from"./HeaderLink-BlO6oj_N.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-CvfxQD5q.js b/assets/default-node-DCzzxLJl.js similarity index 89% rename from assets/default-node-CvfxQD5q.js rename to assets/default-node-DCzzxLJl.js index 49b2a2f864cb07a6cf49f78b31ebe87a48791526..f3d51fe1d57f9622d8fffd951ec794b1ba0c2bbe 100644 --- a/assets/default-node-CvfxQD5q.js +++ b/assets/default-node-DCzzxLJl.js @@ -1 +1 @@ -import{cO as t}from"./index-DP0FGIAR.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-D14Zran9.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-BZov6ATI.js b/assets/delays-zRQlbx4H.js similarity index 74% rename from assets/delays-BZov6ATI.js rename to assets/delays-zRQlbx4H.js index 04ce30dcf7f4f8e9461a9214f574d6dd81824d8b..57e79e894f4619f266b83f8284585d744dde2571 100644 --- a/assets/delays-BZov6ATI.js +++ b/assets/delays-zRQlbx4H.js @@ -1 +1 @@ -import"./three-vrm.module-Bp24ut4Q.js";import{b as g,l as _}from"./queues-KTxrGl8o.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as k}from"./Textarea.vue_vue_type_script_setup_true_lang-CSSBrXdz.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-DP0FGIAR.js";import"./emotions-DWNSb738.js";import"./queue-66hlaQTM.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Badg0BE8.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-D-bSbrVn.js";import{b as g,l as _}from"./queues-DtduOmVA.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as k}from"./Textarea.vue_vue_type_script_setup_true_lang-BCWeHGz1.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-D14Zran9.js";import"./emotions-DWNSb738.js";import"./queue-CHtEOdh3.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-DAk2Pfwq.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/effect-WSjEuzC9-aSvRF1oh.js b/assets/effect-WSjEuzC9-Co61xpr-.js similarity index 51% rename from assets/effect-WSjEuzC9-aSvRF1oh.js rename to assets/effect-WSjEuzC9-Co61xpr-.js index 791a3a2ccf7ce91bc794025e19c096580886da9e..756a26ac8fe500f5dd6b38c88e12d8a26c9f8a3c 100644 --- a/assets/effect-WSjEuzC9-aSvRF1oh.js +++ b/assets/effect-WSjEuzC9-Co61xpr-.js @@ -1 +1 @@ -import{cO as r}from"./index-DP0FGIAR.js";import{t as e}from"./mcp-H-_JN8ee.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-D14Zran9.js";import{t as e}from"./mcp-B_OVeJTA.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-CH5jsvHS.js b/assets/elevenlabs-BSsm83ek.js similarity index 80% rename from assets/elevenlabs-CH5jsvHS.js rename to assets/elevenlabs-BSsm83ek.js index 5ee94d500ca410b4c2fcc692878e42c77b71723a..b43b36fa9dc793e63f85611af1736201f5901524 100644 --- a/assets/elevenlabs-CH5jsvHS.js +++ b/assets/elevenlabs-BSsm83ek.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as N}from"./providers-CCXVXsM2.js";import{u as z}from"./speech-RC4pJLrT.js";import{_ as p,a as G}from"./FieldRange.vue_vue_type_script_setup_true_lang-7V-hK3UG.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as H,a as R}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Er5TxWy_.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-DvCdsRql.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as N}from"./providers-Bnxi0hpg.js";import{u as z}from"./speech-BGwkIM3M.js";import{_ as p,a as G}from"./FieldRange.vue_vue_type_script_setup_true_lang-B7PpkYTo.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as H,a as R}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DKByP4k1.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-BnX1KDA5.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.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--Kof67xA.js b/assets/emotions-C4EsVYF_.js similarity index 77% rename from assets/emotions--Kof67xA.js rename to assets/emotions-C4EsVYF_.js index 7bbcfb8e3cea03d8fa0a016a04ea41469c468653..8762ecc6af2c1cb23dd910b757a958aec47e3023 100644 --- a/assets/emotions--Kof67xA.js +++ b/assets/emotions-C4EsVYF_.js @@ -1 +1 @@ -import{u as _}from"./queue-66hlaQTM.js";import{a as k,l as b}from"./queues-KTxrGl8o.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as x}from"./Textarea.vue_vue_type_script_setup_true_lang-CSSBrXdz.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-DP0FGIAR.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Badg0BE8.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-CHtEOdh3.js";import{a as k,l as b}from"./queues-DtduOmVA.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as x}from"./Textarea.vue_vue_type_script_setup_true_lang-BCWeHGz1.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-D14Zran9.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-DAk2Pfwq.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-Z-5NkV92.js b/assets/featherless-ai-DnuxCHwU.js similarity index 64% rename from assets/featherless-ai-Z-5NkV92.js rename to assets/featherless-ai-DnuxCHwU.js index fd995d23b7b4ebb9a6ef1fc2dc24acc6467c1a7d..892f1363fc6d37cef08cd566cb56cdc321ea5280 100644 --- a/assets/featherless-ai-Z-5NkV92.js +++ b/assets/featherless-ai-DnuxCHwU.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as z}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as z}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-D5fgxn9b.js b/assets/filter-message-BhV06SUJ.js similarity index 75% rename from assets/filter-message-D5fgxn9b.js rename to assets/filter-message-BhV06SUJ.js index b90d10d85682dd54bf2c0a7cec42893b34cc5c3b..b0733b28520848d2b3950e6556b942d00be6a302 100644 --- a/assets/filter-message-D5fgxn9b.js +++ b/assets/filter-message-BhV06SUJ.js @@ -1 +1 @@ -import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as m}from"./Textarea.vue_vue_type_script_setup_true_lang-CSSBrXdz.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-DP0FGIAR.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Badg0BE8.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-ji6OjjEm.js";import{_ as m}from"./Textarea.vue_vue_type_script_setup_true_lang-BCWeHGz1.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-D14Zran9.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-DAk2Pfwq.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-T0bvNySV.js b/assets/fireworks-ai-ChxVTXyy.js similarity index 64% rename from assets/fireworks-ai-T0bvNySV.js rename to assets/fireworks-ai-ChxVTXyy.js index c20fe14c6b136392800800566bc8e280112d1012..0a888aae629e24aa998464090dddda2c699db232 100644 --- a/assets/fireworks-ai-T0bvNySV.js +++ b/assets/fireworks-ai-ChxVTXyy.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as z}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as z}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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/google-generative-ai-qEwXEQ7E.js b/assets/google-generative-ai-BdEPpMgb.js similarity index 67% rename from assets/google-generative-ai-qEwXEQ7E.js rename to assets/google-generative-ai-BdEPpMgb.js index 7cc858c30cd59aea8989ca0a31f76835e97d8405..98702b2cfa58c519abad5177cc5fea2dd79697e2 100644 --- a/assets/google-generative-ai-qEwXEQ7E.js +++ b/assets/google-generative-ai-BdEPpMgb.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as M}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as N,a as w}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as x}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as M}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as N,a as w}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as x}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-DO9kjhVb.js b/assets/image-D7D2TYfM.js similarity index 90% rename from assets/image-DO9kjhVb.js rename to assets/image-D7D2TYfM.js index d060d602e6cd9417a3978e8d72bee88d96f5b7a9..4b121eff54b4cd65a9a75b29a480d8603ba52356 100644 --- a/assets/image-DO9kjhVb.js +++ b/assets/image-D7D2TYfM.js @@ -1,2 +1,2 @@ -import{d as _,e as i,cd as y,c as d,o as u,a,W as x,Y as v,u as w,c2 as b}from"./index-DP0FGIAR.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-D14Zran9.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-DP1h1D6P.js b/assets/index-BNKfaMGQ.js similarity index 89% rename from assets/index-DP1h1D6P.js rename to assets/index-BNKfaMGQ.js index 8df6add41cb3375cc70e4abc77cc9ca3e91a822c..42d1df31c45b96f708b8bf9a1f9656d2587568b8 100644 --- a/assets/index-DP1h1D6P.js +++ b/assets/index-BNKfaMGQ.js @@ -1 +1 @@ -import{d as i,c5 as n,bm as r,o as a,c as s,a as c}from"./index-DP0FGIAR.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-D14Zran9.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-jeVA_ivf.js b/assets/index-BmHVaKnN.js similarity index 92% rename from assets/index-jeVA_ivf.js rename to assets/index-BmHVaKnN.js index 9948af934f49af88b57936217a0033d89b3505e5..8714690092e629cbac515f3424b78d839a6ba8cb 100644 --- a/assets/index-jeVA_ivf.js +++ b/assets/index-BmHVaKnN.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import{d as I,a2 as E,bk as x,o as n,bl as A,a as s,c as p,W as w,bh as D,Y as C,X as P,c2 as R,V as j,e as r,$ as L,bj as V,f as q,c5 as N,bm as _,c6 as F,c7 as O,u as y,a3 as W,_ as X}from"./index-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as Y}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Bk0lr96q.js";import{b as $}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const G={"z-1":"","flex-1":""},H={"text-lg":"","font-thin":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},J={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},K=I({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(i){return(m,g)=>{const f=E("RouterLink");return n(),x(f,{box:"border",flex:"~ row",bg:"neutral-50 dark:neutral-900",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-item",transition:"all ease-in-out duration-400",relative:"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",cursor:"pointer",to:i.to},{default:A(()=>[s("div",G,[s("div",H,C(i.title),1),s("div",J,[s("span",null,C(i.description),1)])]),typeof i.icon=="string"?(n(),p("div",{key:0,class:P(["menu-icon-item-icon",[i.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-24":"","translate-y-4":"",text:"neutral-400/50 dark:neutral-600/50"},null,2)):w("",!0),i.iconTemplate?D(m.$slots,"icon",{key:1},void 0,!0):w("",!0)]),_:3},8,["to"])}}}),M=R(K,[["__scopeId","data-v-b1037d36"]]),Q={flex:"~ col gap-4","font-thin":""},U={flex:"~ col gap-4"},Z={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-12rem)]","bottom-0":"","right--10":"","z--1":"",initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},tt={text:"60","i-solar:settings-bold-duotone":""},et=I({__name:"index",setup(i){const m=j(),g=r(!1),f=r(),c=r(),{t}=L(),b=r(""),h=r(""),k=r(!1),d=V();function S(){var a;(a=c.value)==null||a.call(c)}async function T(a,l){const e=a.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const u=e.getBoundingClientRect(),v=`${u.left}px, ${u.top}px`;b.value=l.icon,h.value=v,k.value=!0,await X(),g.value=!0}const z=m.beforeEach(async(a,l,o)=>{if(!d.usePageSpecificTransitions||d.disableTransitions){o();return}await new Promise(e=>{c.value=e}),z(),o()}),B=q(()=>[{title:t("settings.pages.card.title"),description:t("settings.pages.card.description"),icon:"i-solar:emoji-funny-square-bold-duotone",to:"/settings/airi-card"},{title:t("settings.pages.modules.title"),description:t("settings.pages.modules.description"),icon:"i-solar:layers-bold-duotone",to:"/settings/modules"},{title:t("settings.pages.scene.title"),description:t("settings.pages.scene.description"),icon:"i-solar:armchair-2-bold-duotone",to:"/settings/scene"},{title:t("settings.pages.models.title"),description:t("settings.pages.models.description"),icon:"i-solar:people-nearby-bold-duotone",to:"/settings/models"},{title:t("settings.pages.memory.title"),description:t("settings.pages.memory.description"),icon:"i-solar:leaf-bold-duotone",to:"/settings/memory"},{title:t("settings.pages.providers.title"),description:t("settings.pages.providers.description"),icon:"i-solar:box-minimalistic-bold-duotone",to:"/settings/providers"},{title:t("settings.pages.themes.title"),description:t("settings.pages.themes.description"),icon:"i-solar:filters-bold-duotone",to:"/settings/appearance"}]);return(a,l)=>{const o=N("motion");return n(),p("div",Q,[l[0]||(l[0]=s("div",null,null,-1)),s("div",U,[(n(!0),p(F,null,O(B.value,(e,u)=>_((n(),x(y(M),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:W({transitionDelay:`${u*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:v=>T(v,e)},null,8,["style","title","description","icon","to","onClick"])),[[o]])),128))]),k.value&&!y(d).disableTransitions&&y(d).usePageSpecificTransitions?(n(),x(Y,{key:0,ref_key:"iconAnimation",ref:f,icon:b.value,"icon-size":6*1.2,position:h.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:g.value,onAnimationEndedOnce:S},null,8,["icon","position","started"])):_((n(),p("div",Z,[_(s("div",tt,null,512),[[o]])])),[[o]])])}}});typeof $=="function"&&$(et);export{et as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import{d as I,a2 as E,bk as x,o as n,bl as A,a as s,c as p,W as w,bh as D,Y as C,X as P,c2 as R,V as j,e as r,$ as L,bj as V,f as q,c5 as N,bm as _,c6 as F,c7 as O,u as y,a3 as W,_ as X}from"./index-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as Y}from"./IconAnimation.vue_vue_type_script_setup_true_lang-D4aBVanH.js";import{b as $}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const G={"z-1":"","flex-1":""},H={"text-lg":"","font-thin":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},J={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},K=I({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(i){return(m,g)=>{const f=E("RouterLink");return n(),x(f,{box:"border",flex:"~ row",bg:"neutral-50 dark:neutral-900",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-item",transition:"all ease-in-out duration-400",relative:"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",cursor:"pointer",to:i.to},{default:A(()=>[s("div",G,[s("div",H,C(i.title),1),s("div",J,[s("span",null,C(i.description),1)])]),typeof i.icon=="string"?(n(),p("div",{key:0,class:P(["menu-icon-item-icon",[i.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-24":"","translate-y-4":"",text:"neutral-400/50 dark:neutral-600/50"},null,2)):w("",!0),i.iconTemplate?D(m.$slots,"icon",{key:1},void 0,!0):w("",!0)]),_:3},8,["to"])}}}),M=R(K,[["__scopeId","data-v-b1037d36"]]),Q={flex:"~ col gap-4","font-thin":""},U={flex:"~ col gap-4"},Z={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-12rem)]","bottom-0":"","right--10":"","z--1":"",initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},tt={text:"60","i-solar:settings-bold-duotone":""},et=I({__name:"index",setup(i){const m=j(),g=r(!1),f=r(),c=r(),{t}=L(),b=r(""),h=r(""),k=r(!1),d=V();function S(){var a;(a=c.value)==null||a.call(c)}async function T(a,l){const e=a.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const u=e.getBoundingClientRect(),v=`${u.left}px, ${u.top}px`;b.value=l.icon,h.value=v,k.value=!0,await X(),g.value=!0}const z=m.beforeEach(async(a,l,o)=>{if(!d.usePageSpecificTransitions||d.disableTransitions){o();return}await new Promise(e=>{c.value=e}),z(),o()}),B=q(()=>[{title:t("settings.pages.card.title"),description:t("settings.pages.card.description"),icon:"i-solar:emoji-funny-square-bold-duotone",to:"/settings/airi-card"},{title:t("settings.pages.modules.title"),description:t("settings.pages.modules.description"),icon:"i-solar:layers-bold-duotone",to:"/settings/modules"},{title:t("settings.pages.scene.title"),description:t("settings.pages.scene.description"),icon:"i-solar:armchair-2-bold-duotone",to:"/settings/scene"},{title:t("settings.pages.models.title"),description:t("settings.pages.models.description"),icon:"i-solar:people-nearby-bold-duotone",to:"/settings/models"},{title:t("settings.pages.memory.title"),description:t("settings.pages.memory.description"),icon:"i-solar:leaf-bold-duotone",to:"/settings/memory"},{title:t("settings.pages.providers.title"),description:t("settings.pages.providers.description"),icon:"i-solar:box-minimalistic-bold-duotone",to:"/settings/providers"},{title:t("settings.pages.themes.title"),description:t("settings.pages.themes.description"),icon:"i-solar:filters-bold-duotone",to:"/settings/appearance"}]);return(a,l)=>{const o=N("motion");return n(),p("div",Q,[l[0]||(l[0]=s("div",null,null,-1)),s("div",U,[(n(!0),p(F,null,O(B.value,(e,u)=>_((n(),x(y(M),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:W({transitionDelay:`${u*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:v=>T(v,e)},null,8,["style","title","description","icon","to","onClick"])),[[o]])),128))]),k.value&&!y(d).disableTransitions&&y(d).usePageSpecificTransitions?(n(),x(Y,{key:0,ref_key:"iconAnimation",ref:f,icon:b.value,"icon-size":6*1.2,position:h.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:g.value,onAnimationEndedOnce:S},null,8,["icon","position","started"])):_((n(),p("div",Z,[_(s("div",tt,null,512),[[o]])])),[[o]])])}}});typeof $=="function"&&$(et);export{et as default}; diff --git a/assets/index-B5GMSkOE.js b/assets/index-BmJKXlqd.js similarity index 74% rename from assets/index-B5GMSkOE.js rename to assets/index-BmJKXlqd.js index a8de4b17f1a042de2408c0a2e01190abe302a5bd..79d849f8dcba1a783ecd9bb2059c46d3b5b7128e 100644 --- a/assets/index-B5GMSkOE.js +++ b/assets/index-BmJKXlqd.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import{d as g,a0 as k,a2 as v,c5 as b,c as i,o as t,a as c,bk as s,bm as l,c6 as m,c7 as I,u as e}from"./index-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as h}from"./providers-CCXVXsM2.js";import{I as z}from"./IconStatusItem-DVX2kjJz.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{u as A}from"./useIconAnimation-C4twnWcL.js";import{b as d}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";const B={grid:"~ cols-2 gap-4"},S={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},w=g({__name:"index",setup(C){const u=h(),{allProvidersMetadata:p}=k(u),{iconAnimationStarted:f,showIconAnimation:y,animationIcon:_}=A("i-solar:box-minimalistic-bold-duotone");return(D,n)=>{const x=v("IconAnimation"),a=b("motion");return t(),i(m,null,[c("div",B,[(t(!0),i(m,null,I(e(p),(o,r)=>l((t(),s(e(z),{key:o.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+r*10,delay:r*50,title:o.localizedName,description:o.localizedDescription,icon:o.icon,"icon-color":o.iconColor,"icon-image":o.iconImage,to:`/settings/providers/${o.id}`,configured:o.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[a]])),128))]),e(y)?(t(),s(x,{key:0,"z-index":-1,icon:e(_),"icon-size":12,duration:1e3,started:e(f),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):l((t(),i("div",S,n[0]||(n[0]=[c("div",{text:"60","i-solar:box-minimalistic-bold-duotone":""},null,-1)]))),[[a]])],64)}}});typeof d=="function"&&d(w);export{w as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import{d as g,a0 as k,a2 as v,c5 as b,c as i,o as t,a as c,bk as s,bm as l,c6 as m,c7 as I,u as e}from"./index-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as h}from"./providers-Bnxi0hpg.js";import{I as z}from"./IconStatusItem-BcJ0TKRl.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{u as A}from"./useIconAnimation-RPlHEpRk.js";import{b as d}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";const B={grid:"~ cols-2 gap-4"},S={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},w=g({__name:"index",setup(C){const u=h(),{allProvidersMetadata:p}=k(u),{iconAnimationStarted:f,showIconAnimation:y,animationIcon:_}=A("i-solar:box-minimalistic-bold-duotone");return(D,n)=>{const x=v("IconAnimation"),a=b("motion");return t(),i(m,null,[c("div",B,[(t(!0),i(m,null,I(e(p),(o,r)=>l((t(),s(e(z),{key:o.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+r*10,delay:r*50,title:o.localizedName,description:o.localizedDescription,icon:o.icon,"icon-color":o.iconColor,"icon-image":o.iconImage,to:`/settings/providers/${o.id}`,configured:o.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[a]])),128))]),e(y)?(t(),s(x,{key:0,"z-index":-1,icon:e(_),"icon-size":12,duration:1e3,started:e(f),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):l((t(),i("div",S,n[0]||(n[0]=[c("div",{text:"60","i-solar:box-minimalistic-bold-duotone":""},null,-1)]))),[[a]])],64)}}});typeof d=="function"&&d(w);export{w as default}; diff --git a/assets/index-Bzd5oxLM.js b/assets/index-Bzd5oxLM.js deleted file mode 100644 index 8b63e4498a1e4d389fe3f3fe244bfe55ddc6547b..0000000000000000000000000000000000000000 --- a/assets/index-Bzd5oxLM.js +++ /dev/null @@ -1 +0,0 @@ -import{l as Z,J as P}from"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import{_ as W,a as Y}from"./Model.vue_vue_type_script_setup_true_lang-CvHqwux7.js";import{d as E,bj as D,c as f,o as s,u as t,bh as q,$ as G,cm as H,a0 as K,e as j,w as Q,cn as X,b as l,bk as A,W as ee,bl as c,a as u,bm as O,cc as te,cg as g,Y as $,c6 as U,c7 as R,cl as oe,c2 as ne,bg as ie,a2 as ae,c5 as le}from"./index-DP0FGIAR.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import"./three-vrm.module-Bp24ut4Q.js";import{d as V,e as se}from"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{V as re}from"./browser-CkchkNbv.js";import{_ as z,a as de}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DRDqJuVs.js";import{u as ce}from"./useIconAnimation-C4twnWcL.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./index-BEkOKozM.js";const ue=["disabled"],h=E({__name:"Live2DModelControlButton",emits:["click"],setup(F){const m=D();return(r,n)=>(s(),f("button",{disabled:t(m).loadingLive2dModel,bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250",rounded:"",onClick:n[0]||(n[0]=p=>r.$emit("click"))},[q(r.$slots,"default")],8,ue))}}),me={flex:"~ col gap-4"},fe={flex:"","items-center":"","gap-2":""},pe=["disabled","placeholder"],ve={"font-medium":""},_e={flex:"","gap-2":""},be=["onUpdate:modelValue"],ge=["href","download"],he=E({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(F){const{t:m}=G(),r=H({accept:"application/zip"}),n=D(),{live2dModelFile:p,live2dMotionMap:v,live2dLoadSource:y,loadingLive2dModel:x,availableLive2dMotions:L,live2dModelUrl:M}=K(n),_=j(M.value);r.onChange(o=>{o&&o.length>0&&(v.value={},p.value=o[0],y.value="file",x.value=!0)}),Q(()=>n.loadingLive2dModel,o=>{o||y.value==="file"&&L.value.forEach(e=>{e.motionName in V?v.value[e.fileName]=e.motionName:v.value[e.fileName]=se})});async function b(o,e){if(!Object.keys(e).length)return o;const a=await new P().loadAsync(o),d=Object.keys(a.files).find(N=>N.endsWith("model3.json"));if(!d)throw new Error("model3.json not found");const J=await a.file(d).async("string"),I=JSON.parse(J),C={};Object.entries(e).forEach(([N,S])=>{if(C[S]){C[S].push({File:N});return}C[S]=[{File:N}]}),I.FileReferences.Motions=C,a.file(d,JSON.stringify(I,null,2));const T=await a.generateAsync({type:"blob"});return new File([T],o.name,{type:o.type,lastModified:o.lastModified})}async function w(){const o=await Z.getItem("live2dModel");if(!o)return;const e=await b(o,v.value);p.value=e,y.value="file",x.value=!0}const k=X(p);return(o,e)=>(s(),f("div",me,[l(t(z),{title:"settings.live2d.change-model.title",icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:c(()=>[u("div",fe,[O(u("input",{"onUpdate:modelValue":e[0]||(e[0]=i=>_.value=i),disabled:t(n).loadingLive2dModel,class:"form-control flex-1",border:"neutral-300 dark:neutral-800 solid 1 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out",placeholder:t(m)("settings.live2d.change-model.from-url-placeholder")},null,8,pe),[[te,_.value]]),l(h,{class:"form-control",onClick:e[1]||(e[1]=i=>M.value=_.value)},{default:c(()=>[g($(t(m)("settings.live2d.change-model.from-url")),1)]),_:1})]),l(h,{class:"form-control place-self-end",onClick:e[2]||(e[2]=i=>t(r).open())},{default:c(()=>[g($(t(m)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),l(h,{class:"form-control",onClick:e[3]||(e[3]=i=>o.$emit("extractColorsFromModel"))},{default:c(()=>e[4]||(e[4]=[g(" Extract colors from model ")])),_:1,__:[4]}),l(de,{colors:F.palette.map(i=>({hex:i,name:i}))},null,8,["colors"])]),_:1}),t(n).live2dLoadSource==="file"?(s(),A(t(z),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:c(()=>{var i;return[(s(!0),f(U,null,R(t(n).availableLive2dMotions,a=>(s(),f("div",{key:a.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[u("span",ve,$(a.fileName),1),u("div",_e,[O(u("select",{"onUpdate:modelValue":d=>t(n).live2dMotionMap[a.fileName]=d},[(s(!0),f(U,null,R(Object.keys(t(V)),d=>(s(),f("option",{key:d},$(d),1))),128))],8,be),[[oe,t(n).live2dMotionMap[a.fileName]]]),l(h,{class:"form-control",onClick:d=>t(n).live2dCurrentMotion={group:a.motionName,index:a.motionIndex}},{default:c(()=>e[5]||(e[5]=[g(" Play ")])),_:2,__:[5]},1032,["onClick"])])]))),128)),l(h,{onClick:w},{default:c(()=>e[6]||(e[6]=[g(" Save and patch ")])),_:1,__:[6]}),u("a",{"mt-2":"",block:"",href:t(k),download:`${((i=t(n).live2dModelFile)==null?void 0:i.name)||"live2d"}-motion-edited.zip`},[l(h,{"w-full":""},{default:c(()=>e[7]||(e[7]=[g("Export")])),_:1,__:[7]})],8,ge)]}),_:1})):ee("",!0)]))}}),ye=ne(he,[["__scopeId","data-v-b2e16668"]]),ke={flex:""},xe={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},Me=E({__name:"index",setup(F){const m=j(),r=j(),{width:n,height:p}=ie(m),v=j([]);async function y(){if(!r.value)return;const _=await r.value.captureFrame();if(!_){console.error("No frame captured");return}const b=URL.createObjectURL(_);try{const k=await new re(b).getPalette();v.value=Object.values(k).map(o=>o==null?void 0:o.hex).filter(o=>typeof o=="string")}finally{URL.revokeObjectURL(b)}}const{iconAnimationStarted:x,showIconAnimation:L,animationIcon:M}=ce("i-solar:people-nearby-bold-duotone");return(_,b)=>{const w=ae("IconAnimation"),k=le("motion");return s(),f(U,null,[u("div",ke,[u("div",{ref_key:"live2dContainerRef",ref:m,w:"50%",h:"80vh"},[l(t(Y),{ref_key:"live2dCanvasRef",ref:r,width:t(n),height:t(p)},{default:c(({app:o})=>[l(t(W),{app:o,"mouth-open-size":0,width:t(n),height:t(p),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),l(ye,{w:"50%",h:"80vh",palette:v.value,onExtractColorsFromModel:y},null,8,["palette"])]),t(L)?(s(),A(w,{key:0,"z-index":-1,icon:t(M),"icon-size":12,duration:1e3,started:t(x),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):O((s(),f("div",xe,b[0]||(b[0]=[u("div",{text:"60","i-solar:people-nearby-bold-duotone":""},null,-1)]))),[[k]])],64)}}});typeof B=="function"&&B(Me);export{Me as default}; diff --git a/assets/index-CGh1ZyDs.js b/assets/index-CN6HIUGU.js similarity index 89% rename from assets/index-CGh1ZyDs.js rename to assets/index-CN6HIUGU.js index 92a057b9c4eb48471f14df323eddf309752f3925..129643c281317a8a650e342388d98bb1220923b3 100644 --- a/assets/index-CGh1ZyDs.js +++ b/assets/index-CN6HIUGU.js @@ -1 +1 @@ -import{d as A,ce as _,cf as F,c as r,o,bm as a,a as e,b as m,bn as V,cg as h,W as U,Y as u,bl as g,X as k,ck as j,bj as H,ca as M,$ as O,e as N,w as P,c5 as z,bk as f,bI as I,u as i,cl as R,cc as L,c6 as x,c7 as W,c2 as X}from"./index-DP0FGIAR.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as C,a as Y}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DRDqJuVs.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./index-BEkOKozM.js";const q={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"},G=["aria-checked"],J={key:0,text:"sm neutral-500"},B=A({__name:"CheckBar",props:_({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const n=F(p,"modelValue");return(c,y)=>(o(),r("label",q,[a(e("input",{"onUpdate:modelValue":y[0]||(y[0]=v=>n.value=v),"aria-checked":n.value,type:"checkbox",hidden:""},null,8,G),[[V,n.value]]),e("div",null,[h(u(c.$t(p.text))+" ",1),p.description?(o(),r("div",J,u(c.$t(p.description)),1)):U("",!0)]),m(j,{name:"slide-away",mode:"out-in"},{default:g(()=>[n.value?(o(),r("div",{key:0,class:k(p.iconOn),transition:"all ease-in-out duration-250"},null,2)):(o(),r("div",{key:1,class:k(p.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}}),K=[[],["#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"]],Q={class:"w-full flex items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+3*10,delay:3*50,transition:"all ease-in-out duration-250"},Z={value:"en-US"},ee={value:"zh-CN"},te={flex:"","items-center":"","justify-between":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+5*10,delay:5*50,transition:"all ease-in-out duration-250"},ie={"text-lg":"","font-semibold":""},ne={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},ae=["disabled"],oe={class:"color-bar",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+7*10,delay:7*50,transition:"all ease-in-out duration-250"},se={"text-white":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+8*10,delay:8*50,transition:"all ease-in-out duration-250"},le={class:"color-bar transparency-grid",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+9*10,delay:9*50,transition:"all ease-in-out duration-250"},re=["duration","delay"],de={"font-medium":""},ue={text:"sm neutral-500"},pe={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[65dvh]","right--15":"","z--1":"",initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:"","items-center":"","justify-center":""},w=A({__name:"index",setup(p){const n=H(),c=M(),{t:y}=O(),v=N(!1);return P(()=>[n.usePageSpecificTransitions,n.disableTransitions],()=>{v.value=!0}),(d,t)=>{const s=z("motion");return o(),r(x,null,[a((o(),f(i(C),{title:i(y)("settings.sections.section.general.title"),icon:"i-solar:filters-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+1*10,delay:1*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(m(B,{modelValue:i(c),"onUpdate:modelValue":t[0]||(t[0]=l=>I(c)?c.value=l:null),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+2*10,delay:2*50,"icon-on":"i-solar:moon-stars-bold-duotone","icon-off":"i-solar:sun-fog-bold-duotone",text:"settings.theme",transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a((o(),r("div",Q,[h(u(d.$t("settings.language.title"))+" ",1),a(e("select",{"onUpdate:modelValue":t[1]||(t[1]=l=>i(n).language=l),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[e("option",Z,u(d.$t("settings.language.english")),1),e("option",ee,u(d.$t("settings.language.chinese")),1)],512),[[R,i(n).language]])])),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:i(y)("settings.pages.themes.sections.section.custom-color.title"),icon:"i-solar:pallete-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+4*10,delay:4*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a((o(),r("div",te,[e("span",ie,u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",ne,[a(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>i(n).themeColorsHueDynamic=l),type:"checkbox",class:"peer sr-only"},null,512),[[V,i(n).themeColorsHueDynamic]]),t[6]||(t[6]=e("div",{class:"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)),h(" "+u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])])),[[s]]),a(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>i(n).themeColorsHue=l),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+6*10,delay:6*50,transition:"all ease-in-out duration-250",type:"range",min:"0",max:"360",step:"0.01",class:k(["theme-hue-slider",i(n).themeColorsHueDynamic?"opacity-25 cursor-not-allowed":"cursor-pointer"]),disabled:i(n).themeColorsHueDynamic},null,10,ae),[[L,i(n).themeColorsHue],[s]]),a((o(),r("div",oe,[t[8]||(t[8]=e("span",{"bg-primary-50":""},"50",-1)),t[9]||(t[9]=e("span",{"bg-primary-100":""},"100",-1)),t[10]||(t[10]=e("span",{"bg-primary-200":""},"200",-1)),t[11]||(t[11]=e("span",{"bg-primary-300":""},"300",-1)),t[12]||(t[12]=e("span",{"bg-primary-400":""},"400",-1)),t[13]||(t[13]=e("span",{"bg-primary-500":""},"500",-1)),a((o(),r("div",se,t[7]||(t[7]=[e("span",{"bg-primary-600":""},"600",-1),e("span",{"bg-primary-700":""},"700",-1),e("span",{"bg-primary-800":""},"800",-1),e("span",{"bg-primary-900":""},"900",-1),e("span",{"bg-primary-950":""},"950",-1)]))),[[s]])])),[[s]]),a((o(),r("div",le,t[14]||(t[14]=[e("span",{bg:"primary-500/5"},"500/5",-1),e("span",{bg:"primary-500/10"},"500/10",-1),e("span",{bg:"primary-500/20"},"500/20",-1),e("span",{bg:"primary-500/30"},"500/30",-1),e("span",{bg:"primary-500/40"},"500/40",-1),e("span",{bg:"primary-500/50"},"500/50",-1),e("span",{bg:"primary-500/60"},"500/60",-1),e("span",{bg:"primary-500/70"},"500/70",-1),e("span",{bg:"primary-500/80"},"500/80",-1),e("span",{bg:"primary-500/90"},"500/90",-1),e("span",{bg:"primary-500"},"500",-1)]))),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.theme-presets.title",icon:"i-solar:magic-stick-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+10*10,delay:10*50,transition:"all ease-in-out duration-250"},{default:g(()=>[(o(!0),r(x,null,W(d.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:l,description:$,colors:E},b)=>a((o(),r("div",{key:b,class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+11*10+b*10,delay:11*50+b*50,transition:"all ease-in-out duration-250"},[e("div",null,[e("span",de,u(d.$rt(l)),1),e("div",ue,u(d.$rt($)),1)]),m(Y,{colors:E.map((T,S)=>({hex:i(K)[b][S],name:d.$rt(T)}))},null,8,["colors"])],8,re)),[[s]])),128))]),_:1})),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.developer.title",icon:"i-solar:code-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+18*10,delay:18*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(m(B,{modelValue:i(n).disableTransitions,"onUpdate:modelValue":t[4]||(t[4]=l=>i(n).disableTransitions=l),"icon-on":"i-solar:people-nearby-bold-duotone","icon-off":"i-solar:running-2-line-duotone",text:"settings.animations.stage-transitions.title",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+19*10,delay:19*50,transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a(m(B,{modelValue:i(n).usePageSpecificTransitions,"onUpdate:modelValue":t[5]||(t[5]=l=>i(n).usePageSpecificTransitions=l),disabled:i(n).disableTransitions,"icon-on":"i-solar:running-2-line-duotone","icon-off":"i-solar:people-nearby-bold-duotone",text:"settings.animations.use-page-specific-transitions.title",description:"settings.animations.use-page-specific-transitions.description",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+20*10,delay:20*50,transition:"all ease-in-out duration-250"},null,8,["modelValue","disabled"]),[[s]])]),_:1})),[[s]]),a((o(),r("div",pe,t[15]||(t[15]=[e("div",{text:"60","i-solar:filters-bold-duotone":""},null,-1)]))),[[s]])],64)}}});typeof D=="function"&&D(w);const De=X(w,[["__scopeId","data-v-aa1dd799"]]);export{De as default}; +import{d as A,cf as _,cg as F,c as r,o,bm as a,a as e,b as m,bn as V,ch as h,W as U,Y as u,bl as g,X as x,cl as j,bj as H,ca as M,$ as O,e as N,w as P,c5 as z,bk as f,bI as I,u as i,cm as R,cd as L,c6 as k,c7 as W,c2 as X}from"./index-D14Zran9.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as C,a as Y}from"./ColorPalette.vue_vue_type_script_setup_true_lang-Ct_bDzLr.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./index-MbWgqiI-.js";const q={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"},G=["aria-checked"],J={key:0,text:"sm neutral-500"},B=A({__name:"CheckBar",props:_({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const n=F(p,"modelValue");return(c,y)=>(o(),r("label",q,[a(e("input",{"onUpdate:modelValue":y[0]||(y[0]=v=>n.value=v),"aria-checked":n.value,type:"checkbox",hidden:""},null,8,G),[[V,n.value]]),e("div",null,[h(u(c.$t(p.text))+" ",1),p.description?(o(),r("div",J,u(c.$t(p.description)),1)):U("",!0)]),m(j,{name:"slide-away",mode:"out-in"},{default:g(()=>[n.value?(o(),r("div",{key:0,class:x(p.iconOn),transition:"all ease-in-out duration-250"},null,2)):(o(),r("div",{key:1,class:x(p.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}}),K=[[],["#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"]],Q={class:"w-full flex items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+3*10,delay:3*50,transition:"all ease-in-out duration-250"},Z={value:"en-US"},ee={value:"zh-CN"},te={flex:"","items-center":"","justify-between":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+5*10,delay:5*50,transition:"all ease-in-out duration-250"},ie={"text-lg":"","font-semibold":""},ne={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},ae=["disabled"],oe={class:"color-bar",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+7*10,delay:7*50,transition:"all ease-in-out duration-250"},se={"text-white":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+8*10,delay:8*50,transition:"all ease-in-out duration-250"},le={class:"color-bar transparency-grid",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+9*10,delay:9*50,transition:"all ease-in-out duration-250"},re=["duration","delay"],de={"font-medium":""},ue={text:"sm neutral-500"},pe={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[65dvh]","right--15":"","z--1":"",initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:"","items-center":"","justify-center":""},w=A({__name:"index",setup(p){const n=H(),c=M(),{t:y}=O(),v=N(!1);return P(()=>[n.usePageSpecificTransitions,n.disableTransitions],()=>{v.value=!0}),(d,t)=>{const s=z("motion");return o(),r(k,null,[a((o(),f(i(C),{title:i(y)("settings.sections.section.general.title"),icon:"i-solar:filters-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+1*10,delay:1*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(m(B,{modelValue:i(c),"onUpdate:modelValue":t[0]||(t[0]=l=>I(c)?c.value=l:null),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+2*10,delay:2*50,"icon-on":"i-solar:moon-stars-bold-duotone","icon-off":"i-solar:sun-fog-bold-duotone",text:"settings.theme",transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a((o(),r("div",Q,[h(u(d.$t("settings.language.title"))+" ",1),a(e("select",{"onUpdate:modelValue":t[1]||(t[1]=l=>i(n).language=l),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[e("option",Z,u(d.$t("settings.language.english")),1),e("option",ee,u(d.$t("settings.language.chinese")),1)],512),[[R,i(n).language]])])),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:i(y)("settings.pages.themes.sections.section.custom-color.title"),icon:"i-solar:pallete-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+4*10,delay:4*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a((o(),r("div",te,[e("span",ie,u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",ne,[a(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>i(n).themeColorsHueDynamic=l),type:"checkbox",class:"peer sr-only"},null,512),[[V,i(n).themeColorsHueDynamic]]),t[6]||(t[6]=e("div",{class:"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)),h(" "+u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])])),[[s]]),a(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>i(n).themeColorsHue=l),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+6*10,delay:6*50,transition:"all ease-in-out duration-250",type:"range",min:"0",max:"360",step:"0.01",class:x(["theme-hue-slider",i(n).themeColorsHueDynamic?"opacity-25 cursor-not-allowed":"cursor-pointer"]),disabled:i(n).themeColorsHueDynamic},null,10,ae),[[L,i(n).themeColorsHue],[s]]),a((o(),r("div",oe,[t[8]||(t[8]=e("span",{"bg-primary-50":""},"50",-1)),t[9]||(t[9]=e("span",{"bg-primary-100":""},"100",-1)),t[10]||(t[10]=e("span",{"bg-primary-200":""},"200",-1)),t[11]||(t[11]=e("span",{"bg-primary-300":""},"300",-1)),t[12]||(t[12]=e("span",{"bg-primary-400":""},"400",-1)),t[13]||(t[13]=e("span",{"bg-primary-500":""},"500",-1)),a((o(),r("div",se,t[7]||(t[7]=[e("span",{"bg-primary-600":""},"600",-1),e("span",{"bg-primary-700":""},"700",-1),e("span",{"bg-primary-800":""},"800",-1),e("span",{"bg-primary-900":""},"900",-1),e("span",{"bg-primary-950":""},"950",-1)]))),[[s]])])),[[s]]),a((o(),r("div",le,t[14]||(t[14]=[e("span",{bg:"primary-500/5"},"500/5",-1),e("span",{bg:"primary-500/10"},"500/10",-1),e("span",{bg:"primary-500/20"},"500/20",-1),e("span",{bg:"primary-500/30"},"500/30",-1),e("span",{bg:"primary-500/40"},"500/40",-1),e("span",{bg:"primary-500/50"},"500/50",-1),e("span",{bg:"primary-500/60"},"500/60",-1),e("span",{bg:"primary-500/70"},"500/70",-1),e("span",{bg:"primary-500/80"},"500/80",-1),e("span",{bg:"primary-500/90"},"500/90",-1),e("span",{bg:"primary-500"},"500",-1)]))),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.theme-presets.title",icon:"i-solar:magic-stick-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+10*10,delay:10*50,transition:"all ease-in-out duration-250"},{default:g(()=>[(o(!0),r(k,null,W(d.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:l,description:$,colors:E},b)=>a((o(),r("div",{key:b,class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+11*10+b*10,delay:11*50+b*50,transition:"all ease-in-out duration-250"},[e("div",null,[e("span",de,u(d.$rt(l)),1),e("div",ue,u(d.$rt($)),1)]),m(Y,{colors:E.map((T,S)=>({hex:i(K)[b][S],name:d.$rt(T)}))},null,8,["colors"])],8,re)),[[s]])),128))]),_:1})),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.developer.title",icon:"i-solar:code-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+18*10,delay:18*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(m(B,{modelValue:i(n).disableTransitions,"onUpdate:modelValue":t[4]||(t[4]=l=>i(n).disableTransitions=l),"icon-on":"i-solar:people-nearby-bold-duotone","icon-off":"i-solar:running-2-line-duotone",text:"settings.animations.stage-transitions.title",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+19*10,delay:19*50,transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a(m(B,{modelValue:i(n).usePageSpecificTransitions,"onUpdate:modelValue":t[5]||(t[5]=l=>i(n).usePageSpecificTransitions=l),disabled:i(n).disableTransitions,"icon-on":"i-solar:running-2-line-duotone","icon-off":"i-solar:people-nearby-bold-duotone",text:"settings.animations.use-page-specific-transitions.title",description:"settings.animations.use-page-specific-transitions.description",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+20*10,delay:20*50,transition:"all ease-in-out duration-250"},null,8,["modelValue","disabled"]),[[s]])]),_:1})),[[s]]),a((o(),r("div",pe,t[15]||(t[15]=[e("div",{text:"60","i-solar:filters-bold-duotone":""},null,-1)]))),[[s]])],64)}}});typeof D=="function"&&D(w);const De=X(w,[["__scopeId","data-v-aa1dd799"]]);export{De as default}; diff --git a/assets/index-CPhFJIv6.js b/assets/index-CPhFJIv6.js new file mode 100644 index 0000000000000000000000000000000000000000..555e8e2f04b3bd42a3750127365de5b680ae7e3f --- /dev/null +++ b/assets/index-CPhFJIv6.js @@ -0,0 +1 @@ +import{l as Z,J as P}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import{_ as W,a as Y}from"./Model.vue_vue_type_script_setup_true_lang-y8QkX-HC.js";import{d as E,bj as D,c as f,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 A,W as ee,bl as c,a as u,bm as O,cd as te,ch as g,Y as $,c6 as U,c7 as R,cm as oe,c2 as ne,bg as ie,cb as ae,a2 as le,c5 as se}from"./index-D14Zran9.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import"./three-vrm.module-D-bSbrVn.js";import{d as V,e as re}from"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{V as de}from"./browser-CkchkNbv.js";import{_ as z,a as ce}from"./ColorPalette.vue_vue_type_script_setup_true_lang-Ct_bDzLr.js";import{u as ue}from"./useIconAnimation-RPlHEpRk.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./index-MbWgqiI-.js";const me=["disabled"],h=E({__name:"Live2DModelControlButton",emits:["click"],setup(F){const m=D();return(r,n)=>(s(),f("button",{disabled:t(m).loadingLive2dModel,bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250",rounded:"",onClick:n[0]||(n[0]=p=>r.$emit("click"))},[q(r.$slots,"default")],8,me))}}),fe={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:m}=G(),r=H({accept:"application/zip"}),n=D(),{live2dModelFile:p,live2dMotionMap:v,live2dLoadSource:y,loadingLive2dModel:M,availableLive2dMotions:L,live2dModelUrl:k}=K(n),b=j(k.value);r.onChange(o=>{o&&o.length>0&&(v.value={},p.value=o[0],y.value="file",M.value=!0)}),Q(()=>n.loadingLive2dModel,o=>{o||y.value==="file"&&L.value.forEach(e=>{e.motionName in V?v.value[e.fileName]=e.motionName:v.value[e.fileName]=re})});async function x(o,e){if(!Object.keys(e).length)return o;const a=await new P().loadAsync(o),d=Object.keys(a.files).find(N=>N.endsWith("model3.json"));if(!d)throw new Error("model3.json not found");const J=await a.file(d).async("string"),I=JSON.parse(J),C={};Object.entries(e).forEach(([N,S])=>{if(C[S]){C[S].push({File:N});return}C[S]=[{File:N}]}),I.FileReferences.Motions=C,a.file(d,JSON.stringify(I,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(),f("div",fe,[l(t(z),{title:"settings.live2d.change-model.title",icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:c(()=>[u("div",pe,[O(u("input",{"onUpdate:modelValue":e[0]||(e[0]=i=>b.value=i),disabled:t(n).loadingLive2dModel,class:"form-control flex-1",border:"neutral-300 dark:neutral-800 solid 1 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out",placeholder:t(m)("settings.live2d.change-model.from-url-placeholder")},null,8,ve),[[te,b.value]]),l(h,{class:"form-control",onClick:e[1]||(e[1]=i=>k.value=b.value)},{default:c(()=>[g($(t(m)("settings.live2d.change-model.from-url")),1)]),_:1})]),l(h,{class:"form-control place-self-end",onClick:e[2]||(e[2]=i=>t(r).open())},{default:c(()=>[g($(t(m)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),l(h,{class:"form-control",onClick:e[3]||(e[3]=i=>o.$emit("extractColorsFromModel"))},{default:c(()=>e[4]||(e[4]=[g(" Extract colors from model ")])),_:1,__:[4]}),l(ce,{colors:F.palette.map(i=>({hex:i,name:i}))},null,8,["colors"])]),_:1}),t(n).live2dLoadSource==="file"?(s(),A(t(z),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:c(()=>{var i;return[(s(!0),f(U,null,R(t(n).availableLive2dMotions,a=>(s(),f("div",{key:a.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[u("span",_e,$(a.fileName),1),u("div",be,[O(u("select",{"onUpdate:modelValue":d=>t(n).live2dMotionMap[a.fileName]=d},[(s(!0),f(U,null,R(Object.keys(t(V)),d=>(s(),f("option",{key:d},$(d),1))),128))],8,ge),[[oe,t(n).live2dMotionMap[a.fileName]]]),l(h,{class:"form-control",onClick:d=>t(n).live2dCurrentMotion={group:a.motionName,index:a.motionIndex}},{default:c(()=>e[5]||(e[5]=[g(" Play ")])),_:2,__:[5]},1032,["onClick"])])]))),128)),l(h,{onClick:_},{default:c(()=>e[6]||(e[6]=[g(" Save and patch ")])),_:1,__:[6]}),u("a",{"mt-2":"",block:"",href:t(w),download:`${((i=t(n).live2dModelFile)==null?void 0:i.name)||"live2d"}-motion-edited.zip`},[l(h,{"w-full":""},{default:c(()=>e[7]||(e[7]=[g("Export")])),_:1,__:[7]})],8,he)]}),_:1})):ee("",!0)]))}}),xe=ne(ye,[["__scopeId","data-v-b2e16668"]]),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 m=j(),r=j(),{width:n,height:p}=ie(m),v=j([]);async function y(){if(!r.value)return;const x=await r.value.captureFrame();if(!x){console.error("No frame captured");return}const _=URL.createObjectURL(x);try{const o=await new de(_).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("IconAnimation"),o=se("motion");return s(),f(U,null,[u("div",Me,[u("div",{ref_key:"live2dContainerRef",ref:m,w:"50%",h:"80vh"},[l(t(Y),{ref_key:"live2dCanvasRef",ref:r,width:t(n),height:t(p)},{default:c(({app:e})=>[l(t(W),{app:e,"mouth-open-size":0,width:t(n),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(),A(w,{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(),f("div",ke,_[0]||(_[0]=[u("div",{text:"60","i-solar:people-nearby-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof B=="function"&&B(we);export{we as default}; diff --git a/assets/index-DP0FGIAR.js b/assets/index-D14Zran9.js similarity index 88% rename from assets/index-DP0FGIAR.js rename to assets/index-D14Zran9.js index 12c450bb03bd88c591ee5894d184117a3a846f55..c94e3bb750295b4b2304742f097320cdb18e2f00 100644 --- a/assets/index-DP0FGIAR.js +++ b/assets/index-D14Zran9.js @@ -1,25 +1,25 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-BuTQd-U2.js","assets/HeaderLink-BXBXXYzg.js","assets/HeaderLink-DsxHr3rn.css","assets/settings-Dv1TTR1J.js","assets/Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js","assets/Stage-Btkvlizu.css","assets/three-vrm.module-Bp24ut4Q.js","assets/emotions-DWNSb738.js","assets/mcp-H-_JN8ee.js","assets/providers-CCXVXsM2.js","assets/index-LHmcipjy.js","assets/Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js","assets/floating-ui.core-CgBsuaUc.js","assets/Select-X4vGC3oO.css","assets/index-B75XvTXz.js","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-RC4pJLrT.js","assets/queue-66hlaQTM.js","assets/queues-KTxrGl8o.js","assets/index-Dpfqqu9L.js","assets/airi-card-DKhKg3ic.js","assets/consciousness-uzzh2yDH.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js","assets/Model.vue_vue_type_script_setup_true_lang-CvHqwux7.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.js","assets/Basic.vue_vue_type_script_setup_true_lang-Badg0BE8.js","assets/route-block-B_A1xBdJ.js","assets/index-gTqmS2cP.css","assets/background-remove-DaFTGomF.js","assets/InputFile.vue_vue_type_script_setup_true_lang-BxywhVG8.js","assets/chat-LqG22_61.js","assets/image-DO9kjhVb.js","assets/image-BhuwcwI9.css","assets/vibrant-Dqom7fOB.js","assets/browser-CkchkNbv.js","assets/queue-C1jw5F5A.js","assets/index-jeVA_ivf.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bk0lr96q.js","assets/index-BYUmiAdF.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-pyEPGJ_d.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-B1A4lEPM.js","assets/index-BEkOKozM.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-nVeVvXRd.js","assets/CardDetailDialog-BfFWXE3W.js","assets/CardListItem-B5AqVhT4.js","assets/DeleteCardDialog-Ce4rxuq4.js","assets/index-CGh1ZyDs.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-DRDqJuVs.js","assets/index-BVitw2V7.css","assets/index-DP1h1D6P.js","assets/index-Bzd5oxLM.js","assets/useIconAnimation-C4twnWcL.js","assets/index-rlpEp8ML.css","assets/index-BgI42RYO.js","assets/IconStatusItem-DVX2kjJz.js","assets/consciousness-dGzQjYcs.js","assets/RadioCardSimple-NVMpaHqJ.js","assets/Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js","assets/memory-long-term-DxUYdEDS.js","assets/memory-short-term-BfhGoDof.js","assets/speech-BgcS9-0U.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-7V-hK3UG.js","assets/FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js","assets/Textarea.vue_vue_type_script_setup_true_lang-CSSBrXdz.js","assets/index-B5GMSkOE.js","assets/alibaba-cloud-model-studio-Cagj-QoZ.js","assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Er5TxWy_.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js","assets/anthropic-juwkGSIG.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.js","assets/cloudflare-workers-ai-DjQjUR2r.js","assets/deepseek-CJMkm8eL.js","assets/elevenlabs-CH5jsvHS.js","assets/featherless-ai-Z-5NkV92.js","assets/fireworks-ai-T0bvNySV.js","assets/google-generative-ai-qEwXEQ7E.js","assets/microsoft-speech-hZbAAf4A.js","assets/mistral-ai-D1fqDC-m.js","assets/moonshot-ai-BIzTGNXq.js","assets/novita-ai-DRwPtDAn.js","assets/ollama-D3Njx7yd.js","assets/openai-DL7DVZ_f.js","assets/openrouter-ai-BwGXDu-Y.js","assets/together-ai-dCAiNsZI.js","assets/volcengine-CRxgozat.js","assets/xai-P5ub0MXi.js","assets/index-TcFPSyt2.js","assets/filter-message-D5fgxn9b.js","assets/delays-BZov6ATI.js","assets/emotions--Kof67xA.js","assets/messages-D-pels38.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-DvMNFI2s.js","assets/HeaderLink-BlO6oj_N.js","assets/HeaderLink-DsxHr3rn.css","assets/settings-D8xREh35.js","assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js","assets/Stage-CR1KeiH6.css","assets/three-vrm.module-D-bSbrVn.js","assets/emotions-DWNSb738.js","assets/mcp-B_OVeJTA.js","assets/providers-Bnxi0hpg.js","assets/index-LHmcipjy.js","assets/Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js","assets/floating-ui.core-CgBsuaUc.js","assets/Select-X4vGC3oO.css","assets/index-DBnFFJfg.js","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-BGwkIM3M.js","assets/queue-CHtEOdh3.js","assets/queues-DtduOmVA.js","assets/index-Dpfqqu9L.js","assets/airi-card-DyPOejN4.js","assets/consciousness-CmIiKxQ0.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js","assets/Model.vue_vue_type_script_setup_true_lang-y8QkX-HC.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-CarTVdmi.js","assets/Basic.vue_vue_type_script_setup_true_lang-DAk2Pfwq.js","assets/route-block-B_A1xBdJ.js","assets/index-gTqmS2cP.css","assets/background-remove-CWrjzMNd.js","assets/InputFile.vue_vue_type_script_setup_true_lang-DwkwVH8j.js","assets/chat-CpNt1NMw.js","assets/image-D7D2TYfM.js","assets/image-BhuwcwI9.css","assets/vibrant-58lOJFKP.js","assets/browser-CkchkNbv.js","assets/queue-Bw5vKhjp.js","assets/index-BmHVaKnN.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-D4aBVanH.js","assets/index-DmgogPpB.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-C9PVsW9y.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-Dd8N9atm.js","assets/index-MbWgqiI-.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-CXLs8j9C.js","assets/CardDetailDialog-DwxgCXTp.js","assets/CardListItem-IHOaqPwL.js","assets/DeleteCardDialog-YApE2agS.js","assets/index-CN6HIUGU.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-Ct_bDzLr.js","assets/index-BVitw2V7.css","assets/index-BNKfaMGQ.js","assets/index-CPhFJIv6.js","assets/useIconAnimation-RPlHEpRk.js","assets/index-rlpEp8ML.css","assets/index-E9C4_JmR.js","assets/IconStatusItem-BcJ0TKRl.js","assets/consciousness-aLswuYDU.js","assets/RadioCardSimple-tg_w8gEX.js","assets/Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js","assets/memory-long-term-BYp5gzbN.js","assets/memory-short-term-BrCCCvqI.js","assets/speech-zNK1lovq.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-B7PpkYTo.js","assets/FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js","assets/Textarea.vue_vue_type_script_setup_true_lang-BCWeHGz1.js","assets/index-BmJKXlqd.js","assets/alibaba-cloud-model-studio-_AbXbWJU.js","assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DKByP4k1.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js","assets/anthropic-lNQKhFGe.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.js","assets/cloudflare-workers-ai-Cf2g_ZuT.js","assets/deepseek-CrDEniHj.js","assets/elevenlabs-BSsm83ek.js","assets/featherless-ai-DnuxCHwU.js","assets/fireworks-ai-ChxVTXyy.js","assets/google-generative-ai-BdEPpMgb.js","assets/microsoft-speech-BztvXPSP.js","assets/mistral-ai-DQVUyxbn.js","assets/moonshot-ai-e8eEMU8s.js","assets/novita-ai-5caxkANW.js","assets/ollama-CLDB6qQc.js","assets/openai-BR-iPfOR.js","assets/openrouter-ai-AaPaLp8U.js","assets/together-ai-CqmqxxJV.js","assets/volcengine-BgIoHidq.js","assets/xai-DD8al7gb.js","assets/index-KSDXhdaQ.js","assets/filter-message-BhV06SUJ.js","assets/delays-zRQlbx4H.js","assets/emotions-C4EsVYF_.js","assets/messages-DycnhubE.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 * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function _0(n){const e=Object.create(null);for(const t of n.split(","))e[t]=1;return t=>t in e}const bt={},ha=[],es=()=>{},fC=()=>!1,Gh=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),v0=n=>n.startsWith("onUpdate:"),sn=Object.assign,y0=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},hC=Object.prototype.hasOwnProperty,Et=(n,e)=>hC.call(n,e),Xe=Array.isArray,da=n=>Rc(n)==="[object Map]",Fa=n=>Rc(n)==="[object Set]",bv=n=>Rc(n)==="[object Date]",et=n=>typeof n=="function",kt=n=>typeof n=="string",Ui=n=>typeof n=="symbol",Dt=n=>n!==null&&typeof n=="object",WM=n=>(Dt(n)||et(n))&&et(n.then)&&et(n.catch),XM=Object.prototype.toString,Rc=n=>XM.call(n),dC=n=>Rc(n).slice(8,-1),$M=n=>Rc(n)==="[object Object]",b0=n=>kt(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,bl=_0(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Wh=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},pC=/-(\w)/g,ai=Wh(n=>n.replace(pC,(e,t)=>t?t.toUpperCase():"")),mC=/\B([A-Z])/g,Gs=Wh(n=>n.replace(mC,"-$1").toLowerCase()),Xh=Wh(n=>n.charAt(0).toUpperCase()+n.slice(1)),gf=Wh(n=>n?`on${Xh(n)}`:""),Yn=(n,e)=>!Object.is(n,e),_f=(n,...e)=>{for(let t=0;t{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},Lf=n=>{const e=parseFloat(n);return isNaN(e)?n:e},gC=n=>{const e=kt(n)?Number(n):NaN;return isNaN(e)?n:e};let xv;const $h=()=>xv||(xv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Si(n){if(Xe(n)){const e={};for(let t=0;t{if(t){const i=t.split(vC);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function ka(n){let e="";if(kt(n))e=n;else if(Xe(n))for(let t=0;txo(t,e))}const jM=n=>!!(n&&n.__v_isRef===!0),EC=n=>kt(n)?n:n==null?"":Xe(n)||Dt(n)&&(n.toString===XM||!et(n.toString))?jM(n)?EC(n.value):JSON.stringify(n,KM,2):String(n),KM=(n,e)=>jM(e)?KM(n,e.value):da(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,s],r)=>(t[up(i,r)+" =>"]=s,t),{})}:Fa(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>up(t))}:Ui(e)?up(e):Dt(e)&&!Xe(e)&&!$M(e)?String(e):e,up=(n,e="")=>{var t;return Ui(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/** +**//*! #__NO_SIDE_EFFECTS__ */function _0(n){const e=Object.create(null);for(const t of n.split(","))e[t]=1;return t=>t in e}const bt={},ha=[],es=()=>{},fC=()=>!1,Gh=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),v0=n=>n.startsWith("onUpdate:"),sn=Object.assign,y0=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},hC=Object.prototype.hasOwnProperty,Et=(n,e)=>hC.call(n,e),Xe=Array.isArray,da=n=>Rc(n)==="[object Map]",Fa=n=>Rc(n)==="[object Set]",bv=n=>Rc(n)==="[object Date]",et=n=>typeof n=="function",Bt=n=>typeof n=="string",Ui=n=>typeof n=="symbol",Dt=n=>n!==null&&typeof n=="object",WM=n=>(Dt(n)||et(n))&&et(n.then)&&et(n.catch),XM=Object.prototype.toString,Rc=n=>XM.call(n),dC=n=>Rc(n).slice(8,-1),$M=n=>Rc(n)==="[object Object]",b0=n=>Bt(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,bl=_0(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Wh=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},pC=/-(\w)/g,ai=Wh(n=>n.replace(pC,(e,t)=>t?t.toUpperCase():"")),mC=/\B([A-Z])/g,Gs=Wh(n=>n.replace(mC,"-$1").toLowerCase()),Xh=Wh(n=>n.charAt(0).toUpperCase()+n.slice(1)),gf=Wh(n=>n?`on${Xh(n)}`:""),jn=(n,e)=>!Object.is(n,e),_f=(n,...e)=>{for(let t=0;t{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},Lf=n=>{const e=parseFloat(n);return isNaN(e)?n:e},gC=n=>{const e=Bt(n)?Number(n):NaN;return isNaN(e)?n:e};let xv;const $h=()=>xv||(xv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Si(n){if(Xe(n)){const e={};for(let t=0;t{if(t){const i=t.split(vC);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function ka(n){let e="";if(Bt(n))e=n;else if(Xe(n))for(let t=0;txo(t,e))}const jM=n=>!!(n&&n.__v_isRef===!0),EC=n=>Bt(n)?n:n==null?"":Xe(n)||Dt(n)&&(n.toString===XM||!et(n.toString))?jM(n)?EC(n.value):JSON.stringify(n,KM,2):String(n),KM=(n,e)=>jM(e)?KM(n,e.value):da(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,s],r)=>(t[up(i,r)+" =>"]=s,t),{})}:Fa(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>up(t))}:Ui(e)?up(e):Dt(e)&&!Xe(e)&&!$M(e)?String(e):e,up=(n,e="")=>{var t;return Ui(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/** * @vue/reactivity v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Tn;class ZM{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Tn,!e&&Tn&&(this.index=(Tn.scopes||(Tn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0&&(Tn=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t0)return;if(Ml){let e=Ml;for(Ml=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let n;for(;xl;){let e=xl;for(xl=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){n||(n=i)}e=t}}if(n)throw n}function tS(n){for(let e=n.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function nS(n){let e,t=n.depsTail,i=t;for(;i;){const s=i.prevDep;i.version===-1?(i===t&&(t=s),w0(i),TC(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}n.deps=e,n.depsTail=t}function Qm(n){for(let e=n.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(iS(e.dep.computed)||e.dep.version!==e.version))return!0;return!!n._dirty}function iS(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===$l)||(n.globalVersion=$l,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!Qm(n))))return;n.flags|=2;const e=n.dep,t=Ot,i=Ni;Ot=n,Ni=!0;try{tS(n);const s=n.fn(n._value);(e.version===0||Yn(s,n._value))&&(n.flags|=128,n._value=s,e.version++)}catch(s){throw e.version++,s}finally{Ot=t,Ni=i,nS(n),n.flags&=-3}}function w0(n,e=!1){const{dep:t,prevSub:i,nextSub:s}=n;if(i&&(i.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=i,n.nextSub=void 0),t.subs===n&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)w0(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function TC(n){const{prevDep:e,nextDep:t}=n;e&&(e.nextDep=t,n.prevDep=void 0),t&&(t.prevDep=e,n.nextDep=void 0)}let Ni=!0;const sS=[];function Us(){sS.push(Ni),Ni=!1}function Fs(){const n=sS.pop();Ni=n===void 0?!0:n}function Mv(n){const{cleanup:e}=n;if(n.cleanup=void 0,e){const t=Ot;Ot=void 0;try{e()}finally{Ot=t}}}let $l=0;class wC{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Yh{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!Ot||!Ni||Ot===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Ot)t=this.activeLink=new wC(Ot,this),Ot.deps?(t.prevDep=Ot.depsTail,Ot.depsTail.nextDep=t,Ot.depsTail=t):Ot.deps=Ot.depsTail=t,rS(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=Ot.depsTail,t.nextDep=void 0,Ot.depsTail.nextDep=t,Ot.depsTail=t,Ot.deps===t&&(Ot.deps=i)}return t}trigger(e){this.version++,$l++,this.notify(e)}notify(e){E0();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{T0()}}}function rS(n){if(n.dep.sc++,n.sub.flags&4){const e=n.dep.computed;if(e&&!n.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)rS(i)}const t=n.dep.subs;t!==n&&(n.prevSub=t,t&&(t.nextSub=n)),n.dep.subs=n}}const Df=new WeakMap,mo=Symbol(""),eg=Symbol(""),ql=Symbol("");function wn(n,e,t){if(Ni&&Ot){let i=Df.get(n);i||Df.set(n,i=new Map);let s=i.get(t);s||(i.set(t,s=new Yh),s.map=i,s.key=t),s.track()}}function Ss(n,e,t,i,s,r){const o=Df.get(n);if(!o){$l++;return}const a=l=>{l&&l.trigger()};if(E0(),e==="clear")o.forEach(a);else{const l=Xe(n),c=l&&b0(t);if(l&&t==="length"){const u=Number(i);o.forEach((f,h)=>{(h==="length"||h===ql||!Ui(h)&&h>=u)&&a(f)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),c&&a(o.get(ql)),e){case"add":l?c&&a(o.get("length")):(a(o.get(mo)),da(n)&&a(o.get(eg)));break;case"delete":l||(a(o.get(mo)),da(n)&&a(o.get(eg)));break;case"set":da(n)&&a(o.get(mo));break}}T0()}function AC(n,e){const t=Df.get(n);return t&&t.get(e)}function Fo(n){const e=ht(n);return e===n?e:(wn(e,"iterate",ql),vi(n)?e:e.map(mn))}function jh(n){return wn(n=ht(n),"iterate",ql),n}const CC={__proto__:null,[Symbol.iterator](){return hp(this,Symbol.iterator,mn)},concat(...n){return Fo(this).concat(...n.map(e=>Xe(e)?Fo(e):e))},entries(){return hp(this,"entries",n=>(n[1]=mn(n[1]),n))},every(n,e){return fs(this,"every",n,e,void 0,arguments)},filter(n,e){return fs(this,"filter",n,e,t=>t.map(mn),arguments)},find(n,e){return fs(this,"find",n,e,mn,arguments)},findIndex(n,e){return fs(this,"findIndex",n,e,void 0,arguments)},findLast(n,e){return fs(this,"findLast",n,e,mn,arguments)},findLastIndex(n,e){return fs(this,"findLastIndex",n,e,void 0,arguments)},forEach(n,e){return fs(this,"forEach",n,e,void 0,arguments)},includes(...n){return dp(this,"includes",n)},indexOf(...n){return dp(this,"indexOf",n)},join(n){return Fo(this).join(n)},lastIndexOf(...n){return dp(this,"lastIndexOf",n)},map(n,e){return fs(this,"map",n,e,void 0,arguments)},pop(){return Ka(this,"pop")},push(...n){return Ka(this,"push",n)},reduce(n,...e){return Sv(this,"reduce",n,e)},reduceRight(n,...e){return Sv(this,"reduceRight",n,e)},shift(){return Ka(this,"shift")},some(n,e){return fs(this,"some",n,e,void 0,arguments)},splice(...n){return Ka(this,"splice",n)},toReversed(){return Fo(this).toReversed()},toSorted(n){return Fo(this).toSorted(n)},toSpliced(...n){return Fo(this).toSpliced(...n)},unshift(...n){return Ka(this,"unshift",n)},values(){return hp(this,"values",mn)}};function hp(n,e,t){const i=jh(n),s=i[e]();return i!==n&&!vi(n)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=t(r.value)),r}),s}const RC=Array.prototype;function fs(n,e,t,i,s,r){const o=jh(n),a=o!==n&&!vi(n),l=o[e];if(l!==RC[e]){const f=l.apply(n,r);return a?mn(f):f}let c=t;o!==n&&(a?c=function(f,h){return t.call(this,mn(f),h,n)}:t.length>2&&(c=function(f,h){return t.call(this,f,h,n)}));const u=l.call(o,c,i);return a&&s?s(u):u}function Sv(n,e,t,i){const s=jh(n);let r=t;return s!==n&&(vi(n)?t.length>3&&(r=function(o,a,l){return t.call(this,o,a,l,n)}):r=function(o,a,l){return t.call(this,o,mn(a),l,n)}),s[e](r,...i)}function dp(n,e,t){const i=ht(n);wn(i,"iterate",ql);const s=i[e](...t);return(s===-1||s===!1)&&A0(t[0])?(t[0]=ht(t[0]),i[e](...t)):s}function Ka(n,e,t=[]){Us(),E0();const i=ht(n)[e].apply(n,t);return T0(),Fs(),i}const PC=_0("__proto__,__v_isRef,__isVue"),oS=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Ui));function IC(n){Ui(n)||(n=String(n));const e=ht(this);return wn(e,"has",n),e.hasOwnProperty(n)}class aS{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const s=this._isReadonly,r=this._isShallow;if(t==="__v_isReactive")return!s;if(t==="__v_isReadonly")return s;if(t==="__v_isShallow")return r;if(t==="__v_raw")return i===(s?r?dS:hS:r?fS:uS).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Xe(e);if(!s){let l;if(o&&(l=CC[t]))return l;if(t==="hasOwnProperty")return IC}const a=Reflect.get(e,t,Lt(e)?e:i);return(Ui(t)?oS.has(t):PC(t))||(s||wn(e,"get",t),r)?a:Lt(a)?o&&b0(t)?a:a.value:Dt(a)?s?Fi(a):xi(a):a}}class lS extends aS{constructor(e=!1){super(!1,e)}set(e,t,i,s){let r=e[t];if(!this._isShallow){const l=vr(r);if(!vi(i)&&!vr(i)&&(r=ht(r),i=ht(i)),!Xe(e)&&Lt(r)&&!Lt(i))return l?!1:(r.value=i,!0)}const o=Xe(e)&&b0(t)?Number(t)n,ru=n=>Reflect.getPrototypeOf(n);function UC(n,e,t){return function(...i){const s=this.__v_raw,r=ht(s),o=da(r),a=n==="entries"||n===Symbol.iterator&&o,l=n==="keys"&&o,c=s[n](...i),u=t?tg:e?Of:mn;return!e&&wn(r,"iterate",l?eg:mo),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:a?[u(f[0]),u(f[1])]:u(f),done:h}},[Symbol.iterator](){return this}}}}function ou(n){return function(...e){return n==="delete"?!1:n==="clear"?void 0:this}}function FC(n,e){const t={get(s){const r=this.__v_raw,o=ht(r),a=ht(s);n||(Yn(s,a)&&wn(o,"get",s),wn(o,"get",a));const{has:l}=ru(o),c=e?tg:n?Of:mn;if(l.call(o,s))return c(r.get(s));if(l.call(o,a))return c(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!n&&wn(ht(s),"iterate",mo),Reflect.get(s,"size",s)},has(s){const r=this.__v_raw,o=ht(r),a=ht(s);return n||(Yn(s,a)&&wn(o,"has",s),wn(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,l=ht(a),c=e?tg:n?Of:mn;return!n&&wn(l,"iterate",mo),a.forEach((u,f)=>s.call(r,c(u),c(f),o))}};return sn(t,n?{add:ou("add"),set:ou("set"),delete:ou("delete"),clear:ou("clear")}:{add(s){!e&&!vi(s)&&!vr(s)&&(s=ht(s));const r=ht(this);return ru(r).has.call(r,s)||(r.add(s),Ss(r,"add",s,s)),this},set(s,r){!e&&!vi(r)&&!vr(r)&&(r=ht(r));const o=ht(this),{has:a,get:l}=ru(o);let c=a.call(o,s);c||(s=ht(s),c=a.call(o,s));const u=l.call(o,s);return o.set(s,r),c?Yn(r,u)&&Ss(o,"set",s,r):Ss(o,"add",s,r),this},delete(s){const r=ht(this),{has:o,get:a}=ru(r);let l=o.call(r,s);l||(s=ht(s),l=o.call(r,s)),a&&a.call(r,s);const c=r.delete(s);return l&&Ss(r,"delete",s,void 0),c},clear(){const s=ht(this),r=s.size!==0,o=s.clear();return r&&Ss(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=UC(s,n,e)}),t}function Kh(n,e){const t=FC(n,e);return(i,s,r)=>s==="__v_isReactive"?!n:s==="__v_isReadonly"?n:s==="__v_raw"?i:Reflect.get(Et(t,s)&&s in i?t:i,s,r)}const kC={get:Kh(!1,!1)},BC={get:Kh(!1,!0)},zC={get:Kh(!0,!1)},VC={get:Kh(!0,!0)},uS=new WeakMap,fS=new WeakMap,hS=new WeakMap,dS=new WeakMap;function HC(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function GC(n){return n.__v_skip||!Object.isExtensible(n)?0:HC(dC(n))}function xi(n){return vr(n)?n:Zh(n,!1,LC,kC,uS)}function pS(n){return Zh(n,!1,OC,BC,fS)}function Fi(n){return Zh(n,!0,DC,zC,hS)}function mS(n){return Zh(n,!0,NC,VC,dS)}function Zh(n,e,t,i,s){if(!Dt(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const r=GC(n);if(r===0)return n;const o=s.get(n);if(o)return o;const a=new Proxy(n,r===2?i:t);return s.set(n,a),a}function Ls(n){return vr(n)?Ls(n.__v_raw):!!(n&&n.__v_isReactive)}function vr(n){return!!(n&&n.__v_isReadonly)}function vi(n){return!!(n&&n.__v_isShallow)}function A0(n){return n?!!n.__v_raw:!1}function ht(n){const e=n&&n.__v_raw;return e?ht(e):n}function C0(n){return!Et(n,"__v_skip")&&Object.isExtensible(n)&&qM(n,"__v_skip",!0),n}const mn=n=>Dt(n)?xi(n):n,Of=n=>Dt(n)?Fi(n):n;function Lt(n){return n?n.__v_isRef===!0:!1}function nt(n){return gS(n,!1)}function Ne(n){return gS(n,!0)}function gS(n,e){return Lt(n)?n:new WC(n,e)}class WC{constructor(e,t){this.dep=new Yh,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ht(e),this._value=t?e:mn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||vi(e)||vr(e);e=i?e:ht(e),Yn(e,t)&&(this._rawValue=e,this._value=i?e:mn(e),this.dep.trigger())}}function Ut(n){return Lt(n)?n.value:n}function rt(n){return et(n)?n():Ut(n)}const XC={get:(n,e,t)=>e==="__v_raw"?n:Ut(Reflect.get(n,e,t)),set:(n,e,t,i)=>{const s=n[e];return Lt(s)&&!Lt(t)?(s.value=t,!0):Reflect.set(n,e,t,i)}};function _S(n){return Ls(n)?n:new Proxy(n,XC)}class $C{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Yh,{get:i,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function R0(n){return new $C(n)}function vS(n){const e=Xe(n)?new Array(n.length):{};for(const t in n)e[t]=bS(n,t);return e}class qC{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return AC(ht(this._object),this._key)}}class YC{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function yS(n,e,t){return Lt(n)?n:et(n)?new YC(n):Dt(n)&&arguments.length>1?bS(n,e,t):nt(n)}function bS(n,e,t){const i=n[e];return Lt(i)?i:new qC(n,e,t)}class jC{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Yh(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$l-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Ot!==this)return eS(this,!0),!0}get value(){const e=this.dep.track();return iS(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function KC(n,e,t=!1){let i,s;return et(n)?i=n:(i=n.get,s=n.set),new jC(i,s,t)}const au={},Nf=new WeakMap;let io;function ZC(n,e=!1,t=io){if(t){let i=Nf.get(t);i||Nf.set(t,i=[]),i.push(n)}}function JC(n,e,t=bt){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=t,c=y=>s?y:vi(y)||s===!1||s===0?Es(y,1):Es(y);let u,f,h,d,p=!1,_=!1;if(Lt(n)?(f=()=>n.value,p=vi(n)):Ls(n)?(f=()=>c(n),p=!0):Xe(n)?(_=!0,p=n.some(y=>Ls(y)||vi(y)),f=()=>n.map(y=>{if(Lt(y))return y.value;if(Ls(y))return c(y);if(et(y))return l?l(y,2):y()})):et(n)?e?f=l?()=>l(n,2):n:f=()=>{if(h){Us();try{h()}finally{Fs()}}const y=io;io=u;try{return l?l(n,3,[d]):n(d)}finally{io=y}}:f=es,e&&s){const y=f,T=s===!0?1/0:s;f=()=>Es(y(),T)}const g=qh(),m=()=>{u.stop(),g&&g.active&&y0(g.effects,u)};if(r&&e){const y=e;e=(...T)=>{y(...T),m()}}let v=_?new Array(n.length).fill(au):au;const b=y=>{if(!(!(u.flags&1)||!u.dirty&&!y))if(e){const T=u.run();if(s||p||(_?T.some((w,E)=>Yn(w,v[E])):Yn(T,v))){h&&h();const w=io;io=u;try{const E=[T,v===au?void 0:_&&v[0]===au?[]:v,d];v=T,l?l(e,3,E):e(...E)}finally{io=w}}}else u.run()};return a&&a(b),u=new JM(f),u.scheduler=o?()=>o(b,!1):b,d=y=>ZC(y,!1,u),h=u.onStop=()=>{const y=Nf.get(u);if(y){if(l)l(y,4);else for(const T of y)T();Nf.delete(u)}},e?i?b(!0):v=u.run():o?o(b.bind(null,!0),!0):u.run(),m.pause=u.pause.bind(u),m.resume=u.resume.bind(u),m.stop=m,m}function Es(n,e=1/0,t){if(e<=0||!Dt(n)||n.__v_skip||(t=t||new Set,t.has(n)))return n;if(t.add(n),e--,Lt(n))Es(n.value,e,t);else if(Xe(n))for(let i=0;i{Es(i,e,t)});else if($M(n)){for(const i in n)Es(n[i],e,t);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&Es(n[i],e,t)}return n}/** +**/let Tn;class ZM{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Tn,!e&&Tn&&(this.index=(Tn.scopes||(Tn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0&&(Tn=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t0)return;if(Ml){let e=Ml;for(Ml=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let n;for(;xl;){let e=xl;for(xl=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){n||(n=i)}e=t}}if(n)throw n}function tS(n){for(let e=n.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function nS(n){let e,t=n.depsTail,i=t;for(;i;){const s=i.prevDep;i.version===-1?(i===t&&(t=s),w0(i),TC(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}n.deps=e,n.depsTail=t}function Qm(n){for(let e=n.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(iS(e.dep.computed)||e.dep.version!==e.version))return!0;return!!n._dirty}function iS(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===$l)||(n.globalVersion=$l,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!Qm(n))))return;n.flags|=2;const e=n.dep,t=Nt,i=Ni;Nt=n,Ni=!0;try{tS(n);const s=n.fn(n._value);(e.version===0||jn(s,n._value))&&(n.flags|=128,n._value=s,e.version++)}catch(s){throw e.version++,s}finally{Nt=t,Ni=i,nS(n),n.flags&=-3}}function w0(n,e=!1){const{dep:t,prevSub:i,nextSub:s}=n;if(i&&(i.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=i,n.nextSub=void 0),t.subs===n&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)w0(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function TC(n){const{prevDep:e,nextDep:t}=n;e&&(e.nextDep=t,n.prevDep=void 0),t&&(t.prevDep=e,n.nextDep=void 0)}let Ni=!0;const sS=[];function Us(){sS.push(Ni),Ni=!1}function Fs(){const n=sS.pop();Ni=n===void 0?!0:n}function Mv(n){const{cleanup:e}=n;if(n.cleanup=void 0,e){const t=Nt;Nt=void 0;try{e()}finally{Nt=t}}}let $l=0;class wC{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Yh{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!Nt||!Ni||Nt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Nt)t=this.activeLink=new wC(Nt,this),Nt.deps?(t.prevDep=Nt.depsTail,Nt.depsTail.nextDep=t,Nt.depsTail=t):Nt.deps=Nt.depsTail=t,rS(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=Nt.depsTail,t.nextDep=void 0,Nt.depsTail.nextDep=t,Nt.depsTail=t,Nt.deps===t&&(Nt.deps=i)}return t}trigger(e){this.version++,$l++,this.notify(e)}notify(e){E0();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{T0()}}}function rS(n){if(n.dep.sc++,n.sub.flags&4){const e=n.dep.computed;if(e&&!n.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)rS(i)}const t=n.dep.subs;t!==n&&(n.prevSub=t,t&&(t.nextSub=n)),n.dep.subs=n}}const Df=new WeakMap,mo=Symbol(""),eg=Symbol(""),ql=Symbol("");function wn(n,e,t){if(Ni&&Nt){let i=Df.get(n);i||Df.set(n,i=new Map);let s=i.get(t);s||(i.set(t,s=new Yh),s.map=i,s.key=t),s.track()}}function Ss(n,e,t,i,s,r){const o=Df.get(n);if(!o){$l++;return}const a=l=>{l&&l.trigger()};if(E0(),e==="clear")o.forEach(a);else{const l=Xe(n),c=l&&b0(t);if(l&&t==="length"){const u=Number(i);o.forEach((f,h)=>{(h==="length"||h===ql||!Ui(h)&&h>=u)&&a(f)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),c&&a(o.get(ql)),e){case"add":l?c&&a(o.get("length")):(a(o.get(mo)),da(n)&&a(o.get(eg)));break;case"delete":l||(a(o.get(mo)),da(n)&&a(o.get(eg)));break;case"set":da(n)&&a(o.get(mo));break}}T0()}function AC(n,e){const t=Df.get(n);return t&&t.get(e)}function Fo(n){const e=ht(n);return e===n?e:(wn(e,"iterate",ql),vi(n)?e:e.map(mn))}function jh(n){return wn(n=ht(n),"iterate",ql),n}const CC={__proto__:null,[Symbol.iterator](){return hp(this,Symbol.iterator,mn)},concat(...n){return Fo(this).concat(...n.map(e=>Xe(e)?Fo(e):e))},entries(){return hp(this,"entries",n=>(n[1]=mn(n[1]),n))},every(n,e){return fs(this,"every",n,e,void 0,arguments)},filter(n,e){return fs(this,"filter",n,e,t=>t.map(mn),arguments)},find(n,e){return fs(this,"find",n,e,mn,arguments)},findIndex(n,e){return fs(this,"findIndex",n,e,void 0,arguments)},findLast(n,e){return fs(this,"findLast",n,e,mn,arguments)},findLastIndex(n,e){return fs(this,"findLastIndex",n,e,void 0,arguments)},forEach(n,e){return fs(this,"forEach",n,e,void 0,arguments)},includes(...n){return dp(this,"includes",n)},indexOf(...n){return dp(this,"indexOf",n)},join(n){return Fo(this).join(n)},lastIndexOf(...n){return dp(this,"lastIndexOf",n)},map(n,e){return fs(this,"map",n,e,void 0,arguments)},pop(){return Ka(this,"pop")},push(...n){return Ka(this,"push",n)},reduce(n,...e){return Sv(this,"reduce",n,e)},reduceRight(n,...e){return Sv(this,"reduceRight",n,e)},shift(){return Ka(this,"shift")},some(n,e){return fs(this,"some",n,e,void 0,arguments)},splice(...n){return Ka(this,"splice",n)},toReversed(){return Fo(this).toReversed()},toSorted(n){return Fo(this).toSorted(n)},toSpliced(...n){return Fo(this).toSpliced(...n)},unshift(...n){return Ka(this,"unshift",n)},values(){return hp(this,"values",mn)}};function hp(n,e,t){const i=jh(n),s=i[e]();return i!==n&&!vi(n)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=t(r.value)),r}),s}const RC=Array.prototype;function fs(n,e,t,i,s,r){const o=jh(n),a=o!==n&&!vi(n),l=o[e];if(l!==RC[e]){const f=l.apply(n,r);return a?mn(f):f}let c=t;o!==n&&(a?c=function(f,h){return t.call(this,mn(f),h,n)}:t.length>2&&(c=function(f,h){return t.call(this,f,h,n)}));const u=l.call(o,c,i);return a&&s?s(u):u}function Sv(n,e,t,i){const s=jh(n);let r=t;return s!==n&&(vi(n)?t.length>3&&(r=function(o,a,l){return t.call(this,o,a,l,n)}):r=function(o,a,l){return t.call(this,o,mn(a),l,n)}),s[e](r,...i)}function dp(n,e,t){const i=ht(n);wn(i,"iterate",ql);const s=i[e](...t);return(s===-1||s===!1)&&A0(t[0])?(t[0]=ht(t[0]),i[e](...t)):s}function Ka(n,e,t=[]){Us(),E0();const i=ht(n)[e].apply(n,t);return T0(),Fs(),i}const PC=_0("__proto__,__v_isRef,__isVue"),oS=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Ui));function IC(n){Ui(n)||(n=String(n));const e=ht(this);return wn(e,"has",n),e.hasOwnProperty(n)}class aS{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const s=this._isReadonly,r=this._isShallow;if(t==="__v_isReactive")return!s;if(t==="__v_isReadonly")return s;if(t==="__v_isShallow")return r;if(t==="__v_raw")return i===(s?r?dS:hS:r?fS:uS).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Xe(e);if(!s){let l;if(o&&(l=CC[t]))return l;if(t==="hasOwnProperty")return IC}const a=Reflect.get(e,t,Lt(e)?e:i);return(Ui(t)?oS.has(t):PC(t))||(s||wn(e,"get",t),r)?a:Lt(a)?o&&b0(t)?a:a.value:Dt(a)?s?Fi(a):xi(a):a}}class lS extends aS{constructor(e=!1){super(!1,e)}set(e,t,i,s){let r=e[t];if(!this._isShallow){const l=vr(r);if(!vi(i)&&!vr(i)&&(r=ht(r),i=ht(i)),!Xe(e)&&Lt(r)&&!Lt(i))return l?!1:(r.value=i,!0)}const o=Xe(e)&&b0(t)?Number(t)n,ru=n=>Reflect.getPrototypeOf(n);function UC(n,e,t){return function(...i){const s=this.__v_raw,r=ht(s),o=da(r),a=n==="entries"||n===Symbol.iterator&&o,l=n==="keys"&&o,c=s[n](...i),u=t?tg:e?Of:mn;return!e&&wn(r,"iterate",l?eg:mo),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:a?[u(f[0]),u(f[1])]:u(f),done:h}},[Symbol.iterator](){return this}}}}function ou(n){return function(...e){return n==="delete"?!1:n==="clear"?void 0:this}}function FC(n,e){const t={get(s){const r=this.__v_raw,o=ht(r),a=ht(s);n||(jn(s,a)&&wn(o,"get",s),wn(o,"get",a));const{has:l}=ru(o),c=e?tg:n?Of:mn;if(l.call(o,s))return c(r.get(s));if(l.call(o,a))return c(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!n&&wn(ht(s),"iterate",mo),Reflect.get(s,"size",s)},has(s){const r=this.__v_raw,o=ht(r),a=ht(s);return n||(jn(s,a)&&wn(o,"has",s),wn(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,l=ht(a),c=e?tg:n?Of:mn;return!n&&wn(l,"iterate",mo),a.forEach((u,f)=>s.call(r,c(u),c(f),o))}};return sn(t,n?{add:ou("add"),set:ou("set"),delete:ou("delete"),clear:ou("clear")}:{add(s){!e&&!vi(s)&&!vr(s)&&(s=ht(s));const r=ht(this);return ru(r).has.call(r,s)||(r.add(s),Ss(r,"add",s,s)),this},set(s,r){!e&&!vi(r)&&!vr(r)&&(r=ht(r));const o=ht(this),{has:a,get:l}=ru(o);let c=a.call(o,s);c||(s=ht(s),c=a.call(o,s));const u=l.call(o,s);return o.set(s,r),c?jn(r,u)&&Ss(o,"set",s,r):Ss(o,"add",s,r),this},delete(s){const r=ht(this),{has:o,get:a}=ru(r);let l=o.call(r,s);l||(s=ht(s),l=o.call(r,s)),a&&a.call(r,s);const c=r.delete(s);return l&&Ss(r,"delete",s,void 0),c},clear(){const s=ht(this),r=s.size!==0,o=s.clear();return r&&Ss(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=UC(s,n,e)}),t}function Kh(n,e){const t=FC(n,e);return(i,s,r)=>s==="__v_isReactive"?!n:s==="__v_isReadonly"?n:s==="__v_raw"?i:Reflect.get(Et(t,s)&&s in i?t:i,s,r)}const kC={get:Kh(!1,!1)},BC={get:Kh(!1,!0)},zC={get:Kh(!0,!1)},VC={get:Kh(!0,!0)},uS=new WeakMap,fS=new WeakMap,hS=new WeakMap,dS=new WeakMap;function HC(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function GC(n){return n.__v_skip||!Object.isExtensible(n)?0:HC(dC(n))}function xi(n){return vr(n)?n:Zh(n,!1,LC,kC,uS)}function pS(n){return Zh(n,!1,OC,BC,fS)}function Fi(n){return Zh(n,!0,DC,zC,hS)}function mS(n){return Zh(n,!0,NC,VC,dS)}function Zh(n,e,t,i,s){if(!Dt(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const r=GC(n);if(r===0)return n;const o=s.get(n);if(o)return o;const a=new Proxy(n,r===2?i:t);return s.set(n,a),a}function Ls(n){return vr(n)?Ls(n.__v_raw):!!(n&&n.__v_isReactive)}function vr(n){return!!(n&&n.__v_isReadonly)}function vi(n){return!!(n&&n.__v_isShallow)}function A0(n){return n?!!n.__v_raw:!1}function ht(n){const e=n&&n.__v_raw;return e?ht(e):n}function C0(n){return!Et(n,"__v_skip")&&Object.isExtensible(n)&&qM(n,"__v_skip",!0),n}const mn=n=>Dt(n)?xi(n):n,Of=n=>Dt(n)?Fi(n):n;function Lt(n){return n?n.__v_isRef===!0:!1}function nt(n){return gS(n,!1)}function Oe(n){return gS(n,!0)}function gS(n,e){return Lt(n)?n:new WC(n,e)}class WC{constructor(e,t){this.dep=new Yh,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ht(e),this._value=t?e:mn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||vi(e)||vr(e);e=i?e:ht(e),jn(e,t)&&(this._rawValue=e,this._value=i?e:mn(e),this.dep.trigger())}}function Ft(n){return Lt(n)?n.value:n}function rt(n){return et(n)?n():Ft(n)}const XC={get:(n,e,t)=>e==="__v_raw"?n:Ft(Reflect.get(n,e,t)),set:(n,e,t,i)=>{const s=n[e];return Lt(s)&&!Lt(t)?(s.value=t,!0):Reflect.set(n,e,t,i)}};function _S(n){return Ls(n)?n:new Proxy(n,XC)}class $C{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Yh,{get:i,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function R0(n){return new $C(n)}function vS(n){const e=Xe(n)?new Array(n.length):{};for(const t in n)e[t]=bS(n,t);return e}class qC{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return AC(ht(this._object),this._key)}}class YC{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function yS(n,e,t){return Lt(n)?n:et(n)?new YC(n):Dt(n)&&arguments.length>1?bS(n,e,t):nt(n)}function bS(n,e,t){const i=n[e];return Lt(i)?i:new qC(n,e,t)}class jC{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Yh(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$l-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Nt!==this)return eS(this,!0),!0}get value(){const e=this.dep.track();return iS(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function KC(n,e,t=!1){let i,s;return et(n)?i=n:(i=n.get,s=n.set),new jC(i,s,t)}const au={},Nf=new WeakMap;let io;function ZC(n,e=!1,t=io){if(t){let i=Nf.get(t);i||Nf.set(t,i=[]),i.push(n)}}function JC(n,e,t=bt){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=t,c=y=>s?y:vi(y)||s===!1||s===0?Es(y,1):Es(y);let u,f,h,d,p=!1,_=!1;if(Lt(n)?(f=()=>n.value,p=vi(n)):Ls(n)?(f=()=>c(n),p=!0):Xe(n)?(_=!0,p=n.some(y=>Ls(y)||vi(y)),f=()=>n.map(y=>{if(Lt(y))return y.value;if(Ls(y))return c(y);if(et(y))return l?l(y,2):y()})):et(n)?e?f=l?()=>l(n,2):n:f=()=>{if(h){Us();try{h()}finally{Fs()}}const y=io;io=u;try{return l?l(n,3,[d]):n(d)}finally{io=y}}:f=es,e&&s){const y=f,T=s===!0?1/0:s;f=()=>Es(y(),T)}const g=qh(),m=()=>{u.stop(),g&&g.active&&y0(g.effects,u)};if(r&&e){const y=e;e=(...T)=>{y(...T),m()}}let v=_?new Array(n.length).fill(au):au;const b=y=>{if(!(!(u.flags&1)||!u.dirty&&!y))if(e){const T=u.run();if(s||p||(_?T.some((w,S)=>jn(w,v[S])):jn(T,v))){h&&h();const w=io;io=u;try{const S=[T,v===au?void 0:_&&v[0]===au?[]:v,d];v=T,l?l(e,3,S):e(...S)}finally{io=w}}}else u.run()};return a&&a(b),u=new JM(f),u.scheduler=o?()=>o(b,!1):b,d=y=>ZC(y,!1,u),h=u.onStop=()=>{const y=Nf.get(u);if(y){if(l)l(y,4);else for(const T of y)T();Nf.delete(u)}},e?i?b(!0):v=u.run():o?o(b.bind(null,!0),!0):u.run(),m.pause=u.pause.bind(u),m.resume=u.resume.bind(u),m.stop=m,m}function Es(n,e=1/0,t){if(e<=0||!Dt(n)||n.__v_skip||(t=t||new Set,t.has(n)))return n;if(t.add(n),e--,Lt(n))Es(n.value,e,t);else if(Xe(n))for(let i=0;i{Es(i,e,t)});else if($M(n)){for(const i in n)Es(n[i],e,t);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&Es(n[i],e,t)}return n}/** * @vue/runtime-core v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Pc(n,e,t,i){try{return i?n(...i):n()}catch(s){Jh(s,e,t)}}function ki(n,e,t,i){if(et(n)){const s=Pc(n,e,t,i);return s&&WM(s)&&s.catch(r=>{Jh(r,e,t)}),s}if(Xe(n)){const s=[];for(let r=0;r>>1,s=kn[i],r=Yl(s);r=Yl(t)?kn.push(n):kn.splice(e2(e),0,n),n.flags|=1,MS()}}function MS(){Uf||(Uf=xS.then(ES))}function t2(n){Xe(n)?pa.push(...n):or&&n.id===-1?or.splice(ia+1,0,n):n.flags&1||(pa.push(n),n.flags|=1),MS()}function Ev(n,e,t=Yi+1){for(;tYl(t)-Yl(i));if(pa.length=0,or){or.push(...e);return}for(or=e,ia=0;ian.id==null?n.flags&2?-1:1/0:n.id;function ES(n){try{for(Yi=0;YiI0;function I0(n,e=tn,t){if(!e||n._n)return n;const i=(...s)=>{i._d&&Fv(-1);const r=Ff(e);let o;try{o=n(...s)}finally{Ff(r),i._d&&Fv(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function hG(n,e){if(tn===null)return n;const t=id(tn),i=n.dirs||(n.dirs=[]);for(let s=0;sn.__isTeleport,Sl=n=>n&&(n.disabled||n.disabled===""),Tv=n=>n&&(n.defer||n.defer===""),wv=n=>typeof SVGElement<"u"&&n instanceof SVGElement,Av=n=>typeof MathMLElement=="function"&&n instanceof MathMLElement,ng=(n,e)=>{const t=n&&n.to;return kt(t)?e?e(t):null:t},AS={name:"Teleport",__isTeleport:!0,process(n,e,t,i,s,r,o,a,l,c){const{mc:u,pc:f,pbc:h,o:{insert:d,querySelector:p,createText:_,createComment:g}}=c,m=Sl(e.props);let{shapeFlag:v,children:b,dynamicChildren:y}=e;if(n==null){const T=e.el=_(""),w=e.anchor=_("");d(T,t,i),d(w,t,i);const E=(M,S)=>{v&16&&(s&&s.isCE&&(s.ce._teleportTarget=M),u(b,M,S,s,r,o,a,l))},P=()=>{const M=e.target=ng(e.props,p),S=CS(M,e,_,d);M&&(o!=="svg"&&wv(M)?o="svg":o!=="mathml"&&Av(M)&&(o="mathml"),m||(E(M,S),vf(e,!1)))};m&&(E(t,w),vf(e,!0)),Tv(e.props)?(e.el.__isMounted=!1,Un(()=>{P(),delete e.el.__isMounted},r)):P()}else{if(Tv(e.props)&&n.el.__isMounted===!1){Un(()=>{AS.process(n,e,t,i,s,r,o,a,l,c)},r);return}e.el=n.el,e.targetStart=n.targetStart;const T=e.anchor=n.anchor,w=e.target=n.target,E=e.targetAnchor=n.targetAnchor,P=Sl(n.props),M=P?t:w,S=P?T:E;if(o==="svg"||wv(w)?o="svg":(o==="mathml"||Av(w))&&(o="mathml"),y?(h(n.dynamicChildren,y,M,s,r,o,a),F0(n,e,!0)):l||f(n,e,M,S,s,r,o,a,!1),m)P?e.props&&n.props&&e.props.to!==n.props.to&&(e.props.to=n.props.to):lu(e,t,T,c,1);else if((e.props&&e.props.to)!==(n.props&&n.props.to)){const D=e.target=ng(e.props,p);D&&lu(e,D,null,c,0)}else P&&lu(e,w,E,c,1);vf(e,m)}},remove(n,e,t,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:f,props:h}=n;if(f&&(s(c),s(u)),r&&s(l),o&16){const d=r||!Sl(h);for(let p=0;p{n.isMounted=!0}),US(()=>{n.isUnmounting=!0}),n}const hi=[Function,Array],RS={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hi,onEnter:hi,onAfterEnter:hi,onEnterCancelled:hi,onBeforeLeave:hi,onLeave:hi,onAfterLeave:hi,onLeaveCancelled:hi,onBeforeAppear:hi,onAppear:hi,onAfterAppear:hi,onAppearCancelled:hi},PS=n=>{const e=n.subTree;return e.component?PS(e.component):e},s2={name:"BaseTransition",props:RS,setup(n,{slots:e}){const t=Rn(),i=i2();return()=>{const s=e.default&&DS(e.default(),!0);if(!s||!s.length)return;const r=IS(s),o=ht(n),{mode:a}=o;if(i.isLeaving)return pp(r);const l=Cv(r);if(!l)return pp(r);let c=ig(l,o,i,t,f=>c=f);l.type!==An&&jl(l,c);let u=t.subTree&&Cv(t.subTree);if(u&&u.type!==An&&!ao(l,u)&&PS(t).type!==An){let f=ig(u,o,i,t);if(jl(u,f),a==="out-in"&&l.type!==An)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,t.job.flags&8||t.update(),delete f.afterLeave,u=void 0},pp(r);a==="in-out"&&l.type!==An?f.delayLeave=(h,d,p)=>{const _=LS(i,u);_[String(u.key)]=u,h[ar]=()=>{d(),h[ar]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function IS(n){let e=n[0];if(n.length>1){for(const t of n)if(t.type!==An){e=t;break}}return e}const r2=s2;function LS(n,e){const{leavingVNodes:t}=n;let i=t.get(e.type);return i||(i=Object.create(null),t.set(e.type,i)),i}function ig(n,e,t,i,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:h,onLeave:d,onAfterLeave:p,onLeaveCancelled:_,onBeforeAppear:g,onAppear:m,onAfterAppear:v,onAppearCancelled:b}=e,y=String(n.key),T=LS(t,n),w=(M,S)=>{M&&ki(M,i,9,S)},E=(M,S)=>{const D=S[1];w(M,S),Xe(M)?M.every(B=>B.length<=1)&&D():M.length<=1&&D()},P={mode:o,persisted:a,beforeEnter(M){let S=l;if(!t.isMounted)if(r)S=g||l;else return;M[ar]&&M[ar](!0);const D=T[y];D&&ao(n,D)&&D.el[ar]&&D.el[ar](),w(S,[M])},enter(M){let S=c,D=u,B=f;if(!t.isMounted)if(r)S=m||c,D=v||u,B=b||f;else return;let z=!1;const V=M[cu]=Q=>{z||(z=!0,Q?w(B,[M]):w(D,[M]),P.delayedLeave&&P.delayedLeave(),M[cu]=void 0)};S?E(S,[M,V]):V()},leave(M,S){const D=String(n.key);if(M[cu]&&M[cu](!0),t.isUnmounting)return S();w(h,[M]);let B=!1;const z=M[ar]=V=>{B||(B=!0,S(),V?w(_,[M]):w(p,[M]),M[ar]=void 0,T[D]===n&&delete T[D])};T[D]=n,d?E(d,[M,z]):z()},clone(M){const S=ig(M,e,t,i,s);return s&&s(S),S}};return P}function pp(n){if(ed(n))return n=yr(n),n.children=null,n}function Cv(n){if(!ed(n))return wS(n.type)&&n.children?IS(n.children):n;if(n.component)return n.component.subTree;const{shapeFlag:e,children:t}=n;if(t){if(e&16)return t[0];if(e&32&&et(t.default))return t.default()}}function jl(n,e){n.shapeFlag&6&&n.component?(n.transition=e,jl(n.component.subTree,e)):n.shapeFlag&128?(n.ssContent.transition=e.clone(n.ssContent),n.ssFallback.transition=e.clone(n.ssFallback)):n.transition=e}function DS(n,e=!1,t){let i=[],s=0;for(let r=0;r1)for(let r=0;rkf(p,e&&(Xe(e)?e[_]:e),t,i,s));return}if(ma(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&kf(n,e,t,i.component.subTree);return}const r=i.shapeFlag&4?id(i.component):i.el,o=s?null:r,{i:a,r:l}=n,c=e&&e.r,u=a.refs===bt?a.refs={}:a.refs,f=a.setupState,h=ht(f),d=f===bt?()=>!1:p=>Et(h,p);if(c!=null&&c!==l&&(kt(c)?(u[c]=null,d(c)&&(f[c]=null)):Lt(c)&&(c.value=null)),et(l))Pc(l,a,12,[o,u]);else{const p=kt(l),_=Lt(l);if(p||_){const g=()=>{if(n.f){const m=p?d(l)?f[l]:u[l]:l.value;s?Xe(m)&&y0(m,r):Xe(m)?m.includes(r)||m.push(r):p?(u[l]=[r],d(l)&&(f[l]=u[l])):(l.value=[r],n.k&&(u[n.k]=l.value))}else p?(u[l]=o,d(l)&&(f[l]=o)):_&&(l.value=o,n.k&&(u[n.k]=o))};o?(g.id=-1,Un(g,t)):g()}}}$h().requestIdleCallback;$h().cancelIdleCallback;const ma=n=>!!n.type.__asyncLoader,ed=n=>n.type.__isKeepAlive;function o2(n,e){NS(n,"a",e)}function a2(n,e){NS(n,"da",e)}function NS(n,e,t=un){const i=n.__wdc||(n.__wdc=()=>{let s=t;for(;s;){if(s.isDeactivated)return;s=s.parent}return n()});if(td(e,i,t),t){let s=t.parent;for(;s&&s.parent;)ed(s.parent.vnode)&&l2(i,e,t,s),s=s.parent}}function l2(n,e,t,i){const s=td(e,n,i,!0);rs(()=>{y0(i[e],s)},t)}function td(n,e,t=un,i=!1){if(t){const s=t[n]||(t[n]=[]),r=e.__weh||(e.__weh=(...o)=>{Us();const a=Nc(t),l=ki(e,t,n,o);return a(),Fs(),l});return i?s.unshift(r):s.push(r),r}}const Ws=n=>(e,t=un)=>{(!ec||n==="sp")&&td(n,(...i)=>e(...i),t)},c2=Ws("bm"),Hn=Ws("m"),u2=Ws("bu"),f2=Ws("u"),US=Ws("bum"),rs=Ws("um"),h2=Ws("sp"),d2=Ws("rtg"),p2=Ws("rtc");function m2(n,e=un){td("ec",n,e)}const L0="components",g2="directives";function mG(n,e){return D0(L0,n,!0,e)||n}const FS=Symbol.for("v-ndc");function _2(n){return kt(n)?D0(L0,n,!1)||n:n||FS}function gG(n){return D0(g2,n)}function D0(n,e,t=!0,i=!1){const s=tn||un;if(s){const r=s.type;if(n===L0){const a=rR(r,!1);if(a&&(a===e||a===ai(e)||a===Xh(ai(e))))return r}const o=Rv(s[n]||r[n],e)||Rv(s.appContext[n],e);return!o&&i?r:o}}function Rv(n,e){return n&&(n[e]||n[ai(e)]||n[Xh(ai(e))])}function v2(n,e,t,i){let s;const r=t,o=Xe(n);if(o||kt(n)){const a=o&&Ls(n);let l=!1,c=!1;a&&(l=!vi(n),c=vr(n),n=jh(n)),s=new Array(n.length);for(let u=0,f=n.length;ue(a,l,void 0,r));else{const a=Object.keys(n);s=new Array(a.length);for(let l=0,c=a.length;lQl(e)?!(e.type===An||e.type===Zt&&!kS(e.children)):!0)?n:null}function _G(n,e){const t={};for(const i in n)t[gf(i)]=n[i];return t}const sg=n=>n?r1(n)?id(n):sg(n.parent):null,El=sn(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>n.props,$attrs:n=>n.attrs,$slots:n=>n.slots,$refs:n=>n.refs,$parent:n=>sg(n.parent),$root:n=>sg(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>VS(n),$forceUpdate:n=>n.f||(n.f=()=>{P0(n.update)}),$nextTick:n=>n.n||(n.n=Ar.bind(n.proxy)),$watch:n=>z2.bind(n)}),mp=(n,e)=>n!==bt&&!n.__isScriptSetup&&Et(n,e),b2={get({_:n},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:s,props:r,accessCache:o,type:a,appContext:l}=n;let c;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return s[e];case 4:return t[e];case 3:return r[e]}else{if(mp(i,e))return o[e]=1,i[e];if(s!==bt&&Et(s,e))return o[e]=2,s[e];if((c=n.propsOptions[0])&&Et(c,e))return o[e]=3,r[e];if(t!==bt&&Et(t,e))return o[e]=4,t[e];rg&&(o[e]=0)}}const u=El[e];let f,h;if(u)return e==="$attrs"&&wn(n.attrs,"get",""),u(n);if((f=a.__cssModules)&&(f=f[e]))return f;if(t!==bt&&Et(t,e))return o[e]=4,t[e];if(h=l.config.globalProperties,Et(h,e))return h[e]},set({_:n},e,t){const{data:i,setupState:s,ctx:r}=n;return mp(s,e)?(s[e]=t,!0):i!==bt&&Et(i,e)?(i[e]=t,!0):Et(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(r[e]=t,!0)},has({_:{data:n,setupState:e,accessCache:t,ctx:i,appContext:s,propsOptions:r}},o){let a;return!!t[o]||n!==bt&&Et(n,o)||mp(e,o)||(a=r[0])&&Et(a,o)||Et(i,o)||Et(El,o)||Et(s.config.globalProperties,o)},defineProperty(n,e,t){return t.get!=null?n._.accessCache[e]=0:Et(t,"value")&&this.set(n,e,t.value,null),Reflect.defineProperty(n,e,t)}};function O0(){return BS().slots}function vG(){return BS().attrs}function BS(){const n=Rn();return n.setupContext||(n.setupContext=a1(n))}function Kl(n){return Xe(n)?n.reduce((e,t)=>(e[t]=null,e),{}):n}function yG(n,e){const t=Kl(n);for(const i in e){if(i.startsWith("__skip"))continue;let s=t[i];s?Xe(s)||et(s)?s=t[i]={type:s,default:e[i]}:s.default=e[i]:s===null&&(s=t[i]={default:e[i]}),s&&e[`__skip_${i}`]&&(s.skipFactory=!0)}return t}function bG(n,e){return!n||!e?n||e:Xe(n)&&Xe(e)?n.concat(e):sn({},Kl(n),Kl(e))}let rg=!0;function x2(n){const e=VS(n),t=n.proxy,i=n.ctx;rg=!1,e.beforeCreate&&Pv(e.beforeCreate,n,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:d,updated:p,activated:_,deactivated:g,beforeDestroy:m,beforeUnmount:v,destroyed:b,unmounted:y,render:T,renderTracked:w,renderTriggered:E,errorCaptured:P,serverPrefetch:M,expose:S,inheritAttrs:D,components:B,directives:z,filters:V}=e;if(c&&M2(c,i,null),o)for(const te in o){const Z=o[te];et(Z)&&(i[te]=Z.bind(t))}if(s){const te=s.call(t,t);Dt(te)&&(n.data=xi(te))}if(rg=!0,r)for(const te in r){const Z=r[te],pe=et(Z)?Z.bind(t,t):et(Z.get)?Z.get.bind(t,t):es,Me=!et(Z)&&et(Z.set)?Z.set.bind(t):es,re=Ee({get:pe,set:Me});Object.defineProperty(i,te,{enumerable:!0,configurable:!0,get:()=>re.value,set:xe=>re.value=xe})}if(a)for(const te in a)zS(a[te],i,t,te);if(l){const te=et(l)?l.call(t):l;Reflect.ownKeys(te).forEach(Z=>{gr(Z,te[Z])})}u&&Pv(u,n,"c");function j(te,Z){Xe(Z)?Z.forEach(pe=>te(pe.bind(t))):Z&&te(Z.bind(t))}if(j(c2,f),j(Hn,h),j(u2,d),j(f2,p),j(o2,_),j(a2,g),j(m2,P),j(p2,w),j(d2,E),j(US,v),j(rs,y),j(h2,M),Xe(S))if(S.length){const te=n.exposed||(n.exposed={});S.forEach(Z=>{Object.defineProperty(te,Z,{get:()=>t[Z],set:pe=>t[Z]=pe})})}else n.exposed||(n.exposed={});T&&n.render===es&&(n.render=T),D!=null&&(n.inheritAttrs=D),B&&(n.components=B),z&&(n.directives=z),M&&OS(n)}function M2(n,e,t=es){Xe(n)&&(n=og(n));for(const i in n){const s=n[i];let r;Dt(s)?"default"in s?r=_n(s.from||i,s.default,!0):r=_n(s.from||i):r=_n(s),Lt(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function Pv(n,e,t){ki(Xe(n)?n.map(i=>i.bind(e.proxy)):n.bind(e.proxy),e,t)}function zS(n,e,t,i){let s=i.includes(".")?QS(t,i):()=>t[i];if(kt(n)){const r=e[n];et(r)&&je(s,r)}else if(et(n))je(s,n.bind(t));else if(Dt(n))if(Xe(n))n.forEach(r=>zS(r,e,t,i));else{const r=et(n.handler)?n.handler.bind(t):e[n.handler];et(r)&&je(s,r,n)}}function VS(n){const e=n.type,{mixins:t,extends:i}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=n.appContext,a=r.get(e);let l;return a?l=a:!s.length&&!t&&!i?l=e:(l={},s.length&&s.forEach(c=>Bf(l,c,o,!0)),Bf(l,e,o)),Dt(e)&&r.set(e,l),l}function Bf(n,e,t,i=!1){const{mixins:s,extends:r}=e;r&&Bf(n,r,t,!0),s&&s.forEach(o=>Bf(n,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=S2[o]||t&&t[o];n[o]=a?a(n[o],e[o]):e[o]}return n}const S2={data:Iv,props:Lv,emits:Lv,methods:ml,computed:ml,beforeCreate:Dn,created:Dn,beforeMount:Dn,mounted:Dn,beforeUpdate:Dn,updated:Dn,beforeDestroy:Dn,beforeUnmount:Dn,destroyed:Dn,unmounted:Dn,activated:Dn,deactivated:Dn,errorCaptured:Dn,serverPrefetch:Dn,components:ml,directives:ml,watch:T2,provide:Iv,inject:E2};function Iv(n,e){return e?n?function(){return sn(et(n)?n.call(this,this):n,et(e)?e.call(this,this):e)}:e:n}function E2(n,e){return ml(og(n),og(e))}function og(n){if(Xe(n)){const e={};for(let t=0;t1)return t&&et(e)?e.call(i&&i.proxy):e}}function Ic(){return!!(un||tn||go)}const GS={},WS=()=>Object.create(GS),XS=n=>Object.getPrototypeOf(n)===GS;function C2(n,e,t,i=!1){const s={},r=WS();n.propsDefaults=Object.create(null),$S(n,e,s,r);for(const o in n.propsOptions[0])o in s||(s[o]=void 0);t?n.props=i?s:pS(s):n.type.props?n.props=s:n.props=r,n.attrs=r}function R2(n,e,t,i){const{props:s,attrs:r,vnode:{patchFlag:o}}=n,a=ht(s),[l]=n.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=n.vnode.dynamicProps;for(let f=0;f{l=!0;const[h,d]=qS(f,e,!0);sn(o,h),d&&a.push(...d)};!t&&e.mixins.length&&e.mixins.forEach(u),n.extends&&u(n.extends),n.mixins&&n.mixins.forEach(u)}if(!r&&!l)return Dt(n)&&i.set(n,ha),ha;if(Xe(r))for(let u=0;un[0]==="_"||n==="$stable",U0=n=>Xe(n)?n.map(Zi):[Zi(n)],I2=(n,e,t)=>{if(e._n)return e;const i=I0((...s)=>U0(e(...s)),t);return i._c=!1,i},YS=(n,e,t)=>{const i=n._ctx;for(const s in n){if(N0(s))continue;const r=n[s];if(et(r))e[s]=I2(s,r,i);else if(r!=null){const o=U0(r);e[s]=()=>o}}},jS=(n,e)=>{const t=U0(e);n.slots.default=()=>t},KS=(n,e,t)=>{for(const i in e)(t||!N0(i))&&(n[i]=e[i])},L2=(n,e,t)=>{const i=n.slots=WS();if(n.vnode.shapeFlag&32){const s=e._;s?(KS(i,e,t),t&&qM(i,"_",s,!0)):YS(e,i)}else e&&jS(n,e)},D2=(n,e,t)=>{const{vnode:i,slots:s}=n;let r=!0,o=bt;if(i.shapeFlag&32){const a=e._;a?t&&a===1?r=!1:KS(s,e,t):(r=!e.$stable,YS(e,s)),o=e}else e&&(jS(n,e),o={default:1});if(r)for(const a in s)!N0(a)&&o[a]==null&&delete s[a]},Un=$2;function ZS(n){return O2(n)}function O2(n,e){const t=$h();t.__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:d=es,insertStaticContent:p}=n,_=(N,U,A,W=null,G=null,X=null,C=void 0,I=null,F=!!U.dynamicChildren)=>{if(N===U)return;N&&!ao(N,U)&&(W=$(N),xe(N,G,X,!0),N=null),U.patchFlag===-2&&(F=!1,U.dynamicChildren=null);const{type:H,ref:ce,shapeFlag:R}=U;switch(H){case Oc:g(N,U,A,W);break;case An:m(N,U,A,W);break;case yf:N==null&&v(U,A,W,C);break;case Zt:B(N,U,A,W,G,X,C,I,F);break;default:R&1?T(N,U,A,W,G,X,C,I,F):R&6?z(N,U,A,W,G,X,C,I,F):(R&64||R&128)&&H.process(N,U,A,W,G,X,C,I,F,ue)}ce!=null&&G&&kf(ce,N&&N.ref,X,U||N,!U)},g=(N,U,A,W)=>{if(N==null)i(U.el=a(U.children),A,W);else{const G=U.el=N.el;U.children!==N.children&&c(G,U.children)}},m=(N,U,A,W)=>{N==null?i(U.el=l(U.children||""),A,W):U.el=N.el},v=(N,U,A,W)=>{[N.el,N.anchor]=p(N.children,U,A,W,N.el,N.anchor)},b=({el:N,anchor:U},A,W)=>{let G;for(;N&&N!==U;)G=h(N),i(N,A,W),N=G;i(U,A,W)},y=({el:N,anchor:U})=>{let A;for(;N&&N!==U;)A=h(N),s(N),N=A;s(U)},T=(N,U,A,W,G,X,C,I,F)=>{U.type==="svg"?C="svg":U.type==="math"&&(C="mathml"),N==null?w(U,A,W,G,X,C,I,F):M(N,U,G,X,C,I,F)},w=(N,U,A,W,G,X,C,I)=>{let F,H;const{props:ce,shapeFlag:R,transition:x,dirs:O}=N;if(F=N.el=o(N.type,X,ce&&ce.is,ce),R&8?u(F,N.children):R&16&&P(N.children,F,null,W,G,gp(N,X),C,I),O&&Fr(N,null,W,"created"),E(F,N,N.scopeId,C,W),ce){for(const ne in ce)ne!=="value"&&!bl(ne)&&r(F,ne,null,ce[ne],X,W);"value"in ce&&r(F,"value",null,ce.value,X),(H=ce.onVnodeBeforeMount)&&Wi(H,W,N)}O&&Fr(N,null,W,"beforeMount");const Y=N2(G,x);Y&&x.beforeEnter(F),i(F,U,A),((H=ce&&ce.onVnodeMounted)||Y||O)&&Un(()=>{H&&Wi(H,W,N),Y&&x.enter(F),O&&Fr(N,null,W,"mounted")},G)},E=(N,U,A,W,G)=>{if(A&&d(N,A),W)for(let X=0;X{for(let H=F;H{const I=U.el=N.el;let{patchFlag:F,dynamicChildren:H,dirs:ce}=U;F|=N.patchFlag&16;const R=N.props||bt,x=U.props||bt;let O;if(A&&kr(A,!1),(O=x.onVnodeBeforeUpdate)&&Wi(O,A,U,N),ce&&Fr(U,N,A,"beforeUpdate"),A&&kr(A,!0),(R.innerHTML&&x.innerHTML==null||R.textContent&&x.textContent==null)&&u(I,""),H?S(N.dynamicChildren,H,I,A,W,gp(U,G),X):C||Z(N,U,I,null,A,W,gp(U,G),X,!1),F>0){if(F&16)D(I,R,x,A,G);else if(F&2&&R.class!==x.class&&r(I,"class",null,x.class,G),F&4&&r(I,"style",R.style,x.style,G),F&8){const Y=U.dynamicProps;for(let ne=0;ne{O&&Wi(O,A,U,N),ce&&Fr(U,N,A,"updated")},W)},S=(N,U,A,W,G,X,C)=>{for(let I=0;I{if(U!==A){if(U!==bt)for(const X in U)!bl(X)&&!(X in A)&&r(N,X,U[X],null,G,W);for(const X in A){if(bl(X))continue;const C=A[X],I=U[X];C!==I&&X!=="value"&&r(N,X,I,C,G,W)}"value"in A&&r(N,"value",U.value,A.value,G)}},B=(N,U,A,W,G,X,C,I,F)=>{const H=U.el=N?N.el:a(""),ce=U.anchor=N?N.anchor:a("");let{patchFlag:R,dynamicChildren:x,slotScopeIds:O}=U;O&&(I=I?I.concat(O):O),N==null?(i(H,A,W),i(ce,A,W),P(U.children||[],A,ce,G,X,C,I,F)):R>0&&R&64&&x&&N.dynamicChildren?(S(N.dynamicChildren,x,A,G,X,C,I),(U.key!=null||G&&U===G.subTree)&&F0(N,U,!0)):Z(N,U,A,ce,G,X,C,I,F)},z=(N,U,A,W,G,X,C,I,F)=>{U.slotScopeIds=I,N==null?U.shapeFlag&512?G.ctx.activate(U,A,W,C,F):V(U,A,W,G,X,C,F):Q(N,U,F)},V=(N,U,A,W,G,X,C)=>{const I=N.component=tR(N,W,G);if(ed(N)&&(I.ctx.renderer=ue),nR(I,!1,C),I.asyncDep){if(G&&G.registerDep(I,j,C),!N.el){const F=I.subTree=gn(An);m(null,F,U,A)}}else j(I,N,U,A,G,X,C)},Q=(N,U,A)=>{const W=U.component=N.component;if(W2(N,U,A))if(W.asyncDep&&!W.asyncResolved){te(W,U,A);return}else W.next=U,W.update();else U.el=N.el,W.vnode=U},j=(N,U,A,W,G,X,C)=>{const I=()=>{if(N.isMounted){let{next:R,bu:x,u:O,parent:Y,vnode:ne}=N;{const De=JS(N);if(De){R&&(R.el=ne.el,te(N,R,C)),De.asyncDep.then(()=>{N.isUnmounted||I()});return}}let ee=R,Te;kr(N,!1),R?(R.el=ne.el,te(N,R,C)):R=ne,x&&_f(x),(Te=R.props&&R.props.onVnodeBeforeUpdate)&&Wi(Te,Y,R,ne),kr(N,!0);const me=Nv(N),Re=N.subTree;N.subTree=me,_(Re,me,f(Re.el),$(Re),N,G,X),R.el=me.el,ee===null&&X2(N,me.el),O&&Un(O,G),(Te=R.props&&R.props.onVnodeUpdated)&&Un(()=>Wi(Te,Y,R,ne),G)}else{let R;const{el:x,props:O}=U,{bm:Y,m:ne,parent:ee,root:Te,type:me}=N,Re=ma(U);kr(N,!1),Y&&_f(Y),!Re&&(R=O&&O.onVnodeBeforeMount)&&Wi(R,ee,U),kr(N,!0);{Te.ce&&Te.ce._injectChildStyle(me);const De=N.subTree=Nv(N);_(null,De,A,W,N,G,X),U.el=De.el}if(ne&&Un(ne,G),!Re&&(R=O&&O.onVnodeMounted)){const De=U;Un(()=>Wi(R,ee,De),G)}(U.shapeFlag&256||ee&&ma(ee.vnode)&&ee.vnode.shapeFlag&256)&&N.a&&Un(N.a,G),N.isMounted=!0,U=A=W=null}};N.scope.on();const F=N.effect=new JM(I);N.scope.off();const H=N.update=F.run.bind(F),ce=N.job=F.runIfDirty.bind(F);ce.i=N,ce.id=N.uid,F.scheduler=()=>P0(ce),kr(N,!0),H()},te=(N,U,A)=>{U.component=N;const W=N.vnode.props;N.vnode=U,N.next=null,R2(N,U.props,W,A),D2(N,U.children,A),Us(),Ev(N),Fs()},Z=(N,U,A,W,G,X,C,I,F=!1)=>{const H=N&&N.children,ce=N?N.shapeFlag:0,R=U.children,{patchFlag:x,shapeFlag:O}=U;if(x>0){if(x&128){Me(H,R,A,W,G,X,C,I,F);return}else if(x&256){pe(H,R,A,W,G,X,C,I,F);return}}O&8?(ce&16&&Se(H,G,X),R!==H&&u(A,R)):ce&16?O&16?Me(H,R,A,W,G,X,C,I,F):Se(H,G,X,!0):(ce&8&&u(A,""),O&16&&P(R,A,W,G,X,C,I,F))},pe=(N,U,A,W,G,X,C,I,F)=>{N=N||ha,U=U||ha;const H=N.length,ce=U.length,R=Math.min(H,ce);let x;for(x=0;xce?Se(N,G,X,!0,!1,R):P(U,A,W,G,X,C,I,F,R)},Me=(N,U,A,W,G,X,C,I,F)=>{let H=0;const ce=U.length;let R=N.length-1,x=ce-1;for(;H<=R&&H<=x;){const O=N[H],Y=U[H]=F?cr(U[H]):Zi(U[H]);if(ao(O,Y))_(O,Y,A,null,G,X,C,I,F);else break;H++}for(;H<=R&&H<=x;){const O=N[R],Y=U[x]=F?cr(U[x]):Zi(U[x]);if(ao(O,Y))_(O,Y,A,null,G,X,C,I,F);else break;R--,x--}if(H>R){if(H<=x){const O=x+1,Y=Ox)for(;H<=R;)xe(N[H],G,X,!0),H++;else{const O=H,Y=H,ne=new Map;for(H=Y;H<=x;H++){const ze=U[H]=F?cr(U[H]):Zi(U[H]);ze.key!=null&&ne.set(ze.key,H)}let ee,Te=0;const me=x-Y+1;let Re=!1,De=0;const de=new Array(me);for(H=0;H=me){xe(ze,G,X,!0);continue}let Ve;if(ze.key!=null)Ve=ne.get(ze.key);else for(ee=Y;ee<=x;ee++)if(de[ee-Y]===0&&ao(ze,U[ee])){Ve=ee;break}Ve===void 0?xe(ze,G,X,!0):(de[Ve-Y]=H+1,Ve>=De?De=Ve:Re=!0,_(ze,U[Ve],A,null,G,X,C,I,F),Te++)}const Oe=Re?U2(de):ha;for(ee=Oe.length-1,H=me-1;H>=0;H--){const ze=Y+H,Ve=U[ze],we=ze+1{const{el:X,type:C,transition:I,children:F,shapeFlag:H}=N;if(H&6){re(N.component.subTree,U,A,W);return}if(H&128){N.suspense.move(U,A,W);return}if(H&64){C.move(N,U,A,ue);return}if(C===Zt){i(X,U,A);for(let R=0;RI.enter(X),G);else{const{leave:R,delayLeave:x,afterLeave:O}=I,Y=()=>{N.ctx.isUnmounted?s(X):i(X,U,A)},ne=()=>{R(X,()=>{Y(),O&&O()})};x?x(X,Y,ne):ne()}else i(X,U,A)},xe=(N,U,A,W=!1,G=!1)=>{const{type:X,props:C,ref:I,children:F,dynamicChildren:H,shapeFlag:ce,patchFlag:R,dirs:x,cacheIndex:O}=N;if(R===-2&&(G=!1),I!=null&&(Us(),kf(I,null,A,N,!0),Fs()),O!=null&&(U.renderCache[O]=void 0),ce&256){U.ctx.deactivate(N);return}const Y=ce&1&&x,ne=!ma(N);let ee;if(ne&&(ee=C&&C.onVnodeBeforeUnmount)&&Wi(ee,U,N),ce&6)ge(N.component,A,W);else{if(ce&128){N.suspense.unmount(A,W);return}Y&&Fr(N,null,U,"beforeUnmount"),ce&64?N.type.remove(N,U,A,ue,W):H&&!H.hasOnce&&(X!==Zt||R>0&&R&64)?Se(H,U,A,!1,!0):(X===Zt&&R&384||!G&&ce&16)&&Se(F,U,A),W&&We(N)}(ne&&(ee=C&&C.onVnodeUnmounted)||Y)&&Un(()=>{ee&&Wi(ee,U,N),Y&&Fr(N,null,U,"unmounted")},A)},We=N=>{const{type:U,el:A,anchor:W,transition:G}=N;if(U===Zt){oe(A,W);return}if(U===yf){y(N);return}const X=()=>{s(A),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(N.shapeFlag&1&&G&&!G.persisted){const{leave:C,delayLeave:I}=G,F=()=>C(A,X);I?I(N.el,X,F):F()}else X()},oe=(N,U)=>{let A;for(;N!==U;)A=h(N),s(N),N=A;s(U)},ge=(N,U,A)=>{const{bum:W,scope:G,job:X,subTree:C,um:I,m:F,a:H,parent:ce,slots:{__:R}}=N;Ov(F),Ov(H),W&&_f(W),ce&&Xe(R)&&R.forEach(x=>{ce.renderCache[x]=void 0}),G.stop(),X&&(X.flags|=8,xe(C,N,U,A)),I&&Un(I,U),Un(()=>{N.isUnmounted=!0},U),U&&U.pendingBranch&&!U.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===U.pendingId&&(U.deps--,U.deps===0&&U.resolve())},Se=(N,U,A,W=!1,G=!1,X=0)=>{for(let C=X;C{if(N.shapeFlag&6)return $(N.component.subTree);if(N.shapeFlag&128)return N.suspense.next();const U=h(N.anchor||N.el),A=U&&U[TS];return A?h(A):U};let ae=!1;const le=(N,U,A)=>{N==null?U._vnode&&xe(U._vnode,null,null,!0):_(U._vnode||null,N,U,null,null,null,A),U._vnode=N,ae||(ae=!0,Ev(),SS(),ae=!1)},ue={p:_,um:xe,m:re,r:We,mt:V,mc:P,pc:Z,pbc:S,n:$,o:n};return{render:le,hydrate:void 0,createApp:A2(le)}}function gp({type:n,props:e},t){return t==="svg"&&n==="foreignObject"||t==="mathml"&&n==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function kr({effect:n,job:e},t){t?(n.flags|=32,e.flags|=4):(n.flags&=-33,e.flags&=-5)}function N2(n,e){return(!n||n&&!n.pendingBranch)&&e&&!e.persisted}function F0(n,e,t=!1){const i=n.children,s=e.children;if(Xe(i)&&Xe(s))for(let r=0;r>1,n[t[a]]0&&(e[i]=t[r-1]),t[r]=i)}}for(r=t.length,o=t[r-1];r-- >0;)t[r]=o,o=e[o];return t}function JS(n){const e=n.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:JS(e)}function Ov(n){if(n)for(let e=0;e_n(F2);function Lc(n,e){return Dc(n,null,e)}function xG(n,e){return Dc(n,null,{flush:"post"})}function B2(n,e){return Dc(n,null,{flush:"sync"})}function je(n,e,t){return Dc(n,e,t)}function Dc(n,e,t=bt){const{immediate:i,deep:s,flush:r,once:o}=t,a=sn({},t),l=e&&i||!e&&r!=="post";let c;if(ec){if(r==="sync"){const d=k2();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=es,d.resume=es,d.pause=es,d}}const u=un;a.call=(d,p,_)=>ki(d,u,p,_);let f=!1;r==="post"?a.scheduler=d=>{Un(d,u&&u.suspense)}:r!=="sync"&&(f=!0,a.scheduler=(d,p)=>{p?d():P0(d)}),a.augmentJob=d=>{e&&(d.flags|=4),f&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const h=JC(n,e,a);return ec&&(c?c.push(h):l&&h()),h}function z2(n,e,t){const i=this.proxy,s=kt(n)?n.includes(".")?QS(i,n):()=>i[n]:n.bind(i,i);let r;et(e)?r=e:(r=e.handler,t=e);const o=Nc(this),a=Dc(s,r.bind(i),t);return o(),a}function QS(n,e){const t=e.split(".");return()=>{let i=n;for(let s=0;s{let u,f=bt,h;return B2(()=>{const d=n[s];Yn(u,d)&&(u=d,c())}),{get(){return l(),t.get?t.get(u):u},set(d){const p=t.set?t.set(d):d;if(!Yn(p,u)&&!(f!==bt&&Yn(d,f)))return;const _=i.vnode.props;_&&(e in _||s in _||r in _)&&(`onUpdate:${e}`in _||`onUpdate:${s}`in _||`onUpdate:${r}`in _)||(u=d,c()),i.emit(`update:${e}`,p),Yn(d,p)&&Yn(d,f)&&!Yn(p,h)&&c(),f=d,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||bt:a,done:!1}:{done:!0}}}},a}const e1=(n,e)=>e==="modelValue"||e==="model-value"?n.modelModifiers:n[`${e}Modifiers`]||n[`${ai(e)}Modifiers`]||n[`${Gs(e)}Modifiers`];function V2(n,e,...t){if(n.isUnmounted)return;const i=n.vnode.props||bt;let s=t;const r=e.startsWith("update:"),o=r&&e1(i,e.slice(7));o&&(o.trim&&(s=t.map(u=>kt(u)?u.trim():u)),o.number&&(s=t.map(Lf)));let a,l=i[a=gf(e)]||i[a=gf(ai(e))];!l&&r&&(l=i[a=gf(Gs(e))]),l&&ki(l,n,6,s);const c=i[a+"Once"];if(c){if(!n.emitted)n.emitted={};else if(n.emitted[a])return;n.emitted[a]=!0,ki(c,n,6,s)}}function t1(n,e,t=!1){const i=e.emitsCache,s=i.get(n);if(s!==void 0)return s;const r=n.emits;let o={},a=!1;if(!et(n)){const l=c=>{const u=t1(c,e,!0);u&&(a=!0,sn(o,u))};!t&&e.mixins.length&&e.mixins.forEach(l),n.extends&&l(n.extends),n.mixins&&n.mixins.forEach(l)}return!r&&!a?(Dt(n)&&i.set(n,null),null):(Xe(r)?r.forEach(l=>o[l]=null):sn(o,r),Dt(n)&&i.set(n,o),o)}function nd(n,e){return!n||!Gh(e)?!1:(e=e.slice(2).replace(/Once$/,""),Et(n,e[0].toLowerCase()+e.slice(1))||Et(n,Gs(e))||Et(n,e))}function Nv(n){const{type:e,vnode:t,proxy:i,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:f,data:h,setupState:d,ctx:p,inheritAttrs:_}=n,g=Ff(n);let m,v;try{if(t.shapeFlag&4){const y=s||i,T=y;m=Zi(c.call(T,y,u,f,d,h,p)),v=a}else{const y=e;m=Zi(y.length>1?y(f,{attrs:a,slots:o,emit:l}):y(f,null)),v=e.props?a:H2(a)}}catch(y){Tl.length=0,Jh(y,n,1),m=gn(An)}let b=m;if(v&&_!==!1){const y=Object.keys(v),{shapeFlag:T}=b;y.length&&T&7&&(r&&y.some(v0)&&(v=G2(v,r)),b=yr(b,v,!1,!0))}return t.dirs&&(b=yr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(t.dirs):t.dirs),t.transition&&jl(b,t.transition),m=b,Ff(g),m}const H2=n=>{let e;for(const t in n)(t==="class"||t==="style"||Gh(t))&&((e||(e={}))[t]=n[t]);return e},G2=(n,e)=>{const t={};for(const i in n)(!v0(i)||!(i.slice(9)in e))&&(t[i]=n[i]);return t};function W2(n,e,t){const{props:i,children:s,component:r}=n,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&l>=0){if(l&1024)return!0;if(l&16)return i?Uv(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let f=0;fn.__isSuspense;function $2(n,e){e&&e.pendingBranch?Xe(n)?e.effects.push(...n):e.effects.push(n):t2(n)}const Zt=Symbol.for("v-fgt"),Oc=Symbol.for("v-txt"),An=Symbol.for("v-cmt"),yf=Symbol.for("v-stc"),Tl=[];let ri=null;function vn(n=!1){Tl.push(ri=n?null:[])}function q2(){Tl.pop(),ri=Tl[Tl.length-1]||null}let Zl=1;function Fv(n,e=!1){Zl+=n,n<0&&ri&&e&&(ri.hasOnce=!0)}function i1(n){return n.dynamicChildren=Zl>0?ri||ha:null,q2(),Zl>0&&ri&&ri.push(n),n}function yi(n,e,t,i,s,r){return i1(lr(n,e,t,i,s,r,!0))}function Jl(n,e,t,i,s){return i1(gn(n,e,t,i,s,!0))}function Ql(n){return n?n.__v_isVNode===!0:!1}function ao(n,e){return n.type===e.type&&n.key===e.key}const s1=({key:n})=>n??null,bf=({ref:n,ref_key:e,ref_for:t})=>(typeof n=="number"&&(n=""+n),n!=null?kt(n)||Lt(n)||et(n)?{i:tn,r:n,k:e,f:!!t}:n:null);function lr(n,e=null,t=null,i=0,s=null,r=n===Zt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&s1(e),ref:e&&bf(e),scopeId:Qh,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:tn};return a?(k0(l,t),r&128&&n.normalize(l)):t&&(l.shapeFlag|=kt(t)?8:16),Zl>0&&!o&&ri&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&ri.push(l),l}const gn=Y2;function Y2(n,e=null,t=null,i=0,s=null,r=!1){if((!n||n===FS)&&(n=An),Ql(n)){const a=yr(n,e,!0);return t&&k0(a,t),Zl>0&&!r&&ri&&(a.shapeFlag&6?ri[ri.indexOf(n)]=a:ri.push(a)),a.patchFlag=-2,a}if(oR(n)&&(n=n.__vccOpts),e){e=j2(e);let{class:a,style:l}=e;a&&!kt(a)&&(e.class=ka(a)),Dt(l)&&(A0(l)&&!Xe(l)&&(l=sn({},l)),e.style=Si(l))}const o=kt(n)?1:n1(n)?128:wS(n)?64:Dt(n)?4:et(n)?2:0;return lr(n,e,t,i,s,o,r,!0)}function j2(n){return n?A0(n)||XS(n)?sn({},n):n:null}function yr(n,e,t=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=n,c=e?J2(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:n.type,props:c,key:c&&s1(c),ref:e&&e.ref?t&&r?Xe(r)?r.concat(bf(e)):[r,bf(e)]:bf(e):r,scopeId:n.scopeId,slotScopeIds:n.slotScopeIds,children:a,target:n.target,targetStart:n.targetStart,targetAnchor:n.targetAnchor,staticCount:n.staticCount,shapeFlag:n.shapeFlag,patchFlag:e&&n.type!==Zt?o===-1?16:o|16:o,dynamicProps:n.dynamicProps,dynamicChildren:n.dynamicChildren,appContext:n.appContext,dirs:n.dirs,transition:l,component:n.component,suspense:n.suspense,ssContent:n.ssContent&&yr(n.ssContent),ssFallback:n.ssFallback&&yr(n.ssFallback),el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce};return l&&i&&jl(u,l.clone(u)),u}function K2(n=" ",e=0){return gn(Oc,null,n,e)}function Z2(n,e){const t=gn(yf,null,n);return t.staticCount=e,t}function kv(n="",e=!1){return e?(vn(),Jl(An,null,n)):gn(An,null,n)}function Zi(n){return n==null||typeof n=="boolean"?gn(An):Xe(n)?gn(Zt,null,n.slice()):Ql(n)?cr(n):gn(Oc,null,String(n))}function cr(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:yr(n)}function k0(n,e){let t=0;const{shapeFlag:i}=n;if(e==null)e=null;else if(Xe(e))t=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),k0(n,s()),s._c&&(s._d=!0));return}else{t=32;const s=e._;!s&&!XS(e)?e._ctx=tn:s===3&&tn&&(tn.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else et(e)?(e={default:e,_ctx:tn},t=32):(e=String(e),i&64?(t=16,e=[K2(e)]):t=8);n.children=e,n.shapeFlag|=t}function J2(...n){const e={};for(let t=0;tun||tn;let zf,lg;{const n=$h(),e=(t,i)=>{let s;return(s=n[t])||(s=n[t]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};zf=e("__VUE_INSTANCE_SETTERS__",t=>un=t),lg=e("__VUE_SSR_SETTERS__",t=>ec=t)}const Nc=n=>{const e=un;return zf(n),n.scope.on(),()=>{n.scope.off(),zf(e)}},Bv=()=>{un&&un.scope.off(),zf(null)};function r1(n){return n.vnode.shapeFlag&4}let ec=!1;function nR(n,e=!1,t=!1){e&&lg(e);const{props:i,children:s}=n.vnode,r=r1(n);C2(n,i,r,e),L2(n,s,t||e);const o=r?iR(n,e):void 0;return e&&lg(!1),o}function iR(n,e){const t=n.type;n.accessCache=Object.create(null),n.proxy=new Proxy(n.ctx,b2);const{setup:i}=t;if(i){Us();const s=n.setupContext=i.length>1?a1(n):null,r=Nc(n),o=Pc(i,n,0,[n.props,s]),a=WM(o);if(Fs(),r(),(a||n.sp)&&!ma(n)&&OS(n),a){if(o.then(Bv,Bv),e)return o.then(l=>{zv(n,l)}).catch(l=>{Jh(l,n,0)});n.asyncDep=o}else zv(n,o)}else o1(n)}function zv(n,e,t){et(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:Dt(e)&&(n.setupState=_S(e)),o1(n)}function o1(n,e,t){const i=n.type;n.render||(n.render=i.render||es);{const s=Nc(n);Us();try{x2(n)}finally{Fs(),s()}}}const sR={get(n,e){return wn(n,"get",""),n[e]}};function a1(n){const e=t=>{n.exposed=t||{}};return{attrs:new Proxy(n.attrs,sR),slots:n.slots,emit:n.emit,expose:e}}function id(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(_S(C0(n.exposed)),{get(e,t){if(t in e)return e[t];if(t in El)return El[t](n)},has(e,t){return t in e||t in El}})):n.proxy}function rR(n,e=!0){return et(n)?n.displayName||n.name:n.name||e&&n.__name}function oR(n){return et(n)&&"__vccOpts"in n}const Ee=(n,e)=>KC(n,e,ec);function ks(n,e,t){const i=arguments.length;return i===2?Dt(e)&&!Xe(e)?Ql(e)?gn(n,null,[e]):gn(n,e):gn(n,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Ql(t)&&(t=[t]),gn(n,e,t))}const aR="3.5.16";/** +**/function Pc(n,e,t,i){try{return i?n(...i):n()}catch(s){Jh(s,e,t)}}function ki(n,e,t,i){if(et(n)){const s=Pc(n,e,t,i);return s&&WM(s)&&s.catch(r=>{Jh(r,e,t)}),s}if(Xe(n)){const s=[];for(let r=0;r>>1,s=kn[i],r=Yl(s);r=Yl(t)?kn.push(n):kn.splice(e2(e),0,n),n.flags|=1,MS()}}function MS(){Uf||(Uf=xS.then(ES))}function t2(n){Xe(n)?pa.push(...n):or&&n.id===-1?or.splice(ia+1,0,n):n.flags&1||(pa.push(n),n.flags|=1),MS()}function Ev(n,e,t=Yi+1){for(;tYl(t)-Yl(i));if(pa.length=0,or){or.push(...e);return}for(or=e,ia=0;ian.id==null?n.flags&2?-1:1/0:n.id;function ES(n){try{for(Yi=0;YiI0;function I0(n,e=tn,t){if(!e||n._n)return n;const i=(...s)=>{i._d&&Fv(-1);const r=Ff(e);let o;try{o=n(...s)}finally{Ff(r),i._d&&Fv(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function dG(n,e){if(tn===null)return n;const t=id(tn),i=n.dirs||(n.dirs=[]);for(let s=0;sn.__isTeleport,Sl=n=>n&&(n.disabled||n.disabled===""),Tv=n=>n&&(n.defer||n.defer===""),wv=n=>typeof SVGElement<"u"&&n instanceof SVGElement,Av=n=>typeof MathMLElement=="function"&&n instanceof MathMLElement,ng=(n,e)=>{const t=n&&n.to;return Bt(t)?e?e(t):null:t},AS={name:"Teleport",__isTeleport:!0,process(n,e,t,i,s,r,o,a,l,c){const{mc:u,pc:f,pbc:h,o:{insert:d,querySelector:p,createText:_,createComment:g}}=c,m=Sl(e.props);let{shapeFlag:v,children:b,dynamicChildren:y}=e;if(n==null){const T=e.el=_(""),w=e.anchor=_("");d(T,t,i),d(w,t,i);const S=(M,E)=>{v&16&&(s&&s.isCE&&(s.ce._teleportTarget=M),u(b,M,E,s,r,o,a,l))},P=()=>{const M=e.target=ng(e.props,p),E=CS(M,e,_,d);M&&(o!=="svg"&&wv(M)?o="svg":o!=="mathml"&&Av(M)&&(o="mathml"),m||(S(M,E),vf(e,!1)))};m&&(S(t,w),vf(e,!0)),Tv(e.props)?(e.el.__isMounted=!1,Un(()=>{P(),delete e.el.__isMounted},r)):P()}else{if(Tv(e.props)&&n.el.__isMounted===!1){Un(()=>{AS.process(n,e,t,i,s,r,o,a,l,c)},r);return}e.el=n.el,e.targetStart=n.targetStart;const T=e.anchor=n.anchor,w=e.target=n.target,S=e.targetAnchor=n.targetAnchor,P=Sl(n.props),M=P?t:w,E=P?T:S;if(o==="svg"||wv(w)?o="svg":(o==="mathml"||Av(w))&&(o="mathml"),y?(h(n.dynamicChildren,y,M,s,r,o,a),F0(n,e,!0)):l||f(n,e,M,E,s,r,o,a,!1),m)P?e.props&&n.props&&e.props.to!==n.props.to&&(e.props.to=n.props.to):lu(e,t,T,c,1);else if((e.props&&e.props.to)!==(n.props&&n.props.to)){const D=e.target=ng(e.props,p);D&&lu(e,D,null,c,0)}else P&&lu(e,w,S,c,1);vf(e,m)}},remove(n,e,t,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:f,props:h}=n;if(f&&(s(c),s(u)),r&&s(l),o&16){const d=r||!Sl(h);for(let p=0;p{n.isMounted=!0}),US(()=>{n.isUnmounting=!0}),n}const hi=[Function,Array],RS={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hi,onEnter:hi,onAfterEnter:hi,onEnterCancelled:hi,onBeforeLeave:hi,onLeave:hi,onAfterLeave:hi,onLeaveCancelled:hi,onBeforeAppear:hi,onAppear:hi,onAfterAppear:hi,onAppearCancelled:hi},PS=n=>{const e=n.subTree;return e.component?PS(e.component):e},s2={name:"BaseTransition",props:RS,setup(n,{slots:e}){const t=Rn(),i=i2();return()=>{const s=e.default&&DS(e.default(),!0);if(!s||!s.length)return;const r=IS(s),o=ht(n),{mode:a}=o;if(i.isLeaving)return pp(r);const l=Cv(r);if(!l)return pp(r);let c=ig(l,o,i,t,f=>c=f);l.type!==An&&jl(l,c);let u=t.subTree&&Cv(t.subTree);if(u&&u.type!==An&&!ao(l,u)&&PS(t).type!==An){let f=ig(u,o,i,t);if(jl(u,f),a==="out-in"&&l.type!==An)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,t.job.flags&8||t.update(),delete f.afterLeave,u=void 0},pp(r);a==="in-out"&&l.type!==An?f.delayLeave=(h,d,p)=>{const _=LS(i,u);_[String(u.key)]=u,h[ar]=()=>{d(),h[ar]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function IS(n){let e=n[0];if(n.length>1){for(const t of n)if(t.type!==An){e=t;break}}return e}const r2=s2;function LS(n,e){const{leavingVNodes:t}=n;let i=t.get(e.type);return i||(i=Object.create(null),t.set(e.type,i)),i}function ig(n,e,t,i,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:h,onLeave:d,onAfterLeave:p,onLeaveCancelled:_,onBeforeAppear:g,onAppear:m,onAfterAppear:v,onAppearCancelled:b}=e,y=String(n.key),T=LS(t,n),w=(M,E)=>{M&&ki(M,i,9,E)},S=(M,E)=>{const D=E[1];w(M,E),Xe(M)?M.every(B=>B.length<=1)&&D():M.length<=1&&D()},P={mode:o,persisted:a,beforeEnter(M){let E=l;if(!t.isMounted)if(r)E=g||l;else return;M[ar]&&M[ar](!0);const D=T[y];D&&ao(n,D)&&D.el[ar]&&D.el[ar](),w(E,[M])},enter(M){let E=c,D=u,B=f;if(!t.isMounted)if(r)E=m||c,D=v||u,B=b||f;else return;let z=!1;const V=M[cu]=Q=>{z||(z=!0,Q?w(B,[M]):w(D,[M]),P.delayedLeave&&P.delayedLeave(),M[cu]=void 0)};E?S(E,[M,V]):V()},leave(M,E){const D=String(n.key);if(M[cu]&&M[cu](!0),t.isUnmounting)return E();w(h,[M]);let B=!1;const z=M[ar]=V=>{B||(B=!0,E(),V?w(_,[M]):w(p,[M]),M[ar]=void 0,T[D]===n&&delete T[D])};T[D]=n,d?S(d,[M,z]):z()},clone(M){const E=ig(M,e,t,i,s);return s&&s(E),E}};return P}function pp(n){if(ed(n))return n=yr(n),n.children=null,n}function Cv(n){if(!ed(n))return wS(n.type)&&n.children?IS(n.children):n;if(n.component)return n.component.subTree;const{shapeFlag:e,children:t}=n;if(t){if(e&16)return t[0];if(e&32&&et(t.default))return t.default()}}function jl(n,e){n.shapeFlag&6&&n.component?(n.transition=e,jl(n.component.subTree,e)):n.shapeFlag&128?(n.ssContent.transition=e.clone(n.ssContent),n.ssFallback.transition=e.clone(n.ssFallback)):n.transition=e}function DS(n,e=!1,t){let i=[],s=0;for(let r=0;r1)for(let r=0;rkf(p,e&&(Xe(e)?e[_]:e),t,i,s));return}if(ma(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&kf(n,e,t,i.component.subTree);return}const r=i.shapeFlag&4?id(i.component):i.el,o=s?null:r,{i:a,r:l}=n,c=e&&e.r,u=a.refs===bt?a.refs={}:a.refs,f=a.setupState,h=ht(f),d=f===bt?()=>!1:p=>Et(h,p);if(c!=null&&c!==l&&(Bt(c)?(u[c]=null,d(c)&&(f[c]=null)):Lt(c)&&(c.value=null)),et(l))Pc(l,a,12,[o,u]);else{const p=Bt(l),_=Lt(l);if(p||_){const g=()=>{if(n.f){const m=p?d(l)?f[l]:u[l]:l.value;s?Xe(m)&&y0(m,r):Xe(m)?m.includes(r)||m.push(r):p?(u[l]=[r],d(l)&&(f[l]=u[l])):(l.value=[r],n.k&&(u[n.k]=l.value))}else p?(u[l]=o,d(l)&&(f[l]=o)):_&&(l.value=o,n.k&&(u[n.k]=o))};o?(g.id=-1,Un(g,t)):g()}}}$h().requestIdleCallback;$h().cancelIdleCallback;const ma=n=>!!n.type.__asyncLoader,ed=n=>n.type.__isKeepAlive;function o2(n,e){NS(n,"a",e)}function a2(n,e){NS(n,"da",e)}function NS(n,e,t=un){const i=n.__wdc||(n.__wdc=()=>{let s=t;for(;s;){if(s.isDeactivated)return;s=s.parent}return n()});if(td(e,i,t),t){let s=t.parent;for(;s&&s.parent;)ed(s.parent.vnode)&&l2(i,e,t,s),s=s.parent}}function l2(n,e,t,i){const s=td(e,n,i,!0);rs(()=>{y0(i[e],s)},t)}function td(n,e,t=un,i=!1){if(t){const s=t[n]||(t[n]=[]),r=e.__weh||(e.__weh=(...o)=>{Us();const a=Nc(t),l=ki(e,t,n,o);return a(),Fs(),l});return i?s.unshift(r):s.push(r),r}}const Ws=n=>(e,t=un)=>{(!ec||n==="sp")&&td(n,(...i)=>e(...i),t)},c2=Ws("bm"),Gn=Ws("m"),u2=Ws("bu"),f2=Ws("u"),US=Ws("bum"),rs=Ws("um"),h2=Ws("sp"),d2=Ws("rtg"),p2=Ws("rtc");function m2(n,e=un){td("ec",n,e)}const L0="components",g2="directives";function gG(n,e){return D0(L0,n,!0,e)||n}const FS=Symbol.for("v-ndc");function _2(n){return Bt(n)?D0(L0,n,!1)||n:n||FS}function _G(n){return D0(g2,n)}function D0(n,e,t=!0,i=!1){const s=tn||un;if(s){const r=s.type;if(n===L0){const a=rR(r,!1);if(a&&(a===e||a===ai(e)||a===Xh(ai(e))))return r}const o=Rv(s[n]||r[n],e)||Rv(s.appContext[n],e);return!o&&i?r:o}}function Rv(n,e){return n&&(n[e]||n[ai(e)]||n[Xh(ai(e))])}function v2(n,e,t,i){let s;const r=t,o=Xe(n);if(o||Bt(n)){const a=o&&Ls(n);let l=!1,c=!1;a&&(l=!vi(n),c=vr(n),n=jh(n)),s=new Array(n.length);for(let u=0,f=n.length;ue(a,l,void 0,r));else{const a=Object.keys(n);s=new Array(a.length);for(let l=0,c=a.length;lQl(e)?!(e.type===An||e.type===Zt&&!kS(e.children)):!0)?n:null}function vG(n,e){const t={};for(const i in n)t[gf(i)]=n[i];return t}const sg=n=>n?r1(n)?id(n):sg(n.parent):null,El=sn(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>n.props,$attrs:n=>n.attrs,$slots:n=>n.slots,$refs:n=>n.refs,$parent:n=>sg(n.parent),$root:n=>sg(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>VS(n),$forceUpdate:n=>n.f||(n.f=()=>{P0(n.update)}),$nextTick:n=>n.n||(n.n=Ar.bind(n.proxy)),$watch:n=>z2.bind(n)}),mp=(n,e)=>n!==bt&&!n.__isScriptSetup&&Et(n,e),b2={get({_:n},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:s,props:r,accessCache:o,type:a,appContext:l}=n;let c;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return s[e];case 4:return t[e];case 3:return r[e]}else{if(mp(i,e))return o[e]=1,i[e];if(s!==bt&&Et(s,e))return o[e]=2,s[e];if((c=n.propsOptions[0])&&Et(c,e))return o[e]=3,r[e];if(t!==bt&&Et(t,e))return o[e]=4,t[e];rg&&(o[e]=0)}}const u=El[e];let f,h;if(u)return e==="$attrs"&&wn(n.attrs,"get",""),u(n);if((f=a.__cssModules)&&(f=f[e]))return f;if(t!==bt&&Et(t,e))return o[e]=4,t[e];if(h=l.config.globalProperties,Et(h,e))return h[e]},set({_:n},e,t){const{data:i,setupState:s,ctx:r}=n;return mp(s,e)?(s[e]=t,!0):i!==bt&&Et(i,e)?(i[e]=t,!0):Et(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(r[e]=t,!0)},has({_:{data:n,setupState:e,accessCache:t,ctx:i,appContext:s,propsOptions:r}},o){let a;return!!t[o]||n!==bt&&Et(n,o)||mp(e,o)||(a=r[0])&&Et(a,o)||Et(i,o)||Et(El,o)||Et(s.config.globalProperties,o)},defineProperty(n,e,t){return t.get!=null?n._.accessCache[e]=0:Et(t,"value")&&this.set(n,e,t.value,null),Reflect.defineProperty(n,e,t)}};function O0(){return BS().slots}function yG(){return BS().attrs}function BS(){const n=Rn();return n.setupContext||(n.setupContext=a1(n))}function Kl(n){return Xe(n)?n.reduce((e,t)=>(e[t]=null,e),{}):n}function bG(n,e){const t=Kl(n);for(const i in e){if(i.startsWith("__skip"))continue;let s=t[i];s?Xe(s)||et(s)?s=t[i]={type:s,default:e[i]}:s.default=e[i]:s===null&&(s=t[i]={default:e[i]}),s&&e[`__skip_${i}`]&&(s.skipFactory=!0)}return t}function xG(n,e){return!n||!e?n||e:Xe(n)&&Xe(e)?n.concat(e):sn({},Kl(n),Kl(e))}let rg=!0;function x2(n){const e=VS(n),t=n.proxy,i=n.ctx;rg=!1,e.beforeCreate&&Pv(e.beforeCreate,n,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:d,updated:p,activated:_,deactivated:g,beforeDestroy:m,beforeUnmount:v,destroyed:b,unmounted:y,render:T,renderTracked:w,renderTriggered:S,errorCaptured:P,serverPrefetch:M,expose:E,inheritAttrs:D,components:B,directives:z,filters:V}=e;if(c&&M2(c,i,null),o)for(const te in o){const Z=o[te];et(Z)&&(i[te]=Z.bind(t))}if(s){const te=s.call(t,t);Dt(te)&&(n.data=xi(te))}if(rg=!0,r)for(const te in r){const Z=r[te],pe=et(Z)?Z.bind(t,t):et(Z.get)?Z.get.bind(t,t):es,Me=!et(Z)&&et(Z.set)?Z.set.bind(t):es,re=Ee({get:pe,set:Me});Object.defineProperty(i,te,{enumerable:!0,configurable:!0,get:()=>re.value,set:xe=>re.value=xe})}if(a)for(const te in a)zS(a[te],i,t,te);if(l){const te=et(l)?l.call(t):l;Reflect.ownKeys(te).forEach(Z=>{gr(Z,te[Z])})}u&&Pv(u,n,"c");function j(te,Z){Xe(Z)?Z.forEach(pe=>te(pe.bind(t))):Z&&te(Z.bind(t))}if(j(c2,f),j(Gn,h),j(u2,d),j(f2,p),j(o2,_),j(a2,g),j(m2,P),j(p2,w),j(d2,S),j(US,v),j(rs,y),j(h2,M),Xe(E))if(E.length){const te=n.exposed||(n.exposed={});E.forEach(Z=>{Object.defineProperty(te,Z,{get:()=>t[Z],set:pe=>t[Z]=pe})})}else n.exposed||(n.exposed={});T&&n.render===es&&(n.render=T),D!=null&&(n.inheritAttrs=D),B&&(n.components=B),z&&(n.directives=z),M&&OS(n)}function M2(n,e,t=es){Xe(n)&&(n=og(n));for(const i in n){const s=n[i];let r;Dt(s)?"default"in s?r=_n(s.from||i,s.default,!0):r=_n(s.from||i):r=_n(s),Lt(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function Pv(n,e,t){ki(Xe(n)?n.map(i=>i.bind(e.proxy)):n.bind(e.proxy),e,t)}function zS(n,e,t,i){let s=i.includes(".")?QS(t,i):()=>t[i];if(Bt(n)){const r=e[n];et(r)&&je(s,r)}else if(et(n))je(s,n.bind(t));else if(Dt(n))if(Xe(n))n.forEach(r=>zS(r,e,t,i));else{const r=et(n.handler)?n.handler.bind(t):e[n.handler];et(r)&&je(s,r,n)}}function VS(n){const e=n.type,{mixins:t,extends:i}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=n.appContext,a=r.get(e);let l;return a?l=a:!s.length&&!t&&!i?l=e:(l={},s.length&&s.forEach(c=>Bf(l,c,o,!0)),Bf(l,e,o)),Dt(e)&&r.set(e,l),l}function Bf(n,e,t,i=!1){const{mixins:s,extends:r}=e;r&&Bf(n,r,t,!0),s&&s.forEach(o=>Bf(n,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=S2[o]||t&&t[o];n[o]=a?a(n[o],e[o]):e[o]}return n}const S2={data:Iv,props:Lv,emits:Lv,methods:ml,computed:ml,beforeCreate:Dn,created:Dn,beforeMount:Dn,mounted:Dn,beforeUpdate:Dn,updated:Dn,beforeDestroy:Dn,beforeUnmount:Dn,destroyed:Dn,unmounted:Dn,activated:Dn,deactivated:Dn,errorCaptured:Dn,serverPrefetch:Dn,components:ml,directives:ml,watch:T2,provide:Iv,inject:E2};function Iv(n,e){return e?n?function(){return sn(et(n)?n.call(this,this):n,et(e)?e.call(this,this):e)}:e:n}function E2(n,e){return ml(og(n),og(e))}function og(n){if(Xe(n)){const e={};for(let t=0;t1)return t&&et(e)?e.call(i&&i.proxy):e}}function Ic(){return!!(un||tn||go)}const GS={},WS=()=>Object.create(GS),XS=n=>Object.getPrototypeOf(n)===GS;function C2(n,e,t,i=!1){const s={},r=WS();n.propsDefaults=Object.create(null),$S(n,e,s,r);for(const o in n.propsOptions[0])o in s||(s[o]=void 0);t?n.props=i?s:pS(s):n.type.props?n.props=s:n.props=r,n.attrs=r}function R2(n,e,t,i){const{props:s,attrs:r,vnode:{patchFlag:o}}=n,a=ht(s),[l]=n.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=n.vnode.dynamicProps;for(let f=0;f{l=!0;const[h,d]=qS(f,e,!0);sn(o,h),d&&a.push(...d)};!t&&e.mixins.length&&e.mixins.forEach(u),n.extends&&u(n.extends),n.mixins&&n.mixins.forEach(u)}if(!r&&!l)return Dt(n)&&i.set(n,ha),ha;if(Xe(r))for(let u=0;un[0]==="_"||n==="$stable",U0=n=>Xe(n)?n.map(Zi):[Zi(n)],I2=(n,e,t)=>{if(e._n)return e;const i=I0((...s)=>U0(e(...s)),t);return i._c=!1,i},YS=(n,e,t)=>{const i=n._ctx;for(const s in n){if(N0(s))continue;const r=n[s];if(et(r))e[s]=I2(s,r,i);else if(r!=null){const o=U0(r);e[s]=()=>o}}},jS=(n,e)=>{const t=U0(e);n.slots.default=()=>t},KS=(n,e,t)=>{for(const i in e)(t||!N0(i))&&(n[i]=e[i])},L2=(n,e,t)=>{const i=n.slots=WS();if(n.vnode.shapeFlag&32){const s=e._;s?(KS(i,e,t),t&&qM(i,"_",s,!0)):YS(e,i)}else e&&jS(n,e)},D2=(n,e,t)=>{const{vnode:i,slots:s}=n;let r=!0,o=bt;if(i.shapeFlag&32){const a=e._;a?t&&a===1?r=!1:KS(s,e,t):(r=!e.$stable,YS(e,s)),o=e}else e&&(jS(n,e),o={default:1});if(r)for(const a in s)!N0(a)&&o[a]==null&&delete s[a]},Un=$2;function ZS(n){return O2(n)}function O2(n,e){const t=$h();t.__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:d=es,insertStaticContent:p}=n,_=(N,U,A,W=null,G=null,X=null,C=void 0,I=null,F=!!U.dynamicChildren)=>{if(N===U)return;N&&!ao(N,U)&&(W=$(N),xe(N,G,X,!0),N=null),U.patchFlag===-2&&(F=!1,U.dynamicChildren=null);const{type:H,ref:ce,shapeFlag:R}=U;switch(H){case Oc:g(N,U,A,W);break;case An:m(N,U,A,W);break;case yf:N==null&&v(U,A,W,C);break;case Zt:B(N,U,A,W,G,X,C,I,F);break;default:R&1?T(N,U,A,W,G,X,C,I,F):R&6?z(N,U,A,W,G,X,C,I,F):(R&64||R&128)&&H.process(N,U,A,W,G,X,C,I,F,ue)}ce!=null&&G&&kf(ce,N&&N.ref,X,U||N,!U)},g=(N,U,A,W)=>{if(N==null)i(U.el=a(U.children),A,W);else{const G=U.el=N.el;U.children!==N.children&&c(G,U.children)}},m=(N,U,A,W)=>{N==null?i(U.el=l(U.children||""),A,W):U.el=N.el},v=(N,U,A,W)=>{[N.el,N.anchor]=p(N.children,U,A,W,N.el,N.anchor)},b=({el:N,anchor:U},A,W)=>{let G;for(;N&&N!==U;)G=h(N),i(N,A,W),N=G;i(U,A,W)},y=({el:N,anchor:U})=>{let A;for(;N&&N!==U;)A=h(N),s(N),N=A;s(U)},T=(N,U,A,W,G,X,C,I,F)=>{U.type==="svg"?C="svg":U.type==="math"&&(C="mathml"),N==null?w(U,A,W,G,X,C,I,F):M(N,U,G,X,C,I,F)},w=(N,U,A,W,G,X,C,I)=>{let F,H;const{props:ce,shapeFlag:R,transition:x,dirs:O}=N;if(F=N.el=o(N.type,X,ce&&ce.is,ce),R&8?u(F,N.children):R&16&&P(N.children,F,null,W,G,gp(N,X),C,I),O&&Fr(N,null,W,"created"),S(F,N,N.scopeId,C,W),ce){for(const ne in ce)ne!=="value"&&!bl(ne)&&r(F,ne,null,ce[ne],X,W);"value"in ce&&r(F,"value",null,ce.value,X),(H=ce.onVnodeBeforeMount)&&Wi(H,W,N)}O&&Fr(N,null,W,"beforeMount");const Y=N2(G,x);Y&&x.beforeEnter(F),i(F,U,A),((H=ce&&ce.onVnodeMounted)||Y||O)&&Un(()=>{H&&Wi(H,W,N),Y&&x.enter(F),O&&Fr(N,null,W,"mounted")},G)},S=(N,U,A,W,G)=>{if(A&&d(N,A),W)for(let X=0;X{for(let H=F;H{const I=U.el=N.el;let{patchFlag:F,dynamicChildren:H,dirs:ce}=U;F|=N.patchFlag&16;const R=N.props||bt,x=U.props||bt;let O;if(A&&kr(A,!1),(O=x.onVnodeBeforeUpdate)&&Wi(O,A,U,N),ce&&Fr(U,N,A,"beforeUpdate"),A&&kr(A,!0),(R.innerHTML&&x.innerHTML==null||R.textContent&&x.textContent==null)&&u(I,""),H?E(N.dynamicChildren,H,I,A,W,gp(U,G),X):C||Z(N,U,I,null,A,W,gp(U,G),X,!1),F>0){if(F&16)D(I,R,x,A,G);else if(F&2&&R.class!==x.class&&r(I,"class",null,x.class,G),F&4&&r(I,"style",R.style,x.style,G),F&8){const Y=U.dynamicProps;for(let ne=0;ne{O&&Wi(O,A,U,N),ce&&Fr(U,N,A,"updated")},W)},E=(N,U,A,W,G,X,C)=>{for(let I=0;I{if(U!==A){if(U!==bt)for(const X in U)!bl(X)&&!(X in A)&&r(N,X,U[X],null,G,W);for(const X in A){if(bl(X))continue;const C=A[X],I=U[X];C!==I&&X!=="value"&&r(N,X,I,C,G,W)}"value"in A&&r(N,"value",U.value,A.value,G)}},B=(N,U,A,W,G,X,C,I,F)=>{const H=U.el=N?N.el:a(""),ce=U.anchor=N?N.anchor:a("");let{patchFlag:R,dynamicChildren:x,slotScopeIds:O}=U;O&&(I=I?I.concat(O):O),N==null?(i(H,A,W),i(ce,A,W),P(U.children||[],A,ce,G,X,C,I,F)):R>0&&R&64&&x&&N.dynamicChildren?(E(N.dynamicChildren,x,A,G,X,C,I),(U.key!=null||G&&U===G.subTree)&&F0(N,U,!0)):Z(N,U,A,ce,G,X,C,I,F)},z=(N,U,A,W,G,X,C,I,F)=>{U.slotScopeIds=I,N==null?U.shapeFlag&512?G.ctx.activate(U,A,W,C,F):V(U,A,W,G,X,C,F):Q(N,U,F)},V=(N,U,A,W,G,X,C)=>{const I=N.component=tR(N,W,G);if(ed(N)&&(I.ctx.renderer=ue),nR(I,!1,C),I.asyncDep){if(G&&G.registerDep(I,j,C),!N.el){const F=I.subTree=gn(An);m(null,F,U,A)}}else j(I,N,U,A,G,X,C)},Q=(N,U,A)=>{const W=U.component=N.component;if(W2(N,U,A))if(W.asyncDep&&!W.asyncResolved){te(W,U,A);return}else W.next=U,W.update();else U.el=N.el,W.vnode=U},j=(N,U,A,W,G,X,C)=>{const I=()=>{if(N.isMounted){let{next:R,bu:x,u:O,parent:Y,vnode:ne}=N;{const De=JS(N);if(De){R&&(R.el=ne.el,te(N,R,C)),De.asyncDep.then(()=>{N.isUnmounted||I()});return}}let ee=R,Te;kr(N,!1),R?(R.el=ne.el,te(N,R,C)):R=ne,x&&_f(x),(Te=R.props&&R.props.onVnodeBeforeUpdate)&&Wi(Te,Y,R,ne),kr(N,!0);const me=Nv(N),Re=N.subTree;N.subTree=me,_(Re,me,f(Re.el),$(Re),N,G,X),R.el=me.el,ee===null&&X2(N,me.el),O&&Un(O,G),(Te=R.props&&R.props.onVnodeUpdated)&&Un(()=>Wi(Te,Y,R,ne),G)}else{let R;const{el:x,props:O}=U,{bm:Y,m:ne,parent:ee,root:Te,type:me}=N,Re=ma(U);kr(N,!1),Y&&_f(Y),!Re&&(R=O&&O.onVnodeBeforeMount)&&Wi(R,ee,U),kr(N,!0);{Te.ce&&Te.ce._injectChildStyle(me);const De=N.subTree=Nv(N);_(null,De,A,W,N,G,X),U.el=De.el}if(ne&&Un(ne,G),!Re&&(R=O&&O.onVnodeMounted)){const De=U;Un(()=>Wi(R,ee,De),G)}(U.shapeFlag&256||ee&&ma(ee.vnode)&&ee.vnode.shapeFlag&256)&&N.a&&Un(N.a,G),N.isMounted=!0,U=A=W=null}};N.scope.on();const F=N.effect=new JM(I);N.scope.off();const H=N.update=F.run.bind(F),ce=N.job=F.runIfDirty.bind(F);ce.i=N,ce.id=N.uid,F.scheduler=()=>P0(ce),kr(N,!0),H()},te=(N,U,A)=>{U.component=N;const W=N.vnode.props;N.vnode=U,N.next=null,R2(N,U.props,W,A),D2(N,U.children,A),Us(),Ev(N),Fs()},Z=(N,U,A,W,G,X,C,I,F=!1)=>{const H=N&&N.children,ce=N?N.shapeFlag:0,R=U.children,{patchFlag:x,shapeFlag:O}=U;if(x>0){if(x&128){Me(H,R,A,W,G,X,C,I,F);return}else if(x&256){pe(H,R,A,W,G,X,C,I,F);return}}O&8?(ce&16&&Se(H,G,X),R!==H&&u(A,R)):ce&16?O&16?Me(H,R,A,W,G,X,C,I,F):Se(H,G,X,!0):(ce&8&&u(A,""),O&16&&P(R,A,W,G,X,C,I,F))},pe=(N,U,A,W,G,X,C,I,F)=>{N=N||ha,U=U||ha;const H=N.length,ce=U.length,R=Math.min(H,ce);let x;for(x=0;xce?Se(N,G,X,!0,!1,R):P(U,A,W,G,X,C,I,F,R)},Me=(N,U,A,W,G,X,C,I,F)=>{let H=0;const ce=U.length;let R=N.length-1,x=ce-1;for(;H<=R&&H<=x;){const O=N[H],Y=U[H]=F?cr(U[H]):Zi(U[H]);if(ao(O,Y))_(O,Y,A,null,G,X,C,I,F);else break;H++}for(;H<=R&&H<=x;){const O=N[R],Y=U[x]=F?cr(U[x]):Zi(U[x]);if(ao(O,Y))_(O,Y,A,null,G,X,C,I,F);else break;R--,x--}if(H>R){if(H<=x){const O=x+1,Y=Ox)for(;H<=R;)xe(N[H],G,X,!0),H++;else{const O=H,Y=H,ne=new Map;for(H=Y;H<=x;H++){const ze=U[H]=F?cr(U[H]):Zi(U[H]);ze.key!=null&&ne.set(ze.key,H)}let ee,Te=0;const me=x-Y+1;let Re=!1,De=0;const de=new Array(me);for(H=0;H=me){xe(ze,G,X,!0);continue}let Ve;if(ze.key!=null)Ve=ne.get(ze.key);else for(ee=Y;ee<=x;ee++)if(de[ee-Y]===0&&ao(ze,U[ee])){Ve=ee;break}Ve===void 0?xe(ze,G,X,!0):(de[Ve-Y]=H+1,Ve>=De?De=Ve:Re=!0,_(ze,U[Ve],A,null,G,X,C,I,F),Te++)}const Ne=Re?U2(de):ha;for(ee=Ne.length-1,H=me-1;H>=0;H--){const ze=Y+H,Ve=U[ze],we=ze+1{const{el:X,type:C,transition:I,children:F,shapeFlag:H}=N;if(H&6){re(N.component.subTree,U,A,W);return}if(H&128){N.suspense.move(U,A,W);return}if(H&64){C.move(N,U,A,ue);return}if(C===Zt){i(X,U,A);for(let R=0;RI.enter(X),G);else{const{leave:R,delayLeave:x,afterLeave:O}=I,Y=()=>{N.ctx.isUnmounted?s(X):i(X,U,A)},ne=()=>{R(X,()=>{Y(),O&&O()})};x?x(X,Y,ne):ne()}else i(X,U,A)},xe=(N,U,A,W=!1,G=!1)=>{const{type:X,props:C,ref:I,children:F,dynamicChildren:H,shapeFlag:ce,patchFlag:R,dirs:x,cacheIndex:O}=N;if(R===-2&&(G=!1),I!=null&&(Us(),kf(I,null,A,N,!0),Fs()),O!=null&&(U.renderCache[O]=void 0),ce&256){U.ctx.deactivate(N);return}const Y=ce&1&&x,ne=!ma(N);let ee;if(ne&&(ee=C&&C.onVnodeBeforeUnmount)&&Wi(ee,U,N),ce&6)ge(N.component,A,W);else{if(ce&128){N.suspense.unmount(A,W);return}Y&&Fr(N,null,U,"beforeUnmount"),ce&64?N.type.remove(N,U,A,ue,W):H&&!H.hasOnce&&(X!==Zt||R>0&&R&64)?Se(H,U,A,!1,!0):(X===Zt&&R&384||!G&&ce&16)&&Se(F,U,A),W&&We(N)}(ne&&(ee=C&&C.onVnodeUnmounted)||Y)&&Un(()=>{ee&&Wi(ee,U,N),Y&&Fr(N,null,U,"unmounted")},A)},We=N=>{const{type:U,el:A,anchor:W,transition:G}=N;if(U===Zt){oe(A,W);return}if(U===yf){y(N);return}const X=()=>{s(A),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(N.shapeFlag&1&&G&&!G.persisted){const{leave:C,delayLeave:I}=G,F=()=>C(A,X);I?I(N.el,X,F):F()}else X()},oe=(N,U)=>{let A;for(;N!==U;)A=h(N),s(N),N=A;s(U)},ge=(N,U,A)=>{const{bum:W,scope:G,job:X,subTree:C,um:I,m:F,a:H,parent:ce,slots:{__:R}}=N;Ov(F),Ov(H),W&&_f(W),ce&&Xe(R)&&R.forEach(x=>{ce.renderCache[x]=void 0}),G.stop(),X&&(X.flags|=8,xe(C,N,U,A)),I&&Un(I,U),Un(()=>{N.isUnmounted=!0},U),U&&U.pendingBranch&&!U.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===U.pendingId&&(U.deps--,U.deps===0&&U.resolve())},Se=(N,U,A,W=!1,G=!1,X=0)=>{for(let C=X;C{if(N.shapeFlag&6)return $(N.component.subTree);if(N.shapeFlag&128)return N.suspense.next();const U=h(N.anchor||N.el),A=U&&U[TS];return A?h(A):U};let ae=!1;const le=(N,U,A)=>{N==null?U._vnode&&xe(U._vnode,null,null,!0):_(U._vnode||null,N,U,null,null,null,A),U._vnode=N,ae||(ae=!0,Ev(),SS(),ae=!1)},ue={p:_,um:xe,m:re,r:We,mt:V,mc:P,pc:Z,pbc:E,n:$,o:n};return{render:le,hydrate:void 0,createApp:A2(le)}}function gp({type:n,props:e},t){return t==="svg"&&n==="foreignObject"||t==="mathml"&&n==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function kr({effect:n,job:e},t){t?(n.flags|=32,e.flags|=4):(n.flags&=-33,e.flags&=-5)}function N2(n,e){return(!n||n&&!n.pendingBranch)&&e&&!e.persisted}function F0(n,e,t=!1){const i=n.children,s=e.children;if(Xe(i)&&Xe(s))for(let r=0;r>1,n[t[a]]0&&(e[i]=t[r-1]),t[r]=i)}}for(r=t.length,o=t[r-1];r-- >0;)t[r]=o,o=e[o];return t}function JS(n){const e=n.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:JS(e)}function Ov(n){if(n)for(let e=0;e_n(F2);function Lc(n,e){return Dc(n,null,e)}function MG(n,e){return Dc(n,null,{flush:"post"})}function B2(n,e){return Dc(n,null,{flush:"sync"})}function je(n,e,t){return Dc(n,e,t)}function Dc(n,e,t=bt){const{immediate:i,deep:s,flush:r,once:o}=t,a=sn({},t),l=e&&i||!e&&r!=="post";let c;if(ec){if(r==="sync"){const d=k2();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=es,d.resume=es,d.pause=es,d}}const u=un;a.call=(d,p,_)=>ki(d,u,p,_);let f=!1;r==="post"?a.scheduler=d=>{Un(d,u&&u.suspense)}:r!=="sync"&&(f=!0,a.scheduler=(d,p)=>{p?d():P0(d)}),a.augmentJob=d=>{e&&(d.flags|=4),f&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const h=JC(n,e,a);return ec&&(c?c.push(h):l&&h()),h}function z2(n,e,t){const i=this.proxy,s=Bt(n)?n.includes(".")?QS(i,n):()=>i[n]:n.bind(i,i);let r;et(e)?r=e:(r=e.handler,t=e);const o=Nc(this),a=Dc(s,r.bind(i),t);return o(),a}function QS(n,e){const t=e.split(".");return()=>{let i=n;for(let s=0;s{let u,f=bt,h;return B2(()=>{const d=n[s];jn(u,d)&&(u=d,c())}),{get(){return l(),t.get?t.get(u):u},set(d){const p=t.set?t.set(d):d;if(!jn(p,u)&&!(f!==bt&&jn(d,f)))return;const _=i.vnode.props;_&&(e in _||s in _||r in _)&&(`onUpdate:${e}`in _||`onUpdate:${s}`in _||`onUpdate:${r}`in _)||(u=d,c()),i.emit(`update:${e}`,p),jn(d,p)&&jn(d,f)&&!jn(p,h)&&c(),f=d,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||bt:a,done:!1}:{done:!0}}}},a}const e1=(n,e)=>e==="modelValue"||e==="model-value"?n.modelModifiers:n[`${e}Modifiers`]||n[`${ai(e)}Modifiers`]||n[`${Gs(e)}Modifiers`];function V2(n,e,...t){if(n.isUnmounted)return;const i=n.vnode.props||bt;let s=t;const r=e.startsWith("update:"),o=r&&e1(i,e.slice(7));o&&(o.trim&&(s=t.map(u=>Bt(u)?u.trim():u)),o.number&&(s=t.map(Lf)));let a,l=i[a=gf(e)]||i[a=gf(ai(e))];!l&&r&&(l=i[a=gf(Gs(e))]),l&&ki(l,n,6,s);const c=i[a+"Once"];if(c){if(!n.emitted)n.emitted={};else if(n.emitted[a])return;n.emitted[a]=!0,ki(c,n,6,s)}}function t1(n,e,t=!1){const i=e.emitsCache,s=i.get(n);if(s!==void 0)return s;const r=n.emits;let o={},a=!1;if(!et(n)){const l=c=>{const u=t1(c,e,!0);u&&(a=!0,sn(o,u))};!t&&e.mixins.length&&e.mixins.forEach(l),n.extends&&l(n.extends),n.mixins&&n.mixins.forEach(l)}return!r&&!a?(Dt(n)&&i.set(n,null),null):(Xe(r)?r.forEach(l=>o[l]=null):sn(o,r),Dt(n)&&i.set(n,o),o)}function nd(n,e){return!n||!Gh(e)?!1:(e=e.slice(2).replace(/Once$/,""),Et(n,e[0].toLowerCase()+e.slice(1))||Et(n,Gs(e))||Et(n,e))}function Nv(n){const{type:e,vnode:t,proxy:i,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:f,data:h,setupState:d,ctx:p,inheritAttrs:_}=n,g=Ff(n);let m,v;try{if(t.shapeFlag&4){const y=s||i,T=y;m=Zi(c.call(T,y,u,f,d,h,p)),v=a}else{const y=e;m=Zi(y.length>1?y(f,{attrs:a,slots:o,emit:l}):y(f,null)),v=e.props?a:H2(a)}}catch(y){Tl.length=0,Jh(y,n,1),m=gn(An)}let b=m;if(v&&_!==!1){const y=Object.keys(v),{shapeFlag:T}=b;y.length&&T&7&&(r&&y.some(v0)&&(v=G2(v,r)),b=yr(b,v,!1,!0))}return t.dirs&&(b=yr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(t.dirs):t.dirs),t.transition&&jl(b,t.transition),m=b,Ff(g),m}const H2=n=>{let e;for(const t in n)(t==="class"||t==="style"||Gh(t))&&((e||(e={}))[t]=n[t]);return e},G2=(n,e)=>{const t={};for(const i in n)(!v0(i)||!(i.slice(9)in e))&&(t[i]=n[i]);return t};function W2(n,e,t){const{props:i,children:s,component:r}=n,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&l>=0){if(l&1024)return!0;if(l&16)return i?Uv(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let f=0;fn.__isSuspense;function $2(n,e){e&&e.pendingBranch?Xe(n)?e.effects.push(...n):e.effects.push(n):t2(n)}const Zt=Symbol.for("v-fgt"),Oc=Symbol.for("v-txt"),An=Symbol.for("v-cmt"),yf=Symbol.for("v-stc"),Tl=[];let ri=null;function vn(n=!1){Tl.push(ri=n?null:[])}function q2(){Tl.pop(),ri=Tl[Tl.length-1]||null}let Zl=1;function Fv(n,e=!1){Zl+=n,n<0&&ri&&e&&(ri.hasOnce=!0)}function i1(n){return n.dynamicChildren=Zl>0?ri||ha:null,q2(),Zl>0&&ri&&ri.push(n),n}function yi(n,e,t,i,s,r){return i1(lr(n,e,t,i,s,r,!0))}function Jl(n,e,t,i,s){return i1(gn(n,e,t,i,s,!0))}function Ql(n){return n?n.__v_isVNode===!0:!1}function ao(n,e){return n.type===e.type&&n.key===e.key}const s1=({key:n})=>n??null,bf=({ref:n,ref_key:e,ref_for:t})=>(typeof n=="number"&&(n=""+n),n!=null?Bt(n)||Lt(n)||et(n)?{i:tn,r:n,k:e,f:!!t}:n:null);function lr(n,e=null,t=null,i=0,s=null,r=n===Zt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&s1(e),ref:e&&bf(e),scopeId:Qh,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:tn};return a?(k0(l,t),r&128&&n.normalize(l)):t&&(l.shapeFlag|=Bt(t)?8:16),Zl>0&&!o&&ri&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&ri.push(l),l}const gn=Y2;function Y2(n,e=null,t=null,i=0,s=null,r=!1){if((!n||n===FS)&&(n=An),Ql(n)){const a=yr(n,e,!0);return t&&k0(a,t),Zl>0&&!r&&ri&&(a.shapeFlag&6?ri[ri.indexOf(n)]=a:ri.push(a)),a.patchFlag=-2,a}if(oR(n)&&(n=n.__vccOpts),e){e=j2(e);let{class:a,style:l}=e;a&&!Bt(a)&&(e.class=ka(a)),Dt(l)&&(A0(l)&&!Xe(l)&&(l=sn({},l)),e.style=Si(l))}const o=Bt(n)?1:n1(n)?128:wS(n)?64:Dt(n)?4:et(n)?2:0;return lr(n,e,t,i,s,o,r,!0)}function j2(n){return n?A0(n)||XS(n)?sn({},n):n:null}function yr(n,e,t=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=n,c=e?J2(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:n.type,props:c,key:c&&s1(c),ref:e&&e.ref?t&&r?Xe(r)?r.concat(bf(e)):[r,bf(e)]:bf(e):r,scopeId:n.scopeId,slotScopeIds:n.slotScopeIds,children:a,target:n.target,targetStart:n.targetStart,targetAnchor:n.targetAnchor,staticCount:n.staticCount,shapeFlag:n.shapeFlag,patchFlag:e&&n.type!==Zt?o===-1?16:o|16:o,dynamicProps:n.dynamicProps,dynamicChildren:n.dynamicChildren,appContext:n.appContext,dirs:n.dirs,transition:l,component:n.component,suspense:n.suspense,ssContent:n.ssContent&&yr(n.ssContent),ssFallback:n.ssFallback&&yr(n.ssFallback),el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce};return l&&i&&jl(u,l.clone(u)),u}function K2(n=" ",e=0){return gn(Oc,null,n,e)}function Z2(n,e){const t=gn(yf,null,n);return t.staticCount=e,t}function kv(n="",e=!1){return e?(vn(),Jl(An,null,n)):gn(An,null,n)}function Zi(n){return n==null||typeof n=="boolean"?gn(An):Xe(n)?gn(Zt,null,n.slice()):Ql(n)?cr(n):gn(Oc,null,String(n))}function cr(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:yr(n)}function k0(n,e){let t=0;const{shapeFlag:i}=n;if(e==null)e=null;else if(Xe(e))t=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),k0(n,s()),s._c&&(s._d=!0));return}else{t=32;const s=e._;!s&&!XS(e)?e._ctx=tn:s===3&&tn&&(tn.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else et(e)?(e={default:e,_ctx:tn},t=32):(e=String(e),i&64?(t=16,e=[K2(e)]):t=8);n.children=e,n.shapeFlag|=t}function J2(...n){const e={};for(let t=0;tun||tn;let zf,lg;{const n=$h(),e=(t,i)=>{let s;return(s=n[t])||(s=n[t]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};zf=e("__VUE_INSTANCE_SETTERS__",t=>un=t),lg=e("__VUE_SSR_SETTERS__",t=>ec=t)}const Nc=n=>{const e=un;return zf(n),n.scope.on(),()=>{n.scope.off(),zf(e)}},Bv=()=>{un&&un.scope.off(),zf(null)};function r1(n){return n.vnode.shapeFlag&4}let ec=!1;function nR(n,e=!1,t=!1){e&&lg(e);const{props:i,children:s}=n.vnode,r=r1(n);C2(n,i,r,e),L2(n,s,t||e);const o=r?iR(n,e):void 0;return e&&lg(!1),o}function iR(n,e){const t=n.type;n.accessCache=Object.create(null),n.proxy=new Proxy(n.ctx,b2);const{setup:i}=t;if(i){Us();const s=n.setupContext=i.length>1?a1(n):null,r=Nc(n),o=Pc(i,n,0,[n.props,s]),a=WM(o);if(Fs(),r(),(a||n.sp)&&!ma(n)&&OS(n),a){if(o.then(Bv,Bv),e)return o.then(l=>{zv(n,l)}).catch(l=>{Jh(l,n,0)});n.asyncDep=o}else zv(n,o)}else o1(n)}function zv(n,e,t){et(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:Dt(e)&&(n.setupState=_S(e)),o1(n)}function o1(n,e,t){const i=n.type;n.render||(n.render=i.render||es);{const s=Nc(n);Us();try{x2(n)}finally{Fs(),s()}}}const sR={get(n,e){return wn(n,"get",""),n[e]}};function a1(n){const e=t=>{n.exposed=t||{}};return{attrs:new Proxy(n.attrs,sR),slots:n.slots,emit:n.emit,expose:e}}function id(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(_S(C0(n.exposed)),{get(e,t){if(t in e)return e[t];if(t in El)return El[t](n)},has(e,t){return t in e||t in El}})):n.proxy}function rR(n,e=!0){return et(n)?n.displayName||n.name:n.name||e&&n.__name}function oR(n){return et(n)&&"__vccOpts"in n}const Ee=(n,e)=>KC(n,e,ec);function ks(n,e,t){const i=arguments.length;return i===2?Dt(e)&&!Xe(e)?Ql(e)?gn(n,null,[e]):gn(n,e):gn(n,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Ql(t)&&(t=[t]),gn(n,e,t))}const aR="3.5.16";/** * @vue/runtime-dom v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let cg;const Vv=typeof window<"u"&&window.trustedTypes;if(Vv)try{cg=Vv.createPolicy("vue",{createHTML:n=>n})}catch{}const l1=cg?n=>cg.createHTML(n):n=>n,lR="http://www.w3.org/2000/svg",cR="http://www.w3.org/1998/Math/MathML",Ms=typeof document<"u"?document:null,Hv=Ms&&Ms.createElement("template"),uR={insert:(n,e,t)=>{e.insertBefore(n,t||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,t,i)=>{const s=e==="svg"?Ms.createElementNS(lR,n):e==="mathml"?Ms.createElementNS(cR,n):t?Ms.createElement(n,{is:t}):Ms.createElement(n);return n==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:n=>Ms.createTextNode(n),createComment:n=>Ms.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>Ms.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,s,r){const o=t?t.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),t),!(s===r||!(s=s.nextSibling)););else{Hv.innerHTML=l1(i==="svg"?`${n}`:i==="mathml"?`${n}`:n);const a=Hv.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},js="transition",Za="animation",tc=Symbol("_vtc"),c1={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},fR=sn({},RS,c1),hR=n=>(n.displayName="Transition",n.props=fR,n),SG=hR((n,{slots:e})=>ks(r2,dR(n),e)),Br=(n,e=[])=>{Xe(n)?n.forEach(t=>t(...e)):n&&n(...e)},Gv=n=>n?Xe(n)?n.some(e=>e.length>1):n.length>1:!1;function dR(n){const e={};for(const B in n)B in c1||(e[B]=n[B]);if(n.css===!1)return e;const{name:t="v",type:i,duration:s,enterFromClass:r=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:l=r,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:f=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:d=`${t}-leave-to`}=n,p=pR(s),_=p&&p[0],g=p&&p[1],{onBeforeEnter:m,onEnter:v,onEnterCancelled:b,onLeave:y,onLeaveCancelled:T,onBeforeAppear:w=m,onAppear:E=v,onAppearCancelled:P=b}=e,M=(B,z,V,Q)=>{B._enterCancelled=Q,zr(B,z?u:a),zr(B,z?c:o),V&&V()},S=(B,z)=>{B._isLeaving=!1,zr(B,f),zr(B,d),zr(B,h),z&&z()},D=B=>(z,V)=>{const Q=B?E:v,j=()=>M(z,B,V);Br(Q,[z,j]),Wv(()=>{zr(z,B?l:r),hs(z,B?u:a),Gv(Q)||Xv(z,i,_,j)})};return sn(e,{onBeforeEnter(B){Br(m,[B]),hs(B,r),hs(B,o)},onBeforeAppear(B){Br(w,[B]),hs(B,l),hs(B,c)},onEnter:D(!1),onAppear:D(!0),onLeave(B,z){B._isLeaving=!0;const V=()=>S(B,z);hs(B,f),B._enterCancelled?(hs(B,h),Yv()):(Yv(),hs(B,h)),Wv(()=>{B._isLeaving&&(zr(B,f),hs(B,d),Gv(y)||Xv(B,i,g,V))}),Br(y,[B,V])},onEnterCancelled(B){M(B,!1,void 0,!0),Br(b,[B])},onAppearCancelled(B){M(B,!0,void 0,!0),Br(P,[B])},onLeaveCancelled(B){S(B),Br(T,[B])}})}function pR(n){if(n==null)return null;if(Dt(n))return[_p(n.enter),_p(n.leave)];{const e=_p(n);return[e,e]}}function _p(n){return gC(n)}function hs(n,e){e.split(/\s+/).forEach(t=>t&&n.classList.add(t)),(n[tc]||(n[tc]=new Set)).add(e)}function zr(n,e){e.split(/\s+/).forEach(i=>i&&n.classList.remove(i));const t=n[tc];t&&(t.delete(e),t.size||(n[tc]=void 0))}function Wv(n){requestAnimationFrame(()=>{requestAnimationFrame(n)})}let mR=0;function Xv(n,e,t,i){const s=n._endId=++mR,r=()=>{s===n._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:o,timeout:a,propCount:l}=gR(n,e);if(!o)return i();const c=o+"end";let u=0;const f=()=>{n.removeEventListener(c,h),r()},h=d=>{d.target===n&&++u>=l&&f()};setTimeout(()=>{u(t[p]||"").split(", "),s=i(`${js}Delay`),r=i(`${js}Duration`),o=$v(s,r),a=i(`${Za}Delay`),l=i(`${Za}Duration`),c=$v(a,l);let u=null,f=0,h=0;e===js?o>0&&(u=js,f=o,h=r.length):e===Za?c>0&&(u=Za,f=c,h=l.length):(f=Math.max(o,c),u=f>0?o>c?js:Za:null,h=u?u===js?r.length:l.length:0);const d=u===js&&/\b(transform|all)(,|$)/.test(i(`${js}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:d}}function $v(n,e){for(;n.lengthqv(t)+qv(n[i])))}function qv(n){return n==="auto"?0:Number(n.slice(0,-1).replace(",","."))*1e3}function Yv(){return document.body.offsetHeight}function _R(n,e,t){const i=n[tc];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const jv=Symbol("_vod"),vR=Symbol("_vsh"),yR=Symbol(""),bR=/(^|;)\s*display\s*:/;function xR(n,e,t){const i=n.style,s=kt(t);let r=!1;if(t&&!s){if(e)if(kt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&xf(i,a,"")}else for(const o in e)t[o]==null&&xf(i,o,"");for(const o in t)o==="display"&&(r=!0),xf(i,o,t[o])}else if(s){if(e!==t){const o=i[yR];o&&(t+=";"+o),i.cssText=t,r=bR.test(t)}}else e&&n.removeAttribute("style");jv in n&&(n[jv]=r?i.display:"",n[vR]&&(i.display="none"))}const Kv=/\s*!important$/;function xf(n,e,t){if(Xe(t))t.forEach(i=>xf(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=MR(n,e);Kv.test(t)?n.setProperty(Gs(i),t.replace(Kv,""),"important"):n[i]=t}}const Zv=["Webkit","Moz","ms"],vp={};function MR(n,e){const t=vp[e];if(t)return t;let i=ai(e);if(i!=="filter"&&i in n)return vp[e]=i;i=Xh(i);for(let s=0;syp||(wR.then(()=>yp=0),yp=Date.now());function CR(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;ki(RR(i,t.value),e,5,[i])};return t.value=n,t.attached=AR(),t}function RR(n,e){if(Xe(e)){const t=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{t.call(n),n._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const iy=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,PR=(n,e,t,i,s,r)=>{const o=s==="svg";e==="class"?_R(n,i,o):e==="style"?xR(n,t,i):Gh(e)?v0(e)||ER(n,e,t,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):IR(n,e,i,o))?(ey(n,e,i),!n.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Qv(n,e,i,o,r,e!=="value")):n._isVueCE&&(/[A-Z]/.test(e)||!kt(i))?ey(n,ai(e),i,r,e):(e==="true-value"?n._trueValue=i:e==="false-value"&&(n._falseValue=i),Qv(n,e,i,o))};function IR(n,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in n&&iy(e)&&et(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=n.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return iy(e)&&kt(t)?!1:e in n}const br=n=>{const e=n.props["onUpdate:modelValue"]||!1;return Xe(e)?t=>_f(e,t):e};function LR(n){n.target.composing=!0}function sy(n){const e=n.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const bi=Symbol("_assign"),ry={created(n,{modifiers:{lazy:e,trim:t,number:i}},s){n[bi]=br(s);const r=i||s.props&&s.props.type==="number";Ts(n,e?"change":"input",o=>{if(o.target.composing)return;let a=n.value;t&&(a=a.trim()),r&&(a=Lf(a)),n[bi](a)}),t&&Ts(n,"change",()=>{n.value=n.value.trim()}),e||(Ts(n,"compositionstart",LR),Ts(n,"compositionend",sy),Ts(n,"change",sy))},mounted(n,{value:e}){n.value=e??""},beforeUpdate(n,{value:e,oldValue:t,modifiers:{lazy:i,trim:s,number:r}},o){if(n[bi]=br(o),n.composing)return;const a=(r||n.type==="number")&&!/^0\d/.test(n.value)?Lf(n.value):n.value,l=e??"";a!==l&&(document.activeElement===n&&n.type!=="range"&&(i&&e===t||s&&n.value.trim()===l)||(n.value=l))}},DR={deep:!0,created(n,e,t){n[bi]=br(t),Ts(n,"change",()=>{const i=n._modelValue,s=ba(n),r=n.checked,o=n[bi];if(Xe(i)){const a=x0(i,s),l=a!==-1;if(r&&!l)o(i.concat(s));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Fa(i)){const a=new Set(i);r?a.add(s):a.delete(s),o(a)}else o(u1(n,r))})},mounted:oy,beforeUpdate(n,e,t){n[bi]=br(t),oy(n,e,t)}};function oy(n,{value:e,oldValue:t},i){n._modelValue=e;let s;if(Xe(e))s=x0(e,i.props.value)>-1;else if(Fa(e))s=e.has(i.props.value);else{if(e===t)return;s=xo(e,u1(n,!0))}n.checked!==s&&(n.checked=s)}const OR={created(n,{value:e},t){n.checked=xo(e,t.props.value),n[bi]=br(t),Ts(n,"change",()=>{n[bi](ba(n))})},beforeUpdate(n,{value:e,oldValue:t},i){n[bi]=br(i),e!==t&&(n.checked=xo(e,i.props.value))}},NR={deep:!0,created(n,{value:e,modifiers:{number:t}},i){const s=Fa(e);Ts(n,"change",()=>{const r=Array.prototype.filter.call(n.options,o=>o.selected).map(o=>t?Lf(ba(o)):ba(o));n[bi](n.multiple?s?new Set(r):r:r[0]),n._assigning=!0,Ar(()=>{n._assigning=!1})}),n[bi]=br(i)},mounted(n,{value:e}){ay(n,e)},beforeUpdate(n,e,t){n[bi]=br(t)},updated(n,{value:e}){n._assigning||ay(n,e)}};function ay(n,e){const t=n.multiple,i=Xe(e);if(!(t&&!i&&!Fa(e))){for(let s=0,r=n.options.length;sString(c)===String(a)):o.selected=x0(e,a)>-1}else o.selected=e.has(a);else if(xo(ba(o),e)){n.selectedIndex!==s&&(n.selectedIndex=s);return}}!t&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function ba(n){return"_value"in n?n._value:n.value}function u1(n,e){const t=e?"_trueValue":"_falseValue";return t in n?n[t]:e}const EG={created(n,e,t){uu(n,e,t,null,"created")},mounted(n,e,t){uu(n,e,t,null,"mounted")},beforeUpdate(n,e,t,i){uu(n,e,t,i,"beforeUpdate")},updated(n,e,t,i){uu(n,e,t,i,"updated")}};function UR(n,e){switch(n){case"SELECT":return NR;case"TEXTAREA":return ry;default:switch(e){case"checkbox":return DR;case"radio":return OR;default:return ry}}}function uu(n,e,t,i,s){const o=UR(n.tagName,t.props&&t.props.type)[s];o&&o(n,e,t,i)}const FR=["ctrl","shift","alt","meta"],kR={stop:n=>n.stopPropagation(),prevent:n=>n.preventDefault(),self:n=>n.target!==n.currentTarget,ctrl:n=>!n.ctrlKey,shift:n=>!n.shiftKey,alt:n=>!n.altKey,meta:n=>!n.metaKey,left:n=>"button"in n&&n.button!==0,middle:n=>"button"in n&&n.button!==1,right:n=>"button"in n&&n.button!==2,exact:(n,e)=>FR.some(t=>n[`${t}Key`]&&!e.includes(t))},TG=(n,e)=>{const t=n._withMods||(n._withMods={}),i=e.join(".");return t[i]||(t[i]=(s,...r)=>{for(let o=0;o{const t=n._withKeys||(n._withKeys={}),i=e.join(".");return t[i]||(t[i]=s=>{if(!("key"in s))return;const r=Gs(s.key);if(e.some(o=>o===r||BR[o]===r))return n(s)})},zR=sn({patchProp:PR},uR);let ly;function f1(){return ly||(ly=ZS(zR))}const AG=(...n)=>{f1().render(...n)},VR=(...n)=>{const e=f1().createApp(...n),{mount:t}=e;return e.mount=i=>{const s=GR(i);if(!s)return;const r=e._component;!et(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=t(s,!1,HR(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e};function HR(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function GR(n){return kt(n)?document.querySelector(n):n}const h1=new Set,Zn=new WeakMap,xa=new WeakMap,Mo=new WeakMap,ug=new WeakMap,WR=new WeakMap,Ma=new WeakMap,Vf=new WeakMap,gl=new WeakSet;let xr,B0=0,z0=0;const Cs="__aa_tgt",nc="__aa_del",Hf="__aa_new",XR=n=>{const e=ZR(n);e&&e.forEach(t=>JR(t))},$R=n=>{n.forEach(e=>{e.target===xr&&YR(),Zn.has(e.target)&&Co(e.target)})};function qR(n){const e=ug.get(n);e==null||e.disconnect();let t=Zn.get(n),i=0;const s=5;t||(t=Sa(n),Zn.set(n,t));const{offsetWidth:r,offsetHeight:o}=xr,l=[t.top-s,r-(t.left+s+t.width),o-(t.top+s+t.height),t.left-s].map(u=>`${-1*Math.floor(u)}px`).join(" "),c=new IntersectionObserver(()=>{++i>1&&Co(n)},{root:xr,threshold:1,rootMargin:l});c.observe(n),ug.set(n,c)}function Co(n){clearTimeout(Vf.get(n));const e=sd(n),t=ic(e)?500:e.duration;Vf.set(n,setTimeout(async()=>{const i=Mo.get(n);try{await(i==null?void 0:i.finished),Zn.set(n,Sa(n)),qR(n)}catch{}},t))}function YR(){clearTimeout(Vf.get(xr)),Vf.set(xr,setTimeout(()=>{h1.forEach(n=>g1(n,e=>d1(()=>Co(e))))},100))}function jR(n){setTimeout(()=>{WR.set(n,setInterval(()=>d1(Co.bind(null,n)),2e3))},Math.round(2e3*Math.random()))}function d1(n){typeof requestIdleCallback=="function"?requestIdleCallback(()=>n()):requestAnimationFrame(()=>n())}let fg,oa;const KR=typeof window<"u"&&"ResizeObserver"in window;KR&&(xr=document.documentElement,fg=new MutationObserver(XR),oa=new ResizeObserver($R),window.addEventListener("scroll",()=>{z0=window.scrollY,B0=window.scrollX}),oa.observe(xr));function ZR(n){return n.reduce((i,s)=>[...i,...Array.from(s.addedNodes),...Array.from(s.removedNodes)],[]).every(i=>i.nodeName==="#comment")?!1:n.reduce((i,s)=>{if(i===!1)return!1;if(s.target instanceof Element){if(bp(s.target),!i.has(s.target)){i.add(s.target);for(let r=0;rt(n,Ma.has(n)));for(let t=0;ts(i,Ma.has(i)))}}function H0(n){return Array.isArray(n)?n:[n]}function ic(n){return typeof n=="function"}function e3(n){const e=Zn.get(n),t=Sa(n);if(!V0(n))return Zn.set(n,t);let i;if(!e)return;const s=sd(n);if(typeof s!="function"){const r=e.left-t.left,o=e.top-t.top,[a,l,c,u]=p1(n,e,t),f={transform:`translate(${r}px, ${o}px)`},h={transform:"translate(0, 0)"};a!==l&&(f.width=`${a}px`,h.width=`${l}px`),c!==u&&(f.height=`${c}px`,h.height=`${u}px`),i=n.animate([f,h],{duration:s.duration,easing:s.easing})}else{const[r]=H0(s(n,"remain",e,t));i=new Animation(r),i.play()}Mo.set(n,i),Zn.set(n,t),i.addEventListener("finish",Co.bind(null,n))}function cy(n){Hf in n&&delete n[Hf];const e=Sa(n);Zn.set(n,e);const t=sd(n);if(!V0(n))return;let i;if(typeof t!="function")i=n.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:t.duration*1.5,easing:"ease-in"});else{const[s]=H0(t(n,"add",e));i=new Animation(s),i.play()}Mo.set(n,i),i.addEventListener("finish",Co.bind(null,n))}function uy(n,e){var t;n.remove(),Zn.delete(n),xa.delete(n),Mo.delete(n),(t=ug.get(n))===null||t===void 0||t.disconnect(),setTimeout(()=>{if(nc in n&&delete n[nc],Object.defineProperty(n,Hf,{value:!0,configurable:!0}),e&&n instanceof HTMLElement)for(const i in e)n.style[i]=""},0)}function t3(n){var e;if(!xa.has(n)||!Zn.has(n))return;const[t,i]=xa.get(n);Object.defineProperty(n,nc,{value:!0,configurable:!0});const s=window.scrollX,r=window.scrollY;if(i&&i.parentNode&&i.parentNode instanceof Element?i.parentNode.insertBefore(n,i):t&&t.parentNode?t.parentNode.appendChild(n):(e=m1(n))===null||e===void 0||e.appendChild(n),!V0(n))return uy(n);const[o,a,l,c]=i3(n),u=sd(n),f=Zn.get(n);(s!==B0||r!==z0)&&n3(n,s,r,u);let h,d={position:"absolute",top:`${o}px`,left:`${a}px`,width:`${l}px`,height:`${c}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!ic(u))Object.assign(n.style,d),h=n.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:u.duration,easing:"ease-out"});else{const[p,_]=H0(u(n,"remove",f));(_==null?void 0:_.styleReset)!==!1&&(d=(_==null?void 0:_.styleReset)||d,Object.assign(n.style,d)),h=new Animation(p),h.play()}Mo.set(n,h),h.addEventListener("finish",uy.bind(null,n,d))}function n3(n,e,t,i){const s=B0-e,r=z0-t,o=document.documentElement.style.scrollBehavior;if(getComputedStyle(xr).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+s,window.scrollY+r),!n.parentElement)return;const l=n.parentElement;let c=l.clientHeight,u=l.clientWidth;const f=performance.now();function h(){requestAnimationFrame(()=>{if(!ic(i)){const d=c-l.clientHeight,p=u-l.clientWidth;f+i.duration>performance.now()?(window.scrollTo({left:window.scrollX-p,top:window.scrollY-d}),c=l.clientHeight,u=l.clientWidth,h()):document.documentElement.style.scrollBehavior=o}})}h()}function i3(n){const e=Zn.get(n),[t,,i]=p1(n,e,Sa(n));let s=n.parentElement;for(;s&&(getComputedStyle(s).position==="static"||s instanceof HTMLBodyElement);)s=s.parentElement;s||(s=document.body);const r=getComputedStyle(s),o=Zn.get(s)||Sa(s),a=Math.round(e.top-o.top)-ji(r.borderTopWidth),l=Math.round(e.left-o.left)-ji(r.borderLeftWidth);return[a,l,t,i]}function s3(n,e={}){return fg&&oa&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!ic(e)&&!e.disrespectUserMotionPreference||(gl.add(n),getComputedStyle(n).position==="static"&&Object.assign(n.style,{position:"relative"}),g1(n,Co,jR,s=>oa==null?void 0:oa.observe(s)),ic(e)?Ma.set(n,e):Ma.set(n,{duration:250,easing:"ease-in-out",...e}),fg.observe(n,{childList:!0}),h1.add(n))),Object.freeze({parent:n,enable:()=>{gl.add(n)},disable:()=>{gl.delete(n)},isEnabled:()=>gl.has(n)})}const r3={mounted:(n,e)=>{s3(n,e.value||{})},getSSRProps:()=>({})},o3=r3,a3={install(n){n.directive("auto-animate",o3)}};/** +**/let cg;const Vv=typeof window<"u"&&window.trustedTypes;if(Vv)try{cg=Vv.createPolicy("vue",{createHTML:n=>n})}catch{}const l1=cg?n=>cg.createHTML(n):n=>n,lR="http://www.w3.org/2000/svg",cR="http://www.w3.org/1998/Math/MathML",Ms=typeof document<"u"?document:null,Hv=Ms&&Ms.createElement("template"),uR={insert:(n,e,t)=>{e.insertBefore(n,t||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,t,i)=>{const s=e==="svg"?Ms.createElementNS(lR,n):e==="mathml"?Ms.createElementNS(cR,n):t?Ms.createElement(n,{is:t}):Ms.createElement(n);return n==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:n=>Ms.createTextNode(n),createComment:n=>Ms.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>Ms.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,s,r){const o=t?t.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),t),!(s===r||!(s=s.nextSibling)););else{Hv.innerHTML=l1(i==="svg"?`${n}`:i==="mathml"?`${n}`:n);const a=Hv.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},js="transition",Za="animation",tc=Symbol("_vtc"),c1={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},fR=sn({},RS,c1),hR=n=>(n.displayName="Transition",n.props=fR,n),EG=hR((n,{slots:e})=>ks(r2,dR(n),e)),Br=(n,e=[])=>{Xe(n)?n.forEach(t=>t(...e)):n&&n(...e)},Gv=n=>n?Xe(n)?n.some(e=>e.length>1):n.length>1:!1;function dR(n){const e={};for(const B in n)B in c1||(e[B]=n[B]);if(n.css===!1)return e;const{name:t="v",type:i,duration:s,enterFromClass:r=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:l=r,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:f=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:d=`${t}-leave-to`}=n,p=pR(s),_=p&&p[0],g=p&&p[1],{onBeforeEnter:m,onEnter:v,onEnterCancelled:b,onLeave:y,onLeaveCancelled:T,onBeforeAppear:w=m,onAppear:S=v,onAppearCancelled:P=b}=e,M=(B,z,V,Q)=>{B._enterCancelled=Q,zr(B,z?u:a),zr(B,z?c:o),V&&V()},E=(B,z)=>{B._isLeaving=!1,zr(B,f),zr(B,d),zr(B,h),z&&z()},D=B=>(z,V)=>{const Q=B?S:v,j=()=>M(z,B,V);Br(Q,[z,j]),Wv(()=>{zr(z,B?l:r),hs(z,B?u:a),Gv(Q)||Xv(z,i,_,j)})};return sn(e,{onBeforeEnter(B){Br(m,[B]),hs(B,r),hs(B,o)},onBeforeAppear(B){Br(w,[B]),hs(B,l),hs(B,c)},onEnter:D(!1),onAppear:D(!0),onLeave(B,z){B._isLeaving=!0;const V=()=>E(B,z);hs(B,f),B._enterCancelled?(hs(B,h),Yv()):(Yv(),hs(B,h)),Wv(()=>{B._isLeaving&&(zr(B,f),hs(B,d),Gv(y)||Xv(B,i,g,V))}),Br(y,[B,V])},onEnterCancelled(B){M(B,!1,void 0,!0),Br(b,[B])},onAppearCancelled(B){M(B,!0,void 0,!0),Br(P,[B])},onLeaveCancelled(B){E(B),Br(T,[B])}})}function pR(n){if(n==null)return null;if(Dt(n))return[_p(n.enter),_p(n.leave)];{const e=_p(n);return[e,e]}}function _p(n){return gC(n)}function hs(n,e){e.split(/\s+/).forEach(t=>t&&n.classList.add(t)),(n[tc]||(n[tc]=new Set)).add(e)}function zr(n,e){e.split(/\s+/).forEach(i=>i&&n.classList.remove(i));const t=n[tc];t&&(t.delete(e),t.size||(n[tc]=void 0))}function Wv(n){requestAnimationFrame(()=>{requestAnimationFrame(n)})}let mR=0;function Xv(n,e,t,i){const s=n._endId=++mR,r=()=>{s===n._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:o,timeout:a,propCount:l}=gR(n,e);if(!o)return i();const c=o+"end";let u=0;const f=()=>{n.removeEventListener(c,h),r()},h=d=>{d.target===n&&++u>=l&&f()};setTimeout(()=>{u(t[p]||"").split(", "),s=i(`${js}Delay`),r=i(`${js}Duration`),o=$v(s,r),a=i(`${Za}Delay`),l=i(`${Za}Duration`),c=$v(a,l);let u=null,f=0,h=0;e===js?o>0&&(u=js,f=o,h=r.length):e===Za?c>0&&(u=Za,f=c,h=l.length):(f=Math.max(o,c),u=f>0?o>c?js:Za:null,h=u?u===js?r.length:l.length:0);const d=u===js&&/\b(transform|all)(,|$)/.test(i(`${js}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:d}}function $v(n,e){for(;n.lengthqv(t)+qv(n[i])))}function qv(n){return n==="auto"?0:Number(n.slice(0,-1).replace(",","."))*1e3}function Yv(){return document.body.offsetHeight}function _R(n,e,t){const i=n[tc];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const jv=Symbol("_vod"),vR=Symbol("_vsh"),yR=Symbol(""),bR=/(^|;)\s*display\s*:/;function xR(n,e,t){const i=n.style,s=Bt(t);let r=!1;if(t&&!s){if(e)if(Bt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&xf(i,a,"")}else for(const o in e)t[o]==null&&xf(i,o,"");for(const o in t)o==="display"&&(r=!0),xf(i,o,t[o])}else if(s){if(e!==t){const o=i[yR];o&&(t+=";"+o),i.cssText=t,r=bR.test(t)}}else e&&n.removeAttribute("style");jv in n&&(n[jv]=r?i.display:"",n[vR]&&(i.display="none"))}const Kv=/\s*!important$/;function xf(n,e,t){if(Xe(t))t.forEach(i=>xf(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=MR(n,e);Kv.test(t)?n.setProperty(Gs(i),t.replace(Kv,""),"important"):n[i]=t}}const Zv=["Webkit","Moz","ms"],vp={};function MR(n,e){const t=vp[e];if(t)return t;let i=ai(e);if(i!=="filter"&&i in n)return vp[e]=i;i=Xh(i);for(let s=0;syp||(wR.then(()=>yp=0),yp=Date.now());function CR(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;ki(RR(i,t.value),e,5,[i])};return t.value=n,t.attached=AR(),t}function RR(n,e){if(Xe(e)){const t=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{t.call(n),n._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const iy=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,PR=(n,e,t,i,s,r)=>{const o=s==="svg";e==="class"?_R(n,i,o):e==="style"?xR(n,t,i):Gh(e)?v0(e)||ER(n,e,t,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):IR(n,e,i,o))?(ey(n,e,i),!n.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Qv(n,e,i,o,r,e!=="value")):n._isVueCE&&(/[A-Z]/.test(e)||!Bt(i))?ey(n,ai(e),i,r,e):(e==="true-value"?n._trueValue=i:e==="false-value"&&(n._falseValue=i),Qv(n,e,i,o))};function IR(n,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in n&&iy(e)&&et(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=n.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return iy(e)&&Bt(t)?!1:e in n}const br=n=>{const e=n.props["onUpdate:modelValue"]||!1;return Xe(e)?t=>_f(e,t):e};function LR(n){n.target.composing=!0}function sy(n){const e=n.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const bi=Symbol("_assign"),ry={created(n,{modifiers:{lazy:e,trim:t,number:i}},s){n[bi]=br(s);const r=i||s.props&&s.props.type==="number";Ts(n,e?"change":"input",o=>{if(o.target.composing)return;let a=n.value;t&&(a=a.trim()),r&&(a=Lf(a)),n[bi](a)}),t&&Ts(n,"change",()=>{n.value=n.value.trim()}),e||(Ts(n,"compositionstart",LR),Ts(n,"compositionend",sy),Ts(n,"change",sy))},mounted(n,{value:e}){n.value=e??""},beforeUpdate(n,{value:e,oldValue:t,modifiers:{lazy:i,trim:s,number:r}},o){if(n[bi]=br(o),n.composing)return;const a=(r||n.type==="number")&&!/^0\d/.test(n.value)?Lf(n.value):n.value,l=e??"";a!==l&&(document.activeElement===n&&n.type!=="range"&&(i&&e===t||s&&n.value.trim()===l)||(n.value=l))}},DR={deep:!0,created(n,e,t){n[bi]=br(t),Ts(n,"change",()=>{const i=n._modelValue,s=ba(n),r=n.checked,o=n[bi];if(Xe(i)){const a=x0(i,s),l=a!==-1;if(r&&!l)o(i.concat(s));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Fa(i)){const a=new Set(i);r?a.add(s):a.delete(s),o(a)}else o(u1(n,r))})},mounted:oy,beforeUpdate(n,e,t){n[bi]=br(t),oy(n,e,t)}};function oy(n,{value:e,oldValue:t},i){n._modelValue=e;let s;if(Xe(e))s=x0(e,i.props.value)>-1;else if(Fa(e))s=e.has(i.props.value);else{if(e===t)return;s=xo(e,u1(n,!0))}n.checked!==s&&(n.checked=s)}const OR={created(n,{value:e},t){n.checked=xo(e,t.props.value),n[bi]=br(t),Ts(n,"change",()=>{n[bi](ba(n))})},beforeUpdate(n,{value:e,oldValue:t},i){n[bi]=br(i),e!==t&&(n.checked=xo(e,i.props.value))}},NR={deep:!0,created(n,{value:e,modifiers:{number:t}},i){const s=Fa(e);Ts(n,"change",()=>{const r=Array.prototype.filter.call(n.options,o=>o.selected).map(o=>t?Lf(ba(o)):ba(o));n[bi](n.multiple?s?new Set(r):r:r[0]),n._assigning=!0,Ar(()=>{n._assigning=!1})}),n[bi]=br(i)},mounted(n,{value:e}){ay(n,e)},beforeUpdate(n,e,t){n[bi]=br(t)},updated(n,{value:e}){n._assigning||ay(n,e)}};function ay(n,e){const t=n.multiple,i=Xe(e);if(!(t&&!i&&!Fa(e))){for(let s=0,r=n.options.length;sString(c)===String(a)):o.selected=x0(e,a)>-1}else o.selected=e.has(a);else if(xo(ba(o),e)){n.selectedIndex!==s&&(n.selectedIndex=s);return}}!t&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function ba(n){return"_value"in n?n._value:n.value}function u1(n,e){const t=e?"_trueValue":"_falseValue";return t in n?n[t]:e}const TG={created(n,e,t){uu(n,e,t,null,"created")},mounted(n,e,t){uu(n,e,t,null,"mounted")},beforeUpdate(n,e,t,i){uu(n,e,t,i,"beforeUpdate")},updated(n,e,t,i){uu(n,e,t,i,"updated")}};function UR(n,e){switch(n){case"SELECT":return NR;case"TEXTAREA":return ry;default:switch(e){case"checkbox":return DR;case"radio":return OR;default:return ry}}}function uu(n,e,t,i,s){const o=UR(n.tagName,t.props&&t.props.type)[s];o&&o(n,e,t,i)}const FR=["ctrl","shift","alt","meta"],kR={stop:n=>n.stopPropagation(),prevent:n=>n.preventDefault(),self:n=>n.target!==n.currentTarget,ctrl:n=>!n.ctrlKey,shift:n=>!n.shiftKey,alt:n=>!n.altKey,meta:n=>!n.metaKey,left:n=>"button"in n&&n.button!==0,middle:n=>"button"in n&&n.button!==1,right:n=>"button"in n&&n.button!==2,exact:(n,e)=>FR.some(t=>n[`${t}Key`]&&!e.includes(t))},wG=(n,e)=>{const t=n._withMods||(n._withMods={}),i=e.join(".");return t[i]||(t[i]=(s,...r)=>{for(let o=0;o{const t=n._withKeys||(n._withKeys={}),i=e.join(".");return t[i]||(t[i]=s=>{if(!("key"in s))return;const r=Gs(s.key);if(e.some(o=>o===r||BR[o]===r))return n(s)})},zR=sn({patchProp:PR},uR);let ly;function f1(){return ly||(ly=ZS(zR))}const CG=(...n)=>{f1().render(...n)},VR=(...n)=>{const e=f1().createApp(...n),{mount:t}=e;return e.mount=i=>{const s=GR(i);if(!s)return;const r=e._component;!et(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=t(s,!1,HR(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e};function HR(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function GR(n){return Bt(n)?document.querySelector(n):n}const h1=new Set,Jn=new WeakMap,xa=new WeakMap,Mo=new WeakMap,ug=new WeakMap,WR=new WeakMap,Ma=new WeakMap,Vf=new WeakMap,gl=new WeakSet;let xr,B0=0,z0=0;const Cs="__aa_tgt",nc="__aa_del",Hf="__aa_new",XR=n=>{const e=ZR(n);e&&e.forEach(t=>JR(t))},$R=n=>{n.forEach(e=>{e.target===xr&&YR(),Jn.has(e.target)&&Co(e.target)})};function qR(n){const e=ug.get(n);e==null||e.disconnect();let t=Jn.get(n),i=0;const s=5;t||(t=Sa(n),Jn.set(n,t));const{offsetWidth:r,offsetHeight:o}=xr,l=[t.top-s,r-(t.left+s+t.width),o-(t.top+s+t.height),t.left-s].map(u=>`${-1*Math.floor(u)}px`).join(" "),c=new IntersectionObserver(()=>{++i>1&&Co(n)},{root:xr,threshold:1,rootMargin:l});c.observe(n),ug.set(n,c)}function Co(n){clearTimeout(Vf.get(n));const e=sd(n),t=ic(e)?500:e.duration;Vf.set(n,setTimeout(async()=>{const i=Mo.get(n);try{await(i==null?void 0:i.finished),Jn.set(n,Sa(n)),qR(n)}catch{}},t))}function YR(){clearTimeout(Vf.get(xr)),Vf.set(xr,setTimeout(()=>{h1.forEach(n=>g1(n,e=>d1(()=>Co(e))))},100))}function jR(n){setTimeout(()=>{WR.set(n,setInterval(()=>d1(Co.bind(null,n)),2e3))},Math.round(2e3*Math.random()))}function d1(n){typeof requestIdleCallback=="function"?requestIdleCallback(()=>n()):requestAnimationFrame(()=>n())}let fg,oa;const KR=typeof window<"u"&&"ResizeObserver"in window;KR&&(xr=document.documentElement,fg=new MutationObserver(XR),oa=new ResizeObserver($R),window.addEventListener("scroll",()=>{z0=window.scrollY,B0=window.scrollX}),oa.observe(xr));function ZR(n){return n.reduce((i,s)=>[...i,...Array.from(s.addedNodes),...Array.from(s.removedNodes)],[]).every(i=>i.nodeName==="#comment")?!1:n.reduce((i,s)=>{if(i===!1)return!1;if(s.target instanceof Element){if(bp(s.target),!i.has(s.target)){i.add(s.target);for(let r=0;rt(n,Ma.has(n)));for(let t=0;ts(i,Ma.has(i)))}}function H0(n){return Array.isArray(n)?n:[n]}function ic(n){return typeof n=="function"}function e3(n){const e=Jn.get(n),t=Sa(n);if(!V0(n))return Jn.set(n,t);let i;if(!e)return;const s=sd(n);if(typeof s!="function"){const r=e.left-t.left,o=e.top-t.top,[a,l,c,u]=p1(n,e,t),f={transform:`translate(${r}px, ${o}px)`},h={transform:"translate(0, 0)"};a!==l&&(f.width=`${a}px`,h.width=`${l}px`),c!==u&&(f.height=`${c}px`,h.height=`${u}px`),i=n.animate([f,h],{duration:s.duration,easing:s.easing})}else{const[r]=H0(s(n,"remain",e,t));i=new Animation(r),i.play()}Mo.set(n,i),Jn.set(n,t),i.addEventListener("finish",Co.bind(null,n))}function cy(n){Hf in n&&delete n[Hf];const e=Sa(n);Jn.set(n,e);const t=sd(n);if(!V0(n))return;let i;if(typeof t!="function")i=n.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:t.duration*1.5,easing:"ease-in"});else{const[s]=H0(t(n,"add",e));i=new Animation(s),i.play()}Mo.set(n,i),i.addEventListener("finish",Co.bind(null,n))}function uy(n,e){var t;n.remove(),Jn.delete(n),xa.delete(n),Mo.delete(n),(t=ug.get(n))===null||t===void 0||t.disconnect(),setTimeout(()=>{if(nc in n&&delete n[nc],Object.defineProperty(n,Hf,{value:!0,configurable:!0}),e&&n instanceof HTMLElement)for(const i in e)n.style[i]=""},0)}function t3(n){var e;if(!xa.has(n)||!Jn.has(n))return;const[t,i]=xa.get(n);Object.defineProperty(n,nc,{value:!0,configurable:!0});const s=window.scrollX,r=window.scrollY;if(i&&i.parentNode&&i.parentNode instanceof Element?i.parentNode.insertBefore(n,i):t&&t.parentNode?t.parentNode.appendChild(n):(e=m1(n))===null||e===void 0||e.appendChild(n),!V0(n))return uy(n);const[o,a,l,c]=i3(n),u=sd(n),f=Jn.get(n);(s!==B0||r!==z0)&&n3(n,s,r,u);let h,d={position:"absolute",top:`${o}px`,left:`${a}px`,width:`${l}px`,height:`${c}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!ic(u))Object.assign(n.style,d),h=n.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:u.duration,easing:"ease-out"});else{const[p,_]=H0(u(n,"remove",f));(_==null?void 0:_.styleReset)!==!1&&(d=(_==null?void 0:_.styleReset)||d,Object.assign(n.style,d)),h=new Animation(p),h.play()}Mo.set(n,h),h.addEventListener("finish",uy.bind(null,n,d))}function n3(n,e,t,i){const s=B0-e,r=z0-t,o=document.documentElement.style.scrollBehavior;if(getComputedStyle(xr).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+s,window.scrollY+r),!n.parentElement)return;const l=n.parentElement;let c=l.clientHeight,u=l.clientWidth;const f=performance.now();function h(){requestAnimationFrame(()=>{if(!ic(i)){const d=c-l.clientHeight,p=u-l.clientWidth;f+i.duration>performance.now()?(window.scrollTo({left:window.scrollX-p,top:window.scrollY-d}),c=l.clientHeight,u=l.clientWidth,h()):document.documentElement.style.scrollBehavior=o}})}h()}function i3(n){const e=Jn.get(n),[t,,i]=p1(n,e,Sa(n));let s=n.parentElement;for(;s&&(getComputedStyle(s).position==="static"||s instanceof HTMLBodyElement);)s=s.parentElement;s||(s=document.body);const r=getComputedStyle(s),o=Jn.get(s)||Sa(s),a=Math.round(e.top-o.top)-ji(r.borderTopWidth),l=Math.round(e.left-o.left)-ji(r.borderLeftWidth);return[a,l,t,i]}function s3(n,e={}){return fg&&oa&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!ic(e)&&!e.disrespectUserMotionPreference||(gl.add(n),getComputedStyle(n).position==="static"&&Object.assign(n.style,{position:"relative"}),g1(n,Co,jR,s=>oa==null?void 0:oa.observe(s)),ic(e)?Ma.set(n,e):Ma.set(n,{duration:250,easing:"ease-in-out",...e}),fg.observe(n,{childList:!0}),h1.add(n))),Object.freeze({parent:n,enable:()=>{gl.add(n)},disable:()=>{gl.delete(n)},isEnabled:()=>gl.has(n)})}const r3={mounted:(n,e)=>{s3(n,e.value||{})},getSSRProps:()=>({})},o3=r3,a3={install(n){n.directive("auto-animate",o3)}};/** * @license * Copyright 2010-2025 Three.js Authors * SPDX-License-Identifier: MIT - */const Uc="177",l3={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},c3={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},_1=0,hg=1,v1=2,u3=3,f3=0,G0=1,W0=2,Ki=3,Bs=0,Vn=1,Ii=2,Ds=0,_o=1,dg=2,pg=3,mg=4,y1=5,hr=100,b1=101,x1=102,M1=103,S1=104,E1=200,T1=201,w1=202,A1=203,Gf=204,Wf=205,C1=206,R1=207,P1=208,I1=209,L1=210,D1=211,O1=212,N1=213,U1=214,Xf=0,$f=1,qf=2,So=3,Yf=4,jf=5,Kf=6,Zf=7,Fc=0,F1=1,k1=2,ts=0,B1=1,z1=2,V1=3,rd=4,H1=5,G1=6,W1=7,gg="attached",X1="detached",od=300,zs=301,Mr=302,sc=303,rc=304,Ba=306,oc=1e3,gi=1001,ac=1002,yn=1003,X0=1004,h3=1004,aa=1005,d3=1005,nn=1006,wl=1007,p3=1007,Qi=1008,m3=1008,Bi=1009,$0=1010,q0=1011,Ea=1012,ad=1013,Vs=1014,Kn=1015,za=1016,ld=1017,cd=1018,Ta=1020,Y0=35902,j0=1021,K0=1022,zn=1023,wa=1026,Aa=1027,ud=1028,kc=1029,Z0=1030,fd=1031,g3=1032,hd=1033,Al=33776,Cl=33777,Rl=33778,Pl=33779,Jf=35840,Qf=35841,eh=35842,th=35843,nh=36196,ih=37492,sh=37496,rh=37808,oh=37809,ah=37810,lh=37811,ch=37812,uh=37813,fh=37814,hh=37815,dh=37816,ph=37817,mh=37818,gh=37819,_h=37820,vh=37821,Il=36492,yh=36494,bh=36495,J0=36283,xh=36284,Mh=36285,Sh=36286,$1=2200,q1=2201,Y1=2202,lc=2300,Eh=2301,Mf=2302,uo=2400,fo=2401,cc=2402,dd=2500,Q0=2501,_3=0,v3=1,y3=2,j1=3200,K1=3201,b3=3202,x3=3203,Cr=0,Z1=1,ws="",Fn="srgb",Eo="srgb-linear",uc="linear",Ct="srgb",M3=0,so=7680,S3=7681,E3=7682,T3=7683,w3=34055,A3=34056,C3=5386,R3=512,P3=513,I3=514,L3=515,D3=516,O3=517,N3=518,_g=519,J1=512,Q1=513,eE=514,e_=515,tE=516,nE=517,iE=518,sE=519,fc=35044,U3=35048,F3=35040,k3=35045,B3=35049,z3=35041,V3=35046,H3=35050,G3=35042,W3="100",vg="300 es",_i=2e3,hc=2001,X3={COMPUTE:"compute",RENDER:"render"},$3={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},q3={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FLAT_FIRST:"flat first",FLAT_EITHER:"flat either"};class as{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners;if(i===void 0)return;const s=i[e];if(s!==void 0){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const i=t[e.type];if(i!==void 0){e.target=this;const s=i.slice(0);for(let r=0,o=s.length;r>8&255]+Mn[n>>16&255]+Mn[n>>24&255]+"-"+Mn[e&255]+Mn[e>>8&255]+"-"+Mn[e>>16&15|64]+Mn[e>>24&255]+"-"+Mn[t&63|128]+Mn[t>>8&255]+"-"+Mn[t>>16&255]+Mn[t>>24&255]+Mn[i&255]+Mn[i>>8&255]+Mn[i>>16&255]+Mn[i>>24&255]).toLowerCase()}function st(n,e,t){return Math.max(e,Math.min(t,n))}function t_(n,e){return(n%e+e)%e}function Y3(n,e,t,i,s){return i+(n-e)*(s-i)/(t-e)}function j3(n,e,t){return n!==e?(t-n)/(e-n):0}function Ll(n,e,t){return(1-t)*n+t*e}function K3(n,e,t,i){return Ll(n,e,1-Math.exp(-t*i))}function Z3(n,e=1){return e-Math.abs(t_(n,e*2)-e)}function J3(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function Q3(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function eP(n,e){return n+Math.floor(Math.random()*(e-n+1))}function tP(n,e){return n+Math.random()*(e-n)}function nP(n){return n*(.5-Math.random())}function iP(n){n!==void 0&&(fy=n);let e=fy+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function sP(n){return n*vo}function rP(n){return n*Ca}function oP(n){return(n&n-1)===0&&n!==0}function aP(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function lP(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function cP(n,e,t,i,s){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),c=r((e+i)/2),u=o((e+i)/2),f=r((e-i)/2),h=o((e-i)/2),d=r((i-e)/2),p=o((i-e)/2);switch(s){case"XYX":n.set(a*u,l*f,l*h,a*c);break;case"YZY":n.set(l*h,a*u,l*f,a*c);break;case"ZXZ":n.set(l*f,l*h,a*u,a*c);break;case"XZX":n.set(a*u,l*p,l*d,a*c);break;case"YXY":n.set(l*d,a*u,l*p,a*c);break;case"ZYZ":n.set(l*p,l*d,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function Bn(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function lt(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const n_={DEG2RAD:vo,RAD2DEG:Ca,generateUUID:oi,clamp:st,euclideanModulo:t_,mapLinear:Y3,inverseLerp:j3,lerp:Ll,damp:K3,pingpong:Z3,smoothstep:J3,smootherstep:Q3,randInt:eP,randFloat:tP,randFloatSpread:nP,seededRandom:iP,degToRad:sP,radToDeg:rP,isPowerOfTwo:oP,ceilPowerOfTwo:aP,floorPowerOfTwo:lP,setQuaternionFromProperEuler:cP,normalize:lt,denormalize:Bn};class fe{constructor(e=0,t=0){fe.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6],this.y=s[1]*t+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(st(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),s=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Jn{constructor(e=0,t=0,i=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=s}static slerpFlat(e,t,i,s,r,o,a){let l=i[s+0],c=i[s+1],u=i[s+2],f=i[s+3];const h=r[o+0],d=r[o+1],p=r[o+2],_=r[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f;return}if(a===1){e[t+0]=h,e[t+1]=d,e[t+2]=p,e[t+3]=_;return}if(f!==_||l!==h||c!==d||u!==p){let g=1-a;const m=l*h+c*d+u*p+f*_,v=m>=0?1:-1,b=1-m*m;if(b>Number.EPSILON){const T=Math.sqrt(b),w=Math.atan2(T,m*v);g=Math.sin(g*w)/T,a=Math.sin(a*w)/T}const y=a*v;if(l=l*g+h*y,c=c*g+d*y,u=u*g+p*y,f=f*g+_*y,g===1-a){const T=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=T,c*=T,u*=T,f*=T}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,s,r,o){const a=i[s],l=i[s+1],c=i[s+2],u=i[s+3],f=r[o],h=r[o+1],d=r[o+2],p=r[o+3];return e[t]=a*p+u*f+l*d-c*h,e[t+1]=l*p+u*h+c*f-a*d,e[t+2]=c*p+u*d+a*h-l*f,e[t+3]=u*p-a*f-l*h-c*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,s){return this._x=e,this._y=t,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,s=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(s/2),f=a(r/2),h=l(i/2),d=l(s/2),p=l(r/2);switch(o){case"XYZ":this._x=h*u*f+c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f-h*d*p;break;case"YXZ":this._x=h*u*f+c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f+h*d*p;break;case"ZXY":this._x=h*u*f-c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f-h*d*p;break;case"ZYX":this._x=h*u*f-c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f+h*d*p;break;case"YZX":this._x=h*u*f+c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f-h*d*p;break;case"XZY":this._x=h*u*f-c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f+h*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],s=t[4],r=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],f=t[10],h=i+a+f;if(h>0){const d=.5/Math.sqrt(h+1);this._w=.25/d,this._x=(u-l)*d,this._y=(r-c)*d,this._z=(o-s)*d}else if(i>a&&i>f){const d=2*Math.sqrt(1+i-a-f);this._w=(u-l)/d,this._x=.25*d,this._y=(s+o)/d,this._z=(r+c)/d}else if(a>f){const d=2*Math.sqrt(1+a-i-f);this._w=(r-c)/d,this._x=(s+o)/d,this._y=.25*d,this._z=(l+u)/d}else{const d=2*Math.sqrt(1+f-i-a);this._w=(o-s)/d,this._x=(r+c)/d,this._y=(l+u)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(st(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,t/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,s=e._y,r=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+s*c-r*l,this._y=s*u+o*l+r*a-i*c,this._z=r*u+o*c+i*l-s*a,this._w=o*u-i*a-s*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const d=1-t;return this._w=d*o+t*this._w,this._x=d*i+t*this._x,this._y=d*s+t*this._y,this._z=d*r+t*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-t)*u)/c,h=Math.sin(t*u)/c;return this._w=o*f+this._w*h,this._x=i*f+this._x*h,this._y=s*f+this._y*h,this._z=r*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),r=Math.sqrt(i);return this.set(s*Math.sin(e),s*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class k{constructor(e=0,t=0,i=0){k.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(hy.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(hy.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*s,this.y=r[1]*t+r[4]*i+r[7]*s,this.z=r[2]*t+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*t+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*t+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*t+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*s-a*i),u=2*(a*t-r*s),f=2*(r*i-o*t);return this.x=t+l*c+o*f-a*u,this.y=i+l*u+a*c-r*f,this.z=s+l*f+r*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*s,this.y=r[1]*t+r[5]*i+r[9]*s,this.z=r[2]*t+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this.z=st(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this.z=st(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,s=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return xp.copy(this).projectOnVector(e),this.sub(xp)}reflect(e){return this.sub(xp.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(st(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return t*t+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const s=Math.sin(t)*e;return this.x=s*Math.sin(i),this.y=Math.cos(t)*e,this.z=s*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const xp=new k,hy=new Jn;class at{constructor(e,t,i,s,r,o,a,l,c){at.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,c)}set(e,t,i,s,r,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=s,u[2]=a,u[3]=t,u[4]=r,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],f=i[7],h=i[2],d=i[5],p=i[8],_=s[0],g=s[3],m=s[6],v=s[1],b=s[4],y=s[7],T=s[2],w=s[5],E=s[8];return r[0]=o*_+a*v+l*T,r[3]=o*g+a*b+l*w,r[6]=o*m+a*y+l*E,r[1]=c*_+u*v+f*T,r[4]=c*g+u*b+f*w,r[7]=c*m+u*y+f*E,r[2]=h*_+d*v+p*T,r[5]=h*g+d*b+p*w,r[8]=h*m+d*y+p*E,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-i*r*u+i*a*l+s*r*c-s*o*l}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*o-a*c,h=a*l-u*r,d=c*r-o*l,p=t*f+i*h+s*d;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/p;return e[0]=f*_,e[1]=(s*c-u*i)*_,e[2]=(a*i-s*o)*_,e[3]=h*_,e[4]=(u*t-s*l)*_,e[5]=(s*r-a*t)*_,e[6]=d*_,e[7]=(i*l-c*t)*_,e[8]=(o*t-i*r)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,s,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-s*c,s*l,-s*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Mp.makeScale(e,t)),this}rotate(e){return this.premultiply(Mp.makeRotation(-e)),this}translate(e,t){return this.premultiply(Mp.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<9;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Mp=new at;function rE(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const uP={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function la(n,e){return new uP[n](e)}function dc(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function oE(){const n=dc("canvas");return n.style.display="block",n}const dy={};function ga(n){n in dy||(dy[n]=!0,console.warn(n))}function fP(n,e,t){return new Promise(function(i,s){function r(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:s();break;case n.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:i()}}setTimeout(r,t)})}function hP(n){const e=n.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function dP(n){const e=n.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const py=new at().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),my=new at().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function pP(){const n={enabled:!0,workingColorSpace:Eo,spaces:{},convert:function(s,r,o){return this.enabled===!1||r===o||!r||!o||(this.spaces[r].transfer===Ct&&(s.r=Os(s.r),s.g=Os(s.g),s.b=Os(s.b)),this.spaces[r].primaries!==this.spaces[o].primaries&&(s.applyMatrix3(this.spaces[r].toXYZ),s.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===Ct&&(s.r=_a(s.r),s.g=_a(s.g),s.b=_a(s.b))),s},workingToColorSpace:function(s,r){return this.convert(s,this.workingColorSpace,r)},colorSpaceToWorking:function(s,r){return this.convert(s,r,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===ws?uc:this.spaces[s].transfer},getLuminanceCoefficients:function(s,r=this.workingColorSpace){return s.fromArray(this.spaces[r].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,r,o){return s.copy(this.spaces[r].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,r){return ga("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(s,r)},toWorkingColorSpace:function(s,r){return ga("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(s,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[Eo]:{primaries:e,whitePoint:i,transfer:uc,toXYZ:py,fromXYZ:my,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Fn},outputColorSpaceConfig:{drawingBufferColorSpace:Fn}},[Fn]:{primaries:e,whitePoint:i,transfer:Ct,toXYZ:py,fromXYZ:my,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Fn}}}),n}const pt=pP();function Os(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function _a(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let ko;class aE{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{ko===void 0&&(ko=dc("canvas")),ko.width=e.width,ko.height=e.height;const s=ko.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),i=ko}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=dc("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),r=s.data;for(let o=0;o1),this.pmremVersion=0}get width(){return this.source.getSize(Ep).x}get height(){return this.source.getSize(Ep).y}get depth(){return this.source.getSize(Ep).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}s&&i&&s.isVector2&&i.isVector2||s&&i&&s.isVector3&&i.isVector3||s&&i&&s.isMatrix3&&i.isMatrix3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==od)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case oc:e.x=e.x-Math.floor(e.x);break;case gi:e.x=e.x<0?0:1;break;case ac:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case oc:e.y=e.y-Math.floor(e.y);break;case gi:e.y=e.y<0?0:1;break;case ac:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}$t.DEFAULT_IMAGE=null;$t.DEFAULT_MAPPING=od;$t.DEFAULT_ANISOTROPY=1;class vt{constructor(e=0,t=0,i=0,s=1){vt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,s){return this.x=e,this.y=t,this.z=i,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*t+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*t+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*t+o[7]*i+o[11]*s+o[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,s,r;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],d=l[5],p=l[9],_=l[2],g=l[6],m=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-_)<.01&&Math.abs(p-g)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+_)<.1&&Math.abs(p+g)<.1&&Math.abs(c+d+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,y=(d+1)/2,T=(m+1)/2,w=(u+h)/4,E=(f+_)/4,P=(p+g)/4;return b>y&&b>T?b<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(b),s=w/i,r=E/i):y>T?y<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(y),i=w/s,r=P/s):T<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(T),i=E/r,s=P/r),this.set(i,s,r,t),this}let v=Math.sqrt((g-p)*(g-p)+(f-_)*(f-_)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(g-p)/v,this.y=(f-_)/v,this.z=(h-u)/v,this.w=Math.acos((c+d+m-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this.z=st(this.z,e.z,t.z),this.w=st(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this.z=st(this.z,e,t),this.w=st(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class i_ extends as{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:nn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new vt(0,0,e,t),this.scissorTest=!1,this.viewport=new vt(0,0,e,t);const s={width:e,height:t,depth:i.depth},r=new $t(s);this.textures=[];const o=i.count;for(let a=0;a1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ai),Ai.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ja),hu.subVectors(this.max,Ja),Bo.subVectors(e.a,Ja),zo.subVectors(e.b,Ja),Vo.subVectors(e.c,Ja),Ks.subVectors(zo,Bo),Zs.subVectors(Vo,zo),Vr.subVectors(Bo,Vo);let t=[0,-Ks.z,Ks.y,0,-Zs.z,Zs.y,0,-Vr.z,Vr.y,Ks.z,0,-Ks.x,Zs.z,0,-Zs.x,Vr.z,0,-Vr.x,-Ks.y,Ks.x,0,-Zs.y,Zs.x,0,-Vr.y,Vr.x,0];return!Tp(t,Bo,zo,Vo,hu)||(t=[1,0,0,0,1,0,0,0,1],!Tp(t,Bo,zo,Vo,hu))?!1:(du.crossVectors(Ks,Zs),t=[du.x,du.y,du.z],Tp(t,Bo,zo,Vo,hu))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ai).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ai).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ds[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ds[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ds[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ds[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ds[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ds[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ds[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ds[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ds),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const ds=[new k,new k,new k,new k,new k,new k,new k,new k],Ai=new k,fu=new Cn,Bo=new k,zo=new k,Vo=new k,Ks=new k,Zs=new k,Vr=new k,Ja=new k,hu=new k,du=new k,Hr=new k;function Tp(n,e,t,i,s){for(let r=0,o=n.length-3;r<=o;r+=3){Hr.fromArray(n,r);const a=s.x*Math.abs(Hr.x)+s.y*Math.abs(Hr.y)+s.z*Math.abs(Hr.z),l=e.dot(Hr),c=t.dot(Hr),u=i.dot(Hr);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const yP=new Cn,Qa=new k,wp=new k;class bn{constructor(e=new k,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):yP.setFromPoints(e).getCenter(i);let s=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Qa.subVectors(e,this.center);const t=Qa.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),s=(i-this.radius)*.5;this.center.addScaledVector(Qa,s/i),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(wp.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Qa.copy(e.center).add(wp)),this.expandByPoint(Qa.copy(e.center).sub(wp))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const ps=new k,Ap=new k,pu=new k,Js=new k,Cp=new k,mu=new k,Rp=new k;class Va{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ps)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ps.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ps.copy(this.origin).addScaledVector(this.direction,t),ps.distanceToSquared(e))}distanceSqToSegment(e,t,i,s){Ap.copy(e).add(t).multiplyScalar(.5),pu.copy(t).sub(e).normalize(),Js.copy(this.origin).sub(Ap);const r=e.distanceTo(t)*.5,o=-this.direction.dot(pu),a=Js.dot(this.direction),l=-Js.dot(pu),c=Js.lengthSq(),u=Math.abs(1-o*o);let f,h,d,p;if(u>0)if(f=o*l-a,h=o*a-l,p=r*u,f>=0)if(h>=-p)if(h<=p){const _=1/u;f*=_,h*=_,d=f*(f+o*h+2*a)+h*(o*f+h+2*l)+c}else h=r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h=-r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h<=-p?(f=Math.max(0,-(-o*r+a)),h=f>0?-r:Math.min(Math.max(-r,-l),r),d=-f*f+h*(h+2*l)+c):h<=p?(f=0,h=Math.min(Math.max(-r,-l),r),d=h*(h+2*l)+c):(f=Math.max(0,-(o*r+a)),h=f>0?r:Math.min(Math.max(-r,-l),r),d=-f*f+h*(h+2*l)+c);else h=o>0?-r:r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,f),s&&s.copy(Ap).addScaledVector(pu,h),d}intersectSphere(e,t){ps.subVectors(e.center,this.origin);const i=ps.dot(this.direction),s=ps.dot(ps)-i*i,r=e.radius*e.radius;if(s>r)return null;const o=Math.sqrt(r-s),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,s,r,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(i=(e.min.x-h.x)*c,s=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,s=(e.min.x-h.x)*c),u>=0?(r=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||r>s||((r>i||isNaN(i))&&(i=r),(o=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),i>l||a>s)||((a>i||i!==i)&&(i=a),(l=0?i:s,t)}intersectsBox(e){return this.intersectBox(e,ps)!==null}intersectTriangle(e,t,i,s,r){Cp.subVectors(t,e),mu.subVectors(i,e),Rp.crossVectors(Cp,mu);let o=this.direction.dot(Rp),a;if(o>0){if(s)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Js.subVectors(this.origin,e);const l=a*this.direction.dot(mu.crossVectors(Js,mu));if(l<0)return null;const c=a*this.direction.dot(Cp.cross(Js));if(c<0||l+c>o)return null;const u=-a*Js.dot(Rp);return u<0?null:this.at(u/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Ze{constructor(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g){Ze.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g)}set(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=s,m[1]=r,m[5]=o,m[9]=a,m[13]=l,m[2]=c,m[6]=u,m[10]=f,m[14]=h,m[3]=d,m[7]=p,m[11]=_,m[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Ze().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,s=1/Ho.setFromMatrixColumn(e,0).length(),r=1/Ho.setFromMatrixColumn(e,1).length(),o=1/Ho.setFromMatrixColumn(e,2).length();return t[0]=i[0]*s,t[1]=i[1]*s,t[2]=i[2]*s,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,s=e.y,r=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),c=Math.sin(s),u=Math.cos(r),f=Math.sin(r);if(e.order==="XYZ"){const h=o*u,d=o*f,p=a*u,_=a*f;t[0]=l*u,t[4]=-l*f,t[8]=c,t[1]=d+p*c,t[5]=h-_*c,t[9]=-a*l,t[2]=_-h*c,t[6]=p+d*c,t[10]=o*l}else if(e.order==="YXZ"){const h=l*u,d=l*f,p=c*u,_=c*f;t[0]=h+_*a,t[4]=p*a-d,t[8]=o*c,t[1]=o*f,t[5]=o*u,t[9]=-a,t[2]=d*a-p,t[6]=_+h*a,t[10]=o*l}else if(e.order==="ZXY"){const h=l*u,d=l*f,p=c*u,_=c*f;t[0]=h-_*a,t[4]=-o*f,t[8]=p+d*a,t[1]=d+p*a,t[5]=o*u,t[9]=_-h*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const h=o*u,d=o*f,p=a*u,_=a*f;t[0]=l*u,t[4]=p*c-d,t[8]=h*c+_,t[1]=l*f,t[5]=_*c+h,t[9]=d*c-p,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const h=o*l,d=o*c,p=a*l,_=a*c;t[0]=l*u,t[4]=_-h*f,t[8]=p*f+d,t[1]=f,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=d*f+p,t[10]=h-_*f}else if(e.order==="XZY"){const h=o*l,d=o*c,p=a*l,_=a*c;t[0]=l*u,t[4]=-f,t[8]=c*u,t[1]=h*f+_,t[5]=o*u,t[9]=d*f-p,t[2]=p*f-d,t[6]=a*u,t[10]=_*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(bP,e,xP)}lookAt(e,t,i){const s=this.elements;return ii.subVectors(e,t),ii.lengthSq()===0&&(ii.z=1),ii.normalize(),Qs.crossVectors(i,ii),Qs.lengthSq()===0&&(Math.abs(i.z)===1?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),Qs.crossVectors(i,ii)),Qs.normalize(),gu.crossVectors(ii,Qs),s[0]=Qs.x,s[4]=gu.x,s[8]=ii.x,s[1]=Qs.y,s[5]=gu.y,s[9]=ii.y,s[2]=Qs.z,s[6]=gu.z,s[10]=ii.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],f=i[5],h=i[9],d=i[13],p=i[2],_=i[6],g=i[10],m=i[14],v=i[3],b=i[7],y=i[11],T=i[15],w=s[0],E=s[4],P=s[8],M=s[12],S=s[1],D=s[5],B=s[9],z=s[13],V=s[2],Q=s[6],j=s[10],te=s[14],Z=s[3],pe=s[7],Me=s[11],re=s[15];return r[0]=o*w+a*S+l*V+c*Z,r[4]=o*E+a*D+l*Q+c*pe,r[8]=o*P+a*B+l*j+c*Me,r[12]=o*M+a*z+l*te+c*re,r[1]=u*w+f*S+h*V+d*Z,r[5]=u*E+f*D+h*Q+d*pe,r[9]=u*P+f*B+h*j+d*Me,r[13]=u*M+f*z+h*te+d*re,r[2]=p*w+_*S+g*V+m*Z,r[6]=p*E+_*D+g*Q+m*pe,r[10]=p*P+_*B+g*j+m*Me,r[14]=p*M+_*z+g*te+m*re,r[3]=v*w+b*S+y*V+T*Z,r[7]=v*E+b*D+y*Q+T*pe,r[11]=v*P+b*B+y*j+T*Me,r[15]=v*M+b*z+y*te+T*re,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],d=e[14],p=e[3],_=e[7],g=e[11],m=e[15];return p*(+r*l*f-s*c*f-r*a*h+i*c*h+s*a*d-i*l*d)+_*(+t*l*d-t*c*h+r*o*h-s*o*d+s*c*u-r*l*u)+g*(+t*c*f-t*a*d-r*o*f+i*o*d+r*a*u-i*c*u)+m*(-s*a*u-t*l*f+t*a*h+s*o*f-i*o*h+i*l*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],_=e[13],g=e[14],m=e[15],v=f*g*c-_*h*c+_*l*d-a*g*d-f*l*m+a*h*m,b=p*h*c-u*g*c-p*l*d+o*g*d+u*l*m-o*h*m,y=u*_*c-p*f*c+p*a*d-o*_*d-u*a*m+o*f*m,T=p*f*l-u*_*l-p*a*h+o*_*h+u*a*g-o*f*g,w=t*v+i*b+s*y+r*T;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const E=1/w;return e[0]=v*E,e[1]=(_*h*r-f*g*r-_*s*d+i*g*d+f*s*m-i*h*m)*E,e[2]=(a*g*r-_*l*r+_*s*c-i*g*c-a*s*m+i*l*m)*E,e[3]=(f*l*r-a*h*r-f*s*c+i*h*c+a*s*d-i*l*d)*E,e[4]=b*E,e[5]=(u*g*r-p*h*r+p*s*d-t*g*d-u*s*m+t*h*m)*E,e[6]=(p*l*r-o*g*r-p*s*c+t*g*c+o*s*m-t*l*m)*E,e[7]=(o*h*r-u*l*r+u*s*c-t*h*c-o*s*d+t*l*d)*E,e[8]=y*E,e[9]=(p*f*r-u*_*r-p*i*d+t*_*d+u*i*m-t*f*m)*E,e[10]=(o*_*r-p*a*r+p*i*c-t*_*c-o*i*m+t*a*m)*E,e[11]=(u*a*r-o*f*r-u*i*c+t*f*c+o*i*d-t*a*d)*E,e[12]=T*E,e[13]=(u*_*s-p*f*s+p*i*h-t*_*h-u*i*g+t*f*g)*E,e[14]=(p*a*s-o*_*s-p*i*l+t*_*l+o*i*g-t*a*g)*E,e[15]=(o*f*s-u*a*s+u*i*l-t*f*l-o*i*h+t*a*h)*E,this}scale(e){const t=this.elements,i=e.x,s=e.y,r=e.z;return t[0]*=i,t[4]*=s,t[8]*=r,t[1]*=i,t[5]*=s,t[9]*=r,t[2]*=i,t[6]*=s,t[10]*=r,t[3]*=i,t[7]*=s,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,s))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),s=Math.sin(t),r=1-i,o=e.x,a=e.y,l=e.z,c=r*o,u=r*a;return this.set(c*o+i,c*a-s*l,c*l+s*a,0,c*a+s*l,u*a+i,u*l-s*o,0,c*l-s*a,u*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,t,s,1,0,0,0,0,1),this}compose(e,t,i){const s=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,c=r+r,u=o+o,f=a+a,h=r*c,d=r*u,p=r*f,_=o*u,g=o*f,m=a*f,v=l*c,b=l*u,y=l*f,T=i.x,w=i.y,E=i.z;return s[0]=(1-(_+m))*T,s[1]=(d+y)*T,s[2]=(p-b)*T,s[3]=0,s[4]=(d-y)*w,s[5]=(1-(h+m))*w,s[6]=(g+v)*w,s[7]=0,s[8]=(p+b)*E,s[9]=(g-v)*E,s[10]=(1-(h+_))*E,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,i){const s=this.elements;let r=Ho.set(s[0],s[1],s[2]).length();const o=Ho.set(s[4],s[5],s[6]).length(),a=Ho.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],Ci.copy(this);const c=1/r,u=1/o,f=1/a;return Ci.elements[0]*=c,Ci.elements[1]*=c,Ci.elements[2]*=c,Ci.elements[4]*=u,Ci.elements[5]*=u,Ci.elements[6]*=u,Ci.elements[8]*=f,Ci.elements[9]*=f,Ci.elements[10]*=f,t.setFromRotationMatrix(Ci),i.x=r,i.y=o,i.z=a,this}makePerspective(e,t,i,s,r,o,a=_i){const l=this.elements,c=2*r/(t-e),u=2*r/(i-s),f=(t+e)/(t-e),h=(i+s)/(i-s);let d,p;if(a===_i)d=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===hc)d=-o/(o-r),p=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=d,l[14]=p,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,s,r,o,a=_i){const l=this.elements,c=1/(t-e),u=1/(i-s),f=1/(o-r),h=(t+e)*c,d=(i+s)*u;let p,_;if(a===_i)p=(o+r)*f,_=-2*f;else if(a===hc)p=r*f,_=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-d,l[2]=0,l[6]=0,l[10]=_,l[14]=-p,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<16;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Ho=new k,Ci=new Ze,bP=new k(0,0,0),xP=new k(1,1,1),Qs=new k,gu=new k,ii=new k,gy=new Ze,_y=new Jn;class li{constructor(e=0,t=0,i=0,s=li.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,s=this._order){return this._x=e,this._y=t,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],c=s[5],u=s[9],f=s[2],h=s[6],d=s[10];switch(t){case"XYZ":this._y=Math.asin(st(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-st(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,r),this._z=0);break;case"ZXY":this._x=Math.asin(st(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,d),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-st(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(st(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-st(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return gy.makeRotationFromQuaternion(e),this.setFromRotationMatrix(gy,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return _y.setFromEuler(this),this.setFromQuaternion(_y,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}li.DEFAULT_ORDER="XYZ";class Bc{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(a=>({...a})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(e),s.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){s.children=[];for(let a=0;a0){s.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),d.length>0&&(i.animations=d),p.length>0&&(i.nodes=p)}return i.object=s,i;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,t,i,s,r){Ri.subVectors(s,t),gs.subVectors(i,t),Ip.subVectors(e,t);const o=Ri.dot(Ri),a=Ri.dot(gs),l=Ri.dot(Ip),c=gs.dot(gs),u=gs.dot(Ip),f=o*c-a*a;if(f===0)return r.set(0,0,0),null;const h=1/f,d=(c*l-a*u)*h,p=(o*u-a*l)*h;return r.set(1-d-p,p,d)}static containsPoint(e,t,i,s){return this.getBarycoord(e,t,i,s,_s)===null?!1:_s.x>=0&&_s.y>=0&&_s.x+_s.y<=1}static getInterpolation(e,t,i,s,r,o,a,l){return this.getBarycoord(e,t,i,s,_s)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,_s.x),l.addScaledVector(o,_s.y),l.addScaledVector(a,_s.z),l)}static getInterpolatedAttribute(e,t,i,s,r,o){return Np.setScalar(0),Up.setScalar(0),Fp.setScalar(0),Np.fromBufferAttribute(e,t),Up.fromBufferAttribute(e,i),Fp.fromBufferAttribute(e,s),o.setScalar(0),o.addScaledVector(Np,r.x),o.addScaledVector(Up,r.y),o.addScaledVector(Fp,r.z),o}static isFrontFacing(e,t,i,s){return Ri.subVectors(i,t),gs.subVectors(e,t),Ri.cross(gs).dot(s)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,s){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,i,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ri.subVectors(this.c,this.b),gs.subVectors(this.a,this.b),Ri.cross(gs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return jn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return jn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,s,r){return jn.getInterpolation(e,this.a,this.b,this.c,t,i,s,r)}containsPoint(e){return jn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return jn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,s=this.b,r=this.c;let o,a;Xo.subVectors(s,i),$o.subVectors(r,i),Lp.subVectors(e,i);const l=Xo.dot(Lp),c=$o.dot(Lp);if(l<=0&&c<=0)return t.copy(i);Dp.subVectors(e,s);const u=Xo.dot(Dp),f=$o.dot(Dp);if(u>=0&&f<=u)return t.copy(s);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(Xo,o);Op.subVectors(e,r);const d=Xo.dot(Op),p=$o.dot(Op);if(p>=0&&d<=p)return t.copy(r);const _=d*c-l*p;if(_<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector($o,a);const g=u*p-d*f;if(g<=0&&f-u>=0&&d-p>=0)return Sy.subVectors(r,s),a=(f-u)/(f-u+(d-p)),t.copy(s).addScaledVector(Sy,a);const m=1/(g+_+h);return o=_*m,a=h*m,t.copy(i).addScaledVector(Xo,o).addScaledVector($o,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const lE={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},er={h:0,s:0,l:0},vu={h:0,s:0,l:0};function kp(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Pe{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Fn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,pt.colorSpaceToWorking(this,t),this}setRGB(e,t,i,s=pt.workingColorSpace){return this.r=e,this.g=t,this.b=i,pt.colorSpaceToWorking(this,s),this}setHSL(e,t,i,s=pt.workingColorSpace){if(e=t_(e,1),t=st(t,0,1),i=st(i,0,1),t===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+t):i+t-i*t,o=2*i-r;this.r=kp(o,r,e+1/3),this.g=kp(o,r,e),this.b=kp(o,r,e-1/3)}return pt.colorSpaceToWorking(this,s),this}setStyle(e,t=Fn){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=s[1],a=s[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Fn){const i=lE[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Os(e.r),this.g=Os(e.g),this.b=Os(e.b),this}copyLinearToSRGB(e){return this.r=_a(e.r),this.g=_a(e.g),this.b=_a(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Fn){return pt.workingToColorSpace(Sn.copy(this),e),Math.round(st(Sn.r*255,0,255))*65536+Math.round(st(Sn.g*255,0,255))*256+Math.round(st(Sn.b*255,0,255))}getHexString(e=Fn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=pt.workingColorSpace){pt.workingToColorSpace(Sn.copy(this),t);const i=Sn.r,s=Sn.g,r=Sn.b,o=Math.max(i,s,r),a=Math.min(i,s,r);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=u<=.5?f/(o+a):f/(2-o-a),o){case i:l=(s-r)/f+(s0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==_o&&(i.blending=this.blending),this.side!==Bs&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Gf&&(i.blendSrc=this.blendSrc),this.blendDst!==Wf&&(i.blendDst=this.blendDst),this.blendEquation!==hr&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==So&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_g&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==so&&(i.stencilFail=this.stencilFail),this.stencilZFail!==so&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==so&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=s(e.textures),o=s(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const s=t.length;i=new Array(s);for(let r=0;r!==s;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Xs extends Pn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Pe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const As=AP();function AP(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),s=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(i[l]=0,i[l|256]=32768,s[l]=24,s[l|256]=24):c<-14?(i[l]=1024>>-c-14,i[l|256]=1024>>-c-14|32768,s[l]=-c-1,s[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,s[l]=13,s[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,s[l]=24,s[l|256]=24):(i[l]=31744,i[l|256]=64512,s[l]=13,s[l|256]=13)}const r=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;(c&8388608)===0;)c<<=1,u-=8388608;c&=-8388609,u+=947912704,r[l]=c|u}for(let l=1024;l<2048;++l)r[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:s,mantissaTable:r,exponentTable:o,offsetTable:a}}function $n(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=st(n,-65504,65504),As.floatView[0]=n;const e=As.uint32View[0],t=e>>23&511;return As.baseTable[t]+((e&8388607)>>As.shiftTable[t])}function _l(n){const e=n>>10;return As.uint32View[0]=As.mantissaTable[As.offsetTable[e]+(n&1023)]+As.exponentTable[e],As.floatView[0]}class CP{static toHalfFloat(e){return $n(e)}static fromHalfFloat(e){return _l(e)}}const Kt=new k,yu=new fe;let RP=0;class Pt{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:RP++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=fc,this.updateRanges=[],this.gpuType=Kn,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let s=0,r=this.itemSize;st.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Cn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new k(-1/0,-1/0,-1/0),new k(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,s=t.length;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(s[l]=u,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const s=e.attributes;for(const c in s){const u=s[c];this.setAttribute(c,u.clone(t))}const r=e.morphAttributes;for(const c in r){const u=[],f=r[c];for(let h=0,d=f.length;h0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r(e.far-e.near)**2))&&(Ey.copy(r).invert(),Gr.copy(e.ray).applyMatrix4(Ey),!(i.boundingBox!==null&&Gr.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Gr)))}_computeIntersections(e,t,i){let s;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,c=r.attributes.uv,u=r.attributes.uv1,f=r.attributes.normal,h=r.groups,d=r.drawRange;if(a!==null)if(Array.isArray(o))for(let p=0,_=h.length;p<_;p++){const g=h[p],m=o[g.materialIndex],v=Math.max(g.start,d.start),b=Math.min(a.count,Math.min(g.start+g.count,d.start+d.count));for(let y=v,T=b;yt.far?null:{distance:c,point:Tu.clone(),object:n}}function wu(n,e,t,i,s,r,o,a,l,c){n.getVertexPosition(a,xu),n.getVertexPosition(l,Mu),n.getVertexPosition(c,Su);const u=FP(n,e,t,i,xu,Mu,Su,wy);if(u){const f=new k;jn.getBarycoord(wy,xu,Mu,Su,f),s&&(u.uv=jn.getInterpolatedAttribute(s,a,l,c,f,new fe)),r&&(u.uv1=jn.getInterpolatedAttribute(r,a,l,c,f,new fe)),o&&(u.normal=jn.getInterpolatedAttribute(o,a,l,c,f,new k),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new k,materialIndex:0};jn.getNormal(xu,Mu,Su,h.normal),u.face=h,u.barycoord=f}return u}class Ro extends ct{constructor(e=1,t=1,i=1,s=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:s,heightSegments:r,depthSegments:o};const a=this;s=Math.floor(s),r=Math.floor(r),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,d=0;p("z","y","x",-1,-1,i,t,e,o,r,0),p("z","y","x",1,-1,i,t,-e,o,r,1),p("x","z","y",1,1,e,i,t,s,o,2),p("x","z","y",1,-1,e,i,-t,s,o,3),p("x","y","z",1,-1,e,t,i,s,r,4),p("x","y","z",-1,-1,e,t,-i,s,r,5),this.setIndex(l),this.setAttribute("position",new ke(c,3)),this.setAttribute("normal",new ke(u,3)),this.setAttribute("uv",new ke(f,2));function p(_,g,m,v,b,y,T,w,E,P,M){const S=y/E,D=T/P,B=y/2,z=T/2,V=w/2,Q=E+1,j=P+1;let te=0,Z=0;const pe=new k;for(let Me=0;Me0?1:-1,u.push(pe.x,pe.y,pe.z),f.push(xe/E),f.push(1-Me/P),te+=1}}for(let Me=0;Me>8&255]+Mn[n>>16&255]+Mn[n>>24&255]+"-"+Mn[e&255]+Mn[e>>8&255]+"-"+Mn[e>>16&15|64]+Mn[e>>24&255]+"-"+Mn[t&63|128]+Mn[t>>8&255]+"-"+Mn[t>>16&255]+Mn[t>>24&255]+Mn[i&255]+Mn[i>>8&255]+Mn[i>>16&255]+Mn[i>>24&255]).toLowerCase()}function st(n,e,t){return Math.max(e,Math.min(t,n))}function t_(n,e){return(n%e+e)%e}function Y3(n,e,t,i,s){return i+(n-e)*(s-i)/(t-e)}function j3(n,e,t){return n!==e?(t-n)/(e-n):0}function Ll(n,e,t){return(1-t)*n+t*e}function K3(n,e,t,i){return Ll(n,e,1-Math.exp(-t*i))}function Z3(n,e=1){return e-Math.abs(t_(n,e*2)-e)}function J3(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function Q3(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function eP(n,e){return n+Math.floor(Math.random()*(e-n+1))}function tP(n,e){return n+Math.random()*(e-n)}function nP(n){return n*(.5-Math.random())}function iP(n){n!==void 0&&(fy=n);let e=fy+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function sP(n){return n*vo}function rP(n){return n*Ca}function oP(n){return(n&n-1)===0&&n!==0}function aP(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function lP(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function cP(n,e,t,i,s){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),c=r((e+i)/2),u=o((e+i)/2),f=r((e-i)/2),h=o((e-i)/2),d=r((i-e)/2),p=o((i-e)/2);switch(s){case"XYX":n.set(a*u,l*f,l*h,a*c);break;case"YZY":n.set(l*h,a*u,l*f,a*c);break;case"ZXZ":n.set(l*f,l*h,a*u,a*c);break;case"XZX":n.set(a*u,l*p,l*d,a*c);break;case"YXY":n.set(l*d,a*u,l*p,a*c);break;case"ZYZ":n.set(l*p,l*d,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function Bn(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function lt(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const n_={DEG2RAD:vo,RAD2DEG:Ca,generateUUID:oi,clamp:st,euclideanModulo:t_,mapLinear:Y3,inverseLerp:j3,lerp:Ll,damp:K3,pingpong:Z3,smoothstep:J3,smootherstep:Q3,randInt:eP,randFloat:tP,randFloatSpread:nP,seededRandom:iP,degToRad:sP,radToDeg:rP,isPowerOfTwo:oP,ceilPowerOfTwo:aP,floorPowerOfTwo:lP,setQuaternionFromProperEuler:cP,normalize:lt,denormalize:Bn};class fe{constructor(e=0,t=0){fe.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6],this.y=s[1]*t+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(st(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),s=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Qn{constructor(e=0,t=0,i=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=s}static slerpFlat(e,t,i,s,r,o,a){let l=i[s+0],c=i[s+1],u=i[s+2],f=i[s+3];const h=r[o+0],d=r[o+1],p=r[o+2],_=r[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f;return}if(a===1){e[t+0]=h,e[t+1]=d,e[t+2]=p,e[t+3]=_;return}if(f!==_||l!==h||c!==d||u!==p){let g=1-a;const m=l*h+c*d+u*p+f*_,v=m>=0?1:-1,b=1-m*m;if(b>Number.EPSILON){const T=Math.sqrt(b),w=Math.atan2(T,m*v);g=Math.sin(g*w)/T,a=Math.sin(a*w)/T}const y=a*v;if(l=l*g+h*y,c=c*g+d*y,u=u*g+p*y,f=f*g+_*y,g===1-a){const T=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=T,c*=T,u*=T,f*=T}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,s,r,o){const a=i[s],l=i[s+1],c=i[s+2],u=i[s+3],f=r[o],h=r[o+1],d=r[o+2],p=r[o+3];return e[t]=a*p+u*f+l*d-c*h,e[t+1]=l*p+u*h+c*f-a*d,e[t+2]=c*p+u*d+a*h-l*f,e[t+3]=u*p-a*f-l*h-c*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,s){return this._x=e,this._y=t,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,s=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(s/2),f=a(r/2),h=l(i/2),d=l(s/2),p=l(r/2);switch(o){case"XYZ":this._x=h*u*f+c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f-h*d*p;break;case"YXZ":this._x=h*u*f+c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f+h*d*p;break;case"ZXY":this._x=h*u*f-c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f-h*d*p;break;case"ZYX":this._x=h*u*f-c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f+h*d*p;break;case"YZX":this._x=h*u*f+c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f-h*d*p;break;case"XZY":this._x=h*u*f-c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f+h*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],s=t[4],r=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],f=t[10],h=i+a+f;if(h>0){const d=.5/Math.sqrt(h+1);this._w=.25/d,this._x=(u-l)*d,this._y=(r-c)*d,this._z=(o-s)*d}else if(i>a&&i>f){const d=2*Math.sqrt(1+i-a-f);this._w=(u-l)/d,this._x=.25*d,this._y=(s+o)/d,this._z=(r+c)/d}else if(a>f){const d=2*Math.sqrt(1+a-i-f);this._w=(r-c)/d,this._x=(s+o)/d,this._y=.25*d,this._z=(l+u)/d}else{const d=2*Math.sqrt(1+f-i-a);this._w=(o-s)/d,this._x=(r+c)/d,this._y=(l+u)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(st(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,t/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,s=e._y,r=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+s*c-r*l,this._y=s*u+o*l+r*a-i*c,this._z=r*u+o*c+i*l-s*a,this._w=o*u-i*a-s*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const d=1-t;return this._w=d*o+t*this._w,this._x=d*i+t*this._x,this._y=d*s+t*this._y,this._z=d*r+t*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-t)*u)/c,h=Math.sin(t*u)/c;return this._w=o*f+this._w*h,this._x=i*f+this._x*h,this._y=s*f+this._y*h,this._z=r*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),r=Math.sqrt(i);return this.set(s*Math.sin(e),s*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class k{constructor(e=0,t=0,i=0){k.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(hy.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(hy.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*s,this.y=r[1]*t+r[4]*i+r[7]*s,this.z=r[2]*t+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*t+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*t+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*t+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*s-a*i),u=2*(a*t-r*s),f=2*(r*i-o*t);return this.x=t+l*c+o*f-a*u,this.y=i+l*u+a*c-r*f,this.z=s+l*f+r*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*s,this.y=r[1]*t+r[5]*i+r[9]*s,this.z=r[2]*t+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this.z=st(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this.z=st(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,s=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return xp.copy(this).projectOnVector(e),this.sub(xp)}reflect(e){return this.sub(xp.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(st(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return t*t+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const s=Math.sin(t)*e;return this.x=s*Math.sin(i),this.y=Math.cos(t)*e,this.z=s*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const xp=new k,hy=new Qn;class at{constructor(e,t,i,s,r,o,a,l,c){at.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,c)}set(e,t,i,s,r,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=s,u[2]=a,u[3]=t,u[4]=r,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],f=i[7],h=i[2],d=i[5],p=i[8],_=s[0],g=s[3],m=s[6],v=s[1],b=s[4],y=s[7],T=s[2],w=s[5],S=s[8];return r[0]=o*_+a*v+l*T,r[3]=o*g+a*b+l*w,r[6]=o*m+a*y+l*S,r[1]=c*_+u*v+f*T,r[4]=c*g+u*b+f*w,r[7]=c*m+u*y+f*S,r[2]=h*_+d*v+p*T,r[5]=h*g+d*b+p*w,r[8]=h*m+d*y+p*S,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-i*r*u+i*a*l+s*r*c-s*o*l}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*o-a*c,h=a*l-u*r,d=c*r-o*l,p=t*f+i*h+s*d;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/p;return e[0]=f*_,e[1]=(s*c-u*i)*_,e[2]=(a*i-s*o)*_,e[3]=h*_,e[4]=(u*t-s*l)*_,e[5]=(s*r-a*t)*_,e[6]=d*_,e[7]=(i*l-c*t)*_,e[8]=(o*t-i*r)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,s,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-s*c,s*l,-s*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Mp.makeScale(e,t)),this}rotate(e){return this.premultiply(Mp.makeRotation(-e)),this}translate(e,t){return this.premultiply(Mp.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<9;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Mp=new at;function rE(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const uP={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function la(n,e){return new uP[n](e)}function dc(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function oE(){const n=dc("canvas");return n.style.display="block",n}const dy={};function ga(n){n in dy||(dy[n]=!0,console.warn(n))}function fP(n,e,t){return new Promise(function(i,s){function r(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:s();break;case n.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:i()}}setTimeout(r,t)})}function hP(n){const e=n.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function dP(n){const e=n.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const py=new at().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),my=new at().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function pP(){const n={enabled:!0,workingColorSpace:Eo,spaces:{},convert:function(s,r,o){return this.enabled===!1||r===o||!r||!o||(this.spaces[r].transfer===Ct&&(s.r=Os(s.r),s.g=Os(s.g),s.b=Os(s.b)),this.spaces[r].primaries!==this.spaces[o].primaries&&(s.applyMatrix3(this.spaces[r].toXYZ),s.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===Ct&&(s.r=_a(s.r),s.g=_a(s.g),s.b=_a(s.b))),s},workingToColorSpace:function(s,r){return this.convert(s,this.workingColorSpace,r)},colorSpaceToWorking:function(s,r){return this.convert(s,r,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===ws?uc:this.spaces[s].transfer},getLuminanceCoefficients:function(s,r=this.workingColorSpace){return s.fromArray(this.spaces[r].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,r,o){return s.copy(this.spaces[r].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,r){return ga("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(s,r)},toWorkingColorSpace:function(s,r){return ga("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(s,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[Eo]:{primaries:e,whitePoint:i,transfer:uc,toXYZ:py,fromXYZ:my,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Fn},outputColorSpaceConfig:{drawingBufferColorSpace:Fn}},[Fn]:{primaries:e,whitePoint:i,transfer:Ct,toXYZ:py,fromXYZ:my,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Fn}}}),n}const pt=pP();function Os(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function _a(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let ko;class aE{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{ko===void 0&&(ko=dc("canvas")),ko.width=e.width,ko.height=e.height;const s=ko.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),i=ko}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=dc("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),r=s.data;for(let o=0;o1),this.pmremVersion=0}get width(){return this.source.getSize(Ep).x}get height(){return this.source.getSize(Ep).y}get depth(){return this.source.getSize(Ep).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}s&&i&&s.isVector2&&i.isVector2||s&&i&&s.isVector3&&i.isVector3||s&&i&&s.isMatrix3&&i.isMatrix3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==od)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case oc:e.x=e.x-Math.floor(e.x);break;case gi:e.x=e.x<0?0:1;break;case ac:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case oc:e.y=e.y-Math.floor(e.y);break;case gi:e.y=e.y<0?0:1;break;case ac:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}$t.DEFAULT_IMAGE=null;$t.DEFAULT_MAPPING=od;$t.DEFAULT_ANISOTROPY=1;class vt{constructor(e=0,t=0,i=0,s=1){vt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,s){return this.x=e,this.y=t,this.z=i,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*t+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*t+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*t+o[7]*i+o[11]*s+o[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,s,r;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],d=l[5],p=l[9],_=l[2],g=l[6],m=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-_)<.01&&Math.abs(p-g)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+_)<.1&&Math.abs(p+g)<.1&&Math.abs(c+d+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,y=(d+1)/2,T=(m+1)/2,w=(u+h)/4,S=(f+_)/4,P=(p+g)/4;return b>y&&b>T?b<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(b),s=w/i,r=S/i):y>T?y<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(y),i=w/s,r=P/s):T<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(T),i=S/r,s=P/r),this.set(i,s,r,t),this}let v=Math.sqrt((g-p)*(g-p)+(f-_)*(f-_)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(g-p)/v,this.y=(f-_)/v,this.z=(h-u)/v,this.w=Math.acos((c+d+m-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this.z=st(this.z,e.z,t.z),this.w=st(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this.z=st(this.z,e,t),this.w=st(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class i_ extends as{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:nn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new vt(0,0,e,t),this.scissorTest=!1,this.viewport=new vt(0,0,e,t);const s={width:e,height:t,depth:i.depth},r=new $t(s);this.textures=[];const o=i.count;for(let a=0;a1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ai),Ai.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ja),hu.subVectors(this.max,Ja),Bo.subVectors(e.a,Ja),zo.subVectors(e.b,Ja),Vo.subVectors(e.c,Ja),Ks.subVectors(zo,Bo),Zs.subVectors(Vo,zo),Vr.subVectors(Bo,Vo);let t=[0,-Ks.z,Ks.y,0,-Zs.z,Zs.y,0,-Vr.z,Vr.y,Ks.z,0,-Ks.x,Zs.z,0,-Zs.x,Vr.z,0,-Vr.x,-Ks.y,Ks.x,0,-Zs.y,Zs.x,0,-Vr.y,Vr.x,0];return!Tp(t,Bo,zo,Vo,hu)||(t=[1,0,0,0,1,0,0,0,1],!Tp(t,Bo,zo,Vo,hu))?!1:(du.crossVectors(Ks,Zs),t=[du.x,du.y,du.z],Tp(t,Bo,zo,Vo,hu))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ai).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ai).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ds[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ds[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ds[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ds[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ds[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ds[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ds[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ds[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ds),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const ds=[new k,new k,new k,new k,new k,new k,new k,new k],Ai=new k,fu=new Cn,Bo=new k,zo=new k,Vo=new k,Ks=new k,Zs=new k,Vr=new k,Ja=new k,hu=new k,du=new k,Hr=new k;function Tp(n,e,t,i,s){for(let r=0,o=n.length-3;r<=o;r+=3){Hr.fromArray(n,r);const a=s.x*Math.abs(Hr.x)+s.y*Math.abs(Hr.y)+s.z*Math.abs(Hr.z),l=e.dot(Hr),c=t.dot(Hr),u=i.dot(Hr);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const yP=new Cn,Qa=new k,wp=new k;class bn{constructor(e=new k,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):yP.setFromPoints(e).getCenter(i);let s=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Qa.subVectors(e,this.center);const t=Qa.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),s=(i-this.radius)*.5;this.center.addScaledVector(Qa,s/i),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(wp.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Qa.copy(e.center).add(wp)),this.expandByPoint(Qa.copy(e.center).sub(wp))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const ps=new k,Ap=new k,pu=new k,Js=new k,Cp=new k,mu=new k,Rp=new k;class Va{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ps)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ps.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ps.copy(this.origin).addScaledVector(this.direction,t),ps.distanceToSquared(e))}distanceSqToSegment(e,t,i,s){Ap.copy(e).add(t).multiplyScalar(.5),pu.copy(t).sub(e).normalize(),Js.copy(this.origin).sub(Ap);const r=e.distanceTo(t)*.5,o=-this.direction.dot(pu),a=Js.dot(this.direction),l=-Js.dot(pu),c=Js.lengthSq(),u=Math.abs(1-o*o);let f,h,d,p;if(u>0)if(f=o*l-a,h=o*a-l,p=r*u,f>=0)if(h>=-p)if(h<=p){const _=1/u;f*=_,h*=_,d=f*(f+o*h+2*a)+h*(o*f+h+2*l)+c}else h=r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h=-r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h<=-p?(f=Math.max(0,-(-o*r+a)),h=f>0?-r:Math.min(Math.max(-r,-l),r),d=-f*f+h*(h+2*l)+c):h<=p?(f=0,h=Math.min(Math.max(-r,-l),r),d=h*(h+2*l)+c):(f=Math.max(0,-(o*r+a)),h=f>0?r:Math.min(Math.max(-r,-l),r),d=-f*f+h*(h+2*l)+c);else h=o>0?-r:r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,f),s&&s.copy(Ap).addScaledVector(pu,h),d}intersectSphere(e,t){ps.subVectors(e.center,this.origin);const i=ps.dot(this.direction),s=ps.dot(ps)-i*i,r=e.radius*e.radius;if(s>r)return null;const o=Math.sqrt(r-s),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,s,r,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(i=(e.min.x-h.x)*c,s=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,s=(e.min.x-h.x)*c),u>=0?(r=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||r>s||((r>i||isNaN(i))&&(i=r),(o=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),i>l||a>s)||((a>i||i!==i)&&(i=a),(l=0?i:s,t)}intersectsBox(e){return this.intersectBox(e,ps)!==null}intersectTriangle(e,t,i,s,r){Cp.subVectors(t,e),mu.subVectors(i,e),Rp.crossVectors(Cp,mu);let o=this.direction.dot(Rp),a;if(o>0){if(s)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Js.subVectors(this.origin,e);const l=a*this.direction.dot(mu.crossVectors(Js,mu));if(l<0)return null;const c=a*this.direction.dot(Cp.cross(Js));if(c<0||l+c>o)return null;const u=-a*Js.dot(Rp);return u<0?null:this.at(u/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Ze{constructor(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g){Ze.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g)}set(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=s,m[1]=r,m[5]=o,m[9]=a,m[13]=l,m[2]=c,m[6]=u,m[10]=f,m[14]=h,m[3]=d,m[7]=p,m[11]=_,m[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Ze().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,s=1/Ho.setFromMatrixColumn(e,0).length(),r=1/Ho.setFromMatrixColumn(e,1).length(),o=1/Ho.setFromMatrixColumn(e,2).length();return t[0]=i[0]*s,t[1]=i[1]*s,t[2]=i[2]*s,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,s=e.y,r=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),c=Math.sin(s),u=Math.cos(r),f=Math.sin(r);if(e.order==="XYZ"){const h=o*u,d=o*f,p=a*u,_=a*f;t[0]=l*u,t[4]=-l*f,t[8]=c,t[1]=d+p*c,t[5]=h-_*c,t[9]=-a*l,t[2]=_-h*c,t[6]=p+d*c,t[10]=o*l}else if(e.order==="YXZ"){const h=l*u,d=l*f,p=c*u,_=c*f;t[0]=h+_*a,t[4]=p*a-d,t[8]=o*c,t[1]=o*f,t[5]=o*u,t[9]=-a,t[2]=d*a-p,t[6]=_+h*a,t[10]=o*l}else if(e.order==="ZXY"){const h=l*u,d=l*f,p=c*u,_=c*f;t[0]=h-_*a,t[4]=-o*f,t[8]=p+d*a,t[1]=d+p*a,t[5]=o*u,t[9]=_-h*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const h=o*u,d=o*f,p=a*u,_=a*f;t[0]=l*u,t[4]=p*c-d,t[8]=h*c+_,t[1]=l*f,t[5]=_*c+h,t[9]=d*c-p,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const h=o*l,d=o*c,p=a*l,_=a*c;t[0]=l*u,t[4]=_-h*f,t[8]=p*f+d,t[1]=f,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=d*f+p,t[10]=h-_*f}else if(e.order==="XZY"){const h=o*l,d=o*c,p=a*l,_=a*c;t[0]=l*u,t[4]=-f,t[8]=c*u,t[1]=h*f+_,t[5]=o*u,t[9]=d*f-p,t[2]=p*f-d,t[6]=a*u,t[10]=_*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(bP,e,xP)}lookAt(e,t,i){const s=this.elements;return ii.subVectors(e,t),ii.lengthSq()===0&&(ii.z=1),ii.normalize(),Qs.crossVectors(i,ii),Qs.lengthSq()===0&&(Math.abs(i.z)===1?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),Qs.crossVectors(i,ii)),Qs.normalize(),gu.crossVectors(ii,Qs),s[0]=Qs.x,s[4]=gu.x,s[8]=ii.x,s[1]=Qs.y,s[5]=gu.y,s[9]=ii.y,s[2]=Qs.z,s[6]=gu.z,s[10]=ii.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],f=i[5],h=i[9],d=i[13],p=i[2],_=i[6],g=i[10],m=i[14],v=i[3],b=i[7],y=i[11],T=i[15],w=s[0],S=s[4],P=s[8],M=s[12],E=s[1],D=s[5],B=s[9],z=s[13],V=s[2],Q=s[6],j=s[10],te=s[14],Z=s[3],pe=s[7],Me=s[11],re=s[15];return r[0]=o*w+a*E+l*V+c*Z,r[4]=o*S+a*D+l*Q+c*pe,r[8]=o*P+a*B+l*j+c*Me,r[12]=o*M+a*z+l*te+c*re,r[1]=u*w+f*E+h*V+d*Z,r[5]=u*S+f*D+h*Q+d*pe,r[9]=u*P+f*B+h*j+d*Me,r[13]=u*M+f*z+h*te+d*re,r[2]=p*w+_*E+g*V+m*Z,r[6]=p*S+_*D+g*Q+m*pe,r[10]=p*P+_*B+g*j+m*Me,r[14]=p*M+_*z+g*te+m*re,r[3]=v*w+b*E+y*V+T*Z,r[7]=v*S+b*D+y*Q+T*pe,r[11]=v*P+b*B+y*j+T*Me,r[15]=v*M+b*z+y*te+T*re,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],d=e[14],p=e[3],_=e[7],g=e[11],m=e[15];return p*(+r*l*f-s*c*f-r*a*h+i*c*h+s*a*d-i*l*d)+_*(+t*l*d-t*c*h+r*o*h-s*o*d+s*c*u-r*l*u)+g*(+t*c*f-t*a*d-r*o*f+i*o*d+r*a*u-i*c*u)+m*(-s*a*u-t*l*f+t*a*h+s*o*f-i*o*h+i*l*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],_=e[13],g=e[14],m=e[15],v=f*g*c-_*h*c+_*l*d-a*g*d-f*l*m+a*h*m,b=p*h*c-u*g*c-p*l*d+o*g*d+u*l*m-o*h*m,y=u*_*c-p*f*c+p*a*d-o*_*d-u*a*m+o*f*m,T=p*f*l-u*_*l-p*a*h+o*_*h+u*a*g-o*f*g,w=t*v+i*b+s*y+r*T;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const S=1/w;return e[0]=v*S,e[1]=(_*h*r-f*g*r-_*s*d+i*g*d+f*s*m-i*h*m)*S,e[2]=(a*g*r-_*l*r+_*s*c-i*g*c-a*s*m+i*l*m)*S,e[3]=(f*l*r-a*h*r-f*s*c+i*h*c+a*s*d-i*l*d)*S,e[4]=b*S,e[5]=(u*g*r-p*h*r+p*s*d-t*g*d-u*s*m+t*h*m)*S,e[6]=(p*l*r-o*g*r-p*s*c+t*g*c+o*s*m-t*l*m)*S,e[7]=(o*h*r-u*l*r+u*s*c-t*h*c-o*s*d+t*l*d)*S,e[8]=y*S,e[9]=(p*f*r-u*_*r-p*i*d+t*_*d+u*i*m-t*f*m)*S,e[10]=(o*_*r-p*a*r+p*i*c-t*_*c-o*i*m+t*a*m)*S,e[11]=(u*a*r-o*f*r-u*i*c+t*f*c+o*i*d-t*a*d)*S,e[12]=T*S,e[13]=(u*_*s-p*f*s+p*i*h-t*_*h-u*i*g+t*f*g)*S,e[14]=(p*a*s-o*_*s-p*i*l+t*_*l+o*i*g-t*a*g)*S,e[15]=(o*f*s-u*a*s+u*i*l-t*f*l-o*i*h+t*a*h)*S,this}scale(e){const t=this.elements,i=e.x,s=e.y,r=e.z;return t[0]*=i,t[4]*=s,t[8]*=r,t[1]*=i,t[5]*=s,t[9]*=r,t[2]*=i,t[6]*=s,t[10]*=r,t[3]*=i,t[7]*=s,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,s))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),s=Math.sin(t),r=1-i,o=e.x,a=e.y,l=e.z,c=r*o,u=r*a;return this.set(c*o+i,c*a-s*l,c*l+s*a,0,c*a+s*l,u*a+i,u*l-s*o,0,c*l-s*a,u*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,t,s,1,0,0,0,0,1),this}compose(e,t,i){const s=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,c=r+r,u=o+o,f=a+a,h=r*c,d=r*u,p=r*f,_=o*u,g=o*f,m=a*f,v=l*c,b=l*u,y=l*f,T=i.x,w=i.y,S=i.z;return s[0]=(1-(_+m))*T,s[1]=(d+y)*T,s[2]=(p-b)*T,s[3]=0,s[4]=(d-y)*w,s[5]=(1-(h+m))*w,s[6]=(g+v)*w,s[7]=0,s[8]=(p+b)*S,s[9]=(g-v)*S,s[10]=(1-(h+_))*S,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,i){const s=this.elements;let r=Ho.set(s[0],s[1],s[2]).length();const o=Ho.set(s[4],s[5],s[6]).length(),a=Ho.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],Ci.copy(this);const c=1/r,u=1/o,f=1/a;return Ci.elements[0]*=c,Ci.elements[1]*=c,Ci.elements[2]*=c,Ci.elements[4]*=u,Ci.elements[5]*=u,Ci.elements[6]*=u,Ci.elements[8]*=f,Ci.elements[9]*=f,Ci.elements[10]*=f,t.setFromRotationMatrix(Ci),i.x=r,i.y=o,i.z=a,this}makePerspective(e,t,i,s,r,o,a=_i){const l=this.elements,c=2*r/(t-e),u=2*r/(i-s),f=(t+e)/(t-e),h=(i+s)/(i-s);let d,p;if(a===_i)d=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===hc)d=-o/(o-r),p=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=d,l[14]=p,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,s,r,o,a=_i){const l=this.elements,c=1/(t-e),u=1/(i-s),f=1/(o-r),h=(t+e)*c,d=(i+s)*u;let p,_;if(a===_i)p=(o+r)*f,_=-2*f;else if(a===hc)p=r*f,_=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-d,l[2]=0,l[6]=0,l[10]=_,l[14]=-p,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<16;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Ho=new k,Ci=new Ze,bP=new k(0,0,0),xP=new k(1,1,1),Qs=new k,gu=new k,ii=new k,gy=new Ze,_y=new Qn;class li{constructor(e=0,t=0,i=0,s=li.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,s=this._order){return this._x=e,this._y=t,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],c=s[5],u=s[9],f=s[2],h=s[6],d=s[10];switch(t){case"XYZ":this._y=Math.asin(st(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-st(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,r),this._z=0);break;case"ZXY":this._x=Math.asin(st(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,d),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-st(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(st(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-st(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return gy.makeRotationFromQuaternion(e),this.setFromRotationMatrix(gy,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return _y.setFromEuler(this),this.setFromQuaternion(_y,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}li.DEFAULT_ORDER="XYZ";class Bc{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(a=>({...a})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(e),s.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){s.children=[];for(let a=0;a0){s.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),d.length>0&&(i.animations=d),p.length>0&&(i.nodes=p)}return i.object=s,i;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,t,i,s,r){Ri.subVectors(s,t),gs.subVectors(i,t),Ip.subVectors(e,t);const o=Ri.dot(Ri),a=Ri.dot(gs),l=Ri.dot(Ip),c=gs.dot(gs),u=gs.dot(Ip),f=o*c-a*a;if(f===0)return r.set(0,0,0),null;const h=1/f,d=(c*l-a*u)*h,p=(o*u-a*l)*h;return r.set(1-d-p,p,d)}static containsPoint(e,t,i,s){return this.getBarycoord(e,t,i,s,_s)===null?!1:_s.x>=0&&_s.y>=0&&_s.x+_s.y<=1}static getInterpolation(e,t,i,s,r,o,a,l){return this.getBarycoord(e,t,i,s,_s)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,_s.x),l.addScaledVector(o,_s.y),l.addScaledVector(a,_s.z),l)}static getInterpolatedAttribute(e,t,i,s,r,o){return Np.setScalar(0),Up.setScalar(0),Fp.setScalar(0),Np.fromBufferAttribute(e,t),Up.fromBufferAttribute(e,i),Fp.fromBufferAttribute(e,s),o.setScalar(0),o.addScaledVector(Np,r.x),o.addScaledVector(Up,r.y),o.addScaledVector(Fp,r.z),o}static isFrontFacing(e,t,i,s){return Ri.subVectors(i,t),gs.subVectors(e,t),Ri.cross(gs).dot(s)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,s){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,i,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ri.subVectors(this.c,this.b),gs.subVectors(this.a,this.b),Ri.cross(gs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Kn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Kn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,s,r){return Kn.getInterpolation(e,this.a,this.b,this.c,t,i,s,r)}containsPoint(e){return Kn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Kn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,s=this.b,r=this.c;let o,a;Xo.subVectors(s,i),$o.subVectors(r,i),Lp.subVectors(e,i);const l=Xo.dot(Lp),c=$o.dot(Lp);if(l<=0&&c<=0)return t.copy(i);Dp.subVectors(e,s);const u=Xo.dot(Dp),f=$o.dot(Dp);if(u>=0&&f<=u)return t.copy(s);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(Xo,o);Op.subVectors(e,r);const d=Xo.dot(Op),p=$o.dot(Op);if(p>=0&&d<=p)return t.copy(r);const _=d*c-l*p;if(_<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector($o,a);const g=u*p-d*f;if(g<=0&&f-u>=0&&d-p>=0)return Sy.subVectors(r,s),a=(f-u)/(f-u+(d-p)),t.copy(s).addScaledVector(Sy,a);const m=1/(g+_+h);return o=_*m,a=h*m,t.copy(i).addScaledVector(Xo,o).addScaledVector($o,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const lE={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},er={h:0,s:0,l:0},vu={h:0,s:0,l:0};function kp(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Pe{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Fn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,pt.colorSpaceToWorking(this,t),this}setRGB(e,t,i,s=pt.workingColorSpace){return this.r=e,this.g=t,this.b=i,pt.colorSpaceToWorking(this,s),this}setHSL(e,t,i,s=pt.workingColorSpace){if(e=t_(e,1),t=st(t,0,1),i=st(i,0,1),t===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+t):i+t-i*t,o=2*i-r;this.r=kp(o,r,e+1/3),this.g=kp(o,r,e),this.b=kp(o,r,e-1/3)}return pt.colorSpaceToWorking(this,s),this}setStyle(e,t=Fn){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=s[1],a=s[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Fn){const i=lE[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Os(e.r),this.g=Os(e.g),this.b=Os(e.b),this}copyLinearToSRGB(e){return this.r=_a(e.r),this.g=_a(e.g),this.b=_a(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Fn){return pt.workingToColorSpace(Sn.copy(this),e),Math.round(st(Sn.r*255,0,255))*65536+Math.round(st(Sn.g*255,0,255))*256+Math.round(st(Sn.b*255,0,255))}getHexString(e=Fn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=pt.workingColorSpace){pt.workingToColorSpace(Sn.copy(this),t);const i=Sn.r,s=Sn.g,r=Sn.b,o=Math.max(i,s,r),a=Math.min(i,s,r);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=u<=.5?f/(o+a):f/(2-o-a),o){case i:l=(s-r)/f+(s0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==_o&&(i.blending=this.blending),this.side!==Bs&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Gf&&(i.blendSrc=this.blendSrc),this.blendDst!==Wf&&(i.blendDst=this.blendDst),this.blendEquation!==hr&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==So&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_g&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==so&&(i.stencilFail=this.stencilFail),this.stencilZFail!==so&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==so&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=s(e.textures),o=s(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const s=t.length;i=new Array(s);for(let r=0;r!==s;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Xs extends Pn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Pe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const As=AP();function AP(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),s=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(i[l]=0,i[l|256]=32768,s[l]=24,s[l|256]=24):c<-14?(i[l]=1024>>-c-14,i[l|256]=1024>>-c-14|32768,s[l]=-c-1,s[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,s[l]=13,s[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,s[l]=24,s[l|256]=24):(i[l]=31744,i[l|256]=64512,s[l]=13,s[l|256]=13)}const r=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;(c&8388608)===0;)c<<=1,u-=8388608;c&=-8388609,u+=947912704,r[l]=c|u}for(let l=1024;l<2048;++l)r[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:s,mantissaTable:r,exponentTable:o,offsetTable:a}}function qn(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=st(n,-65504,65504),As.floatView[0]=n;const e=As.uint32View[0],t=e>>23&511;return As.baseTable[t]+((e&8388607)>>As.shiftTable[t])}function _l(n){const e=n>>10;return As.uint32View[0]=As.mantissaTable[As.offsetTable[e]+(n&1023)]+As.exponentTable[e],As.floatView[0]}class CP{static toHalfFloat(e){return qn(e)}static fromHalfFloat(e){return _l(e)}}const Kt=new k,yu=new fe;let RP=0;class Pt{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:RP++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=fc,this.updateRanges=[],this.gpuType=Zn,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let s=0,r=this.itemSize;st.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Cn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new k(-1/0,-1/0,-1/0),new k(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,s=t.length;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(s[l]=u,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const s=e.attributes;for(const c in s){const u=s[c];this.setAttribute(c,u.clone(t))}const r=e.morphAttributes;for(const c in r){const u=[],f=r[c];for(let h=0,d=f.length;h0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r(e.far-e.near)**2))&&(Ey.copy(r).invert(),Gr.copy(e.ray).applyMatrix4(Ey),!(i.boundingBox!==null&&Gr.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Gr)))}_computeIntersections(e,t,i){let s;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,c=r.attributes.uv,u=r.attributes.uv1,f=r.attributes.normal,h=r.groups,d=r.drawRange;if(a!==null)if(Array.isArray(o))for(let p=0,_=h.length;p<_;p++){const g=h[p],m=o[g.materialIndex],v=Math.max(g.start,d.start),b=Math.min(a.count,Math.min(g.start+g.count,d.start+d.count));for(let y=v,T=b;yt.far?null:{distance:c,point:Tu.clone(),object:n}}function wu(n,e,t,i,s,r,o,a,l,c){n.getVertexPosition(a,xu),n.getVertexPosition(l,Mu),n.getVertexPosition(c,Su);const u=FP(n,e,t,i,xu,Mu,Su,wy);if(u){const f=new k;Kn.getBarycoord(wy,xu,Mu,Su,f),s&&(u.uv=Kn.getInterpolatedAttribute(s,a,l,c,f,new fe)),r&&(u.uv1=Kn.getInterpolatedAttribute(r,a,l,c,f,new fe)),o&&(u.normal=Kn.getInterpolatedAttribute(o,a,l,c,f,new k),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new k,materialIndex:0};Kn.getNormal(xu,Mu,Su,h.normal),u.face=h,u.barycoord=f}return u}class Ro extends ct{constructor(e=1,t=1,i=1,s=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:s,heightSegments:r,depthSegments:o};const a=this;s=Math.floor(s),r=Math.floor(r),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,d=0;p("z","y","x",-1,-1,i,t,e,o,r,0),p("z","y","x",1,-1,i,t,-e,o,r,1),p("x","z","y",1,1,e,i,t,s,o,2),p("x","z","y",1,-1,e,i,-t,s,o,3),p("x","y","z",1,-1,e,t,i,s,r,4),p("x","y","z",-1,-1,e,t,-i,s,r,5),this.setIndex(l),this.setAttribute("position",new ke(c,3)),this.setAttribute("normal",new ke(u,3)),this.setAttribute("uv",new ke(f,2));function p(_,g,m,v,b,y,T,w,S,P,M){const E=y/S,D=T/P,B=y/2,z=T/2,V=w/2,Q=S+1,j=P+1;let te=0,Z=0;const pe=new k;for(let Me=0;Me0?1:-1,u.push(pe.x,pe.y,pe.z),f.push(xe/S),f.push(1-Me/P),te+=1}}for(let Me=0;Mee in n?aC(n,e,{enumerable:!0,config gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},s=new Ro(5,5,5),r=new zi({name:"CubemapFromEquirect",uniforms:Ra(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Vn,blending:Ds});r.uniforms.tEquirect.value=t;const o=new jt(s,r),a=t.minFilter;return t.minFilter===Qi&&(t.minFilter=nn),new fE(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,i=!0,s=!0){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,s);e.setRenderTarget(r)}}class ca extends gt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const VP={type:"move"};class Sf{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new ca,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new ca,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new k,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new k),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new ca,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new k,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new k),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let s=null,r=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const g=t.getJointPose(_,i),m=this._getHandJoint(c,_);g!==null&&(m.matrix.fromArray(g.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,m.jointRadius=g.radius),m.visible=g!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),d=.02,p=.005;c.inputState.pinching&&h>d+p?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=d-p&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(s=t.getPose(e.targetRaySpace,i),s===null&&r!==null&&(s=r),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(VP)))}return a!==null&&(a.visible=s!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new ca;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class gd{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Pe(e),this.density=t}clone(){return new gd(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class _d{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Pe(e),this.near=t,this.far=i}clone(){return new _d(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class vd extends gt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new li,this.environmentIntensity=1,this.environmentRotation=new li,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class yd{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=fc,this.updateRanges=[],this.version=0,this.uuid=oi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let s=0,r=this.stride;se.far||t.push({distance:l,point:nl.clone(),uv:jn.getInterpolation(nl,Au,sl,Cu,Ry,Vp,Py,new fe),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Ru(n,e,t,i,s,r){Qo.subVectors(n,t).addScalar(.5).multiply(i),s!==void 0?(il.x=r*Qo.x-s*Qo.y,il.y=s*Qo.x+r*Qo.y):il.copy(Qo),n.copy(e),n.x+=il.x,n.y+=il.y,n.applyMatrix4(dE)}const Pu=new k,Iy=new k;class mE extends gt{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,s=t.length;i0){let i,s;for(i=1,s=t.length;i0){Pu.setFromMatrixPosition(this.matrixWorld);const s=e.ray.origin.distanceTo(Pu);this.getObjectForDistance(s).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Pu.setFromMatrixPosition(e.matrixWorld),Iy.setFromMatrixPosition(this.matrixWorld);const i=Pu.distanceTo(Iy)/e.zoom;t[0].object.visible=!0;let s,r;for(s=1,r=t.length;s=o)t[s-1].object.visible=!1,t[s].object.visible=!0;else break}for(this._currentLevel=s-1;s1?null:t.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||$P.getNormalMatrix(e),s=this.coplanarPoint(Wp).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Wr=new bn,Du=new k;class Ha{constructor(e=new ur,t=new ur,i=new ur,s=new ur,r=new ur,o=new ur){this.planes=[e,t,i,s,r,o]}set(e,t,i,s,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=_i){const i=this.planes,s=e.elements,r=s[0],o=s[1],a=s[2],l=s[3],c=s[4],u=s[5],f=s[6],h=s[7],d=s[8],p=s[9],_=s[10],g=s[11],m=s[12],v=s[13],b=s[14],y=s[15];if(i[0].setComponents(l-r,h-c,g-d,y-m).normalize(),i[1].setComponents(l+r,h+c,g+d,y+m).normalize(),i[2].setComponents(l+o,h+u,g+p,y+v).normalize(),i[3].setComponents(l-o,h-u,g-p,y-v).normalize(),i[4].setComponents(l-a,h-f,g-_,y-b).normalize(),t===_i)i[5].setComponents(l+a,h+f,g+_,y+b).normalize();else if(t===hc)i[5].setComponents(a,f,_,b).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Wr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Wr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Wr)}intersectsSprite(e){return Wr.center.set(0,0,0),Wr.radius=.7071067811865476,Wr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Wr)}intersectsSphere(e){const t=this.planes,i=e.center,s=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,Du.y=s.normal.y>0?e.max.y:e.min.y,Du.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(Du)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const Xi=new Ze,$i=new Ha;class xd{constructor(){this.coordinateSystem=_i}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let i=0;i=r.length&&r.push({start:-1,count:-1,z:-1,index:-1});const a=r[this.index];o.push(a),this.index++,a.start=e,a.count=t,a.z=i,a.index=s}reset(){this.list.length=0,this.index=0}}const Xn=new Ze,KP=new Pe(1,1,1),zy=new Ha,ZP=new xd,Ou=new Cn,Xr=new bn,al=new k,Vy=new k,JP=new k,$p=new jP,En=new jt,Nu=[];function QP(n,e,t=0){const i=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const s=n.count;for(let r=0;r65535?new Uint32Array(s):new Uint16Array(s);t.setIndex(new Pt(r,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(!e.hasAttribute(i))throw new Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const s=e.getAttribute(i),r=t.getAttribute(i);if(s.itemSize!==r.itemSize||s.normalized!==r.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Cn);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let i=0,s=t.length;i=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:e};let s=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Xp),s=this._availableInstanceIds.shift(),this._instanceInfo[s]=i):(s=this._instanceInfo.length,this._instanceInfo.push(i));const r=this._matricesTexture;Xn.identity().toArray(r.image.data,s*16),r.needsUpdate=!0;const o=this._colorsTexture;return o&&(KP.toArray(o.image.data,s*4),o.needsUpdate=!0),this._visibilityChanged=!0,s}addGeometry(e,t=-1,i=-1){this._initializeGeometry(e),this._validateGeometry(e);const s={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},r=this._geometryInfo;s.vertexStart=this._nextVertexStart,s.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const o=e.getIndex();if(o!==null&&(s.indexStart=this._nextIndexStart,s.reservedIndexCount=i===-1?o.count:i),s.indexStart!==-1&&s.indexStart+s.reservedIndexCount>this._maxIndexCount||s.vertexStart+s.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Xp),l=this._availableGeometryIds.shift(),r[l]=s):(l=this._geometryCount,this._geometryCount++,r.push(s)),this.setGeometryAt(l,e),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,l}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,s=i.getIndex()!==null,r=i.getIndex(),o=t.getIndex(),a=this._geometryInfo[e];if(s&&o.count>a.reservedIndexCount||t.attributes.position.count>a.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=t.getAttribute("position").count;for(const u in i.attributes){const f=t.getAttribute(u),h=i.getAttribute(u);QP(f,h,l);const d=f.itemSize;for(let p=f.count,_=c;p<_;p++){const g=l+p;for(let m=0;m=t.length||t[e].active===!1)return this;const i=this._instanceInfo;for(let s=0,r=i.length;sa).sort((o,a)=>i[o].vertexStart-i[a].vertexStart),r=this.geometry;for(let o=0,a=i.length;o=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingBox===null){const r=new Cn,o=i.index,a=i.attributes.position;for(let l=s.start,c=s.start+s.count;l=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingSphere===null){const r=new bn;this.getBoundingBoxAt(e,Ou),Ou.getCenter(r.center);const o=i.index,a=i.attributes.position;let l=0;for(let c=s.start,u=s.start+s.count;ca.active);if(Math.max(...i.map(a=>a.vertexStart+a.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(l=>l.indexStart+l.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const r=this.geometry;r.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new ct,this._initializeGeometry(r));const o=this.geometry;r.index&&$r(r.index.array,o.index.array);for(const a in r.attributes)$r(r.attributes[a].array,o.attributes[a].array)}raycast(e,t){const i=this._instanceInfo,s=this._geometryInfo,r=this.matrixWorld,o=this.geometry;En.material=this.material,En.geometry.index=o.index,En.geometry.attributes=o.attributes,En.geometry.boundingBox===null&&(En.geometry.boundingBox=new Cn),En.geometry.boundingSphere===null&&(En.geometry.boundingSphere=new bn);for(let a=0,l=i.length;a({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,i,s,r){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=s.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._geometryInfo,h=this.perObjectFrustumCulled,d=this._indirectTexture,p=d.image.data,_=i.isArrayCamera?ZP:zy;h&&!i.isArrayCamera&&(Xn.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),zy.setFromProjectionMatrix(Xn,e.coordinateSystem));let g=0;if(this.sortObjects){Xn.copy(this.matrixWorld).invert(),al.setFromMatrixPosition(i.matrixWorld).applyMatrix4(Xn),Vy.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(Xn);for(let b=0,y=l.length;b0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;ri)return;qp.applyMatrix4(n.matrixWorld);const c=e.ray.origin.distanceTo(qp);if(!(ce.far))return{distance:c,point:Gy.clone().applyMatrix4(n.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:n}}const Wy=new k,Xy=new k;class ls extends Sr{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[];for(let s=0,r=t.count;s0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;rs.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class xE extends $t{constructor(e,t,i,s,r=nn,o=nn,a,l,c){super(e,t,i,s,r,o,a,l,c),this.isVideoTexture=!0,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class eI extends xE{constructor(e,t,i,s,r,o,a,l){super({},e,t,i,s,r,o,a,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class tI extends $t{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=yn,this.minFilter=yn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Md extends $t{constructor(e,t,i,s,r,o,a,l,c,u,f,h){super(null,o,a,l,c,u,s,r,f,h),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class nI extends Md{constructor(e,t,i,s,r,o){super(e,t,i,r,o),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=gi,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class iI extends Md{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,zs),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class sI extends $t{constructor(e,t,i,s,r,o,a,l,c){super(e,t,i,s,r,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class c_ extends $t{constructor(e,t,i=Vs,s,r,o,a=yn,l=yn,c,u=wa,f=1){if(u!==wa&&u!==Aa)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const h={width:e,height:t,depth:f};super(h,s,r,o,a,l,u,i,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new dr(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class Sd extends ct{constructor(e=1,t=1,i=4,s=8,r=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:i,radialSegments:s,heightSegments:r},t=Math.max(0,t),i=Math.max(1,Math.floor(i)),s=Math.max(3,Math.floor(s)),r=Math.max(1,Math.floor(r));const o=[],a=[],l=[],c=[],u=t/2,f=Math.PI/2*e,h=t,d=2*f+h,p=i*2+r,_=s+1,g=new k,m=new k;for(let v=0;v<=p;v++){let b=0,y=0,T=0,w=0;if(v<=i){const M=v/i,S=M*Math.PI/2;y=-u-e*Math.cos(S),T=e*Math.sin(S),w=-e*Math.cos(S),b=M*f}else if(v<=i+r){const M=(v-i)/r;y=-u+M*t,T=e,w=0,b=f+M*h}else{const M=(v-i-r)/i,S=M*Math.PI/2;y=u+e*Math.sin(S),T=e*Math.cos(S),w=e*Math.sin(S),b=f+h+M*f}const E=Math.max(0,Math.min(1,b/d));let P=0;v===0?P=.5/s:v===p&&(P=-.5/s);for(let M=0;M<=s;M++){const S=M/s,D=S*Math.PI*2,B=Math.sin(D),z=Math.cos(D);m.x=-T*z,m.y=y,m.z=T*B,a.push(m.x,m.y,m.z),g.set(-T*z,w,T*B),g.normalize(),l.push(g.x,g.y,g.z),c.push(S+P,E)}if(v>0){const M=(v-1)*_;for(let S=0;S0&&b(!0),t>0&&b(!1)),this.setIndex(u),this.setAttribute("position",new ke(f,3)),this.setAttribute("normal",new ke(h,3)),this.setAttribute("uv",new ke(d,2));function v(){const y=new k,T=new k;let w=0;const E=(t-e)/i;for(let P=0;P<=r;P++){const M=[],S=P/r,D=S*(t-e)+e;for(let B=0;B<=s;B++){const z=B/s,V=z*l+a,Q=Math.sin(V),j=Math.cos(V);T.x=D*Q,T.y=-S*i+g,T.z=D*j,f.push(T.x,T.y,T.z),y.set(Q,E,j).normalize(),h.push(y.x,y.y,y.z),d.push(z,1-S),M.push(p++)}_.push(M)}for(let P=0;P0||M!==0)&&(u.push(S,D,z),w+=3),(t>0||M!==r-1)&&(u.push(D,B,z),w+=3)}c.addGroup(m,w,0),m+=w}function b(y){const T=p,w=new fe,E=new k;let P=0;const M=y===!0?e:t,S=y===!0?1:-1;for(let B=1;B<=s;B++)f.push(0,g*S,0),h.push(0,S,0),d.push(.5,.5),p++;const D=p;for(let B=0;B<=s;B++){const V=B/s*l+a,Q=Math.cos(V),j=Math.sin(V);E.x=M*j,E.y=g*S,E.z=M*Q,f.push(E.x,E.y,E.z),h.push(0,S,0),w.x=Q*.5+.5,w.y=j*.5*S+.5,d.push(w.x,w.y),p++}for(let B=0;B.9&&E<.1&&(b<.2&&(o[v+0]+=1),y<.2&&(o[v+2]+=1),T<.2&&(o[v+4]+=1))}}function h(v){r.push(v.x,v.y,v.z)}function d(v,b){const y=v*3;b.x=e[y+0],b.y=e[y+1],b.z=e[y+2]}function p(){const v=new k,b=new k,y=new k,T=new k,w=new fe,E=new fe,P=new fe;for(let M=0,S=0;M0)l=s-1;else{l=s;break}if(s=l,i[s]===o)return s/(r-1);const u=i[s],h=i[s+1]-u,d=(o-u)/h;return(s+d)/(r-1)}getTangent(e,t){let s=e-1e-4,r=e+1e-4;s<0&&(s=0),r>1&&(r=1);const o=this.getPoint(s),a=this.getPoint(r),l=t||(o.isVector2?new fe:new k);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t=!1){const i=new k,s=[],r=[],o=[],a=new k,l=new Ze;for(let d=0;d<=e;d++){const p=d/e;s[d]=this.getTangentAt(p,new k)}r[0]=new k,o[0]=new k;let c=Number.MAX_VALUE;const u=Math.abs(s[0].x),f=Math.abs(s[0].y),h=Math.abs(s[0].z);u<=c&&(c=u,i.set(1,0,0)),f<=c&&(c=f,i.set(0,1,0)),h<=c&&i.set(0,0,1),a.crossVectors(s[0],i).normalize(),r[0].crossVectors(s[0],a),o[0].crossVectors(s[0],r[0]);for(let d=1;d<=e;d++){if(r[d]=r[d-1].clone(),o[d]=o[d-1].clone(),a.crossVectors(s[d-1],s[d]),a.length()>Number.EPSILON){a.normalize();const p=Math.acos(st(s[d-1].dot(s[d]),-1,1));r[d].applyMatrix4(l.makeRotationAxis(a,p))}o[d].crossVectors(s[d],r[d])}if(t===!0){let d=Math.acos(st(r[0].dot(r[e]),-1,1));d/=e,s[0].dot(a.crossVectors(r[0],r[e]))>0&&(d=-d);for(let p=1;p<=e;p++)r[p].applyMatrix4(l.makeRotationAxis(s[p],d*p)),o[p].crossVectors(s[p],r[p])}return{tangents:s,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class wd extends Gi{constructor(e=0,t=0,i=1,s=1,r=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=s,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new fe){const i=t,s=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)s;)r-=s;r0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,u;this.closed||a>0?c=s[(a-1)%r]:(Gu.subVectors(s[0],s[1]).add(s[0]),c=Gu);const f=s[a%r],h=s[(a+1)%r];if(this.closed||a+2s.length-2?s.length-1:o+1],f=s[o>s.length-3?s.length-1:o+2];return i.set(Yy(a,l.x,c.x,u.x,f.x),Yy(a,l.y,c.y,u.y,f.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=s[r]-i,a=this.curves[r],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,t)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,s=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class yo extends Ch{constructor(e){super(e),this.uuid=oi(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,s=this.holes.length;i80*t){a=1/0,l=1/0;let u=-1/0,f=-1/0;for(let h=t;hu&&(u=d),p>f&&(f=p)}c=Math.max(u-a,f-l),c=c!==0?32767/c:0}return pc(r,o,t,a,l,c,0),o}function CE(n,e,t,i,s){let r;if(s===CI(n,e,t,i)>0)for(let o=e;o=e;o-=i)r=jy(o/i|0,n[o],n[o+1],r);return r&&Ia(r,r.next)&&(gc(r),r=r.next),r}function wo(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Ia(t,t.next)||Gt(t.prev,t,t.next)===0)){if(gc(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function pc(n,e,t,i,s,r,o){if(!n)return;!o&&r&&MI(n,i,s,r);let a=n;for(;n.prev!==n.next;){const l=n.prev,c=n.next;if(r?pI(n,i,s,r):dI(n)){e.push(l.i,n.i,c.i),gc(n),n=c.next,a=c.next;continue}if(n=c,n===a){o?o===1?(n=mI(wo(n),e),pc(n,e,t,i,s,r,2)):o===2&&gI(n,e,t,i,s,r):pc(wo(n),e,t,i,s,r,1);break}}}function dI(n){const e=n.prev,t=n,i=n.next;if(Gt(e,t,i)>=0)return!1;const s=e.x,r=t.x,o=i.x,a=e.y,l=t.y,c=i.y,u=Math.min(s,r,o),f=Math.min(a,l,c),h=Math.max(s,r,o),d=Math.max(a,l,c);let p=i.next;for(;p!==e;){if(p.x>=u&&p.x<=h&&p.y>=f&&p.y<=d&&vl(s,a,r,l,o,c,p.x,p.y)&&Gt(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function pI(n,e,t,i){const s=n.prev,r=n,o=n.next;if(Gt(s,r,o)>=0)return!1;const a=s.x,l=r.x,c=o.x,u=s.y,f=r.y,h=o.y,d=Math.min(a,l,c),p=Math.min(u,f,h),_=Math.max(a,l,c),g=Math.max(u,f,h),m=bg(d,p,e,t,i),v=bg(_,g,e,t,i);let b=n.prevZ,y=n.nextZ;for(;b&&b.z>=m&&y&&y.z<=v;){if(b.x>=d&&b.x<=_&&b.y>=p&&b.y<=g&&b!==s&&b!==o&&vl(a,u,l,f,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0||(b=b.prevZ,y.x>=d&&y.x<=_&&y.y>=p&&y.y<=g&&y!==s&&y!==o&&vl(a,u,l,f,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;b&&b.z>=m;){if(b.x>=d&&b.x<=_&&b.y>=p&&b.y<=g&&b!==s&&b!==o&&vl(a,u,l,f,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;y&&y.z<=v;){if(y.x>=d&&y.x<=_&&y.y>=p&&y.y<=g&&y!==s&&y!==o&&vl(a,u,l,f,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function mI(n,e){let t=n;do{const i=t.prev,s=t.next.next;!Ia(i,s)&&PE(i,t,t.next,s)&&mc(i,s)&&mc(s,i)&&(e.push(i.i,t.i,s.i),gc(t),gc(t.next),t=n=s),t=t.next}while(t!==n);return wo(t)}function gI(n,e,t,i,s,r){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&TI(o,a)){let l=IE(o,a);o=wo(o,o.next),l=wo(l,l.next),pc(o,e,t,i,s,r,0),pc(l,e,t,i,s,r,0);return}a=a.next}o=o.next}while(o!==n)}function _I(n,e,t,i){const s=[];for(let r=0,o=e.length;r=t.next.y&&t.next.y!==t.y){const f=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(f<=i&&f>r&&(r=f,o=t.x=t.x&&t.x>=l&&i!==t.x&&RE(so.x||t.x===o.x&&xI(o,t)))&&(o=t,u=f)}t=t.next}while(t!==a);return o}function xI(n,e){return Gt(n.prev,n,e.prev)<0&&Gt(e.next,n,n.next)<0}function MI(n,e,t,i){let s=n;do s.z===0&&(s.z=bg(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==n);s.prevZ.nextZ=null,s.prevZ=null,SI(s)}function SI(n){let e,t=1;do{let i=n,s;n=null;let r=null;for(e=0;i;){e++;let o=i,a=0;for(let c=0;c0||l>0&&o;)a!==0&&(l===0||!o||i.z<=o.z)?(s=i,i=i.nextZ,a--):(s=o,o=o.nextZ,l--),r?r.nextZ=s:n=s,s.prevZ=r,r=s;i=o}r.nextZ=null,t*=2}while(e>1);return n}function bg(n,e,t,i,s){return n=(n-t)*s|0,e=(e-i)*s|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function EI(n){let e=n,t=n;do(e.x=(n-o)*(r-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(r-a)>=(s-o)*(i-a)}function vl(n,e,t,i,s,r,o,a){return!(n===o&&e===a)&&RE(n,e,t,i,s,r,o,a)}function TI(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!wI(n,e)&&(mc(n,e)&&mc(e,n)&&AI(n,e)&&(Gt(n.prev,n,e.prev)||Gt(n,e.prev,e))||Ia(n,e)&&Gt(n.prev,n,n.next)>0&&Gt(e.prev,e,e.next)>0)}function Gt(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Ia(n,e){return n.x===e.x&&n.y===e.y}function PE(n,e,t,i){const s=Xu(Gt(n,e,t)),r=Xu(Gt(n,e,i)),o=Xu(Gt(t,i,n)),a=Xu(Gt(t,i,e));return!!(s!==r&&o!==a||s===0&&Wu(n,t,e)||r===0&&Wu(n,i,e)||o===0&&Wu(t,n,i)||a===0&&Wu(t,e,i))}function Wu(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Xu(n){return n>0?1:n<0?-1:0}function wI(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&PE(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function mc(n,e){return Gt(n.prev,n,n.next)<0?Gt(n,e,n.next)>=0&&Gt(n,n.prev,e)>=0:Gt(n,e,n.prev)<0||Gt(n,n.next,e)<0}function AI(n,e){let t=n,i=!1;const s=(n.x+e.x)/2,r=(n.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&s<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function IE(n,e){const t=xg(n.i,n.x,n.y),i=xg(e.i,e.x,e.y),s=n.next,r=e.prev;return n.next=e,e.prev=n,t.next=s,s.prev=t,i.next=t,t.prev=i,r.next=i,i.prev=r,i}function jy(n,e,t,i){const s=xg(n,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function gc(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function xg(n,e,t){return{i:n,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function CI(n,e,t,i){let s=0;for(let r=e,o=t-i;r2&&n[e-1].equals(n[0])&&n.pop()}function Zy(n,e){for(let t=0;tNumber.EPSILON){const Y=Math.sqrt(x),ne=Math.sqrt(ce*ce+R*R),ee=W.x-H/Y,Te=W.y+F/Y,me=G.x-R/ne,Re=G.y+ce/ne,De=((me-ee)*R-(Re-Te)*ce)/(F*R-H*ce);X=ee+F*De-A.x,C=Te+H*De-A.y;const de=X*X+C*C;if(de<=2)return new fe(X,C);I=Math.sqrt(de/2)}else{let Y=!1;F>Number.EPSILON?ce>Number.EPSILON&&(Y=!0):F<-Number.EPSILON?ce<-Number.EPSILON&&(Y=!0):Math.sign(H)===Math.sign(R)&&(Y=!0),Y?(X=-H,C=F,I=Math.sqrt(x)):(X=F,C=H,I=Math.sqrt(x/2))}return new fe(X/I,C/I)}const pe=[];for(let A=0,W=Q.length,G=W-1,X=A+1;A=0;A--){const W=A/g,G=d*Math.cos(W*Math.PI/2),X=p*Math.sin(W*Math.PI/2)+_;for(let C=0,I=Q.length;C=0;){const X=G;let C=G-1;C<0&&(C=A.length-1);for(let I=0,F=u+g*2;I0)&&d.push(b,y,w),(m!==i-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class UE extends Pn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Pe(16777215),this.specular=new Pe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class FE extends Pn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Pe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class kE extends Pn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class BE extends Pn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Pe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class __ extends Pn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=j1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class v_ extends Pn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class zE extends Pn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Pe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class VE extends Gn{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function ho(n,e){return!n||n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function HE(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function GE(n){function e(s,r){return n[s]-n[r]}const t=n.length,i=new Array(t);for(let s=0;s!==t;++s)i[s]=s;return i.sort(e),i}function Mg(n,e,t){const i=n.length,s=new n.constructor(i);for(let r=0,o=0;o!==i;++r){const a=t[r]*e;for(let l=0;l!==e;++l)s[o++]=n[a+l]}return s}function y_(n,e,t,i){let s=1,r=n[0];for(;r!==void 0&&r[i]===void 0;)r=n[s++];if(r===void 0)return;let o=r[i];if(o!==void 0)if(Array.isArray(o))do o=r[i],o!==void 0&&(e.push(r.time),t.push(...o)),r=n[s++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[i],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=n[s++];while(r!==void 0);else do o=r[i],o!==void 0&&(e.push(r.time),t.push(o)),r=n[s++];while(r!==void 0)}function DI(n,e,t,i,s=30){const r=n.clone();r.name=e;const o=[];for(let l=0;l=i)){f.push(c.times[d]);for(let _=0;_r.tracks[l].times[0]&&(a=r.tracks[l].times[0]);for(let l=0;l=a.times[p]){const m=p*f+u,v=m+f-u;_=a.values.slice(m,v)}else{const m=a.createInterpolant(),v=u,b=f-u;m.evaluate(r),_=m.resultBuffer.slice(v,b)}l==="quaternion"&&new Jn().fromArray(_).normalize().conjugate().toArray(_);const g=c.times.length;for(let m=0;m=r)){const a=t[1];e=r)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,r!==0||o!==s){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=i.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,s=this.values,r=i.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(s!==void 0&&HE(s))for(let a=0,l=s.length;a!==l;++a){const c=s[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===Mf,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*i,l=o*i,c=0;c!==i;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,s=new i(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}Ei.prototype.ValueTypeName="";Ei.prototype.TimeBufferType=Float32Array;Ei.prototype.ValueBufferType=Float32Array;Ei.prototype.DefaultInterpolation=Eh;class Po extends Ei{constructor(e,t,i){super(e,t,i)}}Po.prototype.ValueTypeName="bool";Po.prototype.ValueBufferType=Array;Po.prototype.DefaultInterpolation=lc;Po.prototype.InterpolantFactoryMethodLinear=void 0;Po.prototype.InterpolantFactoryMethodSmooth=void 0;class x_ extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}x_.prototype.ValueTypeName="color";class _c extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}_c.prototype.ValueTypeName="number";class $E extends $c{constructor(e,t,i,s){super(e,t,i,s)}interpolate_(e,t,i,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(s-t);let c=e*a;for(let u=c+a;c!==u;c+=4)Jn.slerpFlat(r,0,o,c-a,o,c,l);return r}}class qc extends Ei{constructor(e,t,i,s){super(e,t,i,s)}InterpolantFactoryMethodLinear(e){return new $E(this.times,this.values,this.getValueSize(),e)}}qc.prototype.ValueTypeName="quaternion";qc.prototype.InterpolantFactoryMethodSmooth=void 0;class Io extends Ei{constructor(e,t,i){super(e,t,i)}}Io.prototype.ValueTypeName="string";Io.prototype.ValueBufferType=Array;Io.prototype.DefaultInterpolation=lc;Io.prototype.InterpolantFactoryMethodLinear=void 0;Io.prototype.InterpolantFactoryMethodSmooth=void 0;class vc extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}vc.prototype.ValueTypeName="vector";class yc{constructor(e="",t=-1,i=[],s=dd){this.name=e,this.tracks=i,this.duration=t,this.blendMode=s,this.uuid=oi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,s=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(FI(i[o]).scale(s));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],i=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=i.length;r!==o;++r)t.push(Ei.toJSON(i[r]));return s}static CreateFromMorphTargetSequence(e,t,i,s){const r=t.length,o=[];for(let a=0;a1){const f=u[1];let h=s[f];h||(s[f]=h=[]),h.push(c)}}const o=[];for(const a in s)o.push(this.CreateFromMorphTargetSequence(a,s[a],t,i));return o}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(f,h,d,p,_){if(d.length!==0){const g=[],m=[];y_(d,g,m,p),g.length!==0&&_.push(new f(h,g,m))}},s=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{t&&t(r),this.manager.itemEnd(e)},0),r;if(vs[e]!==void 0){vs[e].push({onLoad:t,onProgress:i,onError:s});return}vs[e]=[],vs[e].push({onLoad:t,onProgress:i,onError:s});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=vs[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),d=h?parseInt(h):0,p=d!==0;let _=0;const g=new ReadableStream({start(m){v();function v(){f.read().then(({done:b,value:y})=>{if(b)m.close();else{_+=y.byteLength;const T=new ProgressEvent("progress",{lengthComputable:p,loaded:_,total:d});for(let w=0,E=u.length;w{m.error(b)})}}});return new Response(g)}else throw new kI(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a==="")return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,d=new TextDecoder(h);return c.arrayBuffer().then(p=>d.decode(p))}}}).then(c=>{Rs.add(e,c);const u=vs[e];delete vs[e];for(let f=0,h=u.length;f{const u=vs[e];if(u===void 0)throw this.manager.itemError(e),c;delete vs[e];for(let f=0,h=u.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class BI extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(JSON.parse(a)))}catch(l){s?s(l):console.error(l),r.manager.itemError(e)}},i,s)}parse(e){const t=[];for(let i=0;i0:s.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const r in e.uniforms){const o=e.uniforms[r];switch(s.uniforms[r]={},o.type){case"t":s.uniforms[r].value=i(o.value);break;case"c":s.uniforms[r].value=new Pe().setHex(o.value);break;case"v2":s.uniforms[r].value=new fe().fromArray(o.value);break;case"v3":s.uniforms[r].value=new k().fromArray(o.value);break;case"v4":s.uniforms[r].value=new vt().fromArray(o.value);break;case"m3":s.uniforms[r].value=new at().fromArray(o.value);break;case"m4":s.uniforms[r].value=new Ze().fromArray(o.value);break;default:s.uniforms[r].value=o.value}}if(e.defines!==void 0&&(s.defines=e.defines),e.vertexShader!==void 0&&(s.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(s.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(s.glslVersion=e.glslVersion),e.extensions!==void 0)for(const r in e.extensions)s.extensions[r]=e.extensions[r];if(e.lights!==void 0&&(s.lights=e.lights),e.clipping!==void 0&&(s.clipping=e.clipping),e.size!==void 0&&(s.size=e.size),e.sizeAttenuation!==void 0&&(s.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(s.map=i(e.map)),e.matcap!==void 0&&(s.matcap=i(e.matcap)),e.alphaMap!==void 0&&(s.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(s.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(s.bumpScale=e.bumpScale),e.normalMap!==void 0&&(s.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(s.normalMapType=e.normalMapType),e.normalScale!==void 0){let r=e.normalScale;Array.isArray(r)===!1&&(r=[r,r]),s.normalScale=new fe().fromArray(r)}return e.displacementMap!==void 0&&(s.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(s.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(s.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(s.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(s.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(s.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(s.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(s.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(s.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(s.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(s.envMap=i(e.envMap)),e.envMapRotation!==void 0&&s.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(s.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(s.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(s.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(s.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(s.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(s.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(s.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(s.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(s.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(s.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(s.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(s.clearcoatNormalScale=new fe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(s.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(s.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(s.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(s.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(s.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(s.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(s.sheenRoughnessMap=i(e.sheenRoughnessMap)),s}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return Fd.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:DE,SpriteMaterial:o_,RawShaderMaterial:OE,ShaderMaterial:zi,PointsMaterial:l_,MeshPhysicalMaterial:NE,MeshStandardMaterial:g_,MeshPhongMaterial:UE,MeshToonMaterial:FE,MeshNormalMaterial:kE,MeshLambertMaterial:BE,MeshDepthMaterial:__,MeshDistanceMaterial:v_,MeshBasicMaterial:Xs,MeshMatcapMaterial:zE,LineDashedMaterial:VE,LineBasicMaterial:Gn,Material:Pn};return new t[e]}}class Sg{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class nT extends ct{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class iT extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,function(a){try{t(r.parse(JSON.parse(a)))}catch(l){s?s(l):console.error(l),r.manager.itemError(e)}},i,s)}parse(e){const t={},i={};function s(d,p){if(t[p]!==void 0)return t[p];const g=d.interleavedBuffers[p],m=r(d,g.buffer),v=la(g.type,m),b=new yd(v,g.stride);return b.uuid=g.uuid,t[p]=b,b}function r(d,p){if(i[p]!==void 0)return i[p];const g=d.arrayBuffers[p],m=new Uint32Array(g).buffer;return i[p]=m,m}const o=e.isInstancedBufferGeometry?new nT:new ct,a=e.data.index;if(a!==void 0){const d=la(a.type,a.array);o.setIndex(new Pt(d,1))}const l=e.data.attributes;for(const d in l){const p=l[d];let _;if(p.isInterleavedBufferAttribute){const g=s(e.data,p.data);_=new To(g,p.itemSize,p.offset,p.normalized)}else{const g=la(p.type,p.array),m=p.isInstancedBufferAttribute?Pa:Pt;_=new m(g,p.itemSize,p.normalized)}p.name!==void 0&&(_.name=p.name),p.usage!==void 0&&_.setUsage(p.usage),o.setAttribute(d,_)}const c=e.data.morphAttributes;if(c)for(const d in c){const p=c[d],_=[];for(let g=0,m=p.length;g0){const l=new M_(t);r=new bc(l),r.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){s=new bc(this.manager),s.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{let g=null,m=null;return _.boundingBox!==void 0&&(g=new Cn().fromJSON(_.boundingBox)),_.boundingSphere!==void 0&&(m=new bn().fromJSON(_.boundingSphere)),{..._,boundingBox:g,boundingSphere:m}}),o._instanceInfo=e.instanceInfo,o._availableInstanceIds=e._availableInstanceIds,o._availableGeometryIds=e._availableGeometryIds,o._nextIndexStart=e.nextIndexStart,o._nextVertexStart=e.nextVertexStart,o._geometryCount=e.geometryCount,o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._matricesTexture=c(e.matricesTexture.uuid),o._indirectTexture=c(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(o.boundingSphere=new bn().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(o.boundingBox=new Cn().fromJSON(e.boundingBox));break;case"LOD":o=new mE;break;case"Line":o=new Sr(a(e.geometry),l(e.material));break;case"LineLoop":o=new yE(a(e.geometry),l(e.material));break;case"LineSegments":o=new ls(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new bE(a(e.geometry),l(e.material));break;case"Sprite":o=new pE(l(e.material));break;case"Group":o=new ca;break;case"Bone":o=new a_;break;default:o=new gt}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let d=0;d"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Rs.get(e);if(o!==void 0){if(r.manager.itemStart(e),o.then){o.then(c=>{if(em.has(o)===!0)s&&s(em.get(o)),r.manager.itemError(e),r.manager.itemEnd(e);else return t&&t(c),r.manager.itemEnd(e),c});return}return setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(c){return Rs.add(e,c),t&&t(c),r.manager.itemEnd(e),c}).catch(function(c){s&&s(c),em.set(l,c),Rs.remove(e),r.manager.itemError(e),r.manager.itemEnd(e)});Rs.add(e,l),r.manager.itemStart(e)}}let $u;class E_{static getContext(){return $u===void 0&&($u=new(window.AudioContext||window.webkitAudioContext)),$u}static setContext(e){$u=e}}class KI extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);E_.getContext().decodeAudioData(c,function(f){t(f)}).catch(a)}catch(c){a(c)}},i,s);function a(l){s?s(l):console.error(l),r.manager.itemError(e)}}}const rb=new Ze,ob=new Ze,qr=new Ze;class ZI{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Jt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Jt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,qr.copy(e.projectionMatrix);const s=t.eyeSep/2,r=s*t.near/t.focus,o=t.near*Math.tan(vo*t.fov*.5)/t.zoom;let a,l;ob.elements[12]=-s,rb.elements[12]=s,a=-o*t.aspect+r,l=o*t.aspect+r,qr.elements[0]=2*t.near/(l-a),qr.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(qr),a=-o*t.aspect-r,l=o*t.aspect-r,qr.elements[0]=2*t.near/(l-a),qr.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(qr)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ob),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(rb)}}class sT extends Jt{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class kd{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ab(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=ab();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function ab(){return performance.now()}const Yr=new k,tm=new Jn,JI=new k,jr=new k,Kr=new k;class QI extends gt{constructor(){super(),this.type="AudioListener",this.context=E_.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new kd}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Yr,tm,JI),jr.set(0,0,-1).applyQuaternion(tm),Kr.set(0,1,0).applyQuaternion(tm),t.positionX){const i=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Yr.x,i),t.positionY.linearRampToValueAtTime(Yr.y,i),t.positionZ.linearRampToValueAtTime(Yr.z,i),t.forwardX.linearRampToValueAtTime(jr.x,i),t.forwardY.linearRampToValueAtTime(jr.y,i),t.forwardZ.linearRampToValueAtTime(jr.z,i),t.upX.linearRampToValueAtTime(Kr.x,i),t.upY.linearRampToValueAtTime(Kr.y,i),t.upZ.linearRampToValueAtTime(Kr.z,i)}else t.setPosition(Yr.x,Yr.y,Yr.z),t.setOrientation(jr.x,jr.y,jr.z,Kr.x,Kr.y,Kr.z)}}class rT extends gt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,s,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(i[l]!==i[l+t]){a.setValue(i,s);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,s=i*this._origIndex;e.getValue(t,s);for(let r=i,o=s;r!==o;++r)t[r]=t[s+r%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==r;++o)e[t+o]=e[i+o]}_slerp(e,t,i,s){Jn.slerpFlat(e,t,e,t,e,i,s)}_slerpAdditive(e,t,i,s,r){const o=this._workIndex*r;Jn.multiplyQuaternionsFlat(e,o,e,t,e,i),Jn.slerpFlat(e,t,e,t,e,o,s)}_lerp(e,t,i,s,r){const o=1-s;for(let a=0;a!==r;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*s}}_lerpAdditive(e,t,i,s,r){for(let o=0;o!==r;++o){const a=t+o;e[a]=e[a]+e[i+o]*s}}}const T_="\\[\\]\\.:\\/",iL=new RegExp("["+T_+"]","g"),w_="[^"+T_+"]",sL="[^"+T_.replace("\\.","")+"]",rL=/((?:WC+[\/:])*)/.source.replace("WC",w_),oL=/(WCOD+)?/.source.replace("WCOD",sL),aL=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",w_),lL=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",w_),cL=new RegExp("^"+rL+oL+aL+lL+"$"),uL=["material","materials","bones","map"];class fL{constructor(e,t,i){const s=i||_t.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=i.length;s!==r;++s)i[s].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class _t{constructor(e,t,i){this.path=t,this.parsedPath=i||_t.parseTrackName(t),this.node=_t.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new _t.Composite(e,t,i):new _t(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(iL,"")}static parseTrackName(e){const t=cL.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const r=i.nodeName.substring(s+1);uL.indexOf(r)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=r)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(r){for(let o=0;o=r){const f=r++,h=e[f];t[h.uuid]=u,e[u]=h,t[c]=f,e[f]=l;for(let d=0,p=s;d!==p;++d){const _=i[d],g=_[f],m=_[u];_[u]=g,_[f]=m}}}this.nCachedObjects_=r}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,s=i.length;let r=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,f=t[u];if(f!==void 0)if(delete t[u],f0&&(t[d.uuid]=f),e[f]=d,e.pop();for(let p=0,_=s;p!==_;++p){const g=i[p];g[f]=g[h],g.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){const i=this._bindingsIndicesByPath;let s=i[e];const r=this._bindings;if(s!==void 0)return r[s];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);s=r.length,i[e]=s,o.push(e),a.push(t),r.push(f);for(let h=u,d=l.length;h!==d;++h){const p=l[h];f[h]=new _t(p,e,t)}return f}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const s=this._paths,r=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];t[c]=i,o[i]=l,o.pop(),r[i]=r[a],r.pop(),s[i]=s[a],s.pop()}}}class aT{constructor(e,t,i=null,s=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=s;const r=t.tracks,o=r.length,a=new Array(o),l={endingStart:uo,endingEnd:uo};for(let c=0;c!==o;++c){const u=r[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=q1,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i=!1){if(e.fadeOut(t),this.fadeIn(t),i===!0){const s=this._clip.duration,r=e._clip.duration,o=r/s,a=s/r;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i=!1){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const s=this._mixer,r=s.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=s._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=r,l[1]=r+i,c[0]=e/o,c[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,s){if(!this.enabled){this._updateWeight(e);return}const r=this._startTime;if(r!==null){const l=(e-r)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case Q0:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case dd:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulate(s,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopFading(),s===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let s=this.time+e,r=this._loopCount;const o=i===Y1;if(e===0)return r===-1?s:o&&(r&1)===1?t-s:s;if(i===$1){r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(s>=t)s=t;else if(s<0)s=0;else{this.time=s;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(r===-1&&(e>=0?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),s>=t||s<0){const a=Math.floor(s/t);s-=t*a,r+=Math.abs(a);const l=this.repetitions-r;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,s=e>0?t:0,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=r,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=s;if(o&&(r&1)===1)return t-s}return s}_setEndings(e,t,i){const s=this._interpolantSettings;i?(s.endingStart=fo,s.endingEnd=fo):(e?s.endingStart=this.zeroSlopeAtStart?fo:uo:s.endingStart=cc,t?s.endingEnd=this.zeroSlopeAtEnd?fo:uo:s.endingEnd=cc)}_scheduleFading(e,t,i){const s=this._mixer,r=s.time;let o=this._weightInterpolant;o===null&&(o=s._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=r,l[0]=t,a[1]=r+e,l[1]=i,this}}const dL=new Float32Array(1);class pL extends as{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,s=e._clip.tracks,r=s.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let f=0;f!==r;++f){const h=s[f],d=h.name;let p=u[d];if(p!==void 0)++p.referenceCount,o[f]=p;else{if(p=o[f],p!==void 0){p._cacheIndex===null&&(++p.referenceCount,this._addInactiveBinding(p,l,d));continue}const _=t&&t._propertyBindings[f].binding.parsedPath;p=new oT(_t.create(i,d,_),h.ValueTypeName,h.getValueSize()),++p.referenceCount,this._addInactiveBinding(p,l,d),o[f]=p}a[f].resultBuffer=p.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,s=e._clip.uuid,r=this._actionsByClip[s];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,s,i)}const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const r=t[i];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const r=t[i];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,s=this.time+=e,r=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==i;++c)t[c]._update(s,e,r,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let t=0;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,fb).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const hb=new k,qu=new k;class SL{constructor(e=new k,t=new k){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){hb.subVectors(e,this.start),qu.subVectors(this.end,this.start);const i=qu.dot(qu);let r=qu.dot(hb)/i;return t&&(r=st(r,0,1)),r}closestPointToPoint(e,t,i){const s=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(s).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const db=new k;class EL extends gt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new ct,s=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{vb.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(vb,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class FL extends ls{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],s=new ct;s.setAttribute("position",new ke(t,3)),s.setAttribute("color",new ke(i,3));const r=new Gn({vertexColors:!0,toneMapped:!1});super(s,r),this.type="AxesHelper"}setColors(e,t,i){const s=new Pe,r=this.geometry.attributes.color.array;return s.set(e),s.toArray(r,0),s.toArray(r,3),s.set(t),s.toArray(r,6),s.toArray(r,9),s.set(i),s.toArray(r,12),s.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class kL{constructor(){this.type="ShapePath",this.color=new Pe,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Ch,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,s){return this.currentPath.quadraticCurveTo(e,t,i,s),this}bezierCurveTo(e,t,i,s,r,o){return this.currentPath.bezierCurveTo(e,t,i,s,r,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(m){const v=[];for(let b=0,y=m.length;bNumber.EPSILON){if(S<0&&(E=v[w],M=-M,P=v[T],S=-S),m.yP.y)continue;if(m.y===E.y){if(m.x===E.x)return!0}else{const D=S*(m.x-E.x)-M*(m.y-E.y);if(D===0)return!0;if(D<0)continue;y=!y}}else{if(m.y!==E.y)continue;if(P.x<=m.x&&m.x<=E.x||E.x<=m.x&&m.x<=P.x)return!0}}return y}const s=Li.isClockWise,r=this.subPaths;if(r.length===0)return[];let o,a,l;const c=[];if(r.length===1)return a=r[0],l=new yo,l.curves=a.curves,c.push(l),c;let u=!s(r[0].getPoints());u=e?!u:u;const f=[],h=[];let d=[],p=0,_;h[p]=void 0,d[p]=[];for(let m=0,v=r.length;m1){let m=!1,v=0;for(let b=0,y=h.length;b0&&m===!1&&(d=f)}let g;for(let m=0,v=h.length;me?(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2):(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0),n}function VL(n,e){const t=n.image&&n.image.width?n.image.width/n.image.height:1;return t>e?(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0):(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2),n}function HL(n){return n.repeat.x=1,n.repeat.y=1,n.offset.x=0,n.offset.y=0,n}function Tg(n,e,t,i){const s=GL(i);switch(t){case j0:return n*e;case ud:return n*e/s.components*s.byteLength;case kc:return n*e/s.components*s.byteLength;case Z0:return n*e*2/s.components*s.byteLength;case fd:return n*e*2/s.components*s.byteLength;case K0:return n*e*3/s.components*s.byteLength;case zn:return n*e*4/s.components*s.byteLength;case hd:return n*e*4/s.components*s.byteLength;case Al:case Cl:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Rl:case Pl:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Qf:case th:return Math.max(n,16)*Math.max(e,8)/4;case Jf:case eh:return Math.max(n,8)*Math.max(e,8)/2;case nh:case ih:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case sh:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case rh:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case oh:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case ah:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case lh:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case ch:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case uh:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case fh:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case hh:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case dh:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case ph:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case mh:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case gh:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case _h:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case vh:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case Il:case yh:case bh:return Math.ceil(n/4)*Math.ceil(e/4)*16;case J0:case xh:return Math.ceil(n/4)*Math.ceil(e/4)*8;case Mh:case Sh:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function GL(n){switch(n){case Bi:case $0:return{byteLength:1,components:1};case Ea:case q0:case za:return{byteLength:2,components:1};case ld:case cd:return{byteLength:2,components:4};case Vs:case ad:case Kn:return{byteLength:4,components:1};case Y0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}class WL{static contain(e,t){return zL(e,t)}static cover(e,t){return VL(e,t)}static fill(e){return HL(e)}static getByteLength(e,t,i,s){return Tg(e,t,i,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Uc}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Uc);/** + `},s=new Ro(5,5,5),r=new zi({name:"CubemapFromEquirect",uniforms:Ra(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Vn,blending:Ds});r.uniforms.tEquirect.value=t;const o=new jt(s,r),a=t.minFilter;return t.minFilter===Qi&&(t.minFilter=nn),new fE(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,i=!0,s=!0){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,s);e.setRenderTarget(r)}}class ca extends gt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const VP={type:"move"};class Sf{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new ca,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new ca,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new k,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new k),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new ca,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new k,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new k),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let s=null,r=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const g=t.getJointPose(_,i),m=this._getHandJoint(c,_);g!==null&&(m.matrix.fromArray(g.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,m.jointRadius=g.radius),m.visible=g!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),d=.02,p=.005;c.inputState.pinching&&h>d+p?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=d-p&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(s=t.getPose(e.targetRaySpace,i),s===null&&r!==null&&(s=r),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(VP)))}return a!==null&&(a.visible=s!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new ca;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class gd{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Pe(e),this.density=t}clone(){return new gd(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class _d{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Pe(e),this.near=t,this.far=i}clone(){return new _d(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class vd extends gt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new li,this.environmentIntensity=1,this.environmentRotation=new li,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class yd{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=fc,this.updateRanges=[],this.version=0,this.uuid=oi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let s=0,r=this.stride;se.far||t.push({distance:l,point:nl.clone(),uv:Kn.getInterpolation(nl,Au,sl,Cu,Ry,Vp,Py,new fe),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Ru(n,e,t,i,s,r){Qo.subVectors(n,t).addScalar(.5).multiply(i),s!==void 0?(il.x=r*Qo.x-s*Qo.y,il.y=s*Qo.x+r*Qo.y):il.copy(Qo),n.copy(e),n.x+=il.x,n.y+=il.y,n.applyMatrix4(dE)}const Pu=new k,Iy=new k;class mE extends gt{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,s=t.length;i0){let i,s;for(i=1,s=t.length;i0){Pu.setFromMatrixPosition(this.matrixWorld);const s=e.ray.origin.distanceTo(Pu);this.getObjectForDistance(s).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Pu.setFromMatrixPosition(e.matrixWorld),Iy.setFromMatrixPosition(this.matrixWorld);const i=Pu.distanceTo(Iy)/e.zoom;t[0].object.visible=!0;let s,r;for(s=1,r=t.length;s=o)t[s-1].object.visible=!1,t[s].object.visible=!0;else break}for(this._currentLevel=s-1;s1?null:t.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||$P.getNormalMatrix(e),s=this.coplanarPoint(Wp).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Wr=new bn,Du=new k;class Ha{constructor(e=new ur,t=new ur,i=new ur,s=new ur,r=new ur,o=new ur){this.planes=[e,t,i,s,r,o]}set(e,t,i,s,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=_i){const i=this.planes,s=e.elements,r=s[0],o=s[1],a=s[2],l=s[3],c=s[4],u=s[5],f=s[6],h=s[7],d=s[8],p=s[9],_=s[10],g=s[11],m=s[12],v=s[13],b=s[14],y=s[15];if(i[0].setComponents(l-r,h-c,g-d,y-m).normalize(),i[1].setComponents(l+r,h+c,g+d,y+m).normalize(),i[2].setComponents(l+o,h+u,g+p,y+v).normalize(),i[3].setComponents(l-o,h-u,g-p,y-v).normalize(),i[4].setComponents(l-a,h-f,g-_,y-b).normalize(),t===_i)i[5].setComponents(l+a,h+f,g+_,y+b).normalize();else if(t===hc)i[5].setComponents(a,f,_,b).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Wr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Wr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Wr)}intersectsSprite(e){return Wr.center.set(0,0,0),Wr.radius=.7071067811865476,Wr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Wr)}intersectsSphere(e){const t=this.planes,i=e.center,s=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,Du.y=s.normal.y>0?e.max.y:e.min.y,Du.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(Du)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const Xi=new Ze,$i=new Ha;class xd{constructor(){this.coordinateSystem=_i}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let i=0;i=r.length&&r.push({start:-1,count:-1,z:-1,index:-1});const a=r[this.index];o.push(a),this.index++,a.start=e,a.count=t,a.z=i,a.index=s}reset(){this.list.length=0,this.index=0}}const $n=new Ze,KP=new Pe(1,1,1),zy=new Ha,ZP=new xd,Ou=new Cn,Xr=new bn,al=new k,Vy=new k,JP=new k,$p=new jP,En=new jt,Nu=[];function QP(n,e,t=0){const i=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const s=n.count;for(let r=0;r65535?new Uint32Array(s):new Uint16Array(s);t.setIndex(new Pt(r,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(!e.hasAttribute(i))throw new Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const s=e.getAttribute(i),r=t.getAttribute(i);if(s.itemSize!==r.itemSize||s.normalized!==r.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Cn);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let i=0,s=t.length;i=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:e};let s=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Xp),s=this._availableInstanceIds.shift(),this._instanceInfo[s]=i):(s=this._instanceInfo.length,this._instanceInfo.push(i));const r=this._matricesTexture;$n.identity().toArray(r.image.data,s*16),r.needsUpdate=!0;const o=this._colorsTexture;return o&&(KP.toArray(o.image.data,s*4),o.needsUpdate=!0),this._visibilityChanged=!0,s}addGeometry(e,t=-1,i=-1){this._initializeGeometry(e),this._validateGeometry(e);const s={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},r=this._geometryInfo;s.vertexStart=this._nextVertexStart,s.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const o=e.getIndex();if(o!==null&&(s.indexStart=this._nextIndexStart,s.reservedIndexCount=i===-1?o.count:i),s.indexStart!==-1&&s.indexStart+s.reservedIndexCount>this._maxIndexCount||s.vertexStart+s.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Xp),l=this._availableGeometryIds.shift(),r[l]=s):(l=this._geometryCount,this._geometryCount++,r.push(s)),this.setGeometryAt(l,e),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,l}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,s=i.getIndex()!==null,r=i.getIndex(),o=t.getIndex(),a=this._geometryInfo[e];if(s&&o.count>a.reservedIndexCount||t.attributes.position.count>a.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=t.getAttribute("position").count;for(const u in i.attributes){const f=t.getAttribute(u),h=i.getAttribute(u);QP(f,h,l);const d=f.itemSize;for(let p=f.count,_=c;p<_;p++){const g=l+p;for(let m=0;m=t.length||t[e].active===!1)return this;const i=this._instanceInfo;for(let s=0,r=i.length;sa).sort((o,a)=>i[o].vertexStart-i[a].vertexStart),r=this.geometry;for(let o=0,a=i.length;o=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingBox===null){const r=new Cn,o=i.index,a=i.attributes.position;for(let l=s.start,c=s.start+s.count;l=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingSphere===null){const r=new bn;this.getBoundingBoxAt(e,Ou),Ou.getCenter(r.center);const o=i.index,a=i.attributes.position;let l=0;for(let c=s.start,u=s.start+s.count;ca.active);if(Math.max(...i.map(a=>a.vertexStart+a.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(l=>l.indexStart+l.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const r=this.geometry;r.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new ct,this._initializeGeometry(r));const o=this.geometry;r.index&&$r(r.index.array,o.index.array);for(const a in r.attributes)$r(r.attributes[a].array,o.attributes[a].array)}raycast(e,t){const i=this._instanceInfo,s=this._geometryInfo,r=this.matrixWorld,o=this.geometry;En.material=this.material,En.geometry.index=o.index,En.geometry.attributes=o.attributes,En.geometry.boundingBox===null&&(En.geometry.boundingBox=new Cn),En.geometry.boundingSphere===null&&(En.geometry.boundingSphere=new bn);for(let a=0,l=i.length;a({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,i,s,r){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=s.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._geometryInfo,h=this.perObjectFrustumCulled,d=this._indirectTexture,p=d.image.data,_=i.isArrayCamera?ZP:zy;h&&!i.isArrayCamera&&($n.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),zy.setFromProjectionMatrix($n,e.coordinateSystem));let g=0;if(this.sortObjects){$n.copy(this.matrixWorld).invert(),al.setFromMatrixPosition(i.matrixWorld).applyMatrix4($n),Vy.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection($n);for(let b=0,y=l.length;b0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;ri)return;qp.applyMatrix4(n.matrixWorld);const c=e.ray.origin.distanceTo(qp);if(!(ce.far))return{distance:c,point:Gy.clone().applyMatrix4(n.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:n}}const Wy=new k,Xy=new k;class ls extends Sr{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[];for(let s=0,r=t.count;s0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;rs.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class xE extends $t{constructor(e,t,i,s,r=nn,o=nn,a,l,c){super(e,t,i,s,r,o,a,l,c),this.isVideoTexture=!0,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class eI extends xE{constructor(e,t,i,s,r,o,a,l){super({},e,t,i,s,r,o,a,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class tI extends $t{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=yn,this.minFilter=yn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Md extends $t{constructor(e,t,i,s,r,o,a,l,c,u,f,h){super(null,o,a,l,c,u,s,r,f,h),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class nI extends Md{constructor(e,t,i,s,r,o){super(e,t,i,r,o),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=gi,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class iI extends Md{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,zs),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class sI extends $t{constructor(e,t,i,s,r,o,a,l,c){super(e,t,i,s,r,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class c_ extends $t{constructor(e,t,i=Vs,s,r,o,a=yn,l=yn,c,u=wa,f=1){if(u!==wa&&u!==Aa)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const h={width:e,height:t,depth:f};super(h,s,r,o,a,l,u,i,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new dr(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class Sd extends ct{constructor(e=1,t=1,i=4,s=8,r=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:i,radialSegments:s,heightSegments:r},t=Math.max(0,t),i=Math.max(1,Math.floor(i)),s=Math.max(3,Math.floor(s)),r=Math.max(1,Math.floor(r));const o=[],a=[],l=[],c=[],u=t/2,f=Math.PI/2*e,h=t,d=2*f+h,p=i*2+r,_=s+1,g=new k,m=new k;for(let v=0;v<=p;v++){let b=0,y=0,T=0,w=0;if(v<=i){const M=v/i,E=M*Math.PI/2;y=-u-e*Math.cos(E),T=e*Math.sin(E),w=-e*Math.cos(E),b=M*f}else if(v<=i+r){const M=(v-i)/r;y=-u+M*t,T=e,w=0,b=f+M*h}else{const M=(v-i-r)/i,E=M*Math.PI/2;y=u+e*Math.sin(E),T=e*Math.cos(E),w=e*Math.sin(E),b=f+h+M*f}const S=Math.max(0,Math.min(1,b/d));let P=0;v===0?P=.5/s:v===p&&(P=-.5/s);for(let M=0;M<=s;M++){const E=M/s,D=E*Math.PI*2,B=Math.sin(D),z=Math.cos(D);m.x=-T*z,m.y=y,m.z=T*B,a.push(m.x,m.y,m.z),g.set(-T*z,w,T*B),g.normalize(),l.push(g.x,g.y,g.z),c.push(E+P,S)}if(v>0){const M=(v-1)*_;for(let E=0;E0&&b(!0),t>0&&b(!1)),this.setIndex(u),this.setAttribute("position",new ke(f,3)),this.setAttribute("normal",new ke(h,3)),this.setAttribute("uv",new ke(d,2));function v(){const y=new k,T=new k;let w=0;const S=(t-e)/i;for(let P=0;P<=r;P++){const M=[],E=P/r,D=E*(t-e)+e;for(let B=0;B<=s;B++){const z=B/s,V=z*l+a,Q=Math.sin(V),j=Math.cos(V);T.x=D*Q,T.y=-E*i+g,T.z=D*j,f.push(T.x,T.y,T.z),y.set(Q,S,j).normalize(),h.push(y.x,y.y,y.z),d.push(z,1-E),M.push(p++)}_.push(M)}for(let P=0;P0||M!==0)&&(u.push(E,D,z),w+=3),(t>0||M!==r-1)&&(u.push(D,B,z),w+=3)}c.addGroup(m,w,0),m+=w}function b(y){const T=p,w=new fe,S=new k;let P=0;const M=y===!0?e:t,E=y===!0?1:-1;for(let B=1;B<=s;B++)f.push(0,g*E,0),h.push(0,E,0),d.push(.5,.5),p++;const D=p;for(let B=0;B<=s;B++){const V=B/s*l+a,Q=Math.cos(V),j=Math.sin(V);S.x=M*j,S.y=g*E,S.z=M*Q,f.push(S.x,S.y,S.z),h.push(0,E,0),w.x=Q*.5+.5,w.y=j*.5*E+.5,d.push(w.x,w.y),p++}for(let B=0;B.9&&S<.1&&(b<.2&&(o[v+0]+=1),y<.2&&(o[v+2]+=1),T<.2&&(o[v+4]+=1))}}function h(v){r.push(v.x,v.y,v.z)}function d(v,b){const y=v*3;b.x=e[y+0],b.y=e[y+1],b.z=e[y+2]}function p(){const v=new k,b=new k,y=new k,T=new k,w=new fe,S=new fe,P=new fe;for(let M=0,E=0;M0)l=s-1;else{l=s;break}if(s=l,i[s]===o)return s/(r-1);const u=i[s],h=i[s+1]-u,d=(o-u)/h;return(s+d)/(r-1)}getTangent(e,t){let s=e-1e-4,r=e+1e-4;s<0&&(s=0),r>1&&(r=1);const o=this.getPoint(s),a=this.getPoint(r),l=t||(o.isVector2?new fe:new k);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t=!1){const i=new k,s=[],r=[],o=[],a=new k,l=new Ze;for(let d=0;d<=e;d++){const p=d/e;s[d]=this.getTangentAt(p,new k)}r[0]=new k,o[0]=new k;let c=Number.MAX_VALUE;const u=Math.abs(s[0].x),f=Math.abs(s[0].y),h=Math.abs(s[0].z);u<=c&&(c=u,i.set(1,0,0)),f<=c&&(c=f,i.set(0,1,0)),h<=c&&i.set(0,0,1),a.crossVectors(s[0],i).normalize(),r[0].crossVectors(s[0],a),o[0].crossVectors(s[0],r[0]);for(let d=1;d<=e;d++){if(r[d]=r[d-1].clone(),o[d]=o[d-1].clone(),a.crossVectors(s[d-1],s[d]),a.length()>Number.EPSILON){a.normalize();const p=Math.acos(st(s[d-1].dot(s[d]),-1,1));r[d].applyMatrix4(l.makeRotationAxis(a,p))}o[d].crossVectors(s[d],r[d])}if(t===!0){let d=Math.acos(st(r[0].dot(r[e]),-1,1));d/=e,s[0].dot(a.crossVectors(r[0],r[e]))>0&&(d=-d);for(let p=1;p<=e;p++)r[p].applyMatrix4(l.makeRotationAxis(s[p],d*p)),o[p].crossVectors(s[p],r[p])}return{tangents:s,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class wd extends Gi{constructor(e=0,t=0,i=1,s=1,r=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=s,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new fe){const i=t,s=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)s;)r-=s;r0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,u;this.closed||a>0?c=s[(a-1)%r]:(Gu.subVectors(s[0],s[1]).add(s[0]),c=Gu);const f=s[a%r],h=s[(a+1)%r];if(this.closed||a+2s.length-2?s.length-1:o+1],f=s[o>s.length-3?s.length-1:o+2];return i.set(Yy(a,l.x,c.x,u.x,f.x),Yy(a,l.y,c.y,u.y,f.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=s[r]-i,a=this.curves[r],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,t)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,s=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class yo extends Ch{constructor(e){super(e),this.uuid=oi(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,s=this.holes.length;i80*t){a=1/0,l=1/0;let u=-1/0,f=-1/0;for(let h=t;hu&&(u=d),p>f&&(f=p)}c=Math.max(u-a,f-l),c=c!==0?32767/c:0}return pc(r,o,t,a,l,c,0),o}function CE(n,e,t,i,s){let r;if(s===CI(n,e,t,i)>0)for(let o=e;o=e;o-=i)r=jy(o/i|0,n[o],n[o+1],r);return r&&Ia(r,r.next)&&(gc(r),r=r.next),r}function wo(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Ia(t,t.next)||Gt(t.prev,t,t.next)===0)){if(gc(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function pc(n,e,t,i,s,r,o){if(!n)return;!o&&r&&MI(n,i,s,r);let a=n;for(;n.prev!==n.next;){const l=n.prev,c=n.next;if(r?pI(n,i,s,r):dI(n)){e.push(l.i,n.i,c.i),gc(n),n=c.next,a=c.next;continue}if(n=c,n===a){o?o===1?(n=mI(wo(n),e),pc(n,e,t,i,s,r,2)):o===2&&gI(n,e,t,i,s,r):pc(wo(n),e,t,i,s,r,1);break}}}function dI(n){const e=n.prev,t=n,i=n.next;if(Gt(e,t,i)>=0)return!1;const s=e.x,r=t.x,o=i.x,a=e.y,l=t.y,c=i.y,u=Math.min(s,r,o),f=Math.min(a,l,c),h=Math.max(s,r,o),d=Math.max(a,l,c);let p=i.next;for(;p!==e;){if(p.x>=u&&p.x<=h&&p.y>=f&&p.y<=d&&vl(s,a,r,l,o,c,p.x,p.y)&&Gt(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function pI(n,e,t,i){const s=n.prev,r=n,o=n.next;if(Gt(s,r,o)>=0)return!1;const a=s.x,l=r.x,c=o.x,u=s.y,f=r.y,h=o.y,d=Math.min(a,l,c),p=Math.min(u,f,h),_=Math.max(a,l,c),g=Math.max(u,f,h),m=bg(d,p,e,t,i),v=bg(_,g,e,t,i);let b=n.prevZ,y=n.nextZ;for(;b&&b.z>=m&&y&&y.z<=v;){if(b.x>=d&&b.x<=_&&b.y>=p&&b.y<=g&&b!==s&&b!==o&&vl(a,u,l,f,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0||(b=b.prevZ,y.x>=d&&y.x<=_&&y.y>=p&&y.y<=g&&y!==s&&y!==o&&vl(a,u,l,f,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;b&&b.z>=m;){if(b.x>=d&&b.x<=_&&b.y>=p&&b.y<=g&&b!==s&&b!==o&&vl(a,u,l,f,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;y&&y.z<=v;){if(y.x>=d&&y.x<=_&&y.y>=p&&y.y<=g&&y!==s&&y!==o&&vl(a,u,l,f,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function mI(n,e){let t=n;do{const i=t.prev,s=t.next.next;!Ia(i,s)&&PE(i,t,t.next,s)&&mc(i,s)&&mc(s,i)&&(e.push(i.i,t.i,s.i),gc(t),gc(t.next),t=n=s),t=t.next}while(t!==n);return wo(t)}function gI(n,e,t,i,s,r){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&TI(o,a)){let l=IE(o,a);o=wo(o,o.next),l=wo(l,l.next),pc(o,e,t,i,s,r,0),pc(l,e,t,i,s,r,0);return}a=a.next}o=o.next}while(o!==n)}function _I(n,e,t,i){const s=[];for(let r=0,o=e.length;r=t.next.y&&t.next.y!==t.y){const f=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(f<=i&&f>r&&(r=f,o=t.x=t.x&&t.x>=l&&i!==t.x&&RE(so.x||t.x===o.x&&xI(o,t)))&&(o=t,u=f)}t=t.next}while(t!==a);return o}function xI(n,e){return Gt(n.prev,n,e.prev)<0&&Gt(e.next,n,n.next)<0}function MI(n,e,t,i){let s=n;do s.z===0&&(s.z=bg(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==n);s.prevZ.nextZ=null,s.prevZ=null,SI(s)}function SI(n){let e,t=1;do{let i=n,s;n=null;let r=null;for(e=0;i;){e++;let o=i,a=0;for(let c=0;c0||l>0&&o;)a!==0&&(l===0||!o||i.z<=o.z)?(s=i,i=i.nextZ,a--):(s=o,o=o.nextZ,l--),r?r.nextZ=s:n=s,s.prevZ=r,r=s;i=o}r.nextZ=null,t*=2}while(e>1);return n}function bg(n,e,t,i,s){return n=(n-t)*s|0,e=(e-i)*s|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function EI(n){let e=n,t=n;do(e.x=(n-o)*(r-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(r-a)>=(s-o)*(i-a)}function vl(n,e,t,i,s,r,o,a){return!(n===o&&e===a)&&RE(n,e,t,i,s,r,o,a)}function TI(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!wI(n,e)&&(mc(n,e)&&mc(e,n)&&AI(n,e)&&(Gt(n.prev,n,e.prev)||Gt(n,e.prev,e))||Ia(n,e)&&Gt(n.prev,n,n.next)>0&&Gt(e.prev,e,e.next)>0)}function Gt(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Ia(n,e){return n.x===e.x&&n.y===e.y}function PE(n,e,t,i){const s=Xu(Gt(n,e,t)),r=Xu(Gt(n,e,i)),o=Xu(Gt(t,i,n)),a=Xu(Gt(t,i,e));return!!(s!==r&&o!==a||s===0&&Wu(n,t,e)||r===0&&Wu(n,i,e)||o===0&&Wu(t,n,i)||a===0&&Wu(t,e,i))}function Wu(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Xu(n){return n>0?1:n<0?-1:0}function wI(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&PE(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function mc(n,e){return Gt(n.prev,n,n.next)<0?Gt(n,e,n.next)>=0&&Gt(n,n.prev,e)>=0:Gt(n,e,n.prev)<0||Gt(n,n.next,e)<0}function AI(n,e){let t=n,i=!1;const s=(n.x+e.x)/2,r=(n.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&s<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function IE(n,e){const t=xg(n.i,n.x,n.y),i=xg(e.i,e.x,e.y),s=n.next,r=e.prev;return n.next=e,e.prev=n,t.next=s,s.prev=t,i.next=t,t.prev=i,r.next=i,i.prev=r,i}function jy(n,e,t,i){const s=xg(n,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function gc(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function xg(n,e,t){return{i:n,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function CI(n,e,t,i){let s=0;for(let r=e,o=t-i;r2&&n[e-1].equals(n[0])&&n.pop()}function Zy(n,e){for(let t=0;tNumber.EPSILON){const Y=Math.sqrt(x),ne=Math.sqrt(ce*ce+R*R),ee=W.x-H/Y,Te=W.y+F/Y,me=G.x-R/ne,Re=G.y+ce/ne,De=((me-ee)*R-(Re-Te)*ce)/(F*R-H*ce);X=ee+F*De-A.x,C=Te+H*De-A.y;const de=X*X+C*C;if(de<=2)return new fe(X,C);I=Math.sqrt(de/2)}else{let Y=!1;F>Number.EPSILON?ce>Number.EPSILON&&(Y=!0):F<-Number.EPSILON?ce<-Number.EPSILON&&(Y=!0):Math.sign(H)===Math.sign(R)&&(Y=!0),Y?(X=-H,C=F,I=Math.sqrt(x)):(X=F,C=H,I=Math.sqrt(x/2))}return new fe(X/I,C/I)}const pe=[];for(let A=0,W=Q.length,G=W-1,X=A+1;A=0;A--){const W=A/g,G=d*Math.cos(W*Math.PI/2),X=p*Math.sin(W*Math.PI/2)+_;for(let C=0,I=Q.length;C=0;){const X=G;let C=G-1;C<0&&(C=A.length-1);for(let I=0,F=u+g*2;I0)&&d.push(b,y,w),(m!==i-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class UE extends Pn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Pe(16777215),this.specular=new Pe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class FE extends Pn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Pe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class kE extends Pn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class BE extends Pn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Pe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class __ extends Pn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=j1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class v_ extends Pn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class zE extends Pn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Pe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class VE extends Wn{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function ho(n,e){return!n||n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function HE(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function GE(n){function e(s,r){return n[s]-n[r]}const t=n.length,i=new Array(t);for(let s=0;s!==t;++s)i[s]=s;return i.sort(e),i}function Mg(n,e,t){const i=n.length,s=new n.constructor(i);for(let r=0,o=0;o!==i;++r){const a=t[r]*e;for(let l=0;l!==e;++l)s[o++]=n[a+l]}return s}function y_(n,e,t,i){let s=1,r=n[0];for(;r!==void 0&&r[i]===void 0;)r=n[s++];if(r===void 0)return;let o=r[i];if(o!==void 0)if(Array.isArray(o))do o=r[i],o!==void 0&&(e.push(r.time),t.push(...o)),r=n[s++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[i],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=n[s++];while(r!==void 0);else do o=r[i],o!==void 0&&(e.push(r.time),t.push(o)),r=n[s++];while(r!==void 0)}function DI(n,e,t,i,s=30){const r=n.clone();r.name=e;const o=[];for(let l=0;l=i)){f.push(c.times[d]);for(let _=0;_r.tracks[l].times[0]&&(a=r.tracks[l].times[0]);for(let l=0;l=a.times[p]){const m=p*f+u,v=m+f-u;_=a.values.slice(m,v)}else{const m=a.createInterpolant(),v=u,b=f-u;m.evaluate(r),_=m.resultBuffer.slice(v,b)}l==="quaternion"&&new Qn().fromArray(_).normalize().conjugate().toArray(_);const g=c.times.length;for(let m=0;m=r)){const a=t[1];e=r)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,r!==0||o!==s){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=i.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,s=this.values,r=i.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(s!==void 0&&HE(s))for(let a=0,l=s.length;a!==l;++a){const c=s[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===Mf,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*i,l=o*i,c=0;c!==i;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,s=new i(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}Ei.prototype.ValueTypeName="";Ei.prototype.TimeBufferType=Float32Array;Ei.prototype.ValueBufferType=Float32Array;Ei.prototype.DefaultInterpolation=Eh;class Po extends Ei{constructor(e,t,i){super(e,t,i)}}Po.prototype.ValueTypeName="bool";Po.prototype.ValueBufferType=Array;Po.prototype.DefaultInterpolation=lc;Po.prototype.InterpolantFactoryMethodLinear=void 0;Po.prototype.InterpolantFactoryMethodSmooth=void 0;class x_ extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}x_.prototype.ValueTypeName="color";class _c extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}_c.prototype.ValueTypeName="number";class $E extends $c{constructor(e,t,i,s){super(e,t,i,s)}interpolate_(e,t,i,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(s-t);let c=e*a;for(let u=c+a;c!==u;c+=4)Qn.slerpFlat(r,0,o,c-a,o,c,l);return r}}class qc extends Ei{constructor(e,t,i,s){super(e,t,i,s)}InterpolantFactoryMethodLinear(e){return new $E(this.times,this.values,this.getValueSize(),e)}}qc.prototype.ValueTypeName="quaternion";qc.prototype.InterpolantFactoryMethodSmooth=void 0;class Io extends Ei{constructor(e,t,i){super(e,t,i)}}Io.prototype.ValueTypeName="string";Io.prototype.ValueBufferType=Array;Io.prototype.DefaultInterpolation=lc;Io.prototype.InterpolantFactoryMethodLinear=void 0;Io.prototype.InterpolantFactoryMethodSmooth=void 0;class vc extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}vc.prototype.ValueTypeName="vector";class yc{constructor(e="",t=-1,i=[],s=dd){this.name=e,this.tracks=i,this.duration=t,this.blendMode=s,this.uuid=oi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,s=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(FI(i[o]).scale(s));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],i=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=i.length;r!==o;++r)t.push(Ei.toJSON(i[r]));return s}static CreateFromMorphTargetSequence(e,t,i,s){const r=t.length,o=[];for(let a=0;a1){const f=u[1];let h=s[f];h||(s[f]=h=[]),h.push(c)}}const o=[];for(const a in s)o.push(this.CreateFromMorphTargetSequence(a,s[a],t,i));return o}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(f,h,d,p,_){if(d.length!==0){const g=[],m=[];y_(d,g,m,p),g.length!==0&&_.push(new f(h,g,m))}},s=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{t&&t(r),this.manager.itemEnd(e)},0),r;if(vs[e]!==void 0){vs[e].push({onLoad:t,onProgress:i,onError:s});return}vs[e]=[],vs[e].push({onLoad:t,onProgress:i,onError:s});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=vs[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),d=h?parseInt(h):0,p=d!==0;let _=0;const g=new ReadableStream({start(m){v();function v(){f.read().then(({done:b,value:y})=>{if(b)m.close();else{_+=y.byteLength;const T=new ProgressEvent("progress",{lengthComputable:p,loaded:_,total:d});for(let w=0,S=u.length;w{m.error(b)})}}});return new Response(g)}else throw new kI(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a==="")return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,d=new TextDecoder(h);return c.arrayBuffer().then(p=>d.decode(p))}}}).then(c=>{Rs.add(e,c);const u=vs[e];delete vs[e];for(let f=0,h=u.length;f{const u=vs[e];if(u===void 0)throw this.manager.itemError(e),c;delete vs[e];for(let f=0,h=u.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class BI extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(JSON.parse(a)))}catch(l){s?s(l):console.error(l),r.manager.itemError(e)}},i,s)}parse(e){const t=[];for(let i=0;i0:s.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const r in e.uniforms){const o=e.uniforms[r];switch(s.uniforms[r]={},o.type){case"t":s.uniforms[r].value=i(o.value);break;case"c":s.uniforms[r].value=new Pe().setHex(o.value);break;case"v2":s.uniforms[r].value=new fe().fromArray(o.value);break;case"v3":s.uniforms[r].value=new k().fromArray(o.value);break;case"v4":s.uniforms[r].value=new vt().fromArray(o.value);break;case"m3":s.uniforms[r].value=new at().fromArray(o.value);break;case"m4":s.uniforms[r].value=new Ze().fromArray(o.value);break;default:s.uniforms[r].value=o.value}}if(e.defines!==void 0&&(s.defines=e.defines),e.vertexShader!==void 0&&(s.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(s.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(s.glslVersion=e.glslVersion),e.extensions!==void 0)for(const r in e.extensions)s.extensions[r]=e.extensions[r];if(e.lights!==void 0&&(s.lights=e.lights),e.clipping!==void 0&&(s.clipping=e.clipping),e.size!==void 0&&(s.size=e.size),e.sizeAttenuation!==void 0&&(s.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(s.map=i(e.map)),e.matcap!==void 0&&(s.matcap=i(e.matcap)),e.alphaMap!==void 0&&(s.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(s.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(s.bumpScale=e.bumpScale),e.normalMap!==void 0&&(s.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(s.normalMapType=e.normalMapType),e.normalScale!==void 0){let r=e.normalScale;Array.isArray(r)===!1&&(r=[r,r]),s.normalScale=new fe().fromArray(r)}return e.displacementMap!==void 0&&(s.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(s.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(s.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(s.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(s.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(s.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(s.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(s.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(s.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(s.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(s.envMap=i(e.envMap)),e.envMapRotation!==void 0&&s.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(s.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(s.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(s.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(s.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(s.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(s.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(s.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(s.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(s.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(s.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(s.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(s.clearcoatNormalScale=new fe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(s.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(s.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(s.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(s.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(s.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(s.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(s.sheenRoughnessMap=i(e.sheenRoughnessMap)),s}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return Fd.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:DE,SpriteMaterial:o_,RawShaderMaterial:OE,ShaderMaterial:zi,PointsMaterial:l_,MeshPhysicalMaterial:NE,MeshStandardMaterial:g_,MeshPhongMaterial:UE,MeshToonMaterial:FE,MeshNormalMaterial:kE,MeshLambertMaterial:BE,MeshDepthMaterial:__,MeshDistanceMaterial:v_,MeshBasicMaterial:Xs,MeshMatcapMaterial:zE,LineDashedMaterial:VE,LineBasicMaterial:Wn,Material:Pn};return new t[e]}}class Sg{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class nT extends ct{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class iT extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,function(a){try{t(r.parse(JSON.parse(a)))}catch(l){s?s(l):console.error(l),r.manager.itemError(e)}},i,s)}parse(e){const t={},i={};function s(d,p){if(t[p]!==void 0)return t[p];const g=d.interleavedBuffers[p],m=r(d,g.buffer),v=la(g.type,m),b=new yd(v,g.stride);return b.uuid=g.uuid,t[p]=b,b}function r(d,p){if(i[p]!==void 0)return i[p];const g=d.arrayBuffers[p],m=new Uint32Array(g).buffer;return i[p]=m,m}const o=e.isInstancedBufferGeometry?new nT:new ct,a=e.data.index;if(a!==void 0){const d=la(a.type,a.array);o.setIndex(new Pt(d,1))}const l=e.data.attributes;for(const d in l){const p=l[d];let _;if(p.isInterleavedBufferAttribute){const g=s(e.data,p.data);_=new To(g,p.itemSize,p.offset,p.normalized)}else{const g=la(p.type,p.array),m=p.isInstancedBufferAttribute?Pa:Pt;_=new m(g,p.itemSize,p.normalized)}p.name!==void 0&&(_.name=p.name),p.usage!==void 0&&_.setUsage(p.usage),o.setAttribute(d,_)}const c=e.data.morphAttributes;if(c)for(const d in c){const p=c[d],_=[];for(let g=0,m=p.length;g0){const l=new M_(t);r=new bc(l),r.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){s=new bc(this.manager),s.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{let g=null,m=null;return _.boundingBox!==void 0&&(g=new Cn().fromJSON(_.boundingBox)),_.boundingSphere!==void 0&&(m=new bn().fromJSON(_.boundingSphere)),{..._,boundingBox:g,boundingSphere:m}}),o._instanceInfo=e.instanceInfo,o._availableInstanceIds=e._availableInstanceIds,o._availableGeometryIds=e._availableGeometryIds,o._nextIndexStart=e.nextIndexStart,o._nextVertexStart=e.nextVertexStart,o._geometryCount=e.geometryCount,o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._matricesTexture=c(e.matricesTexture.uuid),o._indirectTexture=c(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(o.boundingSphere=new bn().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(o.boundingBox=new Cn().fromJSON(e.boundingBox));break;case"LOD":o=new mE;break;case"Line":o=new Sr(a(e.geometry),l(e.material));break;case"LineLoop":o=new yE(a(e.geometry),l(e.material));break;case"LineSegments":o=new ls(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new bE(a(e.geometry),l(e.material));break;case"Sprite":o=new pE(l(e.material));break;case"Group":o=new ca;break;case"Bone":o=new a_;break;default:o=new gt}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let d=0;d"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Rs.get(e);if(o!==void 0){if(r.manager.itemStart(e),o.then){o.then(c=>{if(em.has(o)===!0)s&&s(em.get(o)),r.manager.itemError(e),r.manager.itemEnd(e);else return t&&t(c),r.manager.itemEnd(e),c});return}return setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(c){return Rs.add(e,c),t&&t(c),r.manager.itemEnd(e),c}).catch(function(c){s&&s(c),em.set(l,c),Rs.remove(e),r.manager.itemError(e),r.manager.itemEnd(e)});Rs.add(e,l),r.manager.itemStart(e)}}let $u;class E_{static getContext(){return $u===void 0&&($u=new(window.AudioContext||window.webkitAudioContext)),$u}static setContext(e){$u=e}}class KI extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);E_.getContext().decodeAudioData(c,function(f){t(f)}).catch(a)}catch(c){a(c)}},i,s);function a(l){s?s(l):console.error(l),r.manager.itemError(e)}}}const rb=new Ze,ob=new Ze,qr=new Ze;class ZI{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Jt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Jt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,qr.copy(e.projectionMatrix);const s=t.eyeSep/2,r=s*t.near/t.focus,o=t.near*Math.tan(vo*t.fov*.5)/t.zoom;let a,l;ob.elements[12]=-s,rb.elements[12]=s,a=-o*t.aspect+r,l=o*t.aspect+r,qr.elements[0]=2*t.near/(l-a),qr.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(qr),a=-o*t.aspect-r,l=o*t.aspect-r,qr.elements[0]=2*t.near/(l-a),qr.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(qr)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ob),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(rb)}}class sT extends Jt{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class kd{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ab(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=ab();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function ab(){return performance.now()}const Yr=new k,tm=new Qn,JI=new k,jr=new k,Kr=new k;class QI extends gt{constructor(){super(),this.type="AudioListener",this.context=E_.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new kd}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Yr,tm,JI),jr.set(0,0,-1).applyQuaternion(tm),Kr.set(0,1,0).applyQuaternion(tm),t.positionX){const i=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Yr.x,i),t.positionY.linearRampToValueAtTime(Yr.y,i),t.positionZ.linearRampToValueAtTime(Yr.z,i),t.forwardX.linearRampToValueAtTime(jr.x,i),t.forwardY.linearRampToValueAtTime(jr.y,i),t.forwardZ.linearRampToValueAtTime(jr.z,i),t.upX.linearRampToValueAtTime(Kr.x,i),t.upY.linearRampToValueAtTime(Kr.y,i),t.upZ.linearRampToValueAtTime(Kr.z,i)}else t.setPosition(Yr.x,Yr.y,Yr.z),t.setOrientation(jr.x,jr.y,jr.z,Kr.x,Kr.y,Kr.z)}}class rT extends gt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,s,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(i[l]!==i[l+t]){a.setValue(i,s);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,s=i*this._origIndex;e.getValue(t,s);for(let r=i,o=s;r!==o;++r)t[r]=t[s+r%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==r;++o)e[t+o]=e[i+o]}_slerp(e,t,i,s){Qn.slerpFlat(e,t,e,t,e,i,s)}_slerpAdditive(e,t,i,s,r){const o=this._workIndex*r;Qn.multiplyQuaternionsFlat(e,o,e,t,e,i),Qn.slerpFlat(e,t,e,t,e,o,s)}_lerp(e,t,i,s,r){const o=1-s;for(let a=0;a!==r;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*s}}_lerpAdditive(e,t,i,s,r){for(let o=0;o!==r;++o){const a=t+o;e[a]=e[a]+e[i+o]*s}}}const T_="\\[\\]\\.:\\/",iL=new RegExp("["+T_+"]","g"),w_="[^"+T_+"]",sL="[^"+T_.replace("\\.","")+"]",rL=/((?:WC+[\/:])*)/.source.replace("WC",w_),oL=/(WCOD+)?/.source.replace("WCOD",sL),aL=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",w_),lL=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",w_),cL=new RegExp("^"+rL+oL+aL+lL+"$"),uL=["material","materials","bones","map"];class fL{constructor(e,t,i){const s=i||_t.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=i.length;s!==r;++s)i[s].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class _t{constructor(e,t,i){this.path=t,this.parsedPath=i||_t.parseTrackName(t),this.node=_t.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new _t.Composite(e,t,i):new _t(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(iL,"")}static parseTrackName(e){const t=cL.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const r=i.nodeName.substring(s+1);uL.indexOf(r)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=r)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(r){for(let o=0;o=r){const f=r++,h=e[f];t[h.uuid]=u,e[u]=h,t[c]=f,e[f]=l;for(let d=0,p=s;d!==p;++d){const _=i[d],g=_[f],m=_[u];_[u]=g,_[f]=m}}}this.nCachedObjects_=r}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,s=i.length;let r=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,f=t[u];if(f!==void 0)if(delete t[u],f0&&(t[d.uuid]=f),e[f]=d,e.pop();for(let p=0,_=s;p!==_;++p){const g=i[p];g[f]=g[h],g.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){const i=this._bindingsIndicesByPath;let s=i[e];const r=this._bindings;if(s!==void 0)return r[s];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);s=r.length,i[e]=s,o.push(e),a.push(t),r.push(f);for(let h=u,d=l.length;h!==d;++h){const p=l[h];f[h]=new _t(p,e,t)}return f}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const s=this._paths,r=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];t[c]=i,o[i]=l,o.pop(),r[i]=r[a],r.pop(),s[i]=s[a],s.pop()}}}class aT{constructor(e,t,i=null,s=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=s;const r=t.tracks,o=r.length,a=new Array(o),l={endingStart:uo,endingEnd:uo};for(let c=0;c!==o;++c){const u=r[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=q1,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i=!1){if(e.fadeOut(t),this.fadeIn(t),i===!0){const s=this._clip.duration,r=e._clip.duration,o=r/s,a=s/r;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i=!1){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const s=this._mixer,r=s.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=s._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=r,l[1]=r+i,c[0]=e/o,c[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,s){if(!this.enabled){this._updateWeight(e);return}const r=this._startTime;if(r!==null){const l=(e-r)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case Q0:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case dd:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulate(s,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopFading(),s===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let s=this.time+e,r=this._loopCount;const o=i===Y1;if(e===0)return r===-1?s:o&&(r&1)===1?t-s:s;if(i===$1){r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(s>=t)s=t;else if(s<0)s=0;else{this.time=s;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(r===-1&&(e>=0?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),s>=t||s<0){const a=Math.floor(s/t);s-=t*a,r+=Math.abs(a);const l=this.repetitions-r;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,s=e>0?t:0,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=r,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=s;if(o&&(r&1)===1)return t-s}return s}_setEndings(e,t,i){const s=this._interpolantSettings;i?(s.endingStart=fo,s.endingEnd=fo):(e?s.endingStart=this.zeroSlopeAtStart?fo:uo:s.endingStart=cc,t?s.endingEnd=this.zeroSlopeAtEnd?fo:uo:s.endingEnd=cc)}_scheduleFading(e,t,i){const s=this._mixer,r=s.time;let o=this._weightInterpolant;o===null&&(o=s._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=r,l[0]=t,a[1]=r+e,l[1]=i,this}}const dL=new Float32Array(1);class pL extends as{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,s=e._clip.tracks,r=s.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let f=0;f!==r;++f){const h=s[f],d=h.name;let p=u[d];if(p!==void 0)++p.referenceCount,o[f]=p;else{if(p=o[f],p!==void 0){p._cacheIndex===null&&(++p.referenceCount,this._addInactiveBinding(p,l,d));continue}const _=t&&t._propertyBindings[f].binding.parsedPath;p=new oT(_t.create(i,d,_),h.ValueTypeName,h.getValueSize()),++p.referenceCount,this._addInactiveBinding(p,l,d),o[f]=p}a[f].resultBuffer=p.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,s=e._clip.uuid,r=this._actionsByClip[s];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,s,i)}const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const r=t[i];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const r=t[i];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,s=this.time+=e,r=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==i;++c)t[c]._update(s,e,r,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let t=0;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,fb).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const hb=new k,qu=new k;class SL{constructor(e=new k,t=new k){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){hb.subVectors(e,this.start),qu.subVectors(this.end,this.start);const i=qu.dot(qu);let r=qu.dot(hb)/i;return t&&(r=st(r,0,1)),r}closestPointToPoint(e,t,i){const s=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(s).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const db=new k;class EL extends gt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new ct,s=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{vb.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(vb,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class FL extends ls{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],s=new ct;s.setAttribute("position",new ke(t,3)),s.setAttribute("color",new ke(i,3));const r=new Wn({vertexColors:!0,toneMapped:!1});super(s,r),this.type="AxesHelper"}setColors(e,t,i){const s=new Pe,r=this.geometry.attributes.color.array;return s.set(e),s.toArray(r,0),s.toArray(r,3),s.set(t),s.toArray(r,6),s.toArray(r,9),s.set(i),s.toArray(r,12),s.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class kL{constructor(){this.type="ShapePath",this.color=new Pe,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Ch,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,s){return this.currentPath.quadraticCurveTo(e,t,i,s),this}bezierCurveTo(e,t,i,s,r,o){return this.currentPath.bezierCurveTo(e,t,i,s,r,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(m){const v=[];for(let b=0,y=m.length;bNumber.EPSILON){if(E<0&&(S=v[w],M=-M,P=v[T],E=-E),m.yP.y)continue;if(m.y===S.y){if(m.x===S.x)return!0}else{const D=E*(m.x-S.x)-M*(m.y-S.y);if(D===0)return!0;if(D<0)continue;y=!y}}else{if(m.y!==S.y)continue;if(P.x<=m.x&&m.x<=S.x||S.x<=m.x&&m.x<=P.x)return!0}}return y}const s=Li.isClockWise,r=this.subPaths;if(r.length===0)return[];let o,a,l;const c=[];if(r.length===1)return a=r[0],l=new yo,l.curves=a.curves,c.push(l),c;let u=!s(r[0].getPoints());u=e?!u:u;const f=[],h=[];let d=[],p=0,_;h[p]=void 0,d[p]=[];for(let m=0,v=r.length;m1){let m=!1,v=0;for(let b=0,y=h.length;b0&&m===!1&&(d=f)}let g;for(let m=0,v=h.length;me?(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2):(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0),n}function VL(n,e){const t=n.image&&n.image.width?n.image.width/n.image.height:1;return t>e?(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0):(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2),n}function HL(n){return n.repeat.x=1,n.repeat.y=1,n.offset.x=0,n.offset.y=0,n}function Tg(n,e,t,i){const s=GL(i);switch(t){case j0:return n*e;case ud:return n*e/s.components*s.byteLength;case kc:return n*e/s.components*s.byteLength;case Z0:return n*e*2/s.components*s.byteLength;case fd:return n*e*2/s.components*s.byteLength;case K0:return n*e*3/s.components*s.byteLength;case zn:return n*e*4/s.components*s.byteLength;case hd:return n*e*4/s.components*s.byteLength;case Al:case Cl:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Rl:case Pl:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Qf:case th:return Math.max(n,16)*Math.max(e,8)/4;case Jf:case eh:return Math.max(n,8)*Math.max(e,8)/2;case nh:case ih:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case sh:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case rh:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case oh:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case ah:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case lh:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case ch:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case uh:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case fh:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case hh:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case dh:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case ph:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case mh:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case gh:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case _h:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case vh:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case Il:case yh:case bh:return Math.ceil(n/4)*Math.ceil(e/4)*16;case J0:case xh:return Math.ceil(n/4)*Math.ceil(e/4)*8;case Mh:case Sh:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function GL(n){switch(n){case Bi:case $0:return{byteLength:1,components:1};case Ea:case q0:case za:return{byteLength:2,components:1};case ld:case cd:return{byteLength:2,components:4};case Vs:case ad:case Zn:return{byteLength:4,components:1};case Y0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}class WL{static contain(e,t){return zL(e,t)}static cover(e,t){return VL(e,t)}static fill(e){return HL(e)}static getByteLength(e,t,i,s){return Tg(e,t,i,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Uc}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Uc);/** * @license * Copyright 2010-2025 Three.js Authors * SPDX-License-Identifier: MIT @@ -3588,7 +3588,7 @@ void main() { #include #include #include -}`,ft={alphahash_fragment:$L,alphahash_pars_fragment:qL,alphamap_fragment:YL,alphamap_pars_fragment:jL,alphatest_fragment:KL,alphatest_pars_fragment:ZL,aomap_fragment:JL,aomap_pars_fragment:QL,batching_pars_vertex:eD,batching_vertex:tD,begin_vertex:nD,beginnormal_vertex:iD,bsdfs:sD,iridescence_fragment:rD,bumpmap_pars_fragment:oD,clipping_planes_fragment:aD,clipping_planes_pars_fragment:lD,clipping_planes_pars_vertex:cD,clipping_planes_vertex:uD,color_fragment:fD,color_pars_fragment:hD,color_pars_vertex:dD,color_vertex:pD,common:mD,cube_uv_reflection_fragment:gD,defaultnormal_vertex:_D,displacementmap_pars_vertex:vD,displacementmap_vertex:yD,emissivemap_fragment:bD,emissivemap_pars_fragment:xD,colorspace_fragment:MD,colorspace_pars_fragment:SD,envmap_fragment:ED,envmap_common_pars_fragment:TD,envmap_pars_fragment:wD,envmap_pars_vertex:AD,envmap_physical_pars_fragment:kD,envmap_vertex:CD,fog_vertex:RD,fog_pars_vertex:PD,fog_fragment:ID,fog_pars_fragment:LD,gradientmap_pars_fragment:DD,lightmap_pars_fragment:OD,lights_lambert_fragment:ND,lights_lambert_pars_fragment:UD,lights_pars_begin:FD,lights_toon_fragment:BD,lights_toon_pars_fragment:zD,lights_phong_fragment:VD,lights_phong_pars_fragment:HD,lights_physical_fragment:GD,lights_physical_pars_fragment:WD,lights_fragment_begin:XD,lights_fragment_maps:$D,lights_fragment_end:qD,logdepthbuf_fragment:YD,logdepthbuf_pars_fragment:jD,logdepthbuf_pars_vertex:KD,logdepthbuf_vertex:ZD,map_fragment:JD,map_pars_fragment:QD,map_particle_fragment:eO,map_particle_pars_fragment:tO,metalnessmap_fragment:nO,metalnessmap_pars_fragment:iO,morphinstance_vertex:sO,morphcolor_vertex:rO,morphnormal_vertex:oO,morphtarget_pars_vertex:aO,morphtarget_vertex:lO,normal_fragment_begin:cO,normal_fragment_maps:uO,normal_pars_fragment:fO,normal_pars_vertex:hO,normal_vertex:dO,normalmap_pars_fragment:pO,clearcoat_normal_fragment_begin:mO,clearcoat_normal_fragment_maps:gO,clearcoat_pars_fragment:_O,iridescence_pars_fragment:vO,opaque_fragment:yO,packing:bO,premultiplied_alpha_fragment:xO,project_vertex:MO,dithering_fragment:SO,dithering_pars_fragment:EO,roughnessmap_fragment:TO,roughnessmap_pars_fragment:wO,shadowmap_pars_fragment:AO,shadowmap_pars_vertex:CO,shadowmap_vertex:RO,shadowmask_pars_fragment:PO,skinbase_vertex:IO,skinning_pars_vertex:LO,skinning_vertex:DO,skinnormal_vertex:OO,specularmap_fragment:NO,specularmap_pars_fragment:UO,tonemapping_fragment:FO,tonemapping_pars_fragment:kO,transmission_fragment:BO,transmission_pars_fragment:zO,uv_pars_fragment:VO,uv_pars_vertex:HO,uv_vertex:GO,worldpos_vertex:WO,background_vert:XO,background_frag:$O,backgroundCube_vert:qO,backgroundCube_frag:YO,cube_vert:jO,cube_frag:KO,depth_vert:ZO,depth_frag:JO,distanceRGBA_vert:QO,distanceRGBA_frag:eN,equirect_vert:tN,equirect_frag:nN,linedashed_vert:iN,linedashed_frag:sN,meshbasic_vert:rN,meshbasic_frag:oN,meshlambert_vert:aN,meshlambert_frag:lN,meshmatcap_vert:cN,meshmatcap_frag:uN,meshnormal_vert:fN,meshnormal_frag:hN,meshphong_vert:dN,meshphong_frag:pN,meshphysical_vert:mN,meshphysical_frag:gN,meshtoon_vert:_N,meshtoon_frag:vN,points_vert:yN,points_frag:bN,shadow_vert:xN,shadow_frag:MN,sprite_vert:SN,sprite_frag:EN},Ae={common:{diffuse:{value:new Pe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new at},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new at}},envmap:{envMap:{value:null},envMapRotation:{value:new at},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new at}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new at}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new at},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new at},normalScale:{value:new fe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new at},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new at}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new at}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new at}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Pe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Pe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0},uvTransform:{value:new at}},sprite:{diffuse:{value:new Pe(16777215)},opacity:{value:1},center:{value:new fe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new at},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0}}},Pi={basic:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.fog]),vertexShader:ft.meshbasic_vert,fragmentShader:ft.meshbasic_frag},lambert:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)}}]),vertexShader:ft.meshlambert_vert,fragmentShader:ft.meshlambert_frag},phong:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)},specular:{value:new Pe(1118481)},shininess:{value:30}}]),vertexShader:ft.meshphong_vert,fragmentShader:ft.meshphong_frag},standard:{uniforms:On([Ae.common,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.roughnessmap,Ae.metalnessmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ft.meshphysical_vert,fragmentShader:ft.meshphysical_frag},toon:{uniforms:On([Ae.common,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.gradientmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)}}]),vertexShader:ft.meshtoon_vert,fragmentShader:ft.meshtoon_frag},matcap:{uniforms:On([Ae.common,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,{matcap:{value:null}}]),vertexShader:ft.meshmatcap_vert,fragmentShader:ft.meshmatcap_frag},points:{uniforms:On([Ae.points,Ae.fog]),vertexShader:ft.points_vert,fragmentShader:ft.points_frag},dashed:{uniforms:On([Ae.common,Ae.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ft.linedashed_vert,fragmentShader:ft.linedashed_frag},depth:{uniforms:On([Ae.common,Ae.displacementmap]),vertexShader:ft.depth_vert,fragmentShader:ft.depth_frag},normal:{uniforms:On([Ae.common,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,{opacity:{value:1}}]),vertexShader:ft.meshnormal_vert,fragmentShader:ft.meshnormal_frag},sprite:{uniforms:On([Ae.sprite,Ae.fog]),vertexShader:ft.sprite_vert,fragmentShader:ft.sprite_frag},background:{uniforms:{uvTransform:{value:new at},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ft.background_vert,fragmentShader:ft.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new at}},vertexShader:ft.backgroundCube_vert,fragmentShader:ft.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ft.cube_vert,fragmentShader:ft.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ft.equirect_vert,fragmentShader:ft.equirect_frag},distanceRGBA:{uniforms:On([Ae.common,Ae.displacementmap,{referencePosition:{value:new k},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ft.distanceRGBA_vert,fragmentShader:ft.distanceRGBA_frag},shadow:{uniforms:On([Ae.lights,Ae.fog,{color:{value:new Pe(0)},opacity:{value:1}}]),vertexShader:ft.shadow_vert,fragmentShader:ft.shadow_frag}};Pi.physical={uniforms:On([Pi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new at},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new at},clearcoatNormalScale:{value:new fe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new at},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new at},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new at},sheen:{value:0},sheenColor:{value:new Pe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new at},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new at},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new at},transmissionSamplerSize:{value:new fe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new at},attenuationDistance:{value:0},attenuationColor:{value:new Pe(0)},specularColor:{value:new Pe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new at},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new at},anisotropyVector:{value:new fe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new at}}]),vertexShader:ft.meshphysical_vert,fragmentShader:ft.meshphysical_frag};const Qu={r:0,b:0,g:0},Qr=new li,TN=new Ze;function wN(n,e,t,i,s,r,o){const a=new Pe(0);let l=r===!0?0:1,c,u,f=null,h=0,d=null;function p(b){let y=b.isScene===!0?b.background:null;return y&&y.isTexture&&(y=(b.backgroundBlurriness>0?t:e).get(y)),y}function _(b){let y=!1;const T=p(b);T===null?m(a,l):T&&T.isColor&&(m(T,1),y=!0);const w=n.xr.getEnvironmentBlendMode();w==="additive"?i.buffers.color.setClear(0,0,0,1,o):w==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||y)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil))}function g(b,y){const T=p(y);T&&(T.isCubeTexture||T.mapping===Ba)?(u===void 0&&(u=new jt(new Ro(1,1,1),new zi({name:"BackgroundCubeMaterial",uniforms:Ra(Pi.backgroundCube.uniforms),vertexShader:Pi.backgroundCube.vertexShader,fragmentShader:Pi.backgroundCube.fragmentShader,side:Vn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(w,E,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(u)),Qr.copy(y.backgroundRotation),Qr.x*=-1,Qr.y*=-1,Qr.z*=-1,T.isCubeTexture&&T.isRenderTargetTexture===!1&&(Qr.y*=-1,Qr.z*=-1),u.material.uniforms.envMap.value=T,u.material.uniforms.flipEnvMap.value=T.isCubeTexture&&T.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(TN.makeRotationFromEuler(Qr)),u.material.toneMapped=pt.getTransfer(T.colorSpace)!==Ct,(f!==T||h!==T.version||d!==n.toneMapping)&&(u.material.needsUpdate=!0,f=T,h=T.version,d=n.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):T&&T.isTexture&&(c===void 0&&(c=new jt(new Ga(2,2),new zi({name:"BackgroundMaterial",uniforms:Ra(Pi.background.uniforms),vertexShader:Pi.background.vertexShader,fragmentShader:Pi.background.fragmentShader,side:Bs,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(c)),c.material.uniforms.t2D.value=T,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=pt.getTransfer(T.colorSpace)!==Ct,T.matrixAutoUpdate===!0&&T.updateMatrix(),c.material.uniforms.uvTransform.value.copy(T.matrix),(f!==T||h!==T.version||d!==n.toneMapping)&&(c.material.needsUpdate=!0,f=T,h=T.version,d=n.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function m(b,y){b.getRGB(Qu,cE(n)),i.buffers.color.setClear(Qu.r,Qu.g,Qu.b,y,o)}function v(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(b,y=1){a.set(b),l=y,m(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,m(a,l)},render:_,addToRenderList:g,dispose:v}}function AN(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},s=h(null);let r=s,o=!1;function a(S,D,B,z,V){let Q=!1;const j=f(z,B,D);r!==j&&(r=j,c(r.object)),Q=d(S,z,B,V),Q&&p(S,z,B,V),V!==null&&e.update(V,n.ELEMENT_ARRAY_BUFFER),(Q||o)&&(o=!1,y(S,D,B,z),V!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(V).buffer))}function l(){return n.createVertexArray()}function c(S){return n.bindVertexArray(S)}function u(S){return n.deleteVertexArray(S)}function f(S,D,B){const z=B.wireframe===!0;let V=i[S.id];V===void 0&&(V={},i[S.id]=V);let Q=V[D.id];Q===void 0&&(Q={},V[D.id]=Q);let j=Q[z];return j===void 0&&(j=h(l()),Q[z]=j),j}function h(S){const D=[],B=[],z=[];for(let V=0;V=0){const Me=V[Z];let re=Q[Z];if(re===void 0&&(Z==="instanceMatrix"&&S.instanceMatrix&&(re=S.instanceMatrix),Z==="instanceColor"&&S.instanceColor&&(re=S.instanceColor)),Me===void 0||Me.attribute!==re||re&&Me.data!==re.data)return!0;j++}return r.attributesNum!==j||r.index!==z}function p(S,D,B,z){const V={},Q=D.attributes;let j=0;const te=B.getAttributes();for(const Z in te)if(te[Z].location>=0){let Me=Q[Z];Me===void 0&&(Z==="instanceMatrix"&&S.instanceMatrix&&(Me=S.instanceMatrix),Z==="instanceColor"&&S.instanceColor&&(Me=S.instanceColor));const re={};re.attribute=Me,Me&&Me.data&&(re.data=Me.data),V[Z]=re,j++}r.attributes=V,r.attributesNum=j,r.index=z}function _(){const S=r.newAttributes;for(let D=0,B=S.length;D=0){let pe=V[te];if(pe===void 0&&(te==="instanceMatrix"&&S.instanceMatrix&&(pe=S.instanceMatrix),te==="instanceColor"&&S.instanceColor&&(pe=S.instanceColor)),pe!==void 0){const Me=pe.normalized,re=pe.itemSize,xe=e.get(pe);if(xe===void 0)continue;const We=xe.buffer,oe=xe.type,ge=xe.bytesPerElement,Se=oe===n.INT||oe===n.UNSIGNED_INT||pe.gpuType===ad;if(pe.isInterleavedBufferAttribute){const $=pe.data,ae=$.stride,le=pe.offset;if($.isInstancedInterleavedBuffer){for(let ue=0;ue0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";E="mediump"}return E==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const f=t.logarithmicDepthBuffer===!0,h=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=n.getParameter(n.MAX_TEXTURE_SIZE),g=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),m=n.getParameter(n.MAX_VERTEX_ATTRIBS),v=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),b=n.getParameter(n.MAX_VARYING_VECTORS),y=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),T=p>0,w=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:_,maxCubemapSize:g,maxAttributes:m,maxVertexUniforms:v,maxVaryings:b,maxFragmentUniforms:y,vertexTextures:T,maxSamples:w}}function PN(n){const e=this;let t=null,i=0,s=!1,r=!1;const o=new ur,a=new at,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const d=f.length!==0||h||i!==0||s;return s=h,i=f.length,d},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(f,h){t=u(f,h,0)},this.setState=function(f,h,d){const p=f.clippingPlanes,_=f.clipIntersection,g=f.clipShadows,m=n.get(f);if(!s||p===null||p.length===0||r&&!g)r?u(null):c();else{const v=r?0:i,b=v*4;let y=m.clippingState||null;l.value=y,y=u(p,h,b,d);for(let T=0;T!==b;++T)y[T]=t[T];m.clippingState=y,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,d,p){const _=f!==null?f.length:0;let g=null;if(_!==0){if(g=l.value,p!==!0||g===null){const m=d+_*4,v=h.matrixWorldInverse;a.getNormalMatrix(v),(g===null||g.length0){const c=new hE(l.height);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",s),t(c.texture,o.mapping)}else return null}}return o}function s(o){const a=o.target;a.removeEventListener("dispose",s);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}const ua=4,yb=[.125,.215,.35,.446,.526,.582],lo=20,sm=new Ud,bb=new Pe;let rm=null,om=0,am=0,lm=!1;const ro=(1+Math.sqrt(5))/2,ta=1/ro,xb=[new k(-ro,ta,0),new k(ro,ta,0),new k(-ta,0,ro),new k(ta,0,ro),new k(0,ro,-ta),new k(0,ro,ta),new k(-1,1,-1),new k(1,1,-1),new k(-1,1,1),new k(1,1,1)],LN=new k;class wg{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,s=100,r={}){const{size:o=256,position:a=LN}=r;rm=this._renderer.getRenderTarget(),om=this._renderer.getActiveCubeFace(),am=this._renderer.getActiveMipmapLevel(),lm=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,i,s,l,a),t>0&&this._blur(l,0,0,t),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Eb(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Sb(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),f.setRenderTarget(s),g&&f.render(_,l),f.render(e,l)}_.geometry.dispose(),_.material.dispose(),f.toneMapping=d,f.autoClear=h,e.background=m}_textureToCubeUV(e,t){const i=this._renderer,s=e.mapping===zs||e.mapping===Mr;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=Eb()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Sb());const r=s?this._cubemapMaterial:this._equirectMaterial,o=new jt(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;ef(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,sm)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const s=this._lodPlanes.length;for(let r=1;rlo&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${lo}`);const m=[];let v=0;for(let E=0;Eb-ua?s-b+ua:0),w=4*(this._cubeSize-y);ef(t,T,w,3*y,2*y),l.setRenderTarget(t),l.render(f,sm)}}function DN(n){const e=[],t=[],i=[];let s=n;const r=n-ua+1+yb.length;for(let o=0;on-ua?l=yb[o-n+ua-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],d=6,p=6,_=3,g=2,m=1,v=new Float32Array(_*p*d),b=new Float32Array(g*p*d),y=new Float32Array(m*p*d);for(let w=0;w2?0:-1,M=[E,P,0,E+2/3,P,0,E+2/3,P+1,0,E,P,0,E+2/3,P+1,0,E,P+1,0];v.set(M,_*p*w),b.set(h,g*p*w);const S=[w,w,w,w,w,w];y.set(S,m*p*w)}const T=new ct;T.setAttribute("position",new Pt(v,_)),T.setAttribute("uv",new Pt(b,g)),T.setAttribute("faceIndex",new Pt(y,m)),e.push(T),s>ua&&s--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function Mb(n,e,t){const i=new os(n,e,t);return i.texture.mapping=Ba,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function ef(n,e,t,i,s){n.viewport.set(e,t,i,s),n.scissor.set(e,t,i,s)}function ON(n,e,t){const i=new Float32Array(lo),s=new k(0,1,0);return new zi({name:"SphericalGaussianBlur",defines:{n:lo,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:R_(),fragmentShader:` +}`,ft={alphahash_fragment:$L,alphahash_pars_fragment:qL,alphamap_fragment:YL,alphamap_pars_fragment:jL,alphatest_fragment:KL,alphatest_pars_fragment:ZL,aomap_fragment:JL,aomap_pars_fragment:QL,batching_pars_vertex:eD,batching_vertex:tD,begin_vertex:nD,beginnormal_vertex:iD,bsdfs:sD,iridescence_fragment:rD,bumpmap_pars_fragment:oD,clipping_planes_fragment:aD,clipping_planes_pars_fragment:lD,clipping_planes_pars_vertex:cD,clipping_planes_vertex:uD,color_fragment:fD,color_pars_fragment:hD,color_pars_vertex:dD,color_vertex:pD,common:mD,cube_uv_reflection_fragment:gD,defaultnormal_vertex:_D,displacementmap_pars_vertex:vD,displacementmap_vertex:yD,emissivemap_fragment:bD,emissivemap_pars_fragment:xD,colorspace_fragment:MD,colorspace_pars_fragment:SD,envmap_fragment:ED,envmap_common_pars_fragment:TD,envmap_pars_fragment:wD,envmap_pars_vertex:AD,envmap_physical_pars_fragment:kD,envmap_vertex:CD,fog_vertex:RD,fog_pars_vertex:PD,fog_fragment:ID,fog_pars_fragment:LD,gradientmap_pars_fragment:DD,lightmap_pars_fragment:OD,lights_lambert_fragment:ND,lights_lambert_pars_fragment:UD,lights_pars_begin:FD,lights_toon_fragment:BD,lights_toon_pars_fragment:zD,lights_phong_fragment:VD,lights_phong_pars_fragment:HD,lights_physical_fragment:GD,lights_physical_pars_fragment:WD,lights_fragment_begin:XD,lights_fragment_maps:$D,lights_fragment_end:qD,logdepthbuf_fragment:YD,logdepthbuf_pars_fragment:jD,logdepthbuf_pars_vertex:KD,logdepthbuf_vertex:ZD,map_fragment:JD,map_pars_fragment:QD,map_particle_fragment:eO,map_particle_pars_fragment:tO,metalnessmap_fragment:nO,metalnessmap_pars_fragment:iO,morphinstance_vertex:sO,morphcolor_vertex:rO,morphnormal_vertex:oO,morphtarget_pars_vertex:aO,morphtarget_vertex:lO,normal_fragment_begin:cO,normal_fragment_maps:uO,normal_pars_fragment:fO,normal_pars_vertex:hO,normal_vertex:dO,normalmap_pars_fragment:pO,clearcoat_normal_fragment_begin:mO,clearcoat_normal_fragment_maps:gO,clearcoat_pars_fragment:_O,iridescence_pars_fragment:vO,opaque_fragment:yO,packing:bO,premultiplied_alpha_fragment:xO,project_vertex:MO,dithering_fragment:SO,dithering_pars_fragment:EO,roughnessmap_fragment:TO,roughnessmap_pars_fragment:wO,shadowmap_pars_fragment:AO,shadowmap_pars_vertex:CO,shadowmap_vertex:RO,shadowmask_pars_fragment:PO,skinbase_vertex:IO,skinning_pars_vertex:LO,skinning_vertex:DO,skinnormal_vertex:OO,specularmap_fragment:NO,specularmap_pars_fragment:UO,tonemapping_fragment:FO,tonemapping_pars_fragment:kO,transmission_fragment:BO,transmission_pars_fragment:zO,uv_pars_fragment:VO,uv_pars_vertex:HO,uv_vertex:GO,worldpos_vertex:WO,background_vert:XO,background_frag:$O,backgroundCube_vert:qO,backgroundCube_frag:YO,cube_vert:jO,cube_frag:KO,depth_vert:ZO,depth_frag:JO,distanceRGBA_vert:QO,distanceRGBA_frag:eN,equirect_vert:tN,equirect_frag:nN,linedashed_vert:iN,linedashed_frag:sN,meshbasic_vert:rN,meshbasic_frag:oN,meshlambert_vert:aN,meshlambert_frag:lN,meshmatcap_vert:cN,meshmatcap_frag:uN,meshnormal_vert:fN,meshnormal_frag:hN,meshphong_vert:dN,meshphong_frag:pN,meshphysical_vert:mN,meshphysical_frag:gN,meshtoon_vert:_N,meshtoon_frag:vN,points_vert:yN,points_frag:bN,shadow_vert:xN,shadow_frag:MN,sprite_vert:SN,sprite_frag:EN},Ae={common:{diffuse:{value:new Pe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new at},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new at}},envmap:{envMap:{value:null},envMapRotation:{value:new at},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new at}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new at}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new at},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new at},normalScale:{value:new fe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new at},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new at}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new at}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new at}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Pe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Pe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0},uvTransform:{value:new at}},sprite:{diffuse:{value:new Pe(16777215)},opacity:{value:1},center:{value:new fe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new at},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0}}},Pi={basic:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.fog]),vertexShader:ft.meshbasic_vert,fragmentShader:ft.meshbasic_frag},lambert:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)}}]),vertexShader:ft.meshlambert_vert,fragmentShader:ft.meshlambert_frag},phong:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)},specular:{value:new Pe(1118481)},shininess:{value:30}}]),vertexShader:ft.meshphong_vert,fragmentShader:ft.meshphong_frag},standard:{uniforms:On([Ae.common,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.roughnessmap,Ae.metalnessmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ft.meshphysical_vert,fragmentShader:ft.meshphysical_frag},toon:{uniforms:On([Ae.common,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.gradientmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)}}]),vertexShader:ft.meshtoon_vert,fragmentShader:ft.meshtoon_frag},matcap:{uniforms:On([Ae.common,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,{matcap:{value:null}}]),vertexShader:ft.meshmatcap_vert,fragmentShader:ft.meshmatcap_frag},points:{uniforms:On([Ae.points,Ae.fog]),vertexShader:ft.points_vert,fragmentShader:ft.points_frag},dashed:{uniforms:On([Ae.common,Ae.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ft.linedashed_vert,fragmentShader:ft.linedashed_frag},depth:{uniforms:On([Ae.common,Ae.displacementmap]),vertexShader:ft.depth_vert,fragmentShader:ft.depth_frag},normal:{uniforms:On([Ae.common,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,{opacity:{value:1}}]),vertexShader:ft.meshnormal_vert,fragmentShader:ft.meshnormal_frag},sprite:{uniforms:On([Ae.sprite,Ae.fog]),vertexShader:ft.sprite_vert,fragmentShader:ft.sprite_frag},background:{uniforms:{uvTransform:{value:new at},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ft.background_vert,fragmentShader:ft.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new at}},vertexShader:ft.backgroundCube_vert,fragmentShader:ft.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ft.cube_vert,fragmentShader:ft.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ft.equirect_vert,fragmentShader:ft.equirect_frag},distanceRGBA:{uniforms:On([Ae.common,Ae.displacementmap,{referencePosition:{value:new k},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ft.distanceRGBA_vert,fragmentShader:ft.distanceRGBA_frag},shadow:{uniforms:On([Ae.lights,Ae.fog,{color:{value:new Pe(0)},opacity:{value:1}}]),vertexShader:ft.shadow_vert,fragmentShader:ft.shadow_frag}};Pi.physical={uniforms:On([Pi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new at},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new at},clearcoatNormalScale:{value:new fe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new at},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new at},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new at},sheen:{value:0},sheenColor:{value:new Pe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new at},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new at},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new at},transmissionSamplerSize:{value:new fe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new at},attenuationDistance:{value:0},attenuationColor:{value:new Pe(0)},specularColor:{value:new Pe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new at},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new at},anisotropyVector:{value:new fe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new at}}]),vertexShader:ft.meshphysical_vert,fragmentShader:ft.meshphysical_frag};const Qu={r:0,b:0,g:0},Qr=new li,TN=new Ze;function wN(n,e,t,i,s,r,o){const a=new Pe(0);let l=r===!0?0:1,c,u,f=null,h=0,d=null;function p(b){let y=b.isScene===!0?b.background:null;return y&&y.isTexture&&(y=(b.backgroundBlurriness>0?t:e).get(y)),y}function _(b){let y=!1;const T=p(b);T===null?m(a,l):T&&T.isColor&&(m(T,1),y=!0);const w=n.xr.getEnvironmentBlendMode();w==="additive"?i.buffers.color.setClear(0,0,0,1,o):w==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||y)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil))}function g(b,y){const T=p(y);T&&(T.isCubeTexture||T.mapping===Ba)?(u===void 0&&(u=new jt(new Ro(1,1,1),new zi({name:"BackgroundCubeMaterial",uniforms:Ra(Pi.backgroundCube.uniforms),vertexShader:Pi.backgroundCube.vertexShader,fragmentShader:Pi.backgroundCube.fragmentShader,side:Vn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(w,S,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(u)),Qr.copy(y.backgroundRotation),Qr.x*=-1,Qr.y*=-1,Qr.z*=-1,T.isCubeTexture&&T.isRenderTargetTexture===!1&&(Qr.y*=-1,Qr.z*=-1),u.material.uniforms.envMap.value=T,u.material.uniforms.flipEnvMap.value=T.isCubeTexture&&T.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(TN.makeRotationFromEuler(Qr)),u.material.toneMapped=pt.getTransfer(T.colorSpace)!==Ct,(f!==T||h!==T.version||d!==n.toneMapping)&&(u.material.needsUpdate=!0,f=T,h=T.version,d=n.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):T&&T.isTexture&&(c===void 0&&(c=new jt(new Ga(2,2),new zi({name:"BackgroundMaterial",uniforms:Ra(Pi.background.uniforms),vertexShader:Pi.background.vertexShader,fragmentShader:Pi.background.fragmentShader,side:Bs,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(c)),c.material.uniforms.t2D.value=T,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=pt.getTransfer(T.colorSpace)!==Ct,T.matrixAutoUpdate===!0&&T.updateMatrix(),c.material.uniforms.uvTransform.value.copy(T.matrix),(f!==T||h!==T.version||d!==n.toneMapping)&&(c.material.needsUpdate=!0,f=T,h=T.version,d=n.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function m(b,y){b.getRGB(Qu,cE(n)),i.buffers.color.setClear(Qu.r,Qu.g,Qu.b,y,o)}function v(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(b,y=1){a.set(b),l=y,m(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,m(a,l)},render:_,addToRenderList:g,dispose:v}}function AN(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},s=h(null);let r=s,o=!1;function a(E,D,B,z,V){let Q=!1;const j=f(z,B,D);r!==j&&(r=j,c(r.object)),Q=d(E,z,B,V),Q&&p(E,z,B,V),V!==null&&e.update(V,n.ELEMENT_ARRAY_BUFFER),(Q||o)&&(o=!1,y(E,D,B,z),V!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(V).buffer))}function l(){return n.createVertexArray()}function c(E){return n.bindVertexArray(E)}function u(E){return n.deleteVertexArray(E)}function f(E,D,B){const z=B.wireframe===!0;let V=i[E.id];V===void 0&&(V={},i[E.id]=V);let Q=V[D.id];Q===void 0&&(Q={},V[D.id]=Q);let j=Q[z];return j===void 0&&(j=h(l()),Q[z]=j),j}function h(E){const D=[],B=[],z=[];for(let V=0;V=0){const Me=V[Z];let re=Q[Z];if(re===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(re=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(re=E.instanceColor)),Me===void 0||Me.attribute!==re||re&&Me.data!==re.data)return!0;j++}return r.attributesNum!==j||r.index!==z}function p(E,D,B,z){const V={},Q=D.attributes;let j=0;const te=B.getAttributes();for(const Z in te)if(te[Z].location>=0){let Me=Q[Z];Me===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(Me=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(Me=E.instanceColor));const re={};re.attribute=Me,Me&&Me.data&&(re.data=Me.data),V[Z]=re,j++}r.attributes=V,r.attributesNum=j,r.index=z}function _(){const E=r.newAttributes;for(let D=0,B=E.length;D=0){let pe=V[te];if(pe===void 0&&(te==="instanceMatrix"&&E.instanceMatrix&&(pe=E.instanceMatrix),te==="instanceColor"&&E.instanceColor&&(pe=E.instanceColor)),pe!==void 0){const Me=pe.normalized,re=pe.itemSize,xe=e.get(pe);if(xe===void 0)continue;const We=xe.buffer,oe=xe.type,ge=xe.bytesPerElement,Se=oe===n.INT||oe===n.UNSIGNED_INT||pe.gpuType===ad;if(pe.isInterleavedBufferAttribute){const $=pe.data,ae=$.stride,le=pe.offset;if($.isInstancedInterleavedBuffer){for(let ue=0;ue0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";S="mediump"}return S==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const f=t.logarithmicDepthBuffer===!0,h=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=n.getParameter(n.MAX_TEXTURE_SIZE),g=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),m=n.getParameter(n.MAX_VERTEX_ATTRIBS),v=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),b=n.getParameter(n.MAX_VARYING_VECTORS),y=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),T=p>0,w=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:_,maxCubemapSize:g,maxAttributes:m,maxVertexUniforms:v,maxVaryings:b,maxFragmentUniforms:y,vertexTextures:T,maxSamples:w}}function PN(n){const e=this;let t=null,i=0,s=!1,r=!1;const o=new ur,a=new at,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const d=f.length!==0||h||i!==0||s;return s=h,i=f.length,d},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(f,h){t=u(f,h,0)},this.setState=function(f,h,d){const p=f.clippingPlanes,_=f.clipIntersection,g=f.clipShadows,m=n.get(f);if(!s||p===null||p.length===0||r&&!g)r?u(null):c();else{const v=r?0:i,b=v*4;let y=m.clippingState||null;l.value=y,y=u(p,h,b,d);for(let T=0;T!==b;++T)y[T]=t[T];m.clippingState=y,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,d,p){const _=f!==null?f.length:0;let g=null;if(_!==0){if(g=l.value,p!==!0||g===null){const m=d+_*4,v=h.matrixWorldInverse;a.getNormalMatrix(v),(g===null||g.length0){const c=new hE(l.height);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",s),t(c.texture,o.mapping)}else return null}}return o}function s(o){const a=o.target;a.removeEventListener("dispose",s);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}const ua=4,yb=[.125,.215,.35,.446,.526,.582],lo=20,sm=new Ud,bb=new Pe;let rm=null,om=0,am=0,lm=!1;const ro=(1+Math.sqrt(5))/2,ta=1/ro,xb=[new k(-ro,ta,0),new k(ro,ta,0),new k(-ta,0,ro),new k(ta,0,ro),new k(0,ro,-ta),new k(0,ro,ta),new k(-1,1,-1),new k(1,1,-1),new k(-1,1,1),new k(1,1,1)],LN=new k;class wg{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,s=100,r={}){const{size:o=256,position:a=LN}=r;rm=this._renderer.getRenderTarget(),om=this._renderer.getActiveCubeFace(),am=this._renderer.getActiveMipmapLevel(),lm=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,i,s,l,a),t>0&&this._blur(l,0,0,t),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Eb(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Sb(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),f.setRenderTarget(s),g&&f.render(_,l),f.render(e,l)}_.geometry.dispose(),_.material.dispose(),f.toneMapping=d,f.autoClear=h,e.background=m}_textureToCubeUV(e,t){const i=this._renderer,s=e.mapping===zs||e.mapping===Mr;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=Eb()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Sb());const r=s?this._cubemapMaterial:this._equirectMaterial,o=new jt(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;ef(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,sm)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const s=this._lodPlanes.length;for(let r=1;rlo&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${lo}`);const m=[];let v=0;for(let S=0;Sb-ua?s-b+ua:0),w=4*(this._cubeSize-y);ef(t,T,w,3*y,2*y),l.setRenderTarget(t),l.render(f,sm)}}function DN(n){const e=[],t=[],i=[];let s=n;const r=n-ua+1+yb.length;for(let o=0;on-ua?l=yb[o-n+ua-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],d=6,p=6,_=3,g=2,m=1,v=new Float32Array(_*p*d),b=new Float32Array(g*p*d),y=new Float32Array(m*p*d);for(let w=0;w2?0:-1,M=[S,P,0,S+2/3,P,0,S+2/3,P+1,0,S,P,0,S+2/3,P+1,0,S,P+1,0];v.set(M,_*p*w),b.set(h,g*p*w);const E=[w,w,w,w,w,w];y.set(E,m*p*w)}const T=new ct;T.setAttribute("position",new Pt(v,_)),T.setAttribute("uv",new Pt(b,g)),T.setAttribute("faceIndex",new Pt(y,m)),e.push(T),s>ua&&s--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function Mb(n,e,t){const i=new os(n,e,t);return i.texture.mapping=Ba,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function ef(n,e,t,i,s){n.viewport.set(e,t,i,s),n.scissor.set(e,t,i,s)}function ON(n,e,t){const i=new Float32Array(lo),s=new k(0,1,0);return new zi({name:"SphericalGaussianBlur",defines:{n:lo,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:R_(),fragmentShader:` precision mediump float; precision mediump int; @@ -3738,7 +3738,7 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function NN(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===sc||l===rc,u=l===zs||l===Mr;if(c||u){let f=e.get(a);const h=f!==void 0?f.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==h)return t===null&&(t=new wg(n)),f=c?t.fromEquirectangular(a,f):t.fromCubemap(a,f),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),f.texture;if(f!==void 0)return f.texture;{const d=a.image;return c&&d&&d.height>0||u&&d&&s(d)?(t===null&&(t=new wg(n)),f=c?t.fromEquirectangular(a):t.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",r),f.texture):null}}}return a}function s(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(T=Math.ceil(y/e.maxTextureSize),y=e.maxTextureSize);const w=new Float32Array(y*T*4*f),E=new pd(w,y,T,f);E.type=Kn,E.needsUpdate=!0;const P=b*4;for(let S=0;S0)return n;const s=e*t;let r=wb[s];if(r===void 0&&(r=new Float32Array(s),wb[s]=r),e!==0){i.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(r,a)}return r}function rn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t0||u&&d&&s(d)?(t===null&&(t=new wg(n)),f=c?t.fromEquirectangular(a):t.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",r),f.texture):null}}}return a}function s(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(T=Math.ceil(y/e.maxTextureSize),y=e.maxTextureSize);const w=new Float32Array(y*T*4*f),S=new pd(w,y,T,f);S.type=Zn,S.needsUpdate=!0;const P=b*4;for(let E=0;E0)return n;const s=e*t;let r=wb[s];if(r===void 0&&(r=new Float32Array(s),wb[s]=r),e!==0){i.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(r,a)}return r}function rn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` `)}const Db=new at;function NU(n){pt._getMatrix(Db,pt.workingColorSpace,n);const e=`mat3( ${Db.elements.map(t=>t.toFixed(4))} )`;switch(pt.getTransfer(n)){case uc:return[e,"LinearTransferOETF"];case Ct:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",n),[e,"LinearTransferOETF"]}}function Ob(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),s=n.getShaderInfoLog(e).trim();if(i&&s==="")return"";const r=/ERROR: 0:(\d+)/.exec(s);if(r){const o=parseInt(r[1]);return t.toUpperCase()+` @@ -3782,14 +3782,14 @@ void main() { `)+` `+g,m=["#define varying in",t.glslVersion===vg?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===vg?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+m);const b=v+g+o,y=v+m+a,T=Lb(s,s.VERTEX_SHADER,b),w=Lb(s,s.FRAGMENT_SHADER,y);s.attachShader(_,T),s.attachShader(_,w),t.index0AttributeName!==void 0?s.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&s.bindAttribLocation(_,0,"position"),s.linkProgram(_);function E(D){if(n.debug.checkShaderErrors){const B=s.getProgramInfoLog(_).trim(),z=s.getShaderInfoLog(T).trim(),V=s.getShaderInfoLog(w).trim();let Q=!0,j=!0;if(s.getProgramParameter(_,s.LINK_STATUS)===!1)if(Q=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(s,_,T,w);else{const te=Ob(s,T,"vertex"),Z=Ob(s,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(_,s.VALIDATE_STATUS)+` +`+m);const b=v+g+o,y=v+m+a,T=Lb(s,s.VERTEX_SHADER,b),w=Lb(s,s.FRAGMENT_SHADER,y);s.attachShader(_,T),s.attachShader(_,w),t.index0AttributeName!==void 0?s.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&s.bindAttribLocation(_,0,"position"),s.linkProgram(_);function S(D){if(n.debug.checkShaderErrors){const B=s.getProgramInfoLog(_).trim(),z=s.getShaderInfoLog(T).trim(),V=s.getShaderInfoLog(w).trim();let Q=!0,j=!0;if(s.getProgramParameter(_,s.LINK_STATUS)===!1)if(Q=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(s,_,T,w);else{const te=Ob(s,T,"vertex"),Z=Ob(s,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(_,s.VALIDATE_STATUS)+` Material Name: `+D.name+` Material Type: `+D.type+` Program Info Log: `+B+` `+te+` -`+Z)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(z===""||V==="")&&(j=!1);j&&(D.diagnostics={runnable:Q,programLog:B,vertexShader:{log:z,prefix:g},fragmentShader:{log:V,prefix:m}})}s.deleteShader(T),s.deleteShader(w),P=new Ef(s,_),M=VU(s,_)}let P;this.getUniforms=function(){return P===void 0&&E(this),P};let M;this.getAttributes=function(){return M===void 0&&E(this),M};let S=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return S===!1&&(S=s.getProgramParameter(_,LU)),S},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=DU++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=T,this.fragmentShader=w,this}let QU=0;class eF{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(t),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(s)===!1&&(o.add(s),s.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new tF(e),t.set(e,i)),i}}class tF{constructor(e){this.id=QU++,this.code=e,this.usedTimes=0}}function nF(n,e,t,i,s,r,o){const a=new Bc,l=new eF,c=new Set,u=[],f=s.logarithmicDepthBuffer,h=s.vertexTextures;let d=s.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(M){return c.add(M),M===0?"uv":`uv${M}`}function g(M,S,D,B,z){const V=B.fog,Q=z.geometry,j=M.isMeshStandardMaterial?B.environment:null,te=(M.isMeshStandardMaterial?t:e).get(M.envMap||j),Z=te&&te.mapping===Ba?te.image.height:null,pe=p[M.type];M.precision!==null&&(d=s.getMaxPrecision(M.precision),d!==M.precision&&console.warn("THREE.WebGLProgram.getParameters:",M.precision,"not supported, using",d,"instead."));const Me=Q.morphAttributes.position||Q.morphAttributes.normal||Q.morphAttributes.color,re=Me!==void 0?Me.length:0;let xe=0;Q.morphAttributes.position!==void 0&&(xe=1),Q.morphAttributes.normal!==void 0&&(xe=2),Q.morphAttributes.color!==void 0&&(xe=3);let We,oe,ge,Se;if(pe){const wt=Pi[pe];We=wt.vertexShader,oe=wt.fragmentShader}else We=M.vertexShader,oe=M.fragmentShader,l.update(M),ge=l.getVertexShaderID(M),Se=l.getFragmentShaderID(M);const $=n.getRenderTarget(),ae=n.state.buffers.depth.getReversed(),le=z.isInstancedMesh===!0,ue=z.isBatchedMesh===!0,$e=!!M.map,N=!!M.matcap,U=!!te,A=!!M.aoMap,W=!!M.lightMap,G=!!M.bumpMap,X=!!M.normalMap,C=!!M.displacementMap,I=!!M.emissiveMap,F=!!M.metalnessMap,H=!!M.roughnessMap,ce=M.anisotropy>0,R=M.clearcoat>0,x=M.dispersion>0,O=M.iridescence>0,Y=M.sheen>0,ne=M.transmission>0,ee=ce&&!!M.anisotropyMap,Te=R&&!!M.clearcoatMap,me=R&&!!M.clearcoatNormalMap,Re=R&&!!M.clearcoatRoughnessMap,De=O&&!!M.iridescenceMap,de=O&&!!M.iridescenceThicknessMap,Oe=Y&&!!M.sheenColorMap,ze=Y&&!!M.sheenRoughnessMap,Ve=!!M.specularMap,we=!!M.specularColorMap,it=!!M.specularIntensityMap,q=ne&&!!M.transmissionMap,Ie=ne&&!!M.thicknessMap,_e=!!M.gradientMap,Be=!!M.alphaMap,ve=M.alphaTest>0,he=!!M.alphaHash,He=!!M.extensions;let ot=ts;M.toneMapped&&($===null||$.isXRRenderTarget===!0)&&(ot=n.toneMapping);const Nt={shaderID:pe,shaderType:M.type,shaderName:M.name,vertexShader:We,fragmentShader:oe,defines:M.defines,customVertexShaderID:ge,customFragmentShaderID:Se,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:d,batching:ue,batchingColor:ue&&z._colorsTexture!==null,instancing:le,instancingColor:le&&z.instanceColor!==null,instancingMorph:le&&z.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:$===null?n.outputColorSpace:$.isXRRenderTarget===!0?$.texture.colorSpace:Eo,alphaToCoverage:!!M.alphaToCoverage,map:$e,matcap:N,envMap:U,envMapMode:U&&te.mapping,envMapCubeUVHeight:Z,aoMap:A,lightMap:W,bumpMap:G,normalMap:X,displacementMap:h&&C,emissiveMap:I,normalMapObjectSpace:X&&M.normalMapType===Z1,normalMapTangentSpace:X&&M.normalMapType===Cr,metalnessMap:F,roughnessMap:H,anisotropy:ce,anisotropyMap:ee,clearcoat:R,clearcoatMap:Te,clearcoatNormalMap:me,clearcoatRoughnessMap:Re,dispersion:x,iridescence:O,iridescenceMap:De,iridescenceThicknessMap:de,sheen:Y,sheenColorMap:Oe,sheenRoughnessMap:ze,specularMap:Ve,specularColorMap:we,specularIntensityMap:it,transmission:ne,transmissionMap:q,thicknessMap:Ie,gradientMap:_e,opaque:M.transparent===!1&&M.blending===_o&&M.alphaToCoverage===!1,alphaMap:Be,alphaTest:ve,alphaHash:he,combine:M.combine,mapUv:$e&&_(M.map.channel),aoMapUv:A&&_(M.aoMap.channel),lightMapUv:W&&_(M.lightMap.channel),bumpMapUv:G&&_(M.bumpMap.channel),normalMapUv:X&&_(M.normalMap.channel),displacementMapUv:C&&_(M.displacementMap.channel),emissiveMapUv:I&&_(M.emissiveMap.channel),metalnessMapUv:F&&_(M.metalnessMap.channel),roughnessMapUv:H&&_(M.roughnessMap.channel),anisotropyMapUv:ee&&_(M.anisotropyMap.channel),clearcoatMapUv:Te&&_(M.clearcoatMap.channel),clearcoatNormalMapUv:me&&_(M.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Re&&_(M.clearcoatRoughnessMap.channel),iridescenceMapUv:De&&_(M.iridescenceMap.channel),iridescenceThicknessMapUv:de&&_(M.iridescenceThicknessMap.channel),sheenColorMapUv:Oe&&_(M.sheenColorMap.channel),sheenRoughnessMapUv:ze&&_(M.sheenRoughnessMap.channel),specularMapUv:Ve&&_(M.specularMap.channel),specularColorMapUv:we&&_(M.specularColorMap.channel),specularIntensityMapUv:it&&_(M.specularIntensityMap.channel),transmissionMapUv:q&&_(M.transmissionMap.channel),thicknessMapUv:Ie&&_(M.thicknessMap.channel),alphaMapUv:Be&&_(M.alphaMap.channel),vertexTangents:!!Q.attributes.tangent&&(X||ce),vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!Q.attributes.color&&Q.attributes.color.itemSize===4,pointsUvs:z.isPoints===!0&&!!Q.attributes.uv&&($e||Be),fog:!!V,useFog:M.fog===!0,fogExp2:!!V&&V.isFogExp2,flatShading:M.flatShading===!0,sizeAttenuation:M.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:ae,skinning:z.isSkinnedMesh===!0,morphTargets:Q.morphAttributes.position!==void 0,morphNormals:Q.morphAttributes.normal!==void 0,morphColors:Q.morphAttributes.color!==void 0,morphTargetsCount:re,morphTextureStride:xe,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numLightProbes:S.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:M.dithering,shadowMapEnabled:n.shadowMap.enabled&&D.length>0,shadowMapType:n.shadowMap.type,toneMapping:ot,decodeVideoTexture:$e&&M.map.isVideoTexture===!0&&pt.getTransfer(M.map.colorSpace)===Ct,decodeVideoTextureEmissive:I&&M.emissiveMap.isVideoTexture===!0&&pt.getTransfer(M.emissiveMap.colorSpace)===Ct,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===Ii,flipSided:M.side===Vn,useDepthPacking:M.depthPacking>=0,depthPacking:M.depthPacking||0,index0AttributeName:M.index0AttributeName,extensionClipCullDistance:He&&M.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(He&&M.extensions.multiDraw===!0||ue)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:M.customProgramCacheKey()};return Nt.vertexUv1s=c.has(1),Nt.vertexUv2s=c.has(2),Nt.vertexUv3s=c.has(3),c.clear(),Nt}function m(M){const S=[];if(M.shaderID?S.push(M.shaderID):(S.push(M.customVertexShaderID),S.push(M.customFragmentShaderID)),M.defines!==void 0)for(const D in M.defines)S.push(D),S.push(M.defines[D]);return M.isRawShaderMaterial===!1&&(v(S,M),b(S,M),S.push(n.outputColorSpace)),S.push(M.customProgramCacheKey),S.join()}function v(M,S){M.push(S.precision),M.push(S.outputColorSpace),M.push(S.envMapMode),M.push(S.envMapCubeUVHeight),M.push(S.mapUv),M.push(S.alphaMapUv),M.push(S.lightMapUv),M.push(S.aoMapUv),M.push(S.bumpMapUv),M.push(S.normalMapUv),M.push(S.displacementMapUv),M.push(S.emissiveMapUv),M.push(S.metalnessMapUv),M.push(S.roughnessMapUv),M.push(S.anisotropyMapUv),M.push(S.clearcoatMapUv),M.push(S.clearcoatNormalMapUv),M.push(S.clearcoatRoughnessMapUv),M.push(S.iridescenceMapUv),M.push(S.iridescenceThicknessMapUv),M.push(S.sheenColorMapUv),M.push(S.sheenRoughnessMapUv),M.push(S.specularMapUv),M.push(S.specularColorMapUv),M.push(S.specularIntensityMapUv),M.push(S.transmissionMapUv),M.push(S.thicknessMapUv),M.push(S.combine),M.push(S.fogExp2),M.push(S.sizeAttenuation),M.push(S.morphTargetsCount),M.push(S.morphAttributeCount),M.push(S.numDirLights),M.push(S.numPointLights),M.push(S.numSpotLights),M.push(S.numSpotLightMaps),M.push(S.numHemiLights),M.push(S.numRectAreaLights),M.push(S.numDirLightShadows),M.push(S.numPointLightShadows),M.push(S.numSpotLightShadows),M.push(S.numSpotLightShadowsWithMaps),M.push(S.numLightProbes),M.push(S.shadowMapType),M.push(S.toneMapping),M.push(S.numClippingPlanes),M.push(S.numClipIntersection),M.push(S.depthPacking)}function b(M,S){a.disableAll(),S.supportsVertexTextures&&a.enable(0),S.instancing&&a.enable(1),S.instancingColor&&a.enable(2),S.instancingMorph&&a.enable(3),S.matcap&&a.enable(4),S.envMap&&a.enable(5),S.normalMapObjectSpace&&a.enable(6),S.normalMapTangentSpace&&a.enable(7),S.clearcoat&&a.enable(8),S.iridescence&&a.enable(9),S.alphaTest&&a.enable(10),S.vertexColors&&a.enable(11),S.vertexAlphas&&a.enable(12),S.vertexUv1s&&a.enable(13),S.vertexUv2s&&a.enable(14),S.vertexUv3s&&a.enable(15),S.vertexTangents&&a.enable(16),S.anisotropy&&a.enable(17),S.alphaHash&&a.enable(18),S.batching&&a.enable(19),S.dispersion&&a.enable(20),S.batchingColor&&a.enable(21),M.push(a.mask),a.disableAll(),S.fog&&a.enable(0),S.useFog&&a.enable(1),S.flatShading&&a.enable(2),S.logarithmicDepthBuffer&&a.enable(3),S.reverseDepthBuffer&&a.enable(4),S.skinning&&a.enable(5),S.morphTargets&&a.enable(6),S.morphNormals&&a.enable(7),S.morphColors&&a.enable(8),S.premultipliedAlpha&&a.enable(9),S.shadowMapEnabled&&a.enable(10),S.doubleSided&&a.enable(11),S.flipSided&&a.enable(12),S.useDepthPacking&&a.enable(13),S.dithering&&a.enable(14),S.transmission&&a.enable(15),S.sheen&&a.enable(16),S.opaque&&a.enable(17),S.pointsUvs&&a.enable(18),S.decodeVideoTexture&&a.enable(19),S.decodeVideoTextureEmissive&&a.enable(20),S.alphaToCoverage&&a.enable(21),M.push(a.mask)}function y(M){const S=p[M.type];let D;if(S){const B=Pi[S];D=uE.clone(B.uniforms)}else D=M.uniforms;return D}function T(M,S){let D;for(let B=0,z=u.length;B0?i.push(m):d.transparent===!0?s.push(m):t.push(m)}function l(f,h,d,p,_,g){const m=o(f,h,d,p,_,g);d.transmission>0?i.unshift(m):d.transparent===!0?s.unshift(m):t.unshift(m)}function c(f,h){t.length>1&&t.sort(f||sF),i.length>1&&i.sort(h||Bb),s.length>1&&s.sort(h||Bb)}function u(){for(let f=e,h=n.length;f=r.length?(o=new zb,r.push(o)):o=r[s],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function oF(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new k,color:new Pe};break;case"SpotLight":t={position:new k,direction:new k,color:new Pe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new k,color:new Pe,distance:0,decay:0};break;case"HemisphereLight":t={direction:new k,skyColor:new Pe,groundColor:new Pe};break;case"RectAreaLight":t={color:new Pe,position:new k,halfWidth:new k,halfHeight:new k};break}return n[e.id]=t,t}}}function aF(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let lF=0;function cF(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function uF(n){const e=new oF,t=aF(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new k);const s=new k,r=new Ze,o=new Ze;function a(c){let u=0,f=0,h=0;for(let M=0;M<9;M++)i.probe[M].set(0,0,0);let d=0,p=0,_=0,g=0,m=0,v=0,b=0,y=0,T=0,w=0,E=0;c.sort(cF);for(let M=0,S=c.length;M0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Ae.LTC_FLOAT_1,i.rectAreaLTC2=Ae.LTC_FLOAT_2):(i.rectAreaLTC1=Ae.LTC_HALF_1,i.rectAreaLTC2=Ae.LTC_HALF_2)),i.ambient[0]=u,i.ambient[1]=f,i.ambient[2]=h;const P=i.hash;(P.directionalLength!==d||P.pointLength!==p||P.spotLength!==_||P.rectAreaLength!==g||P.hemiLength!==m||P.numDirectionalShadows!==v||P.numPointShadows!==b||P.numSpotShadows!==y||P.numSpotMaps!==T||P.numLightProbes!==E)&&(i.directional.length=d,i.spot.length=_,i.rectArea.length=g,i.point.length=p,i.hemi.length=m,i.directionalShadow.length=v,i.directionalShadowMap.length=v,i.pointShadow.length=b,i.pointShadowMap.length=b,i.spotShadow.length=y,i.spotShadowMap.length=y,i.directionalShadowMatrix.length=v,i.pointShadowMatrix.length=b,i.spotLightMatrix.length=y+T-w,i.spotLightMap.length=T,i.numSpotLightShadowsWithMaps=w,i.numLightProbes=E,P.directionalLength=d,P.pointLength=p,P.spotLength=_,P.rectAreaLength=g,P.hemiLength=m,P.numDirectionalShadows=v,P.numPointShadows=b,P.numSpotShadows=y,P.numSpotMaps=T,P.numLightProbes=E,i.version=lF++)}function l(c,u){let f=0,h=0,d=0,p=0,_=0;const g=u.matrixWorldInverse;for(let m=0,v=c.length;m=o.length?(a=new Vb(n),o.push(a)):a=o[r],a}function i(){e=new WeakMap}return{get:t,dispose:i}}const hF=`void main() { +`+Z)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(z===""||V==="")&&(j=!1);j&&(D.diagnostics={runnable:Q,programLog:B,vertexShader:{log:z,prefix:g},fragmentShader:{log:V,prefix:m}})}s.deleteShader(T),s.deleteShader(w),P=new Ef(s,_),M=VU(s,_)}let P;this.getUniforms=function(){return P===void 0&&S(this),P};let M;this.getAttributes=function(){return M===void 0&&S(this),M};let E=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=s.getProgramParameter(_,LU)),E},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=DU++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=T,this.fragmentShader=w,this}let QU=0;class eF{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(t),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(s)===!1&&(o.add(s),s.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new tF(e),t.set(e,i)),i}}class tF{constructor(e){this.id=QU++,this.code=e,this.usedTimes=0}}function nF(n,e,t,i,s,r,o){const a=new Bc,l=new eF,c=new Set,u=[],f=s.logarithmicDepthBuffer,h=s.vertexTextures;let d=s.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(M){return c.add(M),M===0?"uv":`uv${M}`}function g(M,E,D,B,z){const V=B.fog,Q=z.geometry,j=M.isMeshStandardMaterial?B.environment:null,te=(M.isMeshStandardMaterial?t:e).get(M.envMap||j),Z=te&&te.mapping===Ba?te.image.height:null,pe=p[M.type];M.precision!==null&&(d=s.getMaxPrecision(M.precision),d!==M.precision&&console.warn("THREE.WebGLProgram.getParameters:",M.precision,"not supported, using",d,"instead."));const Me=Q.morphAttributes.position||Q.morphAttributes.normal||Q.morphAttributes.color,re=Me!==void 0?Me.length:0;let xe=0;Q.morphAttributes.position!==void 0&&(xe=1),Q.morphAttributes.normal!==void 0&&(xe=2),Q.morphAttributes.color!==void 0&&(xe=3);let We,oe,ge,Se;if(pe){const wt=Pi[pe];We=wt.vertexShader,oe=wt.fragmentShader}else We=M.vertexShader,oe=M.fragmentShader,l.update(M),ge=l.getVertexShaderID(M),Se=l.getFragmentShaderID(M);const $=n.getRenderTarget(),ae=n.state.buffers.depth.getReversed(),le=z.isInstancedMesh===!0,ue=z.isBatchedMesh===!0,$e=!!M.map,N=!!M.matcap,U=!!te,A=!!M.aoMap,W=!!M.lightMap,G=!!M.bumpMap,X=!!M.normalMap,C=!!M.displacementMap,I=!!M.emissiveMap,F=!!M.metalnessMap,H=!!M.roughnessMap,ce=M.anisotropy>0,R=M.clearcoat>0,x=M.dispersion>0,O=M.iridescence>0,Y=M.sheen>0,ne=M.transmission>0,ee=ce&&!!M.anisotropyMap,Te=R&&!!M.clearcoatMap,me=R&&!!M.clearcoatNormalMap,Re=R&&!!M.clearcoatRoughnessMap,De=O&&!!M.iridescenceMap,de=O&&!!M.iridescenceThicknessMap,Ne=Y&&!!M.sheenColorMap,ze=Y&&!!M.sheenRoughnessMap,Ve=!!M.specularMap,we=!!M.specularColorMap,it=!!M.specularIntensityMap,q=ne&&!!M.transmissionMap,Ie=ne&&!!M.thicknessMap,_e=!!M.gradientMap,Be=!!M.alphaMap,ve=M.alphaTest>0,he=!!M.alphaHash,He=!!M.extensions;let ot=ts;M.toneMapped&&($===null||$.isXRRenderTarget===!0)&&(ot=n.toneMapping);const Ut={shaderID:pe,shaderType:M.type,shaderName:M.name,vertexShader:We,fragmentShader:oe,defines:M.defines,customVertexShaderID:ge,customFragmentShaderID:Se,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:d,batching:ue,batchingColor:ue&&z._colorsTexture!==null,instancing:le,instancingColor:le&&z.instanceColor!==null,instancingMorph:le&&z.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:$===null?n.outputColorSpace:$.isXRRenderTarget===!0?$.texture.colorSpace:Eo,alphaToCoverage:!!M.alphaToCoverage,map:$e,matcap:N,envMap:U,envMapMode:U&&te.mapping,envMapCubeUVHeight:Z,aoMap:A,lightMap:W,bumpMap:G,normalMap:X,displacementMap:h&&C,emissiveMap:I,normalMapObjectSpace:X&&M.normalMapType===Z1,normalMapTangentSpace:X&&M.normalMapType===Cr,metalnessMap:F,roughnessMap:H,anisotropy:ce,anisotropyMap:ee,clearcoat:R,clearcoatMap:Te,clearcoatNormalMap:me,clearcoatRoughnessMap:Re,dispersion:x,iridescence:O,iridescenceMap:De,iridescenceThicknessMap:de,sheen:Y,sheenColorMap:Ne,sheenRoughnessMap:ze,specularMap:Ve,specularColorMap:we,specularIntensityMap:it,transmission:ne,transmissionMap:q,thicknessMap:Ie,gradientMap:_e,opaque:M.transparent===!1&&M.blending===_o&&M.alphaToCoverage===!1,alphaMap:Be,alphaTest:ve,alphaHash:he,combine:M.combine,mapUv:$e&&_(M.map.channel),aoMapUv:A&&_(M.aoMap.channel),lightMapUv:W&&_(M.lightMap.channel),bumpMapUv:G&&_(M.bumpMap.channel),normalMapUv:X&&_(M.normalMap.channel),displacementMapUv:C&&_(M.displacementMap.channel),emissiveMapUv:I&&_(M.emissiveMap.channel),metalnessMapUv:F&&_(M.metalnessMap.channel),roughnessMapUv:H&&_(M.roughnessMap.channel),anisotropyMapUv:ee&&_(M.anisotropyMap.channel),clearcoatMapUv:Te&&_(M.clearcoatMap.channel),clearcoatNormalMapUv:me&&_(M.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Re&&_(M.clearcoatRoughnessMap.channel),iridescenceMapUv:De&&_(M.iridescenceMap.channel),iridescenceThicknessMapUv:de&&_(M.iridescenceThicknessMap.channel),sheenColorMapUv:Ne&&_(M.sheenColorMap.channel),sheenRoughnessMapUv:ze&&_(M.sheenRoughnessMap.channel),specularMapUv:Ve&&_(M.specularMap.channel),specularColorMapUv:we&&_(M.specularColorMap.channel),specularIntensityMapUv:it&&_(M.specularIntensityMap.channel),transmissionMapUv:q&&_(M.transmissionMap.channel),thicknessMapUv:Ie&&_(M.thicknessMap.channel),alphaMapUv:Be&&_(M.alphaMap.channel),vertexTangents:!!Q.attributes.tangent&&(X||ce),vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!Q.attributes.color&&Q.attributes.color.itemSize===4,pointsUvs:z.isPoints===!0&&!!Q.attributes.uv&&($e||Be),fog:!!V,useFog:M.fog===!0,fogExp2:!!V&&V.isFogExp2,flatShading:M.flatShading===!0,sizeAttenuation:M.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:ae,skinning:z.isSkinnedMesh===!0,morphTargets:Q.morphAttributes.position!==void 0,morphNormals:Q.morphAttributes.normal!==void 0,morphColors:Q.morphAttributes.color!==void 0,morphTargetsCount:re,morphTextureStride:xe,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:M.dithering,shadowMapEnabled:n.shadowMap.enabled&&D.length>0,shadowMapType:n.shadowMap.type,toneMapping:ot,decodeVideoTexture:$e&&M.map.isVideoTexture===!0&&pt.getTransfer(M.map.colorSpace)===Ct,decodeVideoTextureEmissive:I&&M.emissiveMap.isVideoTexture===!0&&pt.getTransfer(M.emissiveMap.colorSpace)===Ct,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===Ii,flipSided:M.side===Vn,useDepthPacking:M.depthPacking>=0,depthPacking:M.depthPacking||0,index0AttributeName:M.index0AttributeName,extensionClipCullDistance:He&&M.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(He&&M.extensions.multiDraw===!0||ue)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:M.customProgramCacheKey()};return Ut.vertexUv1s=c.has(1),Ut.vertexUv2s=c.has(2),Ut.vertexUv3s=c.has(3),c.clear(),Ut}function m(M){const E=[];if(M.shaderID?E.push(M.shaderID):(E.push(M.customVertexShaderID),E.push(M.customFragmentShaderID)),M.defines!==void 0)for(const D in M.defines)E.push(D),E.push(M.defines[D]);return M.isRawShaderMaterial===!1&&(v(E,M),b(E,M),E.push(n.outputColorSpace)),E.push(M.customProgramCacheKey),E.join()}function v(M,E){M.push(E.precision),M.push(E.outputColorSpace),M.push(E.envMapMode),M.push(E.envMapCubeUVHeight),M.push(E.mapUv),M.push(E.alphaMapUv),M.push(E.lightMapUv),M.push(E.aoMapUv),M.push(E.bumpMapUv),M.push(E.normalMapUv),M.push(E.displacementMapUv),M.push(E.emissiveMapUv),M.push(E.metalnessMapUv),M.push(E.roughnessMapUv),M.push(E.anisotropyMapUv),M.push(E.clearcoatMapUv),M.push(E.clearcoatNormalMapUv),M.push(E.clearcoatRoughnessMapUv),M.push(E.iridescenceMapUv),M.push(E.iridescenceThicknessMapUv),M.push(E.sheenColorMapUv),M.push(E.sheenRoughnessMapUv),M.push(E.specularMapUv),M.push(E.specularColorMapUv),M.push(E.specularIntensityMapUv),M.push(E.transmissionMapUv),M.push(E.thicknessMapUv),M.push(E.combine),M.push(E.fogExp2),M.push(E.sizeAttenuation),M.push(E.morphTargetsCount),M.push(E.morphAttributeCount),M.push(E.numDirLights),M.push(E.numPointLights),M.push(E.numSpotLights),M.push(E.numSpotLightMaps),M.push(E.numHemiLights),M.push(E.numRectAreaLights),M.push(E.numDirLightShadows),M.push(E.numPointLightShadows),M.push(E.numSpotLightShadows),M.push(E.numSpotLightShadowsWithMaps),M.push(E.numLightProbes),M.push(E.shadowMapType),M.push(E.toneMapping),M.push(E.numClippingPlanes),M.push(E.numClipIntersection),M.push(E.depthPacking)}function b(M,E){a.disableAll(),E.supportsVertexTextures&&a.enable(0),E.instancing&&a.enable(1),E.instancingColor&&a.enable(2),E.instancingMorph&&a.enable(3),E.matcap&&a.enable(4),E.envMap&&a.enable(5),E.normalMapObjectSpace&&a.enable(6),E.normalMapTangentSpace&&a.enable(7),E.clearcoat&&a.enable(8),E.iridescence&&a.enable(9),E.alphaTest&&a.enable(10),E.vertexColors&&a.enable(11),E.vertexAlphas&&a.enable(12),E.vertexUv1s&&a.enable(13),E.vertexUv2s&&a.enable(14),E.vertexUv3s&&a.enable(15),E.vertexTangents&&a.enable(16),E.anisotropy&&a.enable(17),E.alphaHash&&a.enable(18),E.batching&&a.enable(19),E.dispersion&&a.enable(20),E.batchingColor&&a.enable(21),M.push(a.mask),a.disableAll(),E.fog&&a.enable(0),E.useFog&&a.enable(1),E.flatShading&&a.enable(2),E.logarithmicDepthBuffer&&a.enable(3),E.reverseDepthBuffer&&a.enable(4),E.skinning&&a.enable(5),E.morphTargets&&a.enable(6),E.morphNormals&&a.enable(7),E.morphColors&&a.enable(8),E.premultipliedAlpha&&a.enable(9),E.shadowMapEnabled&&a.enable(10),E.doubleSided&&a.enable(11),E.flipSided&&a.enable(12),E.useDepthPacking&&a.enable(13),E.dithering&&a.enable(14),E.transmission&&a.enable(15),E.sheen&&a.enable(16),E.opaque&&a.enable(17),E.pointsUvs&&a.enable(18),E.decodeVideoTexture&&a.enable(19),E.decodeVideoTextureEmissive&&a.enable(20),E.alphaToCoverage&&a.enable(21),M.push(a.mask)}function y(M){const E=p[M.type];let D;if(E){const B=Pi[E];D=uE.clone(B.uniforms)}else D=M.uniforms;return D}function T(M,E){let D;for(let B=0,z=u.length;B0?i.push(m):d.transparent===!0?s.push(m):t.push(m)}function l(f,h,d,p,_,g){const m=o(f,h,d,p,_,g);d.transmission>0?i.unshift(m):d.transparent===!0?s.unshift(m):t.unshift(m)}function c(f,h){t.length>1&&t.sort(f||sF),i.length>1&&i.sort(h||Bb),s.length>1&&s.sort(h||Bb)}function u(){for(let f=e,h=n.length;f=r.length?(o=new zb,r.push(o)):o=r[s],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function oF(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new k,color:new Pe};break;case"SpotLight":t={position:new k,direction:new k,color:new Pe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new k,color:new Pe,distance:0,decay:0};break;case"HemisphereLight":t={direction:new k,skyColor:new Pe,groundColor:new Pe};break;case"RectAreaLight":t={color:new Pe,position:new k,halfWidth:new k,halfHeight:new k};break}return n[e.id]=t,t}}}function aF(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let lF=0;function cF(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function uF(n){const e=new oF,t=aF(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new k);const s=new k,r=new Ze,o=new Ze;function a(c){let u=0,f=0,h=0;for(let M=0;M<9;M++)i.probe[M].set(0,0,0);let d=0,p=0,_=0,g=0,m=0,v=0,b=0,y=0,T=0,w=0,S=0;c.sort(cF);for(let M=0,E=c.length;M0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Ae.LTC_FLOAT_1,i.rectAreaLTC2=Ae.LTC_FLOAT_2):(i.rectAreaLTC1=Ae.LTC_HALF_1,i.rectAreaLTC2=Ae.LTC_HALF_2)),i.ambient[0]=u,i.ambient[1]=f,i.ambient[2]=h;const P=i.hash;(P.directionalLength!==d||P.pointLength!==p||P.spotLength!==_||P.rectAreaLength!==g||P.hemiLength!==m||P.numDirectionalShadows!==v||P.numPointShadows!==b||P.numSpotShadows!==y||P.numSpotMaps!==T||P.numLightProbes!==S)&&(i.directional.length=d,i.spot.length=_,i.rectArea.length=g,i.point.length=p,i.hemi.length=m,i.directionalShadow.length=v,i.directionalShadowMap.length=v,i.pointShadow.length=b,i.pointShadowMap.length=b,i.spotShadow.length=y,i.spotShadowMap.length=y,i.directionalShadowMatrix.length=v,i.pointShadowMatrix.length=b,i.spotLightMatrix.length=y+T-w,i.spotLightMap.length=T,i.numSpotLightShadowsWithMaps=w,i.numLightProbes=S,P.directionalLength=d,P.pointLength=p,P.spotLength=_,P.rectAreaLength=g,P.hemiLength=m,P.numDirectionalShadows=v,P.numPointShadows=b,P.numSpotShadows=y,P.numSpotMaps=T,P.numLightProbes=S,i.version=lF++)}function l(c,u){let f=0,h=0,d=0,p=0,_=0;const g=u.matrixWorldInverse;for(let m=0,v=c.length;m=o.length?(a=new Vb(n),o.push(a)):a=o[r],a}function i(){e=new WeakMap}return{get:t,dispose:i}}const hF=`void main() { gl_Position = vec4( position, 1.0 ); }`,dF=`uniform sampler2D shadow_pass; uniform vec2 resolution; @@ -3817,7 +3817,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function pF(n,e,t){let i=new Ha;const s=new fe,r=new fe,o=new vt,a=new __({depthPacking:K1}),l=new v_,c={},u=t.maxTextureSize,f={[Bs]:Vn,[Vn]:Bs,[Ii]:Ii},h=new zi({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new fe},radius:{value:4}},vertexShader:hF,fragmentShader:dF}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const p=new ct;p.setAttribute("position",new Pt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new jt(p,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=G0;let m=this.type;this.render=function(w,E,P){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||w.length===0)return;const M=n.getRenderTarget(),S=n.getActiveCubeFace(),D=n.getActiveMipmapLevel(),B=n.state;B.setBlending(Ds),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const z=m!==Ki&&this.type===Ki,V=m===Ki&&this.type!==Ki;for(let Q=0,j=w.length;Qu||s.y>u)&&(s.x>u&&(r.x=Math.floor(u/pe.x),s.x=r.x*pe.x,Z.mapSize.x=r.x),s.y>u&&(r.y=Math.floor(u/pe.y),s.y=r.y*pe.y,Z.mapSize.y=r.y)),Z.map===null||z===!0||V===!0){const re=this.type!==Ki?{minFilter:yn,magFilter:yn}:{};Z.map!==null&&Z.map.dispose(),Z.map=new os(s.x,s.y,re),Z.map.texture.name=te.name+".shadowMap",Z.camera.updateProjectionMatrix()}n.setRenderTarget(Z.map),n.clear();const Me=Z.getViewportCount();for(let re=0;re0||E.map&&E.alphaTest>0||E.alphaToCoverage===!0){const B=S.uuid,z=E.uuid;let V=c[B];V===void 0&&(V={},c[B]=V);let Q=V[z];Q===void 0&&(Q=S.clone(),V[z]=Q,E.addEventListener("dispose",T)),S=Q}if(S.visible=E.visible,S.wireframe=E.wireframe,M===Ki?S.side=E.shadowSide!==null?E.shadowSide:E.side:S.side=E.shadowSide!==null?E.shadowSide:f[E.side],S.alphaMap=E.alphaMap,S.alphaTest=E.alphaToCoverage===!0?.5:E.alphaTest,S.map=E.map,S.clipShadows=E.clipShadows,S.clippingPlanes=E.clippingPlanes,S.clipIntersection=E.clipIntersection,S.displacementMap=E.displacementMap,S.displacementScale=E.displacementScale,S.displacementBias=E.displacementBias,S.wireframeLinewidth=E.wireframeLinewidth,S.linewidth=E.linewidth,P.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const B=n.properties.get(S);B.light=P}return S}function y(w,E,P,M,S){if(w.visible===!1)return;if(w.layers.test(E.layers)&&(w.isMesh||w.isLine||w.isPoints)&&(w.castShadow||w.receiveShadow&&S===Ki)&&(!w.frustumCulled||i.intersectsObject(w))){w.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,w.matrixWorld);const z=e.update(w),V=w.material;if(Array.isArray(V)){const Q=z.groups;for(let j=0,te=Q.length;j=1):Z.indexOf("OpenGL ES")!==-1&&(te=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),j=te>=2);let pe=null,Me={};const re=n.getParameter(n.SCISSOR_BOX),xe=n.getParameter(n.VIEWPORT),We=new vt().fromArray(re),oe=new vt().fromArray(xe);function ge(q,Ie,_e,Be){const ve=new Uint8Array(4),he=n.createTexture();n.bindTexture(q,he),n.texParameteri(q,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(q,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let He=0;He<_e;He++)q===n.TEXTURE_3D||q===n.TEXTURE_2D_ARRAY?n.texImage3D(Ie,0,n.RGBA,1,1,Be,0,n.RGBA,n.UNSIGNED_BYTE,ve):n.texImage2D(Ie+He,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,ve);return he}const Se={};Se[n.TEXTURE_2D]=ge(n.TEXTURE_2D,n.TEXTURE_2D,1),Se[n.TEXTURE_CUBE_MAP]=ge(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),Se[n.TEXTURE_2D_ARRAY]=ge(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),Se[n.TEXTURE_3D]=ge(n.TEXTURE_3D,n.TEXTURE_3D,1,1),r.setClear(0,0,0,1),o.setClear(1),a.setClear(0),$(n.DEPTH_TEST),o.setFunc(So),G(!1),X(hg),$(n.CULL_FACE),A(Ds);function $(q){u[q]!==!0&&(n.enable(q),u[q]=!0)}function ae(q){u[q]!==!1&&(n.disable(q),u[q]=!1)}function le(q,Ie){return f[q]!==Ie?(n.bindFramebuffer(q,Ie),f[q]=Ie,q===n.DRAW_FRAMEBUFFER&&(f[n.FRAMEBUFFER]=Ie),q===n.FRAMEBUFFER&&(f[n.DRAW_FRAMEBUFFER]=Ie),!0):!1}function ue(q,Ie){let _e=d,Be=!1;if(q){_e=h.get(Ie),_e===void 0&&(_e=[],h.set(Ie,_e));const ve=q.textures;if(_e.length!==ve.length||_e[0]!==n.COLOR_ATTACHMENT0){for(let he=0,He=ve.length;he"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new fe,u=new WeakMap;let f;const h=new WeakMap;let d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function p(R,x){return d?new OffscreenCanvas(R,x):dc("canvas")}function _(R,x,O){let Y=1;const ne=ce(R);if((ne.width>O||ne.height>O)&&(Y=O/Math.max(ne.width,ne.height)),Y<1)if(typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&R instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&R instanceof ImageBitmap||typeof VideoFrame<"u"&&R instanceof VideoFrame){const ee=Math.floor(Y*ne.width),Te=Math.floor(Y*ne.height);f===void 0&&(f=p(ee,Te));const me=x?p(ee,Te):f;return me.width=ee,me.height=Te,me.getContext("2d").drawImage(R,0,0,ee,Te),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ne.width+"x"+ne.height+") to ("+ee+"x"+Te+")."),me}else return"data"in R&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ne.width+"x"+ne.height+")."),R;return R}function g(R){return R.generateMipmaps}function m(R){n.generateMipmap(R)}function v(R){return R.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:R.isWebGL3DRenderTarget?n.TEXTURE_3D:R.isWebGLArrayRenderTarget||R.isCompressedArrayTexture?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function b(R,x,O,Y,ne=!1){if(R!==null){if(n[R]!==void 0)return n[R];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+R+"'")}let ee=x;if(x===n.RED&&(O===n.FLOAT&&(ee=n.R32F),O===n.HALF_FLOAT&&(ee=n.R16F),O===n.UNSIGNED_BYTE&&(ee=n.R8)),x===n.RED_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.R8UI),O===n.UNSIGNED_SHORT&&(ee=n.R16UI),O===n.UNSIGNED_INT&&(ee=n.R32UI),O===n.BYTE&&(ee=n.R8I),O===n.SHORT&&(ee=n.R16I),O===n.INT&&(ee=n.R32I)),x===n.RG&&(O===n.FLOAT&&(ee=n.RG32F),O===n.HALF_FLOAT&&(ee=n.RG16F),O===n.UNSIGNED_BYTE&&(ee=n.RG8)),x===n.RG_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RG8UI),O===n.UNSIGNED_SHORT&&(ee=n.RG16UI),O===n.UNSIGNED_INT&&(ee=n.RG32UI),O===n.BYTE&&(ee=n.RG8I),O===n.SHORT&&(ee=n.RG16I),O===n.INT&&(ee=n.RG32I)),x===n.RGB_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RGB8UI),O===n.UNSIGNED_SHORT&&(ee=n.RGB16UI),O===n.UNSIGNED_INT&&(ee=n.RGB32UI),O===n.BYTE&&(ee=n.RGB8I),O===n.SHORT&&(ee=n.RGB16I),O===n.INT&&(ee=n.RGB32I)),x===n.RGBA_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RGBA8UI),O===n.UNSIGNED_SHORT&&(ee=n.RGBA16UI),O===n.UNSIGNED_INT&&(ee=n.RGBA32UI),O===n.BYTE&&(ee=n.RGBA8I),O===n.SHORT&&(ee=n.RGBA16I),O===n.INT&&(ee=n.RGBA32I)),x===n.RGB&&O===n.UNSIGNED_INT_5_9_9_9_REV&&(ee=n.RGB9_E5),x===n.RGBA){const Te=ne?uc:pt.getTransfer(Y);O===n.FLOAT&&(ee=n.RGBA32F),O===n.HALF_FLOAT&&(ee=n.RGBA16F),O===n.UNSIGNED_BYTE&&(ee=Te===Ct?n.SRGB8_ALPHA8:n.RGBA8),O===n.UNSIGNED_SHORT_4_4_4_4&&(ee=n.RGBA4),O===n.UNSIGNED_SHORT_5_5_5_1&&(ee=n.RGB5_A1)}return(ee===n.R16F||ee===n.R32F||ee===n.RG16F||ee===n.RG32F||ee===n.RGBA16F||ee===n.RGBA32F)&&e.get("EXT_color_buffer_float"),ee}function y(R,x){let O;return R?x===null||x===Vs||x===Ta?O=n.DEPTH24_STENCIL8:x===Kn?O=n.DEPTH32F_STENCIL8:x===Ea&&(O=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):x===null||x===Vs||x===Ta?O=n.DEPTH_COMPONENT24:x===Kn?O=n.DEPTH_COMPONENT32F:x===Ea&&(O=n.DEPTH_COMPONENT16),O}function T(R,x){return g(R)===!0||R.isFramebufferTexture&&R.minFilter!==yn&&R.minFilter!==nn?Math.log2(Math.max(x.width,x.height))+1:R.mipmaps!==void 0&&R.mipmaps.length>0?R.mipmaps.length:R.isCompressedTexture&&Array.isArray(R.image)?x.mipmaps.length:1}function w(R){const x=R.target;x.removeEventListener("dispose",w),P(x),x.isVideoTexture&&u.delete(x)}function E(R){const x=R.target;x.removeEventListener("dispose",E),S(x)}function P(R){const x=i.get(R);if(x.__webglInit===void 0)return;const O=R.source,Y=h.get(O);if(Y){const ne=Y[x.__cacheKey];ne.usedTimes--,ne.usedTimes===0&&M(R),Object.keys(Y).length===0&&h.delete(O)}i.remove(R)}function M(R){const x=i.get(R);n.deleteTexture(x.__webglTexture);const O=R.source,Y=h.get(O);delete Y[x.__cacheKey],o.memory.textures--}function S(R){const x=i.get(R);if(R.depthTexture&&(R.depthTexture.dispose(),i.remove(R.depthTexture)),R.isWebGLCubeRenderTarget)for(let Y=0;Y<6;Y++){if(Array.isArray(x.__webglFramebuffer[Y]))for(let ne=0;ne=s.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+R+" texture units while this GPU supports only "+s.maxTextures),D+=1,R}function V(R){const x=[];return x.push(R.wrapS),x.push(R.wrapT),x.push(R.wrapR||0),x.push(R.magFilter),x.push(R.minFilter),x.push(R.anisotropy),x.push(R.internalFormat),x.push(R.format),x.push(R.type),x.push(R.generateMipmaps),x.push(R.premultiplyAlpha),x.push(R.flipY),x.push(R.unpackAlignment),x.push(R.colorSpace),x.join()}function Q(R,x){const O=i.get(R);if(R.isVideoTexture&&F(R),R.isRenderTargetTexture===!1&&R.version>0&&O.__version!==R.version){const Y=R.image;if(Y===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Y.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Se(O,R,x);return}}t.bindTexture(n.TEXTURE_2D,O.__webglTexture,n.TEXTURE0+x)}function j(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){Se(O,R,x);return}t.bindTexture(n.TEXTURE_2D_ARRAY,O.__webglTexture,n.TEXTURE0+x)}function te(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){Se(O,R,x);return}t.bindTexture(n.TEXTURE_3D,O.__webglTexture,n.TEXTURE0+x)}function Z(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){$(O,R,x);return}t.bindTexture(n.TEXTURE_CUBE_MAP,O.__webglTexture,n.TEXTURE0+x)}const pe={[oc]:n.REPEAT,[gi]:n.CLAMP_TO_EDGE,[ac]:n.MIRRORED_REPEAT},Me={[yn]:n.NEAREST,[X0]:n.NEAREST_MIPMAP_NEAREST,[aa]:n.NEAREST_MIPMAP_LINEAR,[nn]:n.LINEAR,[wl]:n.LINEAR_MIPMAP_NEAREST,[Qi]:n.LINEAR_MIPMAP_LINEAR},re={[J1]:n.NEVER,[sE]:n.ALWAYS,[Q1]:n.LESS,[e_]:n.LEQUAL,[eE]:n.EQUAL,[iE]:n.GEQUAL,[tE]:n.GREATER,[nE]:n.NOTEQUAL};function xe(R,x){if(x.type===Kn&&e.has("OES_texture_float_linear")===!1&&(x.magFilter===nn||x.magFilter===wl||x.magFilter===aa||x.magFilter===Qi||x.minFilter===nn||x.minFilter===wl||x.minFilter===aa||x.minFilter===Qi)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(R,n.TEXTURE_WRAP_S,pe[x.wrapS]),n.texParameteri(R,n.TEXTURE_WRAP_T,pe[x.wrapT]),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,pe[x.wrapR]),n.texParameteri(R,n.TEXTURE_MAG_FILTER,Me[x.magFilter]),n.texParameteri(R,n.TEXTURE_MIN_FILTER,Me[x.minFilter]),x.compareFunction&&(n.texParameteri(R,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(R,n.TEXTURE_COMPARE_FUNC,re[x.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(x.magFilter===yn||x.minFilter!==aa&&x.minFilter!==Qi||x.type===Kn&&e.has("OES_texture_float_linear")===!1)return;if(x.anisotropy>1||i.get(x).__currentAnisotropy){const O=e.get("EXT_texture_filter_anisotropic");n.texParameterf(R,O.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(x.anisotropy,s.getMaxAnisotropy())),i.get(x).__currentAnisotropy=x.anisotropy}}}function We(R,x){let O=!1;R.__webglInit===void 0&&(R.__webglInit=!0,x.addEventListener("dispose",w));const Y=x.source;let ne=h.get(Y);ne===void 0&&(ne={},h.set(Y,ne));const ee=V(x);if(ee!==R.__cacheKey){ne[ee]===void 0&&(ne[ee]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,O=!0),ne[ee].usedTimes++;const Te=ne[R.__cacheKey];Te!==void 0&&(ne[R.__cacheKey].usedTimes--,Te.usedTimes===0&&M(x)),R.__cacheKey=ee,R.__webglTexture=ne[ee].texture}return O}function oe(R,x,O){return Math.floor(Math.floor(R/O)/x)}function ge(R,x,O,Y){const ee=R.updateRanges;if(ee.length===0)t.texSubImage2D(n.TEXTURE_2D,0,0,0,x.width,x.height,O,Y,x.data);else{ee.sort((de,Oe)=>de.start-Oe.start);let Te=0;for(let de=1;de0){q&&Ie&&t.texStorage2D(n.TEXTURE_2D,Be,Ve,it[0].width,it[0].height);for(let ve=0,he=it.length;ve0){const He=Tg(we.width,we.height,x.format,x.type);for(const ot of x.layerUpdates){const Nt=we.data.subarray(ot*He/we.data.BYTES_PER_ELEMENT,(ot+1)*He/we.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,ot,we.width,we.height,1,Oe,Nt)}x.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,0,we.width,we.height,de.depth,Oe,we.data)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,ve,Ve,we.width,we.height,de.depth,0,we.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else q?_e&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,0,we.width,we.height,de.depth,Oe,ze,we.data):t.texImage3D(n.TEXTURE_2D_ARRAY,ve,Ve,we.width,we.height,de.depth,0,Oe,ze,we.data)}else{q&&Ie&&t.texStorage2D(n.TEXTURE_2D,Be,Ve,it[0].width,it[0].height);for(let ve=0,he=it.length;ve0){const ve=Tg(de.width,de.height,x.format,x.type);for(const he of x.layerUpdates){const He=de.data.subarray(he*ve/de.data.BYTES_PER_ELEMENT,(he+1)*ve/de.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,he,de.width,de.height,1,Oe,ze,He)}x.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,de.width,de.height,de.depth,Oe,ze,de.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,Ve,de.width,de.height,de.depth,0,Oe,ze,de.data);else if(x.isData3DTexture)q?(Ie&&t.texStorage3D(n.TEXTURE_3D,Be,Ve,de.width,de.height,de.depth),_e&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,de.width,de.height,de.depth,Oe,ze,de.data)):t.texImage3D(n.TEXTURE_3D,0,Ve,de.width,de.height,de.depth,0,Oe,ze,de.data);else if(x.isFramebufferTexture){if(Ie)if(q)t.texStorage2D(n.TEXTURE_2D,Be,Ve,de.width,de.height);else{let ve=de.width,he=de.height;for(let He=0;He>=1,he>>=1}}else if(it.length>0){if(q&&Ie){const ve=ce(it[0]);t.texStorage2D(n.TEXTURE_2D,Be,Ve,ve.width,ve.height)}for(let ve=0,he=it.length;ve0&&Be++;const he=ce(Oe[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,Be,it,he.width,he.height)}for(let he=0;he<6;he++)if(de){q?_e&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,Oe[he].width,Oe[he].height,Ve,we,Oe[he].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,it,Oe[he].width,Oe[he].height,0,Ve,we,Oe[he].data);for(let He=0;He>ee),ze=Math.max(1,x.height>>ee);ne===n.TEXTURE_3D||ne===n.TEXTURE_2D_ARRAY?t.texImage3D(ne,ee,Re,Oe,ze,x.depth,0,Te,me,null):t.texImage2D(ne,ee,Re,Oe,ze,0,Te,me,null)}t.bindFramebuffer(n.FRAMEBUFFER,R),I(x)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Y,ne,de.__webglTexture,0,C(x)):(ne===n.TEXTURE_2D||ne>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&ne<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Y,ne,de.__webglTexture,ee),t.bindFramebuffer(n.FRAMEBUFFER,null)}function le(R,x,O){if(n.bindRenderbuffer(n.RENDERBUFFER,R),x.depthBuffer){const Y=x.depthTexture,ne=Y&&Y.isDepthTexture?Y.type:null,ee=y(x.stencilBuffer,ne),Te=x.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,me=C(x);I(x)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,me,ee,x.width,x.height):O?n.renderbufferStorageMultisample(n.RENDERBUFFER,me,ee,x.width,x.height):n.renderbufferStorage(n.RENDERBUFFER,ee,x.width,x.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,Te,n.RENDERBUFFER,R)}else{const Y=x.textures;for(let ne=0;ne{delete x.__boundDepthTexture,delete x.__depthDisposeCallback,Y.removeEventListener("dispose",ne)};Y.addEventListener("dispose",ne),x.__depthDisposeCallback=ne}x.__boundDepthTexture=Y}if(R.depthTexture&&!x.__autoAllocateDepthBuffer){if(O)throw new Error("target.depthTexture not supported in Cube render targets");const Y=R.texture.mipmaps;Y&&Y.length>0?ue(x.__webglFramebuffer[0],R):ue(x.__webglFramebuffer,R)}else if(O){x.__webglDepthbuffer=[];for(let Y=0;Y<6;Y++)if(t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer[Y]),x.__webglDepthbuffer[Y]===void 0)x.__webglDepthbuffer[Y]=n.createRenderbuffer(),le(x.__webglDepthbuffer[Y],R,!1);else{const ne=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ee=x.__webglDepthbuffer[Y];n.bindRenderbuffer(n.RENDERBUFFER,ee),n.framebufferRenderbuffer(n.FRAMEBUFFER,ne,n.RENDERBUFFER,ee)}}else{const Y=R.texture.mipmaps;if(Y&&Y.length>0?t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer[0]):t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer),x.__webglDepthbuffer===void 0)x.__webglDepthbuffer=n.createRenderbuffer(),le(x.__webglDepthbuffer,R,!1);else{const ne=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ee=x.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,ee),n.framebufferRenderbuffer(n.FRAMEBUFFER,ne,n.RENDERBUFFER,ee)}}t.bindFramebuffer(n.FRAMEBUFFER,null)}function N(R,x,O){const Y=i.get(R);x!==void 0&&ae(Y.__webglFramebuffer,R,R.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),O!==void 0&&$e(R)}function U(R){const x=R.texture,O=i.get(R),Y=i.get(x);R.addEventListener("dispose",E);const ne=R.textures,ee=R.isWebGLCubeRenderTarget===!0,Te=ne.length>1;if(Te||(Y.__webglTexture===void 0&&(Y.__webglTexture=n.createTexture()),Y.__version=x.version,o.memory.textures++),ee){O.__webglFramebuffer=[];for(let me=0;me<6;me++)if(x.mipmaps&&x.mipmaps.length>0){O.__webglFramebuffer[me]=[];for(let Re=0;Re0){O.__webglFramebuffer=[];for(let me=0;me0&&I(R)===!1){O.__webglMultisampledFramebuffer=n.createFramebuffer(),O.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,O.__webglMultisampledFramebuffer);for(let me=0;me0)for(let Re=0;Re0)for(let Re=0;Re0){if(I(R)===!1){const x=R.textures,O=R.width,Y=R.height;let ne=n.COLOR_BUFFER_BIT;const ee=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Te=i.get(R),me=x.length>1;if(me)for(let De=0;De0?t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Te.__webglFramebuffer[0]):t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Te.__webglFramebuffer);for(let De=0;De0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&x.__useRenderToTexture!==!1}function F(R){const x=o.render.frame;u.get(R)!==x&&(u.set(R,x),R.update())}function H(R,x){const O=R.colorSpace,Y=R.format,ne=R.type;return R.isCompressedTexture===!0||R.isVideoTexture===!0||O!==Eo&&O!==ws&&(pt.getTransfer(O)===Ct?(Y!==zn||ne!==Bi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",O)),x}function ce(R){return typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement?(c.width=R.naturalWidth||R.width,c.height=R.naturalHeight||R.height):typeof VideoFrame<"u"&&R instanceof VideoFrame?(c.width=R.displayWidth,c.height=R.displayHeight):(c.width=R.width,c.height=R.height),c}this.allocateTextureUnit=z,this.resetTextureUnits=B,this.setTexture2D=Q,this.setTexture2DArray=j,this.setTexture3D=te,this.setTextureCube=Z,this.rebindTextures=N,this.setupRenderTarget=U,this.updateRenderTargetMipmap=A,this.updateMultisampleRenderTarget=X,this.setupDepthRenderbuffer=$e,this.setupFrameBufferTexture=ae,this.useMultisampledRTT=I}function mT(n,e){function t(i,s=ws){let r;const o=pt.getTransfer(s);if(i===Bi)return n.UNSIGNED_BYTE;if(i===ld)return n.UNSIGNED_SHORT_4_4_4_4;if(i===cd)return n.UNSIGNED_SHORT_5_5_5_1;if(i===Y0)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===$0)return n.BYTE;if(i===q0)return n.SHORT;if(i===Ea)return n.UNSIGNED_SHORT;if(i===ad)return n.INT;if(i===Vs)return n.UNSIGNED_INT;if(i===Kn)return n.FLOAT;if(i===za)return n.HALF_FLOAT;if(i===j0)return n.ALPHA;if(i===K0)return n.RGB;if(i===zn)return n.RGBA;if(i===wa)return n.DEPTH_COMPONENT;if(i===Aa)return n.DEPTH_STENCIL;if(i===ud)return n.RED;if(i===kc)return n.RED_INTEGER;if(i===Z0)return n.RG;if(i===fd)return n.RG_INTEGER;if(i===hd)return n.RGBA_INTEGER;if(i===Al||i===Cl||i===Rl||i===Pl)if(o===Ct)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(i===Al)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Cl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Rl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Pl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(i===Al)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Cl)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Rl)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Pl)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Jf||i===Qf||i===eh||i===th)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(i===Jf)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Qf)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===eh)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===th)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===nh||i===ih||i===sh)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(i===nh||i===ih)return o===Ct?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(i===sh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===rh||i===oh||i===ah||i===lh||i===ch||i===uh||i===fh||i===hh||i===dh||i===ph||i===mh||i===gh||i===_h||i===vh)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(i===rh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===oh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===ah)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===lh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===ch)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===uh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===fh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===hh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===dh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===ph)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===mh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===gh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===_h)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===vh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===Il||i===yh||i===bh)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(i===Il)return o===Ct?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===yh)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===bh)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===J0||i===xh||i===Mh||i===Sh)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(i===Il)return r.COMPRESSED_RED_RGTC1_EXT;if(i===xh)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===Mh)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===Sh)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Ta?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}const vF=` +}`;function pF(n,e,t){let i=new Ha;const s=new fe,r=new fe,o=new vt,a=new __({depthPacking:K1}),l=new v_,c={},u=t.maxTextureSize,f={[Bs]:Vn,[Vn]:Bs,[Ii]:Ii},h=new zi({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new fe},radius:{value:4}},vertexShader:hF,fragmentShader:dF}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const p=new ct;p.setAttribute("position",new Pt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new jt(p,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=G0;let m=this.type;this.render=function(w,S,P){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||w.length===0)return;const M=n.getRenderTarget(),E=n.getActiveCubeFace(),D=n.getActiveMipmapLevel(),B=n.state;B.setBlending(Ds),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const z=m!==Ki&&this.type===Ki,V=m===Ki&&this.type!==Ki;for(let Q=0,j=w.length;Qu||s.y>u)&&(s.x>u&&(r.x=Math.floor(u/pe.x),s.x=r.x*pe.x,Z.mapSize.x=r.x),s.y>u&&(r.y=Math.floor(u/pe.y),s.y=r.y*pe.y,Z.mapSize.y=r.y)),Z.map===null||z===!0||V===!0){const re=this.type!==Ki?{minFilter:yn,magFilter:yn}:{};Z.map!==null&&Z.map.dispose(),Z.map=new os(s.x,s.y,re),Z.map.texture.name=te.name+".shadowMap",Z.camera.updateProjectionMatrix()}n.setRenderTarget(Z.map),n.clear();const Me=Z.getViewportCount();for(let re=0;re0||S.map&&S.alphaTest>0||S.alphaToCoverage===!0){const B=E.uuid,z=S.uuid;let V=c[B];V===void 0&&(V={},c[B]=V);let Q=V[z];Q===void 0&&(Q=E.clone(),V[z]=Q,S.addEventListener("dispose",T)),E=Q}if(E.visible=S.visible,E.wireframe=S.wireframe,M===Ki?E.side=S.shadowSide!==null?S.shadowSide:S.side:E.side=S.shadowSide!==null?S.shadowSide:f[S.side],E.alphaMap=S.alphaMap,E.alphaTest=S.alphaToCoverage===!0?.5:S.alphaTest,E.map=S.map,E.clipShadows=S.clipShadows,E.clippingPlanes=S.clippingPlanes,E.clipIntersection=S.clipIntersection,E.displacementMap=S.displacementMap,E.displacementScale=S.displacementScale,E.displacementBias=S.displacementBias,E.wireframeLinewidth=S.wireframeLinewidth,E.linewidth=S.linewidth,P.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const B=n.properties.get(E);B.light=P}return E}function y(w,S,P,M,E){if(w.visible===!1)return;if(w.layers.test(S.layers)&&(w.isMesh||w.isLine||w.isPoints)&&(w.castShadow||w.receiveShadow&&E===Ki)&&(!w.frustumCulled||i.intersectsObject(w))){w.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,w.matrixWorld);const z=e.update(w),V=w.material;if(Array.isArray(V)){const Q=z.groups;for(let j=0,te=Q.length;j=1):Z.indexOf("OpenGL ES")!==-1&&(te=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),j=te>=2);let pe=null,Me={};const re=n.getParameter(n.SCISSOR_BOX),xe=n.getParameter(n.VIEWPORT),We=new vt().fromArray(re),oe=new vt().fromArray(xe);function ge(q,Ie,_e,Be){const ve=new Uint8Array(4),he=n.createTexture();n.bindTexture(q,he),n.texParameteri(q,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(q,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let He=0;He<_e;He++)q===n.TEXTURE_3D||q===n.TEXTURE_2D_ARRAY?n.texImage3D(Ie,0,n.RGBA,1,1,Be,0,n.RGBA,n.UNSIGNED_BYTE,ve):n.texImage2D(Ie+He,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,ve);return he}const Se={};Se[n.TEXTURE_2D]=ge(n.TEXTURE_2D,n.TEXTURE_2D,1),Se[n.TEXTURE_CUBE_MAP]=ge(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),Se[n.TEXTURE_2D_ARRAY]=ge(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),Se[n.TEXTURE_3D]=ge(n.TEXTURE_3D,n.TEXTURE_3D,1,1),r.setClear(0,0,0,1),o.setClear(1),a.setClear(0),$(n.DEPTH_TEST),o.setFunc(So),G(!1),X(hg),$(n.CULL_FACE),A(Ds);function $(q){u[q]!==!0&&(n.enable(q),u[q]=!0)}function ae(q){u[q]!==!1&&(n.disable(q),u[q]=!1)}function le(q,Ie){return f[q]!==Ie?(n.bindFramebuffer(q,Ie),f[q]=Ie,q===n.DRAW_FRAMEBUFFER&&(f[n.FRAMEBUFFER]=Ie),q===n.FRAMEBUFFER&&(f[n.DRAW_FRAMEBUFFER]=Ie),!0):!1}function ue(q,Ie){let _e=d,Be=!1;if(q){_e=h.get(Ie),_e===void 0&&(_e=[],h.set(Ie,_e));const ve=q.textures;if(_e.length!==ve.length||_e[0]!==n.COLOR_ATTACHMENT0){for(let he=0,He=ve.length;he"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new fe,u=new WeakMap;let f;const h=new WeakMap;let d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function p(R,x){return d?new OffscreenCanvas(R,x):dc("canvas")}function _(R,x,O){let Y=1;const ne=ce(R);if((ne.width>O||ne.height>O)&&(Y=O/Math.max(ne.width,ne.height)),Y<1)if(typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&R instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&R instanceof ImageBitmap||typeof VideoFrame<"u"&&R instanceof VideoFrame){const ee=Math.floor(Y*ne.width),Te=Math.floor(Y*ne.height);f===void 0&&(f=p(ee,Te));const me=x?p(ee,Te):f;return me.width=ee,me.height=Te,me.getContext("2d").drawImage(R,0,0,ee,Te),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ne.width+"x"+ne.height+") to ("+ee+"x"+Te+")."),me}else return"data"in R&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ne.width+"x"+ne.height+")."),R;return R}function g(R){return R.generateMipmaps}function m(R){n.generateMipmap(R)}function v(R){return R.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:R.isWebGL3DRenderTarget?n.TEXTURE_3D:R.isWebGLArrayRenderTarget||R.isCompressedArrayTexture?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function b(R,x,O,Y,ne=!1){if(R!==null){if(n[R]!==void 0)return n[R];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+R+"'")}let ee=x;if(x===n.RED&&(O===n.FLOAT&&(ee=n.R32F),O===n.HALF_FLOAT&&(ee=n.R16F),O===n.UNSIGNED_BYTE&&(ee=n.R8)),x===n.RED_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.R8UI),O===n.UNSIGNED_SHORT&&(ee=n.R16UI),O===n.UNSIGNED_INT&&(ee=n.R32UI),O===n.BYTE&&(ee=n.R8I),O===n.SHORT&&(ee=n.R16I),O===n.INT&&(ee=n.R32I)),x===n.RG&&(O===n.FLOAT&&(ee=n.RG32F),O===n.HALF_FLOAT&&(ee=n.RG16F),O===n.UNSIGNED_BYTE&&(ee=n.RG8)),x===n.RG_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RG8UI),O===n.UNSIGNED_SHORT&&(ee=n.RG16UI),O===n.UNSIGNED_INT&&(ee=n.RG32UI),O===n.BYTE&&(ee=n.RG8I),O===n.SHORT&&(ee=n.RG16I),O===n.INT&&(ee=n.RG32I)),x===n.RGB_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RGB8UI),O===n.UNSIGNED_SHORT&&(ee=n.RGB16UI),O===n.UNSIGNED_INT&&(ee=n.RGB32UI),O===n.BYTE&&(ee=n.RGB8I),O===n.SHORT&&(ee=n.RGB16I),O===n.INT&&(ee=n.RGB32I)),x===n.RGBA_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RGBA8UI),O===n.UNSIGNED_SHORT&&(ee=n.RGBA16UI),O===n.UNSIGNED_INT&&(ee=n.RGBA32UI),O===n.BYTE&&(ee=n.RGBA8I),O===n.SHORT&&(ee=n.RGBA16I),O===n.INT&&(ee=n.RGBA32I)),x===n.RGB&&O===n.UNSIGNED_INT_5_9_9_9_REV&&(ee=n.RGB9_E5),x===n.RGBA){const Te=ne?uc:pt.getTransfer(Y);O===n.FLOAT&&(ee=n.RGBA32F),O===n.HALF_FLOAT&&(ee=n.RGBA16F),O===n.UNSIGNED_BYTE&&(ee=Te===Ct?n.SRGB8_ALPHA8:n.RGBA8),O===n.UNSIGNED_SHORT_4_4_4_4&&(ee=n.RGBA4),O===n.UNSIGNED_SHORT_5_5_5_1&&(ee=n.RGB5_A1)}return(ee===n.R16F||ee===n.R32F||ee===n.RG16F||ee===n.RG32F||ee===n.RGBA16F||ee===n.RGBA32F)&&e.get("EXT_color_buffer_float"),ee}function y(R,x){let O;return R?x===null||x===Vs||x===Ta?O=n.DEPTH24_STENCIL8:x===Zn?O=n.DEPTH32F_STENCIL8:x===Ea&&(O=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):x===null||x===Vs||x===Ta?O=n.DEPTH_COMPONENT24:x===Zn?O=n.DEPTH_COMPONENT32F:x===Ea&&(O=n.DEPTH_COMPONENT16),O}function T(R,x){return g(R)===!0||R.isFramebufferTexture&&R.minFilter!==yn&&R.minFilter!==nn?Math.log2(Math.max(x.width,x.height))+1:R.mipmaps!==void 0&&R.mipmaps.length>0?R.mipmaps.length:R.isCompressedTexture&&Array.isArray(R.image)?x.mipmaps.length:1}function w(R){const x=R.target;x.removeEventListener("dispose",w),P(x),x.isVideoTexture&&u.delete(x)}function S(R){const x=R.target;x.removeEventListener("dispose",S),E(x)}function P(R){const x=i.get(R);if(x.__webglInit===void 0)return;const O=R.source,Y=h.get(O);if(Y){const ne=Y[x.__cacheKey];ne.usedTimes--,ne.usedTimes===0&&M(R),Object.keys(Y).length===0&&h.delete(O)}i.remove(R)}function M(R){const x=i.get(R);n.deleteTexture(x.__webglTexture);const O=R.source,Y=h.get(O);delete Y[x.__cacheKey],o.memory.textures--}function E(R){const x=i.get(R);if(R.depthTexture&&(R.depthTexture.dispose(),i.remove(R.depthTexture)),R.isWebGLCubeRenderTarget)for(let Y=0;Y<6;Y++){if(Array.isArray(x.__webglFramebuffer[Y]))for(let ne=0;ne=s.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+R+" texture units while this GPU supports only "+s.maxTextures),D+=1,R}function V(R){const x=[];return x.push(R.wrapS),x.push(R.wrapT),x.push(R.wrapR||0),x.push(R.magFilter),x.push(R.minFilter),x.push(R.anisotropy),x.push(R.internalFormat),x.push(R.format),x.push(R.type),x.push(R.generateMipmaps),x.push(R.premultiplyAlpha),x.push(R.flipY),x.push(R.unpackAlignment),x.push(R.colorSpace),x.join()}function Q(R,x){const O=i.get(R);if(R.isVideoTexture&&F(R),R.isRenderTargetTexture===!1&&R.version>0&&O.__version!==R.version){const Y=R.image;if(Y===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Y.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Se(O,R,x);return}}t.bindTexture(n.TEXTURE_2D,O.__webglTexture,n.TEXTURE0+x)}function j(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){Se(O,R,x);return}t.bindTexture(n.TEXTURE_2D_ARRAY,O.__webglTexture,n.TEXTURE0+x)}function te(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){Se(O,R,x);return}t.bindTexture(n.TEXTURE_3D,O.__webglTexture,n.TEXTURE0+x)}function Z(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){$(O,R,x);return}t.bindTexture(n.TEXTURE_CUBE_MAP,O.__webglTexture,n.TEXTURE0+x)}const pe={[oc]:n.REPEAT,[gi]:n.CLAMP_TO_EDGE,[ac]:n.MIRRORED_REPEAT},Me={[yn]:n.NEAREST,[X0]:n.NEAREST_MIPMAP_NEAREST,[aa]:n.NEAREST_MIPMAP_LINEAR,[nn]:n.LINEAR,[wl]:n.LINEAR_MIPMAP_NEAREST,[Qi]:n.LINEAR_MIPMAP_LINEAR},re={[J1]:n.NEVER,[sE]:n.ALWAYS,[Q1]:n.LESS,[e_]:n.LEQUAL,[eE]:n.EQUAL,[iE]:n.GEQUAL,[tE]:n.GREATER,[nE]:n.NOTEQUAL};function xe(R,x){if(x.type===Zn&&e.has("OES_texture_float_linear")===!1&&(x.magFilter===nn||x.magFilter===wl||x.magFilter===aa||x.magFilter===Qi||x.minFilter===nn||x.minFilter===wl||x.minFilter===aa||x.minFilter===Qi)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(R,n.TEXTURE_WRAP_S,pe[x.wrapS]),n.texParameteri(R,n.TEXTURE_WRAP_T,pe[x.wrapT]),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,pe[x.wrapR]),n.texParameteri(R,n.TEXTURE_MAG_FILTER,Me[x.magFilter]),n.texParameteri(R,n.TEXTURE_MIN_FILTER,Me[x.minFilter]),x.compareFunction&&(n.texParameteri(R,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(R,n.TEXTURE_COMPARE_FUNC,re[x.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(x.magFilter===yn||x.minFilter!==aa&&x.minFilter!==Qi||x.type===Zn&&e.has("OES_texture_float_linear")===!1)return;if(x.anisotropy>1||i.get(x).__currentAnisotropy){const O=e.get("EXT_texture_filter_anisotropic");n.texParameterf(R,O.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(x.anisotropy,s.getMaxAnisotropy())),i.get(x).__currentAnisotropy=x.anisotropy}}}function We(R,x){let O=!1;R.__webglInit===void 0&&(R.__webglInit=!0,x.addEventListener("dispose",w));const Y=x.source;let ne=h.get(Y);ne===void 0&&(ne={},h.set(Y,ne));const ee=V(x);if(ee!==R.__cacheKey){ne[ee]===void 0&&(ne[ee]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,O=!0),ne[ee].usedTimes++;const Te=ne[R.__cacheKey];Te!==void 0&&(ne[R.__cacheKey].usedTimes--,Te.usedTimes===0&&M(x)),R.__cacheKey=ee,R.__webglTexture=ne[ee].texture}return O}function oe(R,x,O){return Math.floor(Math.floor(R/O)/x)}function ge(R,x,O,Y){const ee=R.updateRanges;if(ee.length===0)t.texSubImage2D(n.TEXTURE_2D,0,0,0,x.width,x.height,O,Y,x.data);else{ee.sort((de,Ne)=>de.start-Ne.start);let Te=0;for(let de=1;de0){q&&Ie&&t.texStorage2D(n.TEXTURE_2D,Be,Ve,it[0].width,it[0].height);for(let ve=0,he=it.length;ve0){const He=Tg(we.width,we.height,x.format,x.type);for(const ot of x.layerUpdates){const Ut=we.data.subarray(ot*He/we.data.BYTES_PER_ELEMENT,(ot+1)*He/we.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,ot,we.width,we.height,1,Ne,Ut)}x.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,0,we.width,we.height,de.depth,Ne,we.data)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,ve,Ve,we.width,we.height,de.depth,0,we.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else q?_e&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,0,we.width,we.height,de.depth,Ne,ze,we.data):t.texImage3D(n.TEXTURE_2D_ARRAY,ve,Ve,we.width,we.height,de.depth,0,Ne,ze,we.data)}else{q&&Ie&&t.texStorage2D(n.TEXTURE_2D,Be,Ve,it[0].width,it[0].height);for(let ve=0,he=it.length;ve0){const ve=Tg(de.width,de.height,x.format,x.type);for(const he of x.layerUpdates){const He=de.data.subarray(he*ve/de.data.BYTES_PER_ELEMENT,(he+1)*ve/de.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,he,de.width,de.height,1,Ne,ze,He)}x.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,de.width,de.height,de.depth,Ne,ze,de.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,Ve,de.width,de.height,de.depth,0,Ne,ze,de.data);else if(x.isData3DTexture)q?(Ie&&t.texStorage3D(n.TEXTURE_3D,Be,Ve,de.width,de.height,de.depth),_e&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,de.width,de.height,de.depth,Ne,ze,de.data)):t.texImage3D(n.TEXTURE_3D,0,Ve,de.width,de.height,de.depth,0,Ne,ze,de.data);else if(x.isFramebufferTexture){if(Ie)if(q)t.texStorage2D(n.TEXTURE_2D,Be,Ve,de.width,de.height);else{let ve=de.width,he=de.height;for(let He=0;He>=1,he>>=1}}else if(it.length>0){if(q&&Ie){const ve=ce(it[0]);t.texStorage2D(n.TEXTURE_2D,Be,Ve,ve.width,ve.height)}for(let ve=0,he=it.length;ve0&&Be++;const he=ce(Ne[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,Be,it,he.width,he.height)}for(let he=0;he<6;he++)if(de){q?_e&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,Ne[he].width,Ne[he].height,Ve,we,Ne[he].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,it,Ne[he].width,Ne[he].height,0,Ve,we,Ne[he].data);for(let He=0;He>ee),ze=Math.max(1,x.height>>ee);ne===n.TEXTURE_3D||ne===n.TEXTURE_2D_ARRAY?t.texImage3D(ne,ee,Re,Ne,ze,x.depth,0,Te,me,null):t.texImage2D(ne,ee,Re,Ne,ze,0,Te,me,null)}t.bindFramebuffer(n.FRAMEBUFFER,R),I(x)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Y,ne,de.__webglTexture,0,C(x)):(ne===n.TEXTURE_2D||ne>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&ne<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Y,ne,de.__webglTexture,ee),t.bindFramebuffer(n.FRAMEBUFFER,null)}function le(R,x,O){if(n.bindRenderbuffer(n.RENDERBUFFER,R),x.depthBuffer){const Y=x.depthTexture,ne=Y&&Y.isDepthTexture?Y.type:null,ee=y(x.stencilBuffer,ne),Te=x.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,me=C(x);I(x)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,me,ee,x.width,x.height):O?n.renderbufferStorageMultisample(n.RENDERBUFFER,me,ee,x.width,x.height):n.renderbufferStorage(n.RENDERBUFFER,ee,x.width,x.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,Te,n.RENDERBUFFER,R)}else{const Y=x.textures;for(let ne=0;ne{delete x.__boundDepthTexture,delete x.__depthDisposeCallback,Y.removeEventListener("dispose",ne)};Y.addEventListener("dispose",ne),x.__depthDisposeCallback=ne}x.__boundDepthTexture=Y}if(R.depthTexture&&!x.__autoAllocateDepthBuffer){if(O)throw new Error("target.depthTexture not supported in Cube render targets");const Y=R.texture.mipmaps;Y&&Y.length>0?ue(x.__webglFramebuffer[0],R):ue(x.__webglFramebuffer,R)}else if(O){x.__webglDepthbuffer=[];for(let Y=0;Y<6;Y++)if(t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer[Y]),x.__webglDepthbuffer[Y]===void 0)x.__webglDepthbuffer[Y]=n.createRenderbuffer(),le(x.__webglDepthbuffer[Y],R,!1);else{const ne=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ee=x.__webglDepthbuffer[Y];n.bindRenderbuffer(n.RENDERBUFFER,ee),n.framebufferRenderbuffer(n.FRAMEBUFFER,ne,n.RENDERBUFFER,ee)}}else{const Y=R.texture.mipmaps;if(Y&&Y.length>0?t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer[0]):t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer),x.__webglDepthbuffer===void 0)x.__webglDepthbuffer=n.createRenderbuffer(),le(x.__webglDepthbuffer,R,!1);else{const ne=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ee=x.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,ee),n.framebufferRenderbuffer(n.FRAMEBUFFER,ne,n.RENDERBUFFER,ee)}}t.bindFramebuffer(n.FRAMEBUFFER,null)}function N(R,x,O){const Y=i.get(R);x!==void 0&&ae(Y.__webglFramebuffer,R,R.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),O!==void 0&&$e(R)}function U(R){const x=R.texture,O=i.get(R),Y=i.get(x);R.addEventListener("dispose",S);const ne=R.textures,ee=R.isWebGLCubeRenderTarget===!0,Te=ne.length>1;if(Te||(Y.__webglTexture===void 0&&(Y.__webglTexture=n.createTexture()),Y.__version=x.version,o.memory.textures++),ee){O.__webglFramebuffer=[];for(let me=0;me<6;me++)if(x.mipmaps&&x.mipmaps.length>0){O.__webglFramebuffer[me]=[];for(let Re=0;Re0){O.__webglFramebuffer=[];for(let me=0;me0&&I(R)===!1){O.__webglMultisampledFramebuffer=n.createFramebuffer(),O.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,O.__webglMultisampledFramebuffer);for(let me=0;me0)for(let Re=0;Re0)for(let Re=0;Re0){if(I(R)===!1){const x=R.textures,O=R.width,Y=R.height;let ne=n.COLOR_BUFFER_BIT;const ee=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Te=i.get(R),me=x.length>1;if(me)for(let De=0;De0?t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Te.__webglFramebuffer[0]):t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Te.__webglFramebuffer);for(let De=0;De0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&x.__useRenderToTexture!==!1}function F(R){const x=o.render.frame;u.get(R)!==x&&(u.set(R,x),R.update())}function H(R,x){const O=R.colorSpace,Y=R.format,ne=R.type;return R.isCompressedTexture===!0||R.isVideoTexture===!0||O!==Eo&&O!==ws&&(pt.getTransfer(O)===Ct?(Y!==zn||ne!==Bi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",O)),x}function ce(R){return typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement?(c.width=R.naturalWidth||R.width,c.height=R.naturalHeight||R.height):typeof VideoFrame<"u"&&R instanceof VideoFrame?(c.width=R.displayWidth,c.height=R.displayHeight):(c.width=R.width,c.height=R.height),c}this.allocateTextureUnit=z,this.resetTextureUnits=B,this.setTexture2D=Q,this.setTexture2DArray=j,this.setTexture3D=te,this.setTextureCube=Z,this.rebindTextures=N,this.setupRenderTarget=U,this.updateRenderTargetMipmap=A,this.updateMultisampleRenderTarget=X,this.setupDepthRenderbuffer=$e,this.setupFrameBufferTexture=ae,this.useMultisampledRTT=I}function mT(n,e){function t(i,s=ws){let r;const o=pt.getTransfer(s);if(i===Bi)return n.UNSIGNED_BYTE;if(i===ld)return n.UNSIGNED_SHORT_4_4_4_4;if(i===cd)return n.UNSIGNED_SHORT_5_5_5_1;if(i===Y0)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===$0)return n.BYTE;if(i===q0)return n.SHORT;if(i===Ea)return n.UNSIGNED_SHORT;if(i===ad)return n.INT;if(i===Vs)return n.UNSIGNED_INT;if(i===Zn)return n.FLOAT;if(i===za)return n.HALF_FLOAT;if(i===j0)return n.ALPHA;if(i===K0)return n.RGB;if(i===zn)return n.RGBA;if(i===wa)return n.DEPTH_COMPONENT;if(i===Aa)return n.DEPTH_STENCIL;if(i===ud)return n.RED;if(i===kc)return n.RED_INTEGER;if(i===Z0)return n.RG;if(i===fd)return n.RG_INTEGER;if(i===hd)return n.RGBA_INTEGER;if(i===Al||i===Cl||i===Rl||i===Pl)if(o===Ct)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(i===Al)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Cl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Rl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Pl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(i===Al)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Cl)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Rl)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Pl)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Jf||i===Qf||i===eh||i===th)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(i===Jf)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Qf)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===eh)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===th)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===nh||i===ih||i===sh)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(i===nh||i===ih)return o===Ct?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(i===sh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===rh||i===oh||i===ah||i===lh||i===ch||i===uh||i===fh||i===hh||i===dh||i===ph||i===mh||i===gh||i===_h||i===vh)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(i===rh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===oh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===ah)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===lh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===ch)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===uh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===fh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===hh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===dh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===ph)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===mh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===gh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===_h)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===vh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===Il||i===yh||i===bh)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(i===Il)return o===Ct?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===yh)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===bh)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===J0||i===xh||i===Mh||i===Sh)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(i===Il)return r.COMPRESSED_RED_RGTC1_EXT;if(i===xh)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===Mh)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===Sh)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Ta?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}const vF=` void main() { gl_Position = vec4( position, 1.0 ); @@ -3841,37 +3841,37 @@ void main() { } -}`;class bF{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const s=new $t,r=e.properties.get(s);r.__webglTexture=t.texture,(t.depthNear!==i.depthNear||t.depthFar!==i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=s}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new zi({vertexShader:vF,fragmentShader:yF,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new jt(new Ga(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class xF extends as{constructor(e,t){super();const i=this;let s=null,r=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,d=null,p=null;const _=new bF,g=t.getContextAttributes();let m=null,v=null;const b=[],y=[],T=new fe;let w=null;const E=new Jt;E.viewport=new vt;const P=new Jt;P.viewport=new vt;const M=[E,P],S=new sT;let D=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(oe){let ge=b[oe];return ge===void 0&&(ge=new Sf,b[oe]=ge),ge.getTargetRaySpace()},this.getControllerGrip=function(oe){let ge=b[oe];return ge===void 0&&(ge=new Sf,b[oe]=ge),ge.getGripSpace()},this.getHand=function(oe){let ge=b[oe];return ge===void 0&&(ge=new Sf,b[oe]=ge),ge.getHandSpace()};function z(oe){const ge=y.indexOf(oe.inputSource);if(ge===-1)return;const Se=b[ge];Se!==void 0&&(Se.update(oe.inputSource,oe.frame,c||o),Se.dispatchEvent({type:oe.type,data:oe.inputSource}))}function V(){s.removeEventListener("select",z),s.removeEventListener("selectstart",z),s.removeEventListener("selectend",z),s.removeEventListener("squeeze",z),s.removeEventListener("squeezestart",z),s.removeEventListener("squeezeend",z),s.removeEventListener("end",V),s.removeEventListener("inputsourceschange",Q);for(let oe=0;oe=0&&(y[$]=null,b[$].disconnect(Se))}for(let ge=0;ge=y.length){y.push(Se),$=le;break}else if(y[le]===null){y[le]=Se,$=le;break}if($===-1)break}const ae=b[$];ae&&ae.connect(Se)}}const j=new k,te=new k;function Z(oe,ge,Se){j.setFromMatrixPosition(ge.matrixWorld),te.setFromMatrixPosition(Se.matrixWorld);const $=j.distanceTo(te),ae=ge.projectionMatrix.elements,le=Se.projectionMatrix.elements,ue=ae[14]/(ae[10]-1),$e=ae[14]/(ae[10]+1),N=(ae[9]+1)/ae[5],U=(ae[9]-1)/ae[5],A=(ae[8]-1)/ae[0],W=(le[8]+1)/le[0],G=ue*A,X=ue*W,C=$/(-A+W),I=C*-A;if(ge.matrixWorld.decompose(oe.position,oe.quaternion,oe.scale),oe.translateX(I),oe.translateZ(C),oe.matrixWorld.compose(oe.position,oe.quaternion,oe.scale),oe.matrixWorldInverse.copy(oe.matrixWorld).invert(),ae[10]===-1)oe.projectionMatrix.copy(ge.projectionMatrix),oe.projectionMatrixInverse.copy(ge.projectionMatrixInverse);else{const F=ue+C,H=$e+C,ce=G-I,R=X+($-I),x=N*$e/H*F,O=U*$e/H*F;oe.projectionMatrix.makePerspective(ce,R,x,O,F,H),oe.projectionMatrixInverse.copy(oe.projectionMatrix).invert()}}function pe(oe,ge){ge===null?oe.matrixWorld.copy(oe.matrix):oe.matrixWorld.multiplyMatrices(ge.matrixWorld,oe.matrix),oe.matrixWorldInverse.copy(oe.matrixWorld).invert()}this.updateCamera=function(oe){if(s===null)return;let ge=oe.near,Se=oe.far;_.texture!==null&&(_.depthNear>0&&(ge=_.depthNear),_.depthFar>0&&(Se=_.depthFar)),S.near=P.near=E.near=ge,S.far=P.far=E.far=Se,(D!==S.near||B!==S.far)&&(s.updateRenderState({depthNear:S.near,depthFar:S.far}),D=S.near,B=S.far),E.layers.mask=oe.layers.mask|2,P.layers.mask=oe.layers.mask|4,S.layers.mask=E.layers.mask|P.layers.mask;const $=oe.parent,ae=S.cameras;pe(S,$);for(let le=0;le0&&(g.alphaTest.value=m.alphaTest);const v=e.get(m),b=v.envMap,y=v.envMapRotation;b&&(g.envMap.value=b,eo.copy(y),eo.x*=-1,eo.y*=-1,eo.z*=-1,b.isCubeTexture&&b.isRenderTargetTexture===!1&&(eo.y*=-1,eo.z*=-1),g.envMapRotation.value.setFromMatrix4(MF.makeRotationFromEuler(eo)),g.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=m.reflectivity,g.ior.value=m.ior,g.refractionRatio.value=m.refractionRatio),m.lightMap&&(g.lightMap.value=m.lightMap,g.lightMapIntensity.value=m.lightMapIntensity,t(m.lightMap,g.lightMapTransform)),m.aoMap&&(g.aoMap.value=m.aoMap,g.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,g.aoMapTransform))}function o(g,m){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,m.map&&(g.map.value=m.map,t(m.map,g.mapTransform))}function a(g,m){g.dashSize.value=m.dashSize,g.totalSize.value=m.dashSize+m.gapSize,g.scale.value=m.scale}function l(g,m,v,b){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.size.value=m.size*v,g.scale.value=b*.5,m.map&&(g.map.value=m.map,t(m.map,g.uvTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest)}function c(g,m){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.rotation.value=m.rotation,m.map&&(g.map.value=m.map,t(m.map,g.mapTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest)}function u(g,m){g.specular.value.copy(m.specular),g.shininess.value=Math.max(m.shininess,1e-4)}function f(g,m){m.gradientMap&&(g.gradientMap.value=m.gradientMap)}function h(g,m){g.metalness.value=m.metalness,m.metalnessMap&&(g.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,g.metalnessMapTransform)),g.roughness.value=m.roughness,m.roughnessMap&&(g.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,g.roughnessMapTransform)),m.envMap&&(g.envMapIntensity.value=m.envMapIntensity)}function d(g,m,v){g.ior.value=m.ior,m.sheen>0&&(g.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),g.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(g.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,g.sheenColorMapTransform)),m.sheenRoughnessMap&&(g.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,g.sheenRoughnessMapTransform))),m.clearcoat>0&&(g.clearcoat.value=m.clearcoat,g.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(g.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,g.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,g.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(g.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,g.clearcoatNormalMapTransform),g.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===Vn&&g.clearcoatNormalScale.value.negate())),m.dispersion>0&&(g.dispersion.value=m.dispersion),m.iridescence>0&&(g.iridescence.value=m.iridescence,g.iridescenceIOR.value=m.iridescenceIOR,g.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],g.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(g.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,g.iridescenceMapTransform)),m.iridescenceThicknessMap&&(g.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,g.iridescenceThicknessMapTransform))),m.transmission>0&&(g.transmission.value=m.transmission,g.transmissionSamplerMap.value=v.texture,g.transmissionSamplerSize.value.set(v.width,v.height),m.transmissionMap&&(g.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,g.transmissionMapTransform)),g.thickness.value=m.thickness,m.thicknessMap&&(g.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,g.thicknessMapTransform)),g.attenuationDistance.value=m.attenuationDistance,g.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(g.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(g.anisotropyMap.value=m.anisotropyMap,t(m.anisotropyMap,g.anisotropyMapTransform))),g.specularIntensity.value=m.specularIntensity,g.specularColor.value.copy(m.specularColor),m.specularColorMap&&(g.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,g.specularColorMapTransform)),m.specularIntensityMap&&(g.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,g.specularIntensityMapTransform))}function p(g,m){m.matcap&&(g.matcap.value=m.matcap)}function _(g,m){const v=e.get(m).light;g.referencePosition.value.setFromMatrixPosition(v.matrixWorld),g.nearDistance.value=v.shadow.camera.near,g.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function EF(n,e,t,i){let s={},r={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function l(v,b){const y=b.program;i.uniformBlockBinding(v,y)}function c(v,b){let y=s[v.id];y===void 0&&(p(v),y=u(v),s[v.id]=y,v.addEventListener("dispose",g));const T=b.program;i.updateUBOMapping(v,T);const w=e.render.frame;r[v.id]!==w&&(h(v),r[v.id]=w)}function u(v){const b=f();v.__bindingPointIndex=b;const y=n.createBuffer(),T=v.__size,w=v.usage;return n.bindBuffer(n.UNIFORM_BUFFER,y),n.bufferData(n.UNIFORM_BUFFER,T,w),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,b,y),y}function f(){for(let v=0;v0&&(y+=T-w),v.__size=y,v.__cache={},this}function _(v){const b={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(b.boundary=4,b.storage=4):v.isVector2?(b.boundary=8,b.storage=8):v.isVector3||v.isColor?(b.boundary=16,b.storage=12):v.isVector4?(b.boundary=16,b.storage=16):v.isMatrix3?(b.boundary=48,b.storage=48):v.isMatrix4?(b.boundary=64,b.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),b}function g(v){const b=v.target;b.removeEventListener("dispose",g);const y=o.indexOf(b.__bindingPointIndex);o.splice(y,1),n.deleteBuffer(s[b.id]),delete s[b.id],delete r[b.id]}function m(){for(const v in s)n.deleteBuffer(s[v]);o=[],s={},r={}}return{bind:l,update:c,dispose:m}}class Tf{constructor(e={}){const{canvas:t=oE(),context:i=null,depth:s=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let d;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");d=i.getContextAttributes().alpha}else d=o;const p=new Uint32Array(4),_=new Int32Array(4);let g=null,m=null;const v=[],b=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=ts,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const y=this;let T=!1;this._outputColorSpace=Fn;let w=0,E=0,P=null,M=-1,S=null;const D=new vt,B=new vt;let z=null;const V=new Pe(0);let Q=0,j=t.width,te=t.height,Z=1,pe=null,Me=null;const re=new vt(0,0,j,te),xe=new vt(0,0,j,te);let We=!1;const oe=new Ha;let ge=!1,Se=!1;const $=new Ze,ae=new Ze,le=new k,ue=new vt,$e={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let N=!1;function U(){return P===null?Z:1}let A=i;function W(L,K){return t.getContext(L,K)}try{const L={alpha:!0,depth:s,stencil:r,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Uc}`),t.addEventListener("webglcontextlost",Be,!1),t.addEventListener("webglcontextrestored",ve,!1),t.addEventListener("webglcontextcreationerror",he,!1),A===null){const K="webgl2";if(A=W(K,L),A===null)throw W(K)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(L){throw console.error("THREE.WebGLRenderer: "+L.message),L}let G,X,C,I,F,H,ce,R,x,O,Y,ne,ee,Te,me,Re,De,de,Oe,ze,Ve,we,it,q;function Ie(){G=new UN(A),G.init(),we=new mT(A,G),X=new RN(A,G,e,we),C=new gF(A,G),X.reverseDepthBuffer&&h&&C.buffers.depth.setReversed(!0),I=new BN(A),F=new iF,H=new _F(A,G,C,F,X,we,I),ce=new IN(y),R=new NN(y),x=new XL(A),it=new AN(A,x),O=new FN(A,x,I,it),Y=new VN(A,O,x,I),Oe=new zN(A,X,H),Re=new PN(F),ne=new nF(y,ce,R,G,X,it,Re),ee=new SF(y,F),Te=new rF,me=new fF(G),de=new wN(y,ce,R,C,Y,d,l),De=new pF(y,Y,X),q=new EF(A,I,X,C),ze=new CN(A,G,I),Ve=new kN(A,G,I),I.programs=ne.programs,y.capabilities=X,y.extensions=G,y.properties=F,y.renderLists=Te,y.shadowMap=De,y.state=C,y.info=I}Ie();const _e=new xF(y,A);this.xr=_e,this.getContext=function(){return A},this.getContextAttributes=function(){return A.getContextAttributes()},this.forceContextLoss=function(){const L=G.get("WEBGL_lose_context");L&&L.loseContext()},this.forceContextRestore=function(){const L=G.get("WEBGL_lose_context");L&&L.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(L){L!==void 0&&(Z=L,this.setSize(j,te,!1))},this.getSize=function(L){return L.set(j,te)},this.setSize=function(L,K,ie=!0){if(_e.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}j=L,te=K,t.width=Math.floor(L*Z),t.height=Math.floor(K*Z),ie===!0&&(t.style.width=L+"px",t.style.height=K+"px"),this.setViewport(0,0,L,K)},this.getDrawingBufferSize=function(L){return L.set(j*Z,te*Z).floor()},this.setDrawingBufferSize=function(L,K,ie){j=L,te=K,Z=ie,t.width=Math.floor(L*ie),t.height=Math.floor(K*ie),this.setViewport(0,0,L,K)},this.getCurrentViewport=function(L){return L.copy(D)},this.getViewport=function(L){return L.copy(re)},this.setViewport=function(L,K,ie,se){L.isVector4?re.set(L.x,L.y,L.z,L.w):re.set(L,K,ie,se),C.viewport(D.copy(re).multiplyScalar(Z).round())},this.getScissor=function(L){return L.copy(xe)},this.setScissor=function(L,K,ie,se){L.isVector4?xe.set(L.x,L.y,L.z,L.w):xe.set(L,K,ie,se),C.scissor(B.copy(xe).multiplyScalar(Z).round())},this.getScissorTest=function(){return We},this.setScissorTest=function(L){C.setScissorTest(We=L)},this.setOpaqueSort=function(L){pe=L},this.setTransparentSort=function(L){Me=L},this.getClearColor=function(L){return L.copy(de.getClearColor())},this.setClearColor=function(){de.setClearColor(...arguments)},this.getClearAlpha=function(){return de.getClearAlpha()},this.setClearAlpha=function(){de.setClearAlpha(...arguments)},this.clear=function(L=!0,K=!0,ie=!0){let se=0;if(L){let J=!1;if(P!==null){const be=P.texture.format;J=be===hd||be===fd||be===kc}if(J){const be=P.texture.type,Le=be===Bi||be===Vs||be===Ea||be===Ta||be===ld||be===cd,Ge=de.getClearColor(),Ue=de.getClearAlpha(),Qe=Ge.r,tt=Ge.g,qe=Ge.b;Le?(p[0]=Qe,p[1]=tt,p[2]=qe,p[3]=Ue,A.clearBufferuiv(A.COLOR,0,p)):(_[0]=Qe,_[1]=tt,_[2]=qe,_[3]=Ue,A.clearBufferiv(A.COLOR,0,_))}else se|=A.COLOR_BUFFER_BIT}K&&(se|=A.DEPTH_BUFFER_BIT),ie&&(se|=A.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),A.clear(se)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Be,!1),t.removeEventListener("webglcontextrestored",ve,!1),t.removeEventListener("webglcontextcreationerror",he,!1),de.dispose(),Te.dispose(),me.dispose(),F.dispose(),ce.dispose(),R.dispose(),Y.dispose(),it.dispose(),q.dispose(),ne.dispose(),_e.dispose(),_e.removeEventListener("sessionstart",hv),_e.removeEventListener("sessionend",dv),Nr.stop()};function Be(L){L.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),T=!0}function ve(){console.log("THREE.WebGLRenderer: Context Restored."),T=!1;const L=I.autoReset,K=De.enabled,ie=De.autoUpdate,se=De.needsUpdate,J=De.type;Ie(),I.autoReset=L,De.enabled=K,De.autoUpdate=ie,De.needsUpdate=se,De.type=J}function he(L){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",L.statusMessage)}function He(L){const K=L.target;K.removeEventListener("dispose",He),ot(K)}function ot(L){Nt(L),F.remove(L)}function Nt(L){const K=F.get(L).programs;K!==void 0&&(K.forEach(function(ie){ne.releaseProgram(ie)}),L.isShaderMaterial&&ne.releaseShaderCache(L))}this.renderBufferDirect=function(L,K,ie,se,J,be){K===null&&(K=$e);const Le=J.isMesh&&J.matrixWorld.determinant()<0,Ge=tC(L,K,ie,se,J);C.setMaterial(se,Le);let Ue=ie.index,Qe=1;if(se.wireframe===!0){if(Ue=O.getWireframeAttribute(ie),Ue===void 0)return;Qe=2}const tt=ie.drawRange,qe=ie.attributes.position;let dt=tt.start*Qe,At=(tt.start+tt.count)*Qe;be!==null&&(dt=Math.max(dt,be.start*Qe),At=Math.min(At,(be.start+be.count)*Qe)),Ue!==null?(dt=Math.max(dt,0),At=Math.min(At,Ue.count)):qe!=null&&(dt=Math.max(dt,0),At=Math.min(At,qe.count));const Bt=At-dt;if(Bt<0||Bt===1/0)return;it.setup(J,se,Ge,ie,Ue);let Wt,yt=ze;if(Ue!==null&&(Wt=x.get(Ue),yt=Ve,yt.setIndex(Wt)),J.isMesh)se.wireframe===!0?(C.setLineWidth(se.wireframeLinewidth*U()),yt.setMode(A.LINES)):yt.setMode(A.TRIANGLES);else if(J.isLine){let Ye=se.linewidth;Ye===void 0&&(Ye=1),C.setLineWidth(Ye*U()),J.isLineSegments?yt.setMode(A.LINES):J.isLineLoop?yt.setMode(A.LINE_LOOP):yt.setMode(A.LINE_STRIP)}else J.isPoints?yt.setMode(A.POINTS):J.isSprite&&yt.setMode(A.TRIANGLES);if(J.isBatchedMesh)if(J._multiDrawInstances!==null)ga("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),yt.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances);else if(G.get("WEBGL_multi_draw"))yt.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else{const Ye=J._multiDrawStarts,dn=J._multiDrawCounts,Mt=J._multiDrawCount,wi=Ue?x.get(Ue).bytesPerElement:1,Uo=F.get(se).currentProgram.getUniforms();for(let ni=0;ni{function be(){if(se.forEach(function(Le){F.get(Le).currentProgram.isReady()&&se.delete(Le)}),se.size===0){J(L);return}setTimeout(be,10)}G.get("KHR_parallel_shader_compile")!==null?be():setTimeout(be,10)})};let Ti=null;function us(L){Ti&&Ti(L)}function hv(){Nr.stop()}function dv(){Nr.start()}const Nr=new uT;Nr.setAnimationLoop(us),typeof self<"u"&&Nr.setContext(self),this.setAnimationLoop=function(L){Ti=L,_e.setAnimationLoop(L),L===null?Nr.stop():Nr.start()},_e.addEventListener("sessionstart",hv),_e.addEventListener("sessionend",dv),this.render=function(L,K){if(K!==void 0&&K.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;if(L.matrixWorldAutoUpdate===!0&&L.updateMatrixWorld(),K.parent===null&&K.matrixWorldAutoUpdate===!0&&K.updateMatrixWorld(),_e.enabled===!0&&_e.isPresenting===!0&&(_e.cameraAutoUpdate===!0&&_e.updateCamera(K),K=_e.getCamera()),L.isScene===!0&&L.onBeforeRender(y,L,K,P),m=me.get(L,b.length),m.init(K),b.push(m),ae.multiplyMatrices(K.projectionMatrix,K.matrixWorldInverse),oe.setFromProjectionMatrix(ae),Se=this.localClippingEnabled,ge=Re.init(this.clippingPlanes,Se),g=Te.get(L,v.length),g.init(),v.push(g),_e.enabled===!0&&_e.isPresenting===!0){const be=y.xr.getDepthSensingMesh();be!==null&&lp(be,K,-1/0,y.sortObjects)}lp(L,K,0,y.sortObjects),g.finish(),y.sortObjects===!0&&g.sort(pe,Me),N=_e.enabled===!1||_e.isPresenting===!1||_e.hasDepthSensing()===!1,N&&de.addToRenderList(g,L),this.info.render.frame++,ge===!0&&Re.beginShadows();const ie=m.state.shadowsArray;De.render(ie,L,K),ge===!0&&Re.endShadows(),this.info.autoReset===!0&&this.info.reset();const se=g.opaque,J=g.transmissive;if(m.setupLights(),K.isArrayCamera){const be=K.cameras;if(J.length>0)for(let Le=0,Ge=be.length;Le0&&mv(se,J,L,K),N&&de.render(L),pv(g,L,K);P!==null&&E===0&&(H.updateMultisampleRenderTarget(P),H.updateRenderTargetMipmap(P)),L.isScene===!0&&L.onAfterRender(y,L,K),it.resetDefaultState(),M=-1,S=null,b.pop(),b.length>0?(m=b[b.length-1],ge===!0&&Re.setGlobalState(y.clippingPlanes,m.state.camera)):m=null,v.pop(),v.length>0?g=v[v.length-1]:g=null};function lp(L,K,ie,se){if(L.visible===!1)return;if(L.layers.test(K.layers)){if(L.isGroup)ie=L.renderOrder;else if(L.isLOD)L.autoUpdate===!0&&L.update(K);else if(L.isLight)m.pushLight(L),L.castShadow&&m.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||oe.intersectsSprite(L)){se&&ue.setFromMatrixPosition(L.matrixWorld).applyMatrix4(ae);const Le=Y.update(L),Ge=L.material;Ge.visible&&g.push(L,Le,Ge,ie,ue.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||oe.intersectsObject(L))){const Le=Y.update(L),Ge=L.material;if(se&&(L.boundingSphere!==void 0?(L.boundingSphere===null&&L.computeBoundingSphere(),ue.copy(L.boundingSphere.center)):(Le.boundingSphere===null&&Le.computeBoundingSphere(),ue.copy(Le.boundingSphere.center)),ue.applyMatrix4(L.matrixWorld).applyMatrix4(ae)),Array.isArray(Ge)){const Ue=Le.groups;for(let Qe=0,tt=Ue.length;Qe0&&iu(J,K,ie),be.length>0&&iu(be,K,ie),Le.length>0&&iu(Le,K,ie),C.buffers.depth.setTest(!0),C.buffers.depth.setMask(!0),C.buffers.color.setMask(!0),C.setPolygonOffset(!1)}function mv(L,K,ie,se){if((ie.isScene===!0?ie.overrideMaterial:null)!==null)return;m.state.transmissionRenderTarget[se.id]===void 0&&(m.state.transmissionRenderTarget[se.id]=new os(1,1,{generateMipmaps:!0,type:G.has("EXT_color_buffer_half_float")||G.has("EXT_color_buffer_float")?za:Bi,minFilter:Qi,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:pt.workingColorSpace}));const be=m.state.transmissionRenderTarget[se.id],Le=se.viewport||D;be.setSize(Le.z*y.transmissionResolutionScale,Le.w*y.transmissionResolutionScale);const Ge=y.getRenderTarget();y.setRenderTarget(be),y.getClearColor(V),Q=y.getClearAlpha(),Q<1&&y.setClearColor(16777215,.5),y.clear(),N&&de.render(ie);const Ue=y.toneMapping;y.toneMapping=ts;const Qe=se.viewport;if(se.viewport!==void 0&&(se.viewport=void 0),m.setupLightsView(se),ge===!0&&Re.setGlobalState(y.clippingPlanes,se),iu(L,ie,se),H.updateMultisampleRenderTarget(be),H.updateRenderTargetMipmap(be),G.has("WEBGL_multisampled_render_to_texture")===!1){let tt=!1;for(let qe=0,dt=K.length;qe0),qe=!!ie.morphAttributes.position,dt=!!ie.morphAttributes.normal,At=!!ie.morphAttributes.color;let Bt=ts;se.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(Bt=y.toneMapping);const Wt=ie.morphAttributes.position||ie.morphAttributes.normal||ie.morphAttributes.color,yt=Wt!==void 0?Wt.length:0,Ye=F.get(se),dn=m.state.lights;if(ge===!0&&(Se===!0||L!==S)){const In=L===S&&se.id===M;Re.setState(se,L,In)}let Mt=!1;se.version===Ye.__version?(Ye.needsLights&&Ye.lightsStateVersion!==dn.state.version||Ye.outputColorSpace!==Ge||J.isBatchedMesh&&Ye.batching===!1||!J.isBatchedMesh&&Ye.batching===!0||J.isBatchedMesh&&Ye.batchingColor===!0&&J.colorTexture===null||J.isBatchedMesh&&Ye.batchingColor===!1&&J.colorTexture!==null||J.isInstancedMesh&&Ye.instancing===!1||!J.isInstancedMesh&&Ye.instancing===!0||J.isSkinnedMesh&&Ye.skinning===!1||!J.isSkinnedMesh&&Ye.skinning===!0||J.isInstancedMesh&&Ye.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&Ye.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&Ye.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&Ye.instancingMorph===!1&&J.morphTexture!==null||Ye.envMap!==Ue||se.fog===!0&&Ye.fog!==be||Ye.numClippingPlanes!==void 0&&(Ye.numClippingPlanes!==Re.numPlanes||Ye.numIntersection!==Re.numIntersection)||Ye.vertexAlphas!==Qe||Ye.vertexTangents!==tt||Ye.morphTargets!==qe||Ye.morphNormals!==dt||Ye.morphColors!==At||Ye.toneMapping!==Bt||Ye.morphTargetsCount!==yt)&&(Mt=!0):(Mt=!0,Ye.__version=se.version);let wi=Ye.currentProgram;Mt===!0&&(wi=su(se,K,J));let Uo=!1,ni=!1,ja=!1;const Ft=wi.getUniforms(),ci=Ye.uniforms;if(C.useProgram(wi.program)&&(Uo=!0,ni=!0,ja=!0),se.id!==M&&(M=se.id,ni=!0),Uo||S!==L){C.buffers.depth.getReversed()?($.copy(L.projectionMatrix),hP($),dP($),Ft.setValue(A,"projectionMatrix",$)):Ft.setValue(A,"projectionMatrix",L.projectionMatrix),Ft.setValue(A,"viewMatrix",L.matrixWorldInverse);const Wn=Ft.map.cameraPosition;Wn!==void 0&&Wn.setValue(A,le.setFromMatrixPosition(L.matrixWorld)),X.logarithmicDepthBuffer&&Ft.setValue(A,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(se.isMeshPhongMaterial||se.isMeshToonMaterial||se.isMeshLambertMaterial||se.isMeshBasicMaterial||se.isMeshStandardMaterial||se.isShaderMaterial)&&Ft.setValue(A,"isOrthographic",L.isOrthographicCamera===!0),S!==L&&(S=L,ni=!0,ja=!0)}if(J.isSkinnedMesh){Ft.setOptional(A,J,"bindMatrix"),Ft.setOptional(A,J,"bindMatrixInverse");const In=J.skeleton;In&&(In.boneTexture===null&&In.computeBoneTexture(),Ft.setValue(A,"boneTexture",In.boneTexture,H))}J.isBatchedMesh&&(Ft.setOptional(A,J,"batchingTexture"),Ft.setValue(A,"batchingTexture",J._matricesTexture,H),Ft.setOptional(A,J,"batchingIdTexture"),Ft.setValue(A,"batchingIdTexture",J._indirectTexture,H),Ft.setOptional(A,J,"batchingColorTexture"),J._colorsTexture!==null&&Ft.setValue(A,"batchingColorTexture",J._colorsTexture,H));const ui=ie.morphAttributes;if((ui.position!==void 0||ui.normal!==void 0||ui.color!==void 0)&&Oe.update(J,ie,wi),(ni||Ye.receiveShadow!==J.receiveShadow)&&(Ye.receiveShadow=J.receiveShadow,Ft.setValue(A,"receiveShadow",J.receiveShadow)),se.isMeshGouraudMaterial&&se.envMap!==null&&(ci.envMap.value=Ue,ci.flipEnvMap.value=Ue.isCubeTexture&&Ue.isRenderTargetTexture===!1?-1:1),se.isMeshStandardMaterial&&se.envMap===null&&K.environment!==null&&(ci.envMapIntensity.value=K.environmentIntensity),ni&&(Ft.setValue(A,"toneMappingExposure",y.toneMappingExposure),Ye.needsLights&&nC(ci,ja),be&&se.fog===!0&&ee.refreshFogUniforms(ci,be),ee.refreshMaterialUniforms(ci,se,Z,te,m.state.transmissionRenderTarget[L.id]),Ef.upload(A,_v(Ye),ci,H)),se.isShaderMaterial&&se.uniformsNeedUpdate===!0&&(Ef.upload(A,_v(Ye),ci,H),se.uniformsNeedUpdate=!1),se.isSpriteMaterial&&Ft.setValue(A,"center",J.center),Ft.setValue(A,"modelViewMatrix",J.modelViewMatrix),Ft.setValue(A,"normalMatrix",J.normalMatrix),Ft.setValue(A,"modelMatrix",J.matrixWorld),se.isShaderMaterial||se.isRawShaderMaterial){const In=se.uniformsGroups;for(let Wn=0,cp=In.length;Wn0&&H.useMultisampledRTT(L)===!1?J=F.get(L).__webglMultisampledFramebuffer:Array.isArray(tt)?J=tt[ie]:J=tt,D.copy(L.viewport),B.copy(L.scissor),z=L.scissorTest}else D.copy(re).multiplyScalar(Z).floor(),B.copy(xe).multiplyScalar(Z).floor(),z=We;if(ie!==0&&(J=sC),C.bindFramebuffer(A.FRAMEBUFFER,J)&&se&&C.drawBuffers(L,J),C.viewport(D),C.scissor(B),C.setScissorTest(z),be){const Ue=F.get(L.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ue.__webglTexture,ie)}else if(Le){const Ue=F.get(L.texture),Qe=K;A.framebufferTextureLayer(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,Ue.__webglTexture,ie,Qe)}else if(L!==null&&ie!==0){const Ue=F.get(L.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,Ue.__webglTexture,ie)}M=-1},this.readRenderTargetPixels=function(L,K,ie,se,J,be,Le,Ge=0){if(!(L&&L.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ue=F.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Le!==void 0&&(Ue=Ue[Le]),Ue){C.bindFramebuffer(A.FRAMEBUFFER,Ue);try{const Qe=L.textures[Ge],tt=Qe.format,qe=Qe.type;if(!X.textureFormatReadable(tt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!X.textureTypeReadable(qe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}K>=0&&K<=L.width-se&&ie>=0&&ie<=L.height-J&&(L.textures.length>1&&A.readBuffer(A.COLOR_ATTACHMENT0+Ge),A.readPixels(K,ie,se,J,we.convert(tt),we.convert(qe),be))}finally{const Qe=P!==null?F.get(P).__webglFramebuffer:null;C.bindFramebuffer(A.FRAMEBUFFER,Qe)}}},this.readRenderTargetPixelsAsync=async function(L,K,ie,se,J,be,Le,Ge=0){if(!(L&&L.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ue=F.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Le!==void 0&&(Ue=Ue[Le]),Ue)if(K>=0&&K<=L.width-se&&ie>=0&&ie<=L.height-J){C.bindFramebuffer(A.FRAMEBUFFER,Ue);const Qe=L.textures[Ge],tt=Qe.format,qe=Qe.type;if(!X.textureFormatReadable(tt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!X.textureTypeReadable(qe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const dt=A.createBuffer();A.bindBuffer(A.PIXEL_PACK_BUFFER,dt),A.bufferData(A.PIXEL_PACK_BUFFER,be.byteLength,A.STREAM_READ),L.textures.length>1&&A.readBuffer(A.COLOR_ATTACHMENT0+Ge),A.readPixels(K,ie,se,J,we.convert(tt),we.convert(qe),0);const At=P!==null?F.get(P).__webglFramebuffer:null;C.bindFramebuffer(A.FRAMEBUFFER,At);const Bt=A.fenceSync(A.SYNC_GPU_COMMANDS_COMPLETE,0);return A.flush(),await fP(A,Bt,4),A.bindBuffer(A.PIXEL_PACK_BUFFER,dt),A.getBufferSubData(A.PIXEL_PACK_BUFFER,0,be),A.deleteBuffer(dt),A.deleteSync(Bt),be}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(L,K=null,ie=0){const se=Math.pow(2,-ie),J=Math.floor(L.image.width*se),be=Math.floor(L.image.height*se),Le=K!==null?K.x:0,Ge=K!==null?K.y:0;H.setTexture2D(L,0),A.copyTexSubImage2D(A.TEXTURE_2D,ie,0,0,Le,Ge,J,be),C.unbindTexture()};const rC=A.createFramebuffer(),oC=A.createFramebuffer();this.copyTextureToTexture=function(L,K,ie=null,se=null,J=0,be=null){be===null&&(J!==0?(ga("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),be=J,J=0):be=0);let Le,Ge,Ue,Qe,tt,qe,dt,At,Bt;const Wt=L.isCompressedTexture?L.mipmaps[be]:L.image;if(ie!==null)Le=ie.max.x-ie.min.x,Ge=ie.max.y-ie.min.y,Ue=ie.isBox3?ie.max.z-ie.min.z:1,Qe=ie.min.x,tt=ie.min.y,qe=ie.isBox3?ie.min.z:0;else{const ui=Math.pow(2,-J);Le=Math.floor(Wt.width*ui),Ge=Math.floor(Wt.height*ui),L.isDataArrayTexture?Ue=Wt.depth:L.isData3DTexture?Ue=Math.floor(Wt.depth*ui):Ue=1,Qe=0,tt=0,qe=0}se!==null?(dt=se.x,At=se.y,Bt=se.z):(dt=0,At=0,Bt=0);const yt=we.convert(K.format),Ye=we.convert(K.type);let dn;K.isData3DTexture?(H.setTexture3D(K,0),dn=A.TEXTURE_3D):K.isDataArrayTexture||K.isCompressedArrayTexture?(H.setTexture2DArray(K,0),dn=A.TEXTURE_2D_ARRAY):(H.setTexture2D(K,0),dn=A.TEXTURE_2D),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,K.flipY),A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),A.pixelStorei(A.UNPACK_ALIGNMENT,K.unpackAlignment);const Mt=A.getParameter(A.UNPACK_ROW_LENGTH),wi=A.getParameter(A.UNPACK_IMAGE_HEIGHT),Uo=A.getParameter(A.UNPACK_SKIP_PIXELS),ni=A.getParameter(A.UNPACK_SKIP_ROWS),ja=A.getParameter(A.UNPACK_SKIP_IMAGES);A.pixelStorei(A.UNPACK_ROW_LENGTH,Wt.width),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,Wt.height),A.pixelStorei(A.UNPACK_SKIP_PIXELS,Qe),A.pixelStorei(A.UNPACK_SKIP_ROWS,tt),A.pixelStorei(A.UNPACK_SKIP_IMAGES,qe);const Ft=L.isDataArrayTexture||L.isData3DTexture,ci=K.isDataArrayTexture||K.isData3DTexture;if(L.isDepthTexture){const ui=F.get(L),In=F.get(K),Wn=F.get(ui.__renderTarget),cp=F.get(In.__renderTarget);C.bindFramebuffer(A.READ_FRAMEBUFFER,Wn.__webglFramebuffer),C.bindFramebuffer(A.DRAW_FRAMEBUFFER,cp.__webglFramebuffer);for(let Ur=0;Ur{n.delete(r)};return{on:r=>{n.add(r);const o=()=>e(r);return Er(o),{off:o}},off:e,trigger:(...r)=>Promise.all(Array.from(n).map(o=>o(...r))),clear:()=>{n.clear()}}}const um=new WeakMap,wF=(...n)=>{var e;const t=n[0],i=(e=Rn())==null?void 0:e.proxy;if(i==null&&!Ic())throw new Error("injectLocal must be called in setup");return i&&um.has(i)&&t in um.get(i)?um.get(i)[t]:_n(...n)},Cg=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const AF=n=>typeof n<"u",CF=n=>n!=null,RF=Object.prototype.toString,PF=n=>RF.call(n)==="[object Object]",Rg=()=>{};function IF(n,e){function t(...i){return new Promise((s,r)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(r)})}return t}function LF(n,e={}){let t,i,s=Rg;const r=l=>{clearTimeout(l),s(),s=Rg};let o;return l=>{const c=rt(n),u=rt(e.maxWait);return t&&r(t),c<=0||u!==void 0&&u<=0?(i&&(r(i),i=null),Promise.resolve(l())):new Promise((f,h)=>{s=e.rejectOnCancel?h:f,o=l,u&&!i&&(i=setTimeout(()=>{t&&r(t),i=null,f(o())},u)),t=setTimeout(()=>{i&&r(i),i=null,f(l())},c)})}}function Hb(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function DF(n,e,t=!1){return e.reduce((i,s)=>(s in n&&(!t||n[s]!==void 0)&&(i[s]=n[s]),i),{})}function OF(n){return Rn()}function Nl(n){return Array.isArray(n)?n:[n]}function NF(n,e=200,t={}){return IF(LF(e,t),n)}function Gb(n,e=200,t={}){const i=nt(n.value),s=NF(()=>{i.value=n.value},e,t);return je(n,()=>s()),i}function UF(n,e={}){if(!Lt(n))return vS(n);const t=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const i in n.value)t[i]=R0(()=>({get(){return n.value[i]},set(s){var r;if((r=rt(e.replaceRef))!=null?r:!0)if(Array.isArray(n.value)){const a=[...n.value];a[i]=s,n.value=a}else{const a={...n.value,[i]:s};Object.setPrototypeOf(a,Object.getPrototypeOf(n.value)),n.value=a}else n.value[i]=s}}));return t}const pn=rt;function P_(n,e=!0,t){OF()?Hn(n,t):e?n():Ar(n)}function FF(n,e=1e3,t={}){const{immediate:i=!0,immediateCallback:s=!1}=t;let r=null;const o=Ne(!1);function a(){r&&(clearInterval(r),r=null)}function l(){o.value=!1,a()}function c(){const u=rt(e);u<=0||(o.value=!0,s&&n(),a(),o.value&&(r=setInterval(n,u)))}if(i&&Cg&&c(),Lt(e)||typeof e=="function"){const u=je(e,()=>{o.value&&Cg&&c()});Er(u)}return Er(l),{isActive:o,pause:l,resume:c}}function gT(n,e,t){return je(n,e,{...t,immediate:!0})}const $s=Cg?window:void 0;function Di(n){var e;const t=rt(n);return(e=t==null?void 0:t.$el)!=null?e:t}function Ao(...n){const e=[],t=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=Ee(()=>{const a=Nl(rt(n[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=gT(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>Di(c)))!=null?l:[$s].filter(c=>c!=null),Nl(rt(s.value?n[1]:n[0])),Nl(Ut(s.value?n[2]:n[1])),rt(s.value?n[3]:n[2])]},([a,l,c,u])=>{if(t(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const f=PF(u)?{...u}:u;e.push(...a.flatMap(h=>l.flatMap(d=>c.map(p=>i(h,d,p,f)))))},{flush:"post"}),o=()=>{r(),t()};return Er(t),o}function kF(){const n=Ne(!1),e=Rn();return e&&Hn(()=>{n.value=!0},e),n}function zd(n){const e=kF();return Ee(()=>(e.value,!!n()))}function BF(n,e,t={}){const{window:i=$s,...s}=t;let r;const o=zd(()=>i&&"MutationObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const h=rt(n),d=Nl(h).map(Di).filter(CF);return new Set(d)}),c=je(()=>l.value,h=>{a(),o.value&&h.size&&(r=new MutationObserver(e),h.forEach(d=>r.observe(d,s)))},{immediate:!0,flush:"post"}),u=()=>r==null?void 0:r.takeRecords(),f=()=>{c(),a()};return Er(f),{isSupported:o,stop:f,takeRecords:u}}function I_(n,e={}){const{immediate:t=!0,fpsLimit:i=void 0,window:s=$s,once:r=!1}=e,o=Ne(!1),a=Ee(()=>i?1e3/rt(i):null);let l=0,c=null;function u(d){if(!o.value||!s)return;l||(l=d);const p=d-l;if(a.value&&pt&&"matchMedia"in t&&typeof t.matchMedia=="function"),r=Ne(typeof i=="number"),o=Ne(),a=Ne(!1),l=c=>{a.value=c.matches};return Lc(()=>{if(r.value){r.value=!s.value;const c=rt(n).split(",");a.value=c.some(u=>{const f=u.includes("not all"),h=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),d=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(h||d);return h&&p&&(p=i>=Hb(h[1])),d&&p&&(p=i<=Hb(d[1])),f?!p:p});return}s.value&&(o.value=t.matchMedia(rt(n)),a.value=o.value.matches)}),Ao(o,"change",l,{passive:!0}),Ee(()=>a.value)}function HF(n){return JSON.parse(JSON.stringify(n))}function GF(n={}){const{window:e=$s}=n,t=Ne(1),i=_T(()=>`(resolution: ${t.value}dppx)`,n);let s=Rg;return e&&(s=gT(i,()=>t.value=e.devicePixelRatio)),{pixelRatio:Fi(t),stop:s}}function vT(n,e,t={}){const{window:i=$s,...s}=t;let r;const o=zd(()=>i&&"ResizeObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const f=rt(n);return Array.isArray(f)?f.map(h=>Di(h)):[Di(f)]}),c=je(l,f=>{if(a(),o.value&&i){r=new ResizeObserver(e);for(const h of f)h&&r.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Er(u),{isSupported:o,stop:u}}function WF(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:s=!0,immediate:r=!0,updateTiming:o="sync"}=e,a=Ne(0),l=Ne(0),c=Ne(0),u=Ne(0),f=Ne(0),h=Ne(0),d=Ne(0),p=Ne(0);function _(){const m=Di(n);if(!m){t&&(a.value=0,l.value=0,c.value=0,u.value=0,f.value=0,h.value=0,d.value=0,p.value=0);return}const v=m.getBoundingClientRect();a.value=v.height,l.value=v.bottom,c.value=v.left,u.value=v.right,f.value=v.top,h.value=v.width,d.value=v.x,p.value=v.y}function g(){o==="sync"?_():o==="next-frame"&&requestAnimationFrame(()=>_())}return vT(n,g),je(()=>Di(n),m=>!m&&g()),BF(n,g,{attributeFilter:["style","class"]}),s&&Ao("scroll",g,{capture:!0,passive:!0}),i&&Ao("resize",g,{passive:!0}),P_(()=>{r&&g()}),{height:a,bottom:l,left:c,right:u,top:f,width:h,x:d,y:p,update:g}}function XF(n,e={width:0,height:0},t={}){const{window:i=$s,box:s="content-box"}=t,r=Ee(()=>{var f,h;return(h=(f=Di(n))==null?void 0:f.namespaceURI)==null?void 0:h.includes("svg")}),o=Ne(e.width),a=Ne(e.height),{stop:l}=vT(n,([f])=>{const h=s==="border-box"?f.borderBoxSize:s==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(i&&r.value){const d=Di(n);if(d){const p=d.getBoundingClientRect();o.value=p.width,a.value=p.height}}else if(h){const d=Nl(h);o.value=d.reduce((p,{inlineSize:_})=>p+_,0),a.value=d.reduce((p,{blockSize:_})=>p+_,0)}else o.value=f.contentRect.width,a.value=f.contentRect.height},t);P_(()=>{const f=Di(n);f&&(o.value="offsetWidth"in f?f.offsetWidth:e.width,a.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=je(()=>Di(n),f=>{o.value=f?e.width:0,a.value=f?e.height:0});function u(){l(),c()}return{width:o,height:a,stop:u}}function $F(n){var e;const t=Ne(0);if(typeof performance>"u")return t;const i=(e=n==null?void 0:n.every)!=null?e:10;let s=performance.now(),r=0;return I_(()=>{if(r+=1,r>=i){const o=performance.now(),a=o-s;t.value=Math.round(1e3/(a/r)),s=o,r=0}}),t}function qF(n={}){const e=nt(),t=zd(()=>typeof performance<"u"&&"memory"in performance);if(t.value){const{interval:i=1e3}=n;FF(()=>{e.value=performance.memory},i,{immediate:n.immediate,immediateCallback:n.immediateCallback})}return{isSupported:t,memory:e}}const yT={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},YF=Object.keys(yT);function jF(n={}){const{target:e=$s}=n,t=Ne(!1),i=nt(n.initialValue||{});Object.assign(i.value,yT,i.value);const s=r=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(r.pointerType))&&(i.value=DF(r,YF,!1))};if(e){const r={passive:!0};Ao(e,["pointerdown","pointermove","pointerup"],s,r),Ao(e,"pointerleave",()=>t.value=!1,r)}return{...UF(i),isInside:t}}function CG(n,e,t,i={}){var s,r,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:h}=i,d=Rn(),p=t||(d==null?void 0:d.emit)||((s=d==null?void 0:d.$emit)==null?void 0:s.bind(d))||((o=(r=d==null?void 0:d.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let _=c;_=_||`update:${e.toString()}`;const g=b=>a?typeof a=="function"?a(b):HF(b):b,m=()=>AF(n[e])?g(n[e]):f,v=b=>{h?h(b)&&p(_,b):p(_,b)};if(l){const b=m(),y=nt(b);let T=!1;return je(()=>n[e],w=>{T||(T=!0,y.value=g(w),Ar(()=>T=!1))}),je(y,w=>{!T&&(w!==n[e]||u)&&v(w)},{deep:u}),y}else return Ee({get(){return m()},set(b){v(b)}})}function KF(n={}){const{window:e=$s,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:r=!0,type:o="inner"}=n,a=Ne(t),l=Ne(i),c=()=>{if(e)if(o==="outer")a.value=e.outerWidth,l.value=e.outerHeight;else if(o==="visual"&&e.visualViewport){const{width:f,height:h,scale:d}=e.visualViewport;a.value=Math.round(f*d),l.value=Math.round(h*d)}else r?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),P_(c);const u={passive:!0};if(Ao("resize",c,u),e&&o==="visual"&&e.visualViewport&&Ao(e.visualViewport,"resize",c,u),s){const f=_T("(orientation: portrait)");je(f,()=>c())}return{width:a,height:l}}var ZF=Object.defineProperty,JF=(n,e,t)=>e in n?ZF(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wb=(n,e,t)=>JF(n,typeof e!="symbol"?e+"":e,t);const QF="@tresjs/core",ek="module",tk="4.3.5",nk="pnpm@10.6.3",ik="Declarative ThreeJS using Vue Components",sk="Alvaro Saburido (https://github.com/alvarosabu/)",rk="MIT",ok={type:"git",url:"git+https://github.com/Tresjs/tres.git"},ak=["vue","3d","threejs","three","threejs-vue"],lk=!1,ck={".":{types:"./dist/index.d.ts",import:"./dist/tres.js",require:"./dist/tres.umd.cjs"},"./components":{types:"./dist/src/components/index.d.ts"},"./composables":{types:"./dist/src/composables/index.d.ts"},"./types":{types:"./dist/src/types/index.d.ts"},"./utils":{types:"./dist/src/utils/index.d.ts"},"./*":"./*"},uk="./dist/tres.js",fk="./dist/tres.js",hk="./dist/index.d.ts",dk=["*.d.ts","dist"],pk={access:"public"},mk={dev:"pnpm --filter='./playground/vue' dev","dev:nuxt":"pnpm --filter='./playground/nuxt' dev",build:"vite build",test:"vitest","test:ci":"vitest run","test:ui":"vitest --ui --coverage.enabled=true",release:"release-it",coverage:"vitest run --coverage",lint:"eslint .","lint:fix":"eslint . --fix","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:serve":"vitepress serve docs","docs:preview":"vitepress preview docs","docs:contributors":"esno scripts/update-contributors.ts"},gk={three:">=0.133",vue:">=3.4"},_k={"@alvarosabu/utils":"^3.2.0","@vue/devtools-api":"^6.6.3","@vueuse/core":"^12.5.0"},vk={"@release-it/conventional-changelog":"^10.0.0","@stackblitz/sdk":"^1.11.0","@tresjs/cientos":"4.1.0","@tresjs/eslint-config":"^1.4.0","@types/three":"^0.173.0","@typescript-eslint/eslint-plugin":"^8.23.0","@typescript-eslint/parser":"^8.23.0","@vitejs/plugin-vue":"^5.2.1","@vitest/coverage-c8":"^0.33.0","@vitest/coverage-v8":"^3.0.5","@vitest/ui":"^3.0.5","@vue/test-utils":"^2.4.6",eslint:"^9.19.0","eslint-plugin-vue":"^9.32.0",esno:"^4.8.0",gsap:"^3.12.7",jsdom:"^26.0.0",kolorist:"^1.8.0",ohmyfetch:"^0.4.21",pathe:"^2.0.2","release-it":"^18.1.2","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-copy":"^3.5.0","rollup-plugin-visualizer":"^5.14.0",sponsorkit:"^16.3.0",three:"^0.173.0",unocss:"^65.4.3",unplugin:"^2.1.2","unplugin-vue-components":"^28.0.0",vite:"^6.1.0","vite-plugin-banner":"^0.8.0","vite-plugin-dts":"4.5.0","vite-plugin-inspect":"^10.1.0","vite-plugin-require-transform":"^1.0.21","vite-svg-loader":"^5.1.0",vitepress:"1.6.3",vitest:"3.0.5",vue:"3.5.13","vue-demi":"^0.14.10"},yk={name:QF,type:ek,version:tk,packageManager:nk,description:ik,author:sk,license:rk,repository:ok,keywords:ak,sideEffects:lk,exports:ck,main:uk,module:fk,types:hk,files:dk,publishConfig:pk,scripts:mk,peerDependencies:gk,dependencies:_k,devDependencies:vk};class bk extends jt{constructor(...e){super(...e),Wb(this,"type","HightlightMesh"),Wb(this,"createTime"),this.createTime=Date.now()}onBeforeRender(){const e=(Date.now()-this.createTime)/1e3,t=1+.07*Math.sin(2.5*e);this.scale.set(t,t,t)}}function Pg(n){return typeof n>"u"}function L_(n){return Array.isArray(n)}function xk(n){return typeof n=="number"}function bT(n){return typeof n=="string"}function fa(n){return typeof n=="function"}function cs(n){return n===Object(n)&&!L_(n)&&!fa(n)}function pr(n){return cs(n)&&!!n.isObject3D}function xT(n){return cs(n)&&!!n.isColor}function Mk(n){return n!=null&&(typeof n=="string"||typeof n=="number"||xT(n))}function Ig(n){return n!==null&&typeof n=="object"&&"set"in n&&typeof n.set=="function"}function Sk(n){return Ig(n)&&"copy"in n&&typeof n.copy=="function"}function Ek(n){return!!(n!=null&&n.constructor)}function Xb(n){return n instanceof Bc}function $b(n){return cs(n)&&!!n.isCamera}function Tk(n){return cs(n)&&!!n.isBufferGeometry}function wk(n){return cs(n)&&!!n.isMaterial}function Ak(n){return cs(n)&&!!n.isLight}function Ck(n){return cs(n)&&!!n.isFog}function Rk(n){return cs(n)&&!!n.isScene}function nf(n){return pr(n)||Tk(n)||wk(n)||Ck(n)}function Pk(n){return cs(n)&&!!n.isPrimitive}const MT=(n,e)=>{for(const t of Object.keys(e))e[t]instanceof Object&&Object.assign(e[t],MT(n[t],e[t]));return Object.assign(n||{},e),n},Ik="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Lk=Nk(Ik);function qb(n){return n&&n.nodeType===1}function fm(n){return n.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const Dk=/\B([A-Z])/g;function Ok(n){return n.replace(Dk,"-$1").toLowerCase()}function Nk(n,e){const t=Object.create(null),i=n.split(",");for(let s=0;s!!t[s.toLowerCase()]:s=>!!t[s]}const Yb=(n,e)=>{if(!e)return;const t=Array.isArray(e)?e:e.match(/([^[.\]])+/g);return t==null?void 0:t.reduce((i,s)=>i&&i[s],n)},Uk=(n,e,t)=>{const i=Array.isArray(e)?e:e.match(/([^[.\]])+/g);i&&i.reduce((s,r,o)=>(s[r]===void 0&&(s[r]={}),o===i.length-1&&(s[r]=t),s[r]),n)};function ST(n,e){if(qb(n)&&qb(e)){const s=n.attributes,r=e.attributes;return s.length!==r.length?!1:Array.from(s).every(({name:o,value:a})=>e.getAttribute(o)===a)}if(n===e)return!0;if(n===null||typeof n!="object"||e===null||typeof e!="object")return!1;const t=Object.keys(n),i=Object.keys(e);if(t.length!==i.length)return!1;for(const s of t)if(!i.includes(s)||!ST(n[s],e[s]))return!1;return!0}function Fk(n,e){if(!Array.isArray(n)||!Array.isArray(e)||n.length!==e.length)return!1;for(let t=0;t{if(l.uuid===e)return l;for(const c of l.children){const u=s(c);if(u)return u}},r=s(n);if(!r){console.warn("Object with UUID not found in the scene.");return}let o=r;for(let l=0;lET(i)),!(n instanceof vd)){const i=n;n&&((t=n.dispose)==null||t.call(n)),i.geometry&&i.geometry.dispose(),Array.isArray(i.material)?i.material.forEach(s=>jb(s)):i.material&&jb(i.material)}}function Vk(n,e){let t=0;for(let i=0;it===0?e:e.charAt(0).toUpperCase()+e.slice(1)).join("")}const Zb=/-\d+$/;function Hk(n,e,t){if(bT(t)){if(Zb.test(t)){const r=t.replace(Zb,""),{target:o,key:a}=Lg(n,r);if(!Array.isArray(o[a])){const l=o[a],c=[];c.__tresDetach=()=>{c.every(u=>Pg(u))&&(o[a]=l)},o[a]=c}}const{target:i,key:s}=Lg(n,t);e.__tres.previousAttach=i[s],i[s]=La(e)}else e.__tres.previousAttach=t(n,e)}function Gk(n,e,t){var i,s,r;if(bT(t)){const{target:o,key:a}=Lg(n,t),l=e.__tres.previousAttach;l===void 0?delete o[a]:o[a]=l,"__tresDetach"in o&&o.__tresDetach()}else(s=(i=e.__tres)==null?void 0:i.previousAttach)==null||s.call(i,n,e);(r=e.__tres)==null||delete r.previousAttach}function oo(n,e,t){const i=n;return i.__tres={type:"unknown",eventCount:0,root:t,handlers:{},memoizedProps:{},objects:[],parent:null,previousAttach:null,...e},i.__tres.attach||(i.isMaterial?i.__tres.attach="material":i.isBufferGeometry?i.__tres.attach="geometry":i.isFog&&(i.__tres.attach="fog")),i}function TT(n){var e;const t=(e=n==null?void 0:n.__tres)==null?void 0:e.root;t&&t.render&&t.render.canBeInvalidated.value&&t.invalidate()}function Wk(n,e,t){var i;if(!fa(n.setPixelRatio))return;let s=0;if(t&&L_(t)&&t.length>=2){const[r,o]=t;s=n_.clamp(e,r,o)}else xk(t)?s=t:s=e;s!==((i=n.getPixelRatio)==null?void 0:i.call(n))&&n.setPixelRatio(s)}function Xk(n,e,t,i,s){const r=[...e.__tres.objects],o=La(e);if(n=La(n),o===n)return!0;const a=oo(n,e.__tres??{},s),l=e.parent??e.__tres.parent??null,c={...e.__tres.memoizedProps};delete c.object;for(const u of r)wT(u,s),AT(u,s);o.__tres.objects=[],i.remove(e);for(const[u,f]of Object.entries(c))i.patchProp(a,u,a[u],f);t(n),i.insert(e,l);for(const u of r)i.insert(u,e);return!0}function La(n){return Pk(n)?(n.object.__tres=n.__tres,n.object):n}function wT(n,e){var t,i,s,r;const o=((t=n.__tres)==null?void 0:t.parent)||e.scene.value;n.__tres&&(n.__tres.parent=null),o&&o.__tres&&"objects"in o.__tres&&Vk(o.__tres.objects,a=>a!==n),(i=n.__tres)!=null&&i.attach?Gk(o,n,n.__tres.attach):((r=(s=n.parent)==null?void 0:s.remove)==null||r.call(s,La(n)),n.parent=null)}function AT(n,e){var t;(t=n.traverse)==null||t.call(n,i=>{var s;e.deregisterCamera(i),(s=e.eventManager)==null||s.deregisterPointerMissedObject(i)}),e.deregisterCamera(n),TT(n)}const $k=({sizes:n})=>{const e=nt([]),t=Ee(()=>e.value[0]),i=o=>{const a=o instanceof zc?o:e.value.find(c=>c.uuid===o);if(!a)return;const l=e.value.filter(({uuid:c})=>c!==a.uuid);e.value=[a,...l]},s=(o,a=!1)=>{if($b(o)){const l=o;if(e.value.some(({uuid:c})=>c===l.uuid))return;a?i(l):e.value.push(l)}},r=o=>{if($b(o)){const a=o;e.value=e.value.filter(({uuid:l})=>l!==a.uuid)}};return Lc(()=>{n.aspectRatio.value&&e.value.forEach(o=>{!o.manual&&(o instanceof Jt||qk(o))&&(o instanceof Jt?o.aspect=n.aspectRatio.value:(o.left=n.width.value*-.5,o.right=n.width.value*.5,o.top=n.height.value*.5,o.bottom=n.height.value*-.5),o.updateProjectionMatrix())})}),rs(()=>{e.value=[]}),{camera:t,cameras:e,registerCamera:s,deregisterCamera:r,setCameraActive:i}};function qk(n){return n.hasOwnProperty("isOrthographicCamera")&&n.isOrthographicCamera}const Rh="[TresJS ▲ ■ ●] ";function Yk(...n){typeof n[0]=="string"?n[0]=Rh+n[0]:n.unshift(Rh),console.error(...n)}function jk(...n){typeof n[0]=="string"?n[0]=Rh+n[0]:n.unshift(Rh),console.warn(...n)}function Kk(n,e){}function CT(){return{logError:Yk,logWarning:jk,logMessage:Kk}}const Dg=nt({}),Og=n=>Object.assign(Dg.value,n);function hm(){const n=new Map,e=new Set;let t=0,i=!1;const s=()=>{const o=Array.from(n.entries()).sort((a,l)=>{const c=a[1].priority-l[1].priority;return c===0?a[1].addI-l[1].addI:c});e.clear(),o.forEach(a=>e.add(a[0]))},r=o=>{n.delete(o),e.delete(o)};return{on:(o,a=0)=>{n.set(o,{priority:a,addI:t++});const l=()=>r(o);return Er(l),i=!0,{off:l}},off:r,trigger:(...o)=>{i&&(s(),i=!1),e.forEach(a=>a(...o))},dispose:()=>{n.clear(),e.clear()},get count(){return n.size}}}function Zk(){let n=!0,e=!0,t=!1;const i=new kd(!1),s=nt(i.running),r=nt(!1);let o;const a=n_.generateUUID();let l=null;const c=hm(),u=hm(),f=hm();w();let h={};function d(E){h=E}function p(E,P,M=0){switch(P){case"before":return c.on(E,M);case"render":return l||(l=E),u.dispose(),u.on(E);case"after":return f.on(E,M)}}function _(){e&&(e=!1,w(),T())}function g(){e=!0,w(),cancelAnimationFrame(o)}function m(){t=!1,w()}function v(){t=!0,w()}function b(){r.value=!0}function y(){r.value=!1}function T(){if(!n){o=requestAnimationFrame(T);return}const E=i.getDelta(),P=i.getElapsedTime(),M={camera:Ut(h.camera),scene:Ut(h.scene),renderer:Ut(h.renderer),raycaster:Ut(h.raycaster),controls:Ut(h.controls),invalidate:h.invalidate,advance:h.advance},S={delta:E,elapsed:P,clock:i,...M};s.value&&c.trigger(S),r.value||(u.count?u.trigger(S):l&&l(S)),s.value&&f.trigger(S),o=requestAnimationFrame(T)}function w(){const E=!e&&!t;i.running!==E&&(i.running?i.stop():i.start()),s.value=i.running}return{loopId:a,register:(E,P,M)=>p(E,P,M),start:_,stop:g,pause:v,resume:m,pauseRender:b,resumeRender:y,isRenderPaused:r,isActive:s,setContext:d,setReady:E=>n=E}}function D_(n){let e=0;return n.traverse(t=>{if(t.isMesh&&t.geometry&&t.type!=="HightlightMesh"){const i=t.geometry,s=i.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,r=i.index?i.index.count*Uint32Array.BYTES_PER_ELEMENT:0,o=i.attributes.normal?i.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,a=i.attributes.uv?i.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,l=s+r+o+a;e+=l}}),e}function Jk(n){return(n/1024).toFixed(2)}const Qk=Number.parseInt(Uc.replace("dev",""));function eB(n){return n instanceof Pe?n:Array.isArray(n)?new Pe(...n):new Pe(n)}const sf={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:Fn,toneMapping:rd,toneMappingExposure:3,shadowMap:{enabled:!0,type:W0}},flat:{toneMapping:ts,toneMappingExposure:1}};function tB({canvas:n,options:e,contextParts:{sizes:t,render:i,invalidate:s,advance:r}}){const o=Ee(()=>({alpha:pn(e.alpha)??!0,depth:pn(e.depth),canvas:Di(n),context:pn(e.context),stencil:pn(e.stencil),antialias:pn(e.antialias)??!0,precision:pn(e.precision),powerPreference:pn(e.powerPreference),premultipliedAlpha:pn(e.premultipliedAlpha),preserveDrawingBuffer:pn(e.preserveDrawingBuffer),logarithmicDepthBuffer:pn(e.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:pn(e.failIfMajorPerformanceCaveat)})),a=Ne(new Tf(o.value));function l(){e.renderMode==="on-demand"&&s()}je(o,()=>{a.value.dispose(),a.value=new Tf(o.value),l()}),je([t.width,t.height],()=>{a.value.setSize(t.width.value,t.height.value),l()},{immediate:!0}),je(()=>e.clearColor,l);const{pixelRatio:c}=GF(),{logError:u}=CT(),f=(()=>{const d=new Tf,p={shadowMap:{enabled:d.shadowMap.enabled,type:d.shadowMap.type},toneMapping:d.toneMapping,toneMappingExposure:d.toneMappingExposure,outputColorSpace:d.outputColorSpace};return d.dispose(),p})(),h=pn(e.renderMode);return h==="on-demand"&&s(),h==="manual"&&setTimeout(()=>{r()},100),Lc(()=>{const d=pn(e.preset);d&&(d in sf||u(`Renderer Preset must be one of these: ${Object.keys(sf).join(", ")}`),MT(a.value,sf[d])),Wk(a.value,c.value,pn(e.dpr)),h==="always"&&(i.frames.value=Math.max(1,i.frames.value));const p=(m,v)=>{const b=pn(m),y=()=>{if(d)return Yb(sf[d],v)};if(b!==void 0)return b;const T=y();return T!==void 0?T:Yb(f,v)},_=(m,v)=>Uk(a.value,v,p(m,v));_(e.shadows,"shadowMap.enabled"),_(e.toneMapping??rd,"toneMapping"),_(e.shadowMapType,"shadowMap.type"),Qk<150&&_(!e.useLegacyLights,"physicallyCorrectLights"),_(e.outputColorSpace,"outputColorSpace"),_(e.toneMappingExposure,"toneMappingExposure");const g=p(e.clearColor,"clearColor");g&&a.value.setClearColor(g?eB(g):new Pe(0))}),rs(()=>{a.value.dispose(),a.value.forceContextLoss()}),{renderer:a}}function nB(n,e,t=10){const i=pn(n)?KF():XF(Ee(()=>pn(e).parentElement)),s=Fi(Gb(i.width,t)),r=Fi(Gb(i.height,t)),o=Ee(()=>s.value/r.value);return{height:r,width:s,aspectRatio:o}}const iB=(n,e)=>{const t=Ee(()=>e.renderer.value.domElement),i=Ne([]),{x:s,y:r}=jF({target:t});let o=0;const{width:a,height:l,top:c,left:u}=WF(t),f=({x:re,y:xe})=>{if(t.value)return{x:(re-u.value)/a.value*2-1,y:-((xe-c.value)/l.value)*2+1}},h=({x:re,y:xe})=>{if(e.camera.value)return e.raycaster.value.setFromCamera(new fe(re,xe),e.camera.value),i.value=e.raycaster.value.intersectObjects(n.value,!0),i.value},d=re=>{const xe=f({x:(re==null?void 0:re.clientX)??s.value,y:(re==null?void 0:re.clientY)??r.value});return xe?h(xe)||[]:[]},p=pi(),_=pi(),g=pi(),m=pi(),v=pi(),b=pi(),y=pi(),T=pi();function w(re){const xe={};for(const We in re)typeof We!="function"&&(xe[We]=re[We]);return xe}const E=(re,xe)=>{var We,oe,ge;const Se=w(xe),$=new k(xe==null?void 0:xe.clientX,xe==null?void 0:xe.clientY,0).unproject((We=e.camera)==null?void 0:We.value);re.trigger({...Se,intersections:i.value,unprojectedPoint:$,ray:(oe=e.raycaster)==null?void 0:oe.value.ray,camera:(ge=e.camera)==null?void 0:ge.value,sourceEvent:xe,delta:o,stopPropagating:!1})};let P;const M=re=>{d(re),E(g,re),P=re},S=()=>{P&&M(P)};let D,B,z;const V=re=>{var xe;D=(xe=i.value[0])==null?void 0:xe.object,o=0,B=new fe((re==null?void 0:re.clientX)??s.value,(re==null?void 0:re.clientY)??r.value),E(v,re)};let Q,j=!1;const te=re=>{var xe,We,oe;re instanceof PointerEvent&&(i.value.length===0&&E(b,re),D===((xe=i.value[0])==null?void 0:xe.object)&&(z=new fe((re==null?void 0:re.clientX)??s.value,(re==null?void 0:re.clientY)??r.value),o=B==null?void 0:B.distanceTo(z),re.button===0?(E(p,re),Q===((We=i.value[0])==null?void 0:We.object)?j=!0:(Q=(oe=i.value[0])==null?void 0:oe.object,j=!1)):re.button===2&&E(y,re)),E(m,re))},Z=re=>{j&&(E(_,re),Q=void 0,j=!1)},pe=re=>E(g,re),Me=re=>E(T,re);return t.value.addEventListener("pointerup",te),t.value.addEventListener("pointerdown",V),t.value.addEventListener("pointermove",M),t.value.addEventListener("pointerleave",pe),t.value.addEventListener("dblclick",Z),t.value.addEventListener("wheel",Me),rs(()=>{t!=null&&t.value&&(t.value.removeEventListener("pointerup",te),t.value.removeEventListener("pointerdown",V),t.value.removeEventListener("pointermove",M),t.value.removeEventListener("pointerleave",pe),t.value.removeEventListener("dblclick",Z),t.value.removeEventListener("wheel",Me))}),{intersects:i,onClick:re=>p.on(re).off,onDblClick:re=>_.on(re).off,onContextMenu:re=>y.on(re).off,onPointerMove:re=>g.on(re).off,onPointerUp:re=>m.on(re).off,onPointerDown:re=>v.on(re).off,onPointerMissed:re=>b.on(re).off,onWheel:re=>T.on(re).off,forceUpdate:S}};function dm(n,e){if(Array.isArray(n))for(const t of n)t(e);typeof n=="function"&&n(e)}function sB(n,e,t){var i;const s=Ne(),r=Ne();n&&(s.value=n),e&&(r.value=e);const o=M=>{var S;return((S=M.__tres)==null?void 0:S.eventCount)>0},a=M=>{var S;return((S=M.children)==null?void 0:S.some(D=>a(D)))||o(M)},l=Ne(((i=s.value)==null?void 0:i.children).filter(a)||[]);function c(M,S){const D=[],B=()=>S.stopPropagating=!0;S.stopPropagation=B;for(const z of S==null?void 0:S.intersections){if(S.stopPropagating)return;S={...S,...z};const{object:V}=z;S.eventObject=V,dm(V[M],S),D.push(V);let Q=V.parent;for(;Q!==null&&!S.stopPropagating&&!D.includes(Q);)S.eventObject=Q,dm(Q[M],S),D.push(Q),Q=Q.parent;const j=Ok(M.slice(2));t(j,{intersection:z,event:S})}}const{onClick:u,onDblClick:f,onContextMenu:h,onPointerMove:d,onPointerDown:p,onPointerUp:_,onPointerMissed:g,onWheel:m,forceUpdate:v}=iB(l,e);_(M=>c("onPointerUp",M)),p(M=>c("onPointerDown",M)),u(M=>c("onClick",M)),f(M=>c("onDoubleClick",M)),h(M=>c("onContextMenu",M)),m(M=>c("onWheel",M));let b=[];d(M=>{const S=M.intersections.map(({object:B})=>B),D=M.intersections;b.forEach(({object:B})=>{S.includes(B)||(M.intersections=b,c("onPointerLeave",M),c("onPointerOut",M))}),M.intersections=D,M.intersections.forEach(({object:B})=>{b.includes(B)||(c("onPointerEnter",M),c("onPointerOver",M))}),c("onPointerMove",M),b=M.intersections});const y=[];g(M=>{const S=()=>M.stopPropagating=!0;M.stopPropagation=S,y.forEach(D=>{M.stopPropagating||(M.eventObject=D,dm(D.onPointerMissed,M))}),t("pointer-missed",{event:M})});function T(M){nf(M)&&pr(M)&&l.value.push(M)}function w(M){if(nf(M)&&pr(M)){const S=l.value.indexOf(M);S>-1&&l.value.splice(S,1)}}function E(M){nf(M)&&pr(M)&&M.onPointerMissed&&y.push(M)}function P(M){if(nf(M)&&pr(M)){const S=y.indexOf(M);S>-1&&y.splice(S,1)}}return e.eventManager={forceUpdate:v,registerObject:T,deregisterObject:w,registerPointerMissedObject:E,deregisterPointerMissedObject:P},{forceUpdate:v,registerObject:T,deregisterObject:w,registerPointerMissedObject:E,deregisterPointerMissedObject:P}}function rB(n,e,t=100){t=t<=0?100:t;const i=pi(),s=new Set;let r=!1,o=!1,a=null;function l(){a&&clearTimeout(a),!o&&!r&&n()?(i.trigger(e),s.forEach(f=>f()),s.clear(),r=!0):!o&&!r&&(a=setTimeout(l,t))}function c(){o=!0,a&&clearTimeout(a)}l();const u=(f,...h)=>{f(...h)};return{on:f=>{if(r)return u(f,e),{off:()=>{}};{const h=i.on(f);return s.add(h.off),i.on(f)}},off:i.off,trigger:i.trigger,clear:i.clear,cancel:c}}const pm=new WeakMap;function oB(n){if(n=n||RT(),pm.has(n))return pm.get(n);const e=100,t=Date.now(),i=rB(()=>{if(Date.now()-t>=e)return!0;{const s=n.renderer.value,r=(s==null?void 0:s.domElement)||{width:0,height:0};return!!(s&&r.width>0&&r.height>0)}},n);return pm.set(n,i),i}function aB({scene:n,canvas:e,windowSize:t,rendererOptions:i,emit:s}){const r=Ne(n),o=nB(t,e),{camera:a,cameras:l,registerCamera:c,deregisterCamera:u,setCameraActive:f}=$k({sizes:o}),h={mode:nt(i.renderMode||"always"),priority:nt(0),frames:nt(0),maxFrames:60,canBeInvalidated:Ee(()=>h.mode.value==="on-demand"&&h.frames.value===0)};function d(z=1){i.renderMode==="on-demand"&&(h.frames.value=Math.min(h.maxFrames,h.frames.value+z))}function p(){i.renderMode==="manual"&&(h.frames.value=1)}const{renderer:_}=tB({canvas:e,options:i,contextParts:{sizes:o,render:h,invalidate:d,advance:p}}),g={sizes:o,scene:r,camera:a,cameras:Fi(l),renderer:_,raycaster:Ne(new lT),controls:nt(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:h,advance:p,extend:Og,invalidate:d,registerCamera:c,setCameraActive:f,deregisterCamera:u,loop:Zk()};gr("useTres",g),g.scene.value.__tres={root:g},g.loop.register(()=>{a.value&&h.frames.value>0&&(_.value.render(n,a.value),s("render",g.renderer.value)),h.priority.value=0,h.mode.value==="always"?h.frames.value=1:h.frames.value=Math.max(0,h.frames.value-1)},"render");const{on:m,cancel:v}=oB(g);g.loop.setReady(!1),g.loop.start(),m(()=>{s("ready",g),g.loop.setReady(!0),sB(n,g,s)}),rs(()=>{v(),g.loop.stop()});const b=100,y=$F({every:b}),{isSupported:T,memory:w}=qF({interval:b}),E=160;let P=performance.now();const M=({timestamp:z})=>{g.scene.value&&(g.perf.memory.allocatedMem=D_(g.scene.value)),z-P>=b&&(P=z,g.perf.fps.accumulator.push(y.value),g.perf.fps.accumulator.length>E&&g.perf.fps.accumulator.shift(),g.perf.fps.value=y.value,T.value&&w.value&&(g.perf.memory.accumulator.push(w.value.usedJSHeapSize/1024/1024),g.perf.memory.accumulator.length>E&&g.perf.memory.accumulator.shift(),g.perf.memory.currentMem=g.perf.memory.accumulator.reduce((V,Q)=>V+Q,0)/g.perf.memory.accumulator.length))};let S=0;const D=1,{pause:B}=I_(({delta:z})=>{window.__TRES__DEVTOOLS__&&(M({timestamp:performance.now()}),S+=z,S>=D&&(window.__TRES__DEVTOOLS__.cb(g),S=0))},{immediate:!0});return rs(()=>{B()}),g}function RT(){const n=_n("useTres");if(!n)throw new Error("useTresContext must be used together with useTresContextProvider");return n}function RG(){const{camera:n,scene:e,renderer:t,loop:i,raycaster:s,controls:r,invalidate:o,advance:a}=RT();i.setContext({camera:n,scene:e,renderer:t,raycaster:s,controls:r,invalidate:o,advance:a});function l(f,h=0){return i.register(f,"before",h)}function c(f){return i.register(f,"render")}function u(f,h=0){return i.register(f,"after",h)}return{pause:i.pause,resume:i.resume,pauseRender:i.pauseRender,resumeRender:i.resumeRender,isActive:i.isActive,onBeforeRender:l,render:c,onAfterRender:u}}const lB=pi(),cB=pi(),PT=pi(),Ul=new kd;let wf=0,Af=0;I_(()=>{lB.trigger({delta:wf,elapsed:Af,clock:Ul}),cB.trigger({delta:wf,elapsed:Af,clock:Ul}),PT.trigger({delta:wf,elapsed:Af,clock:Ul})},{immediate:!1});PT.on(()=>{wf=Ul.getDelta(),Af=Ul.getElapsedTime()});function uB(n,e={},t={}){let i=n;const s=a=>{i=a};let r=new Proxy({},{});const o={has(a,l){return l in e||l in i},get(a,l,c){return l in e?e[l](i):i[l]},set(a,l,c){return t[l]?t[l](c,i,r,s):i[l]=c,!0}};return r=new Proxy({},o),r}const{logError:Jb}=CT(),Qb=["onClick","onContextMenu","onPointerMove","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onDoubleClick","onPointerDown","onPointerUp","onPointerCancel","onPointerMissed","onLostPointerCapture","onWheel"],fB=n=>{const e=n.scene.value;function t(c,u,f,h){if(h||(h={}),h.args||(h.args=[]),c==="template"||Lk(c))return null;let d=c.replace("Tres",""),p;if(c==="primitive"){(!cs(h.object)||Lt(h.object))&&Jb("Tres primitives need an 'object' prop, whose value is an object or shallowRef"),d=h.object.type;const _={};p=uB(h.object,{object:g=>g,isPrimitive:()=>!0,__tres:()=>_},{object:(g,m,v,b)=>{Xk(g,v,b,{patchProp:r,remove:s,insert:i},n)},__tres:g=>{Object.assign(_,g)}})}else{const _=Dg.value[d];_||Jb(`${d} is not defined on the THREE namespace. Use extend to add it to the catalog.`),p=new _(...h.args)}return p?(p.isCamera&&(h!=null&&h.position||p.position.set(3,3,3),h!=null&&h.lookAt||p.lookAt(0,0,0)),p=oo(p,{...p.__tres,type:d,memoizedProps:h,eventCount:0,primitive:c==="primitive",attach:h.attach},n),p):null}function i(c,u){var f,h,d;if(!c)return;u=u||e;const p=c.__tres?c:oo(c,{},n),_=u.__tres?u:oo(u,{},n);c=La(p),u=La(_),c.__tres&&((f=c.__tres)==null?void 0:f.eventCount)>0&&((h=n.eventManager)==null||h.registerObject(c)),n.registerCamera(c),(d=n.eventManager)==null||d.registerPointerMissedObject(c),p.__tres.attach?Hk(_,p,p.__tres.attach):pr(c)&&pr(_)&&(_.add(c),c.dispatchEvent({type:"added"})),p.__tres.parent=_,_.__tres.objects&&!_.__tres.objects.includes(p)&&_.__tres.objects.push(p)}function s(c,u){var f,h,d,p;if(!c)return;c!=null&&c.__tres&&((f=c.__tres)==null?void 0:f.eventCount)>0&&((h=n.eventManager)==null||h.deregisterObject(c)),u=Pg(u)?"default":u;const _=(d=c.__tres)==null?void 0:d.dispose;Pg(_)||(_===null?u=!1:u=_);const g=(p=c.__tres)==null?void 0:p.primitive,m=u==="default"?!g:!!u;if(c.__tres&&"objects"in c.__tres&&[...c.__tres.objects].forEach(v=>s(v,u)),m&&c.children&&[...c.children].forEach(v=>s(v,u)),wT(c,n),AT(c,n),m&&!Rk(c)){if(fa(u))u(c);else if(fa(c.dispose))try{c.dispose()}catch{}}"__tres"in c&&delete c.__tres}function r(c,u,f,h){var d,p;if(!c)return;let _=c,g=u;if(c.__tres&&(c.__tres.memoizedProps[u]=h),u==="attach"){const y=((d=c.__tres)==null?void 0:d.parent)||c.parent;s(c),oo(c,{attach:h},n),y&&i(c,y);return}if(u==="dispose"){c.__tres||(c=oo(c,{},n)),c.__tres.dispose=h;return}if(pr(c)&&g==="blocks-pointer-events"){h||h===""?c[g]=h:delete c[g];return}Qb.includes(u)&&c.__tres&&(c.__tres.eventCount+=1);let m=fm(g),v=_==null?void 0:_[m];if(g==="args"){const y=c,T=f??[],w=h??[],E=((p=c.__tres)==null?void 0:p.type)||c.type;E&&T.length&&!Fk(T,w)&&(_=Object.assign(y,new Dg.value[E](...h)));return}if(_.type==="BufferGeometry"){if(g==="args")return;_.setAttribute(fm(g),new Pt(...h));return}if(g.includes("-")&&v===void 0){v=_;for(const y of g.split("-"))m=g=fm(y),_=v,v=v==null?void 0:v[g]}let b=h;if(b===""&&(b=!0),fa(v)){Qb.includes(u)||(L_(b)?c[m](...b):c[m](b)),m.startsWith("on")&&fa(b)&&(_[m]=b);return}Xb(v)&&Xb(b)?v.mask=b.mask:xT(v)&&Mk(b)?v.set(b):Sk(v)&&Ek(b)&&v.constructor===b.constructor?v.copy(b):Ig(v)&&Array.isArray(b)?"fromArray"in v&&typeof v.fromArray=="function"?v.fromArray(b):v.set(...b):Ig(v)&&typeof b=="number"?"setScalar"in v&&typeof v.setScalar=="function"?v.setScalar(b):v.set(b):_[m]=b,TT(c)}function o(c){var u;return((u=c==null?void 0:c.__tres)==null?void 0:u.parent)||null}function a(c){const u=oo(new gt,{type:"Comment"},n);return u.name=c,u}function l(c){var u;const f=o(c),h=((u=f==null?void 0:f.__tres)==null?void 0:u.objects)||[],d=h.indexOf(c);return d<0||d>=h.length-1?null:h[d+1]}return{insert:i,remove:s,createElement:t,patchProp:r,parentNode:o,createText:()=>{},createComment:a,setText:()=>{},setElementText:()=>{},nextSibling:l,querySelector:()=>{},setScopeId:()=>{},cloneNode:()=>{},insertStaticContent:()=>{}}};function hB(){return IT().__VUE_DEVTOOLS_GLOBAL_HOOK__}function IT(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const dB=typeof Proxy=="function",pB="devtools-plugin:setup",mB="plugin:settings:set";let ul,Ng;function gB(){var n;return ul!==void 0||(typeof window<"u"&&window.performance?(ul=!0,Ng=window.performance):typeof globalThis<"u"&&!((n=globalThis.perf_hooks)===null||n===void 0)&&n.performance?(ul=!0,Ng=globalThis.perf_hooks.performance):ul=!1),ul}function _B(){return gB()?Ng.now():Date.now()}class vB{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const i={};if(e.settings)for(const o in e.settings){const a=e.settings[o];i[o]=a.defaultValue}const s=`__vue-devtools-plugin-settings__${e.id}`;let r=Object.assign({},i);try{const o=localStorage.getItem(s),a=JSON.parse(o);Object.assign(r,a)}catch{}this.fallbacks={getSettings(){return r},setSettings(o){try{localStorage.setItem(s,JSON.stringify(o))}catch{}r=o},now(){return _B()}},t&&t.on(mB,(o,a)=>{o===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(o,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(o,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(c=>{this.targetQueue.push({method:a,args:l,resolve:c})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function yB(n,e){const t=n,i=IT(),s=hB(),r=dB&&t.enableEarlyProxy;if(s&&(i.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))s.emit(pB,n,e);else{const o=r?new vB(t,s):null;(i.__VUE_DEVTOOLS_PLUGINS__=i.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:o}),o&&e(o.proxiedTarget)}}function bB(n,e){const t=`▲ ■ ●${n}`;typeof ex=="function"?ex(t,e):console.log(t)}function ex(n,e){throw new Error(n+e)}const LT=n=>{const e={id:n.uuid,label:n.type,children:[],tags:[]};n.name!==""&&e.tags.push({label:n.name,textColor:5750629,backgroundColor:15793395});const t=D_(n);return t>0&&e.tags.push({label:`${Jk(t)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:"Memory usage"}),n.type.includes("Light")&&(Ak(n)&&e.tags.push({label:`${n.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:"Intensity"}),e.tags.push({label:`#${new Pe(n.color).getHexString()}`,textColor:9738662,backgroundColor:16316922,tooltip:"Color"})),n.type.includes("Camera")&&(e.tags.push({label:`${n.fov}°`,textColor:9738662,backgroundColor:16316922,tooltip:"Field of view"}),e.tags.push({label:`x: ${Math.round(n.position.x)} y: ${Math.round(n.position.y)} z: ${Math.round(n.position.z)}`,textColor:9738662,backgroundColor:16316922,tooltip:"Position"})),e};function DT(n,e,t=""){n.children.forEach(i=>{if(i.type==="HightlightMesh"||t&&!i.type.includes(t)&&!i.name.includes(t))return;const s=LT(i);e.children.push(s),DT(i,s,t)})}const xB=[],fl="tres:inspector",MB=xi({sceneGraph:null});function SB(n,e){yB({id:"dev.esm.tres",label:"TresJS 🪐",logo:"https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg",packageName:"tresjs",homepage:"https://tresjs.org",componentStateTypes:xB,app:n},t=>{typeof t.now!="function"&&bB("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addInspector({id:fl,label:"TresJS 🪐",icon:"account_tree",treeFilterPlaceholder:"Search instances"}),setInterval(()=>{t.sendInspectorTree(fl)},1e3),setInterval(()=>{t.notifyComponentUpdate()},5e3),t.on.getInspectorTree(r=>{if(r.inspectorId===fl){const o=LT(e.scene.value);DT(e.scene.value,o,r.filter),MB.sceneGraph=o,r.rootNodes=[o]}});let i=null,s=null;t.on.getInspectorState(r=>{var o;if(r.inspectorId===fl){const[a]=e.scene.value.getObjectsByProperty("uuid",r.nodeId);if(!a)return;if(s&&i&&i.parent&&s.remove(i),a.isMesh){const l=Bk(a);a.add(l),i=l,s=a}r.state={object:Object.entries(a).map(([l,c])=>l==="children"?{key:l,value:c.filter(u=>u.type!=="HightlightMesh")}:{key:l,value:c,editable:!0}).filter(({key:l})=>l!=="parent")},a.isScene&&(r.state={...r.state,state:[{key:"Scene Info",value:{objects:a.children.length,memory:D_(a),calls:e.renderer.value.info.render.calls,triangles:e.renderer.value.info.render.triangles,points:e.renderer.value.info.render.points,lines:e.renderer.value.info.render.lines}},{key:"Programs",value:((o=e.renderer.value.info.programs)==null?void 0:o.map(l=>({...l,programName:l.name})))||[]}]})}}),t.on.editInspectorState(r=>{r.inspectorId===fl&&kk(e.scene.value,r.nodeId,r.path,r.state.value)})})}const EB=["data-scene","data-tres"],TB=hn({__name:"TresCanvas",props:{shadows:{type:Boolean,default:void 0},clearColor:{},toneMapping:{},shadowMapType:{},useLegacyLights:{type:Boolean,default:void 0},outputColorSpace:{},toneMappingExposure:{},renderMode:{default:"always"},dpr:{},camera:{},preset:{},windowSize:{type:Boolean,default:void 0},enableProvideBridge:{type:Boolean,default:!0},context:{},alpha:{type:Boolean,default:void 0},premultipliedAlpha:{type:Boolean},antialias:{type:Boolean,default:void 0},stencil:{type:Boolean,default:void 0},preserveDrawingBuffer:{type:Boolean,default:void 0},powerPreference:{},depth:{type:Boolean,default:void 0},failIfMajorPerformanceCaveat:{type:Boolean,default:void 0},precision:{},logarithmicDepthBuffer:{type:Boolean,default:void 0},reverseDepthBuffer:{type:Boolean}},emits:["render","click","double-click","context-menu","pointer-move","pointer-up","pointer-down","pointer-enter","pointer-leave","pointer-over","pointer-out","pointer-missed","wheel","ready"],setup(n,{expose:e,emit:t}){const i=n,s=t,r=O0(),o=nt(),a=Ne(new vd),l=Rn();Og(TF);const c=(p,_=!1)=>hn({setup(){var g;const m=(g=Rn())==null?void 0:g.appContext;m&&(m.app=l==null?void 0:l.appContext.app);const v={};function b(y){y&&(y.parent&&b(y.parent),y.provides&&Object.assign(v,y.provides))}return l!=null&&l.parent&&i.enableProvideBridge&&(b(l.parent),Reflect.ownKeys(v).forEach(y=>{gr(y,v[y])})),gr("useTres",p),gr("extend",Og),typeof window<"u"&&SB(m==null?void 0:m.app,p),()=>ks(Zt,null,_?[]:r.default())}}),u=(p,_=!1)=>{const g=c(p,_),{render:m}=ZS(fB(p));m(ks(g),a.value)},f=(p,_=!1)=>{ET(p.scene.value),_&&(p.renderer.value.dispose(),p.renderer.value.renderLists.dispose(),p.renderer.value.forceContextLoss()),a.value.__tres={root:p}},h=Ne(null);e({context:h,dispose:()=>f(h.value,!0)});const d=()=>{f(h.value),u(h.value,!0)};return Hn(()=>{const p=o;h.value=aB({scene:a.value,canvas:p,windowSize:i.windowSize??!1,rendererOptions:i,emit:s});const{registerCamera:_,camera:g,cameras:m,deregisterCamera:v}=h.value;u(h.value);const b=()=>{const y=new Jt(45,window.innerWidth/window.innerHeight,.1,1e3);y.position.set(3,3,3),y.lookAt(0,0,0),_(y);const T=Lc(()=>{m.value.length>=2&&(y.removeFromParent(),v(y),T==null||T())})};je(()=>i.camera,(y,T)=>{y&&_(y),T&&(T.removeFromParent(),v(T))},{immediate:!0}),g.value||b()}),rs(d),(p,_)=>(vn(),yi("canvas",{ref_key:"canvas",ref:o,"data-scene":a.value.uuid,class:ka(p.$attrs.class),"data-tres":`tresjs ${Ut(yk).version}`,style:Si({display:"block",width:"100%",height:"100%",position:p.windowSize?"fixed":"relative",top:0,left:0,pointerEvents:"auto",touchAction:"none",...p.$attrs.style})},null,14,EB))}}),wB={install(n){n.component("TresCanvas",TB)}};function mm(n){if(n===null||typeof n!="object")return!1;const e=Object.getPrototypeOf(n);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in n?!1:Symbol.toStringTag in n?Object.prototype.toString.call(n)==="[object Module]":!0}function Ug(n,e,t=".",i){if(!mm(e))return Ug(n,{},t,i);const s=Object.assign({},e);for(const r in n){if(r==="__proto__"||r==="constructor")continue;const o=n[r];o!=null&&(i&&i(s,r,o,t)||(Array.isArray(o)&&Array.isArray(s[r])?s[r]=[...o,...s[r]]:mm(o)&&mm(s[r])?s[r]=Ug(o,s[r],(t?`${t}.`:"")+r.toString(),i):s[r]=o))}return s}function AB(n){return(...e)=>e.reduce((t,i)=>Ug(t,i,"",n),{})}const OT=AB();function Ir(n){return qh()?(S0(n),!0):!1}function tx(){const n=new Set,e=r=>{n.delete(r)};return{on:r=>{n.add(r);const o=()=>e(r);return Ir(o),{off:o}},off:e,trigger:(...r)=>Promise.all(Array.from(n).map(o=>o(...r))),clear:()=>{n.clear()}}}const gm=new WeakMap,CB=(...n)=>{var e;const t=n[0],i=(e=Rn())==null?void 0:e.proxy;if(i==null&&!Ic())throw new Error("injectLocal must be called in setup");return i&&gm.has(i)&&t in gm.get(i)?gm.get(i)[t]:_n(...n)},Yc=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const NT=n=>n!=null,RB=Object.prototype.toString,Ph=n=>RB.call(n)==="[object Object]",is=()=>{},PB=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);function UT(...n){if(n.length!==1)return yS(...n);const e=n[0];return typeof e=="function"?Fi(R0(()=>({get:e,set:is}))):nt(e)}function O_(n,e){function t(...i){return new Promise((s,r)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(r)})}return t}const FT=n=>n();function kT(n,e={}){let t,i,s=is;const r=l=>{clearTimeout(l),s(),s=is};let o;return l=>{const c=rt(n),u=rt(e.maxWait);return t&&r(t),c<=0||u!==void 0&&u<=0?(i&&(r(i),i=null),Promise.resolve(l())):new Promise((f,h)=>{s=e.rejectOnCancel?h:f,o=l,u&&!i&&(i=setTimeout(()=>{t&&r(t),i=null,f(o())},u)),t=setTimeout(()=>{i&&r(i),i=null,f(l())},c)})}}function IB(...n){let e=0,t,i=!0,s=is,r,o,a,l,c;!Lt(n[0])&&typeof n[0]=="object"?{delay:o,trailing:a=!0,leading:l=!0,rejectOnCancel:c=!1}=n[0]:[o,a=!0,l=!0,c=!1]=n;const u=()=>{t&&(clearTimeout(t),t=void 0,s(),s=is)};return h=>{const d=rt(o),p=Date.now()-e,_=()=>r=h();return u(),d<=0?(e=Date.now(),_()):(p>d&&(l||!i)?(e=Date.now(),_()):a&&(r=new Promise((g,m)=>{s=c?m:g,t=setTimeout(()=>{e=Date.now(),i=!0,g(_()),u()},Math.max(0,d-p))})),!l&&!t&&(t=setTimeout(()=>i=!0,d)),i=!1,r)}}function LB(n=FT,e={}){const{initialState:t="active"}=e,i=UT(t==="active");function s(){i.value=!1}function r(){i.value=!0}const o=(...a)=>{i.value&&n(...a)};return{isActive:Fi(i),pause:s,resume:r,eventFilter:o}}function DB(n){let e;function t(){return e||(e=n()),e}return t.reset=async()=>{const i=e;e=void 0,i&&await i},t}function OB(n,e){var t;if(typeof n=="number")return n+e;const i=((t=n.match(/^-?\d+\.?\d*/))==null?void 0:t[0])||"",s=n.slice(i.length),r=Number.parseFloat(i)+e;return Number.isNaN(r)?n:r+s}function Fl(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function kl(n){return Array.isArray(n)?n:[n]}function BT(n){return Rn()}function N_(n,e=200,t={}){return O_(kT(e,t),n)}function PG(n,e=200,t={}){const i=nt(rt(n)),s=N_(()=>{i.value=n.value},e,t);return je(n,()=>s()),mS(i)}function NB(n,e=200,t=!1,i=!0,s=!1){return O_(IB(e,t,i,s),n)}function zT(n,e,t={}){const{eventFilter:i=FT,...s}=t;return je(n,O_(i,e),s)}function UB(n,e,t={}){const{eventFilter:i,initialState:s="active",...r}=t,{eventFilter:o,pause:a,resume:l,isActive:c}=LB(i,{initialState:s});return{stop:zT(n,e,{...r,eventFilter:o}),pause:a,resume:l,isActive:c}}function Xa(n,e=!0,t){BT()?Hn(n,t):e?n():Ar(n)}function FB(n,e){BT()&&rs(n,e)}function kB(n,e,t={}){const{immediate:i=!0,immediateCallback:s=!1}=t,r=Ne(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function l(){r.value=!1,a()}function c(...u){s&&n(),a(),r.value=!0,o=setTimeout(()=>{r.value=!1,o=null,n(...u)},rt(e))}return i&&(r.value=!0,Yc&&c()),Ir(l),{isPending:mS(r),start:c,stop:l}}function IG(n,e,t={}){const{debounce:i=0,maxWait:s=void 0,...r}=t;return zT(n,e,{...r,eventFilter:kT(i,{maxWait:s})})}function BB(n,e,t){return je(n,e,{...t,immediate:!0})}const ei=Yc?window:void 0,zB=Yc?window.document:void 0,U_=Yc?window.navigator:void 0;function Qn(n){var e;const t=rt(n);return(e=t==null?void 0:t.$el)!=null?e:t}function zt(...n){const e=[],t=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=Ee(()=>{const a=kl(rt(n[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=BB(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>Qn(c)))!=null?l:[ei].filter(c=>c!=null),kl(rt(s.value?n[1]:n[0])),kl(Ut(s.value?n[2]:n[1])),rt(s.value?n[3]:n[2])]},([a,l,c,u])=>{if(t(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const f=Ph(u)?{...u}:u;e.push(...a.flatMap(h=>l.flatMap(d=>c.map(p=>i(h,d,p,f)))))},{flush:"post"}),o=()=>{r(),t()};return Ir(t),o}function VB(){const n=Ne(!1),e=Rn();return e&&Hn(()=>{n.value=!0},e),n}function Lo(n){const e=VB();return Ee(()=>(e.value,!!n()))}function VT(n,e,t={}){const{window:i=ei,...s}=t;let r;const o=Lo(()=>i&&"MutationObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const h=rt(n),d=kl(h).map(Qn).filter(NT);return new Set(d)}),c=je(()=>l.value,h=>{a(),o.value&&h.size&&(r=new MutationObserver(e),h.forEach(d=>r.observe(d,s)))},{immediate:!0,flush:"post"}),u=()=>r==null?void 0:r.takeRecords(),f=()=>{c(),a()};return Ir(f),{isSupported:o,stop:f,takeRecords:u}}const HB=Symbol("vueuse-ssr-width");function HT(){const n=Ic()?CB(HB,null):null;return typeof n=="number"?n:void 0}function co(n,e={}){const{window:t=ei,ssrWidth:i=HT()}=e,s=Lo(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function"),r=Ne(typeof i=="number"),o=Ne(),a=Ne(!1),l=c=>{a.value=c.matches};return Lc(()=>{if(r.value){r.value=!s.value;const c=rt(n).split(",");a.value=c.some(u=>{const f=u.includes("not all"),h=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),d=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(h||d);return h&&p&&(p=i>=Fl(h[1])),d&&p&&(p=i<=Fl(d[1])),f?!p:p});return}s.value&&(o.value=t.matchMedia(rt(n)),a.value=o.value.matches)}),zt(o,"change",l,{passive:!0}),Ee(()=>a.value)}const LG={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function DG(n,e={}){function t(d,p){let _=rt(n[rt(d)]);return p!=null&&(_=OB(_,p)),typeof _=="number"&&(_=`${_}px`),_}const{window:i=ei,strategy:s="min-width",ssrWidth:r=HT()}=e,o=typeof r=="number",a=o?Ne(!1):{value:!0};o&&Xa(()=>a.value=!!i);function l(d,p){return!a.value&&o?d==="min"?r>=Fl(p):r<=Fl(p):i?i.matchMedia(`(${d}-width: ${p})`).matches:!1}const c=d=>co(()=>`(min-width: ${t(d)})`,e),u=d=>co(()=>`(max-width: ${t(d)})`,e),f=Object.keys(n).reduce((d,p)=>(Object.defineProperty(d,p,{get:()=>s==="min-width"?c(p):u(p),enumerable:!0,configurable:!0}),d),{});function h(){const d=Object.keys(n).map(p=>[p,f[p],Fl(t(p))]).sort((p,_)=>p[2]-_[2]);return Ee(()=>d.filter(([,p])=>p.value).map(([p])=>p))}return Object.assign(f,{greaterOrEqual:c,smallerOrEqual:u,greater(d){return co(()=>`(min-width: ${t(d,.1)})`,e)},smaller(d){return co(()=>`(max-width: ${t(d,-.1)})`,e)},between(d,p){return co(()=>`(min-width: ${t(d)}) and (max-width: ${t(p,-.1)})`,e)},isGreater(d){return l("min",t(d,.1))},isGreaterOrEqual(d){return l("min",t(d))},isSmaller(d){return l("max",t(d,-.1))},isSmallerOrEqual(d){return l("max",t(d))},isInBetween(d,p){return l("min",t(d))&&l("max",t(p,-.1))},current:h,active(){const d=h();return Ee(()=>d.value.length===0?"":d.value.at(s==="min-width"?-1:0))}})}function Fg(n,e={}){const{controls:t=!1,navigator:i=U_}=e,s=Lo(()=>i&&"permissions"in i),r=Ne(),o=typeof n=="string"?{name:n}:n,a=Ne(),l=()=>{var u,f;a.value=(f=(u=r.value)==null?void 0:u.state)!=null?f:"prompt"};zt(r,"change",l,{passive:!0});const c=DB(async()=>{if(s.value){if(!r.value)try{r.value=await i.permissions.query(o)}catch{r.value=void 0}finally{l()}if(t)return ht(r.value)}});return c(),t?{state:a,isSupported:s,query:c}:a}function OG(n={}){const{navigator:e=U_,read:t=!1,source:i,copiedDuring:s=1500,legacy:r=!1}=n,o=Lo(()=>e&&"clipboard"in e),a=Fg("clipboard-read"),l=Fg("clipboard-write"),c=Ee(()=>o.value||r),u=Ne(""),f=Ne(!1),h=kB(()=>f.value=!1,s,{immediate:!1});async function d(){let v=!(o.value&&m(a.value));if(!v)try{u.value=await e.clipboard.readText()}catch{v=!0}v&&(u.value=g())}c.value&&t&&zt(["copy","cut"],d,{passive:!0});async function p(v=rt(i)){if(c.value&&v!=null){let b=!(o.value&&m(l.value));if(!b)try{await e.clipboard.writeText(v)}catch{b=!0}b&&_(v),u.value=v,f.value=!0,h.start()}}function _(v){const b=document.createElement("textarea");b.value=v??"",b.style.position="absolute",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),b.remove()}function g(){var v,b,y;return(y=(b=(v=document==null?void 0:document.getSelection)==null?void 0:v.call(document))==null?void 0:b.toString())!=null?y:""}function m(v){return v==="granted"||v==="prompt"}return{isSupported:c,text:u,copied:f,copy:p}}const rf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},of="__vueuse_ssr_handlers__",GB=WB();function WB(){return of in rf||(rf[of]=rf[of]||{}),rf[of]}function GT(n,e){return GB[n]||e}function XB(n){return co("(prefers-color-scheme: dark)",n)}function $B(n){return n==null?"any":n instanceof Set?"set":n instanceof Map?"map":n instanceof Date?"date":typeof n=="boolean"?"boolean":typeof n=="string"?"string":typeof n=="object"?"object":Number.isNaN(n)?"any":"number"}const qB={boolean:{read:n=>n==="true",write:n=>String(n)},object:{read:n=>JSON.parse(n),write:n=>JSON.stringify(n)},number:{read:n=>Number.parseFloat(n),write:n=>String(n)},any:{read:n=>n,write:n=>String(n)},string:{read:n=>n,write:n=>String(n)},map:{read:n=>new Map(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n.entries()))},set:{read:n=>new Set(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n))},date:{read:n=>new Date(n),write:n=>n.toISOString()}},nx="vueuse-storage";function WT(n,e,t,i={}){var s;const{flush:r="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:f=ei,eventFilter:h,onError:d=V=>{console.error(V)},initOnMounted:p}=i,_=(u?Ne:nt)(typeof e=="function"?e():e),g=Ee(()=>rt(n));if(!t)try{t=GT("getDefaultStorage",()=>{var V;return(V=ei)==null?void 0:V.localStorage})()}catch(V){d(V)}if(!t)return _;const m=rt(e),v=$B(m),b=(s=i.serializer)!=null?s:qB[v],{pause:y,resume:T}=UB(_,()=>S(_.value),{flush:r,deep:o,eventFilter:h});je(g,()=>B(),{flush:r});let w=!1;const E=V=>{p&&!w||B(V)},P=V=>{p&&!w||z(V)};f&&a&&(t instanceof Storage?zt(f,"storage",E,{passive:!0}):zt(f,nx,P)),p?Xa(()=>{w=!0,B()}):B();function M(V,Q){if(f){const j={key:g.value,oldValue:V,newValue:Q,storageArea:t};f.dispatchEvent(t instanceof Storage?new StorageEvent("storage",j):new CustomEvent(nx,{detail:j}))}}function S(V){try{const Q=t.getItem(g.value);if(V==null)M(Q,null),t.removeItem(g.value);else{const j=b.write(V);Q!==j&&(t.setItem(g.value,j),M(Q,j))}}catch(Q){d(Q)}}function D(V){const Q=V?V.newValue:t.getItem(g.value);if(Q==null)return l&&m!=null&&t.setItem(g.value,b.write(m)),m;if(!V&&c){const j=b.read(Q);return typeof c=="function"?c(j,m):v==="object"&&!Array.isArray(j)?{...m,...j}:j}else return typeof Q!="string"?Q:b.read(Q)}function B(V){if(!(V&&V.storageArea!==t)){if(V&&V.key==null){_.value=m;return}if(!(V&&V.key!==g.value)){y();try{(V==null?void 0:V.newValue)!==b.write(_.value)&&(_.value=D(V))}catch(Q){d(Q)}finally{V?Ar(T):T()}}}}function z(V){B(V.detail)}return _}const YB="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function jB(n={}){const{selector:e="html",attribute:t="class",initialValue:i="auto",window:s=ei,storage:r,storageKey:o="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:c,disableTransition:u=!0}=n,f={auto:"",light:"light",dark:"dark",...n.modes||{}},h=XB({window:s}),d=Ee(()=>h.value?"dark":"light"),p=l||(o==null?UT(i):WT(o,i,r,{window:s,listenToStorageChanges:a})),_=Ee(()=>p.value==="auto"?d.value:p.value),g=GT("updateHTMLAttrs",(y,T,w)=>{const E=typeof y=="string"?s==null?void 0:s.document.querySelector(y):Qn(y);if(!E)return;const P=new Set,M=new Set;let S=null;if(T==="class"){const B=w.split(/\s/g);Object.values(f).flatMap(z=>(z||"").split(/\s/g)).filter(Boolean).forEach(z=>{B.includes(z)?P.add(z):M.add(z)})}else S={key:T,value:w};if(P.size===0&&M.size===0&&S===null)return;let D;u&&(D=s.document.createElement("style"),D.appendChild(document.createTextNode(YB)),s.document.head.appendChild(D));for(const B of P)E.classList.add(B);for(const B of M)E.classList.remove(B);S&&E.setAttribute(S.key,S.value),u&&(s.getComputedStyle(D).opacity,document.head.removeChild(D))});function m(y){var T;g(e,t,(T=f[y])!=null?T:y)}function v(y){n.onChanged?n.onChanged(y,m):m(y)}je(_,v,{flush:"post",immediate:!0}),Xa(()=>v(_.value));const b=Ee({get(){return c?p.value:_.value},set(y){p.value=y}});return Object.assign(b,{store:p,system:d,state:_})}function af(n,e,t={}){const{window:i=ei,initialValue:s,observe:r=!1}=t,o=Ne(s),a=Ee(()=>{var c;return Qn(e)||((c=i==null?void 0:i.document)==null?void 0:c.documentElement)});function l(){var c;const u=rt(n),f=rt(a);if(f&&i&&u){const h=(c=i.getComputedStyle(f).getPropertyValue(u))==null?void 0:c.trim();o.value=h||o.value||s}}return r&&VT(a,l,{attributeFilter:["style","class"],window:i}),je([a,()=>rt(n)],(c,u)=>{u[0]&&u[1]&&u[0].style.removeProperty(u[1]),l()},{immediate:!0}),je([o,a],([c,u])=>{const f=rt(n);u!=null&&u.style&&f&&(c==null?u.style.removeProperty(f):u.style.setProperty(f,c))},{immediate:!0}),o}function KB(n={}){const{valueDark:e="dark",valueLight:t=""}=n,i=jB({...n,onChanged:(o,a)=>{var l;n.onChanged?(l=n.onChanged)==null||l.call(n,o==="dark",a,o):a(o)},modes:{dark:e,light:t}}),s=Ee(()=>i.system.value);return Ee({get(){return i.value==="dark"},set(o){const a=o?"dark":"light";s.value===a?i.value="auto":i.value=a}})}function ZB(n={}){const{navigator:e=U_,requestPermissions:t=!1,constraints:i={audio:!0,video:!0},onUpdated:s}=n,r=nt([]),o=Ee(()=>r.value.filter(p=>p.kind==="videoinput")),a=Ee(()=>r.value.filter(p=>p.kind==="audioinput")),l=Ee(()=>r.value.filter(p=>p.kind==="audiooutput")),c=Lo(()=>e&&e.mediaDevices&&e.mediaDevices.enumerateDevices),u=Ne(!1);let f;async function h(){c.value&&(r.value=await e.mediaDevices.enumerateDevices(),s==null||s(r.value),f&&(f.getTracks().forEach(p=>p.stop()),f=null))}async function d(){const p=i.video?"camera":"microphone";if(!c.value)return!1;if(u.value)return!0;const{state:_,query:g}=Fg(p,{controls:!0});if(await g(),_.value!=="granted"){let m=!0;try{f=await e.mediaDevices.getUserMedia(i)}catch{f=null,m=!1}h(),u.value=m}else u.value=!0;return u.value}return c.value&&(t&&d(),zt(e.mediaDevices,"devicechange",h,{passive:!0}),h()),{devices:r,ensurePermissions:d,permissionGranted:u,videoInputs:o,audioInputs:a,audioOutputs:l,isSupported:c}}function JB(n,e,t={}){const{window:i=ei,...s}=t;let r;const o=Lo(()=>i&&"ResizeObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const f=rt(n);return Array.isArray(f)?f.map(h=>Qn(h)):[Qn(f)]}),c=je(l,f=>{if(a(),o.value&&i){r=new ResizeObserver(e);for(const h of f)h&&r.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Ir(u),{isSupported:o,stop:u}}function NG(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:s=!0,immediate:r=!0,updateTiming:o="sync"}=e,a=Ne(0),l=Ne(0),c=Ne(0),u=Ne(0),f=Ne(0),h=Ne(0),d=Ne(0),p=Ne(0);function _(){const m=Qn(n);if(!m){t&&(a.value=0,l.value=0,c.value=0,u.value=0,f.value=0,h.value=0,d.value=0,p.value=0);return}const v=m.getBoundingClientRect();a.value=v.height,l.value=v.bottom,c.value=v.left,u.value=v.right,f.value=v.top,h.value=v.width,d.value=v.x,p.value=v.y}function g(){o==="sync"?_():o==="next-frame"&&requestAnimationFrame(()=>_())}return JB(n,g),je(()=>Qn(n),m=>!m&&g()),VT(n,g,{attributeFilter:["style","class"]}),s&&zt("scroll",g,{capture:!0,passive:!0}),i&&zt("resize",g,{passive:!0}),Xa(()=>{r&&g()}),{height:a,bottom:l,left:c,right:u,top:f,width:h,x:d,y:p,update:g}}function QB(n,e,t={}){const{root:i,rootMargin:s="0px",threshold:r=0,window:o=ei,immediate:a=!0}=t,l=Lo(()=>o&&"IntersectionObserver"in o),c=Ee(()=>{const p=rt(n);return kl(p).map(Qn).filter(NT)});let u=is;const f=Ne(a),h=l.value?je(()=>[c.value,Qn(i),f.value],([p,_])=>{if(u(),!f.value||!p.length)return;const g=new IntersectionObserver(e,{root:Qn(_),rootMargin:s,threshold:r});p.forEach(m=>m&&g.observe(m)),u=()=>{g.disconnect(),u=is}},{immediate:a,flush:"post"}):is,d=()=>{u(),h(),f.value=!1};return Ir(d),{isSupported:l,isActive:f,pause(){u(),f.value=!1},resume(){f.value=!0},stop:d}}const e4={multiple:!0,accept:"*",reset:!1,directory:!1};function t4(n){if(!n)return null;if(n instanceof FileList)return n;const e=new DataTransfer;for(const t of n)e.items.add(t);return e.files}function UG(n={}){const{document:e=zB}=n,t=nt(t4(n.initialFiles)),{on:i,trigger:s}=tx(),{on:r,trigger:o}=tx();let a;e&&(a=Qn(n.input)||e.createElement("input"),a.type="file",a.onchange=u=>{const f=u.target;t.value=f.files,s(t.value)},a.oncancel=()=>{o()});const l=()=>{t.value=null,a&&a.value&&(a.value="",s(null))},c=u=>{if(!a)return;const f={...e4,...n,...u};a.multiple=f.multiple,a.accept=f.accept,a.webkitdirectory=f.directory,PB(f,"capture")&&(a.capture=f.capture),f.reset&&l(),a.click()};return{files:Fi(t),open:c,reset:l,onCancel:r,onChange:i}}const ix=1;function FG(n,e={}){const{throttle:t=0,idle:i=200,onStop:s=is,onScroll:r=is,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:a={capture:!1,passive:!0},behavior:l="auto",window:c=ei,onError:u=E=>{console.error(E)}}=e,f=Ne(0),h=Ne(0),d=Ee({get(){return f.value},set(E){_(E,void 0)}}),p=Ee({get(){return h.value},set(E){_(void 0,E)}});function _(E,P){var M,S,D,B;if(!c)return;const z=rt(n);if(!z)return;(D=z instanceof Document?c.document.body:z)==null||D.scrollTo({top:(M=rt(P))!=null?M:p.value,left:(S=rt(E))!=null?S:d.value,behavior:rt(l)});const V=((B=z==null?void 0:z.document)==null?void 0:B.documentElement)||(z==null?void 0:z.documentElement)||z;d!=null&&(f.value=V.scrollLeft),p!=null&&(h.value=V.scrollTop)}const g=Ne(!1),m=xi({left:!0,right:!1,top:!0,bottom:!1}),v=xi({left:!1,right:!1,top:!1,bottom:!1}),b=E=>{g.value&&(g.value=!1,v.left=!1,v.right=!1,v.top=!1,v.bottom=!1,s(E))},y=N_(b,t+i),T=E=>{var P;if(!c)return;const M=((P=E==null?void 0:E.document)==null?void 0:P.documentElement)||(E==null?void 0:E.documentElement)||Qn(E),{display:S,flexDirection:D,direction:B}=getComputedStyle(M),z=B==="rtl"?-1:1,V=M.scrollLeft;v.left=Vf.value;const Q=Math.abs(V*z)<=(o.left||0),j=Math.abs(V*z)+M.clientWidth>=M.scrollWidth-(o.right||0)-ix;S==="flex"&&D==="row-reverse"?(m.left=j,m.right=Q):(m.left=Q,m.right=j),f.value=V;let te=M.scrollTop;E===c.document&&!te&&(te=c.document.body.scrollTop),v.top=teh.value;const Z=Math.abs(te)<=(o.top||0),pe=Math.abs(te)+M.clientHeight>=M.scrollHeight-(o.bottom||0)-ix;S==="flex"&&D==="column-reverse"?(m.top=pe,m.bottom=Z):(m.top=Z,m.bottom=pe),h.value=te},w=E=>{var P;if(!c)return;const M=(P=E.target.documentElement)!=null?P:E.target;T(M),g.value=!0,y(E),r(E)};return zt(n,"scroll",t?NB(w,t,!0,!1):w,a),Xa(()=>{try{const E=rt(n);if(!E)return;T(E)}catch(E){u(E)}}),zt(n,"scrollend",b,a),{x:d,y:p,isScrolling:g,arrivedState:m,directions:v,measure(){const E=rt(n);c&&E&&T(E)}}}function ys(n,e,t={}){const{window:i=ei}=t;return WT(n,e,i==null?void 0:i.localStorage,t)}function kG(n){const e=Ne(),t=()=>{e.value&&URL.revokeObjectURL(e.value),e.value=void 0};return je(()=>rt(n),i=>{t(),i&&(e.value=URL.createObjectURL(i))},{immediate:!0}),Ir(t),Fi(e)}const sx="--vueuse-safe-area-top",rx="--vueuse-safe-area-right",ox="--vueuse-safe-area-bottom",ax="--vueuse-safe-area-left";function BG(){const n=Ne(""),e=Ne(""),t=Ne(""),i=Ne("");if(Yc){const r=af(sx),o=af(rx),a=af(ox),l=af(ax);r.value="env(safe-area-inset-top, 0px)",o.value="env(safe-area-inset-right, 0px)",a.value="env(safe-area-inset-bottom, 0px)",l.value="env(safe-area-inset-left, 0px)",s(),zt("resize",N_(s),{passive:!0})}function s(){n.value=lf(sx),e.value=lf(rx),t.value=lf(ox),i.value=lf(ax)}return{top:n,right:e,bottom:t,left:i,update:s}}function lf(n){return getComputedStyle(document.documentElement).getPropertyValue(n)}function zG(n,e,t){const{window:i=ei}={},s=nt(null),r=Ne(),o=(...l)=>{r.value&&r.value.postMessage(...l)},a=function(){r.value&&r.value.terminate()};return i&&(r.value=new Worker(n,e),r.value.onmessage=l=>{s.value=l.data},Ir(()=>{r.value&&r.value.terminate()})),{data:s,post:o,terminate:a,worker:r}}function VG(n={}){const{window:e=ei,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:r=!0,type:o="inner"}=n,a=Ne(t),l=Ne(i),c=()=>{if(e)if(o==="outer")a.value=e.outerWidth,l.value=e.outerHeight;else if(o==="visual"&&e.visualViewport){const{width:f,height:h,scale:d}=e.visualViewport;a.value=Math.round(f*d),l.value=Math.round(h*d)}else r?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),Xa(c);const u={passive:!0};if(zt("resize",c,u),e&&o==="visual"&&e.visualViewport&&zt(e.visualViewport,"resize",c,u),s){const f=co("(orientation: portrait)");je(f,()=>c())}return{width:a,height:l}}const XT=1/60*1e3,n4=typeof performance<"u"?()=>performance.now():()=>Date.now(),$T=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(n4()),XT);function i4(n){let e=[],t=[],i=0,s=!1,r=!1;const o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&s,h=f?e:t;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),f&&s&&(i=e.length)),l},cancel:l=>{const c=t.indexOf(l);c!==-1&&t.splice(c,1),o.delete(l)},process:l=>{if(s){r=!0;return}if(s=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let c=0;c(n[e]=i4(()=>xc=!0),n),{}),zg=jc.reduce((n,e)=>{const t=Vd[e];return n[e]=(i,s=!1,r=!1)=>(xc||a4(),t.schedule(i,s,r)),n},{}),r4=jc.reduce((n,e)=>(n[e]=Vd[e].cancel,n),{});jc.reduce((n,e)=>(n[e]=()=>Vd[e].process(va),n),{});const o4=n=>Vd[n].process(va),qT=n=>{xc=!1,va.delta=kg?XT:Math.max(Math.min(n-va.timestamp,s4),1),va.timestamp=n,Bg=!0,jc.forEach(o4),Bg=!1,xc&&(kg=!1,$T(qT))},a4=()=>{xc=!0,kg=!0,Bg||$T(qT)},YT=()=>va;function jT(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);sMath.min(Math.max(t,n),e),cx=.001,l4=.01,c4=10,u4=.05,f4=1;function h4({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let s,r,o=1-e;o=Vg(u4,f4,o),n=Vg(l4,c4,n/1e3),o<1?(s=c=>{const u=c*o,f=u*n,h=u-t,d=Hg(c,o),p=Math.exp(-f);return cx-h/d*p},r=c=>{const f=c*o*n,h=f*t+t,d=Math.pow(o,2)*Math.pow(c,2)*n,p=Math.exp(-f),_=Hg(Math.pow(c,2),o);return(-s(c)+cx>0?-1:1)*((h-d)*p)/_}):(s=c=>{const u=Math.exp(-c*n),f=(c-t)*n+1;return-.001+u*f},r=c=>{const u=Math.exp(-c*n),f=(t-c)*(n*n);return u*f});const a=5/n,l=p4(s,r,a);if(n=n*1e3,isNaN(l))return{stiffness:100,damping:10,duration:n};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:n}}}const d4=12;function p4(n,e,t){let i=t;for(let s=1;sn[t]!==void 0)}function _4(n){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},n);if(!ux(n,g4)&&ux(n,m4)){const t=h4(n);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function F_(n){var{from:e=0,to:t=1,restSpeed:i=2,restDelta:s}=n,r=jT(n,["from","to","restSpeed","restDelta"]);const o={done:!1,value:e};let{stiffness:a,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:h}=_4(r),d=fx,p=fx;function _(){const g=u?-(u/1e3):0,m=t-e,v=l/(2*Math.sqrt(a*c)),b=Math.sqrt(a/c)/1e3;if(s===void 0&&(s=Math.min(Math.abs(t-e)/100,.4)),v<1){const y=Hg(b,v);d=T=>{const w=Math.exp(-v*b*T);return t-w*((g+v*b*m)/y*Math.sin(y*T)+m*Math.cos(y*T))},p=T=>{const w=Math.exp(-v*b*T);return v*b*w*(Math.sin(y*T)*(g+v*b*m)/y+m*Math.cos(y*T))-w*(Math.cos(y*T)*(g+v*b*m)-y*m*Math.sin(y*T))}}else if(v===1)d=y=>t-Math.exp(-b*y)*(m+(g+b*m)*y);else{const y=b*Math.sqrt(v*v-1);d=T=>{const w=Math.exp(-v*b*T),E=Math.min(y*T,300);return t-w*((g+v*b*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}}return _(),{next:g=>{const m=d(g);if(h)o.done=g>=f;else{const v=p(g)*1e3,b=Math.abs(v)<=i,y=Math.abs(t-m)<=s;o.done=b&&y}return o.value=o.done?t:m,o},flipTarget:()=>{u=-u,[e,t]=[t,e],_()}}}F_.needsInterpolation=(n,e)=>typeof n=="string"||typeof e=="string";const fx=n=>0,KT=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},k_=(n,e,t)=>-t*n+t*e+n,ZT=(n,e)=>t=>Math.max(Math.min(t,e),n),Bl=n=>n%1?Number(n.toFixed(5)):n,Mc=/(-)?([\d]*\.?[\d])+/g,Gg=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,v4=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Kc(n){return typeof n=="string"}const Zc={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},zl=Object.assign(Object.assign({},Zc),{transform:ZT(0,1)}),cf=Object.assign(Object.assign({},Zc),{default:1}),B_=n=>({test:e=>Kc(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),to=B_("deg"),Vl=B_("%"),ut=B_("px"),hx=Object.assign(Object.assign({},Vl),{parse:n=>Vl.parse(n)/100,transform:n=>Vl.transform(n*100)}),z_=(n,e)=>t=>!!(Kc(t)&&v4.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),JT=(n,e,t)=>i=>{if(!Kc(i))return i;const[s,r,o,a]=i.match(Mc);return{[n]:parseFloat(s),[e]:parseFloat(r),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},po={test:z_("hsl","hue"),parse:JT("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+Vl.transform(Bl(e))+", "+Vl.transform(Bl(t))+", "+Bl(zl.transform(i))+")"},y4=ZT(0,255),_m=Object.assign(Object.assign({},Zc),{transform:n=>Math.round(y4(n))}),mr={test:z_("rgb","red"),parse:JT("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+_m.transform(n)+", "+_m.transform(e)+", "+_m.transform(t)+", "+Bl(zl.transform(i))+")"};function b4(n){let e="",t="",i="",s="";return n.length>5?(e=n.substr(1,2),t=n.substr(3,2),i=n.substr(5,2),s=n.substr(7,2)):(e=n.substr(1,1),t=n.substr(2,1),i=n.substr(3,1),s=n.substr(4,1),e+=e,t+=t,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Wg={test:z_("#"),parse:b4,transform:mr.transform},qn={test:n=>mr.test(n)||Wg.test(n)||po.test(n),parse:n=>mr.test(n)?mr.parse(n):po.test(n)?po.parse(n):Wg.parse(n),transform:n=>Kc(n)?n:n.hasOwnProperty("red")?mr.transform(n):po.transform(n)},QT="${c}",ew="${n}";function x4(n){var e,t,i,s;return isNaN(n)&&Kc(n)&&((t=(e=n.match(Mc))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((s=(i=n.match(Gg))===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0)>0}function tw(n){typeof n=="number"&&(n=`${n}`);const e=[];let t=0;const i=n.match(Gg);i&&(t=i.length,n=n.replace(Gg,QT),e.push(...i.map(qn.parse)));const s=n.match(Mc);return s&&(n=n.replace(Mc,ew),e.push(...s.map(Zc.parse))),{values:e,numColors:t,tokenised:n}}function nw(n){return tw(n).values}function iw(n){const{values:e,numColors:t,tokenised:i}=tw(n),s=e.length;return r=>{let o=i;for(let a=0;atypeof n=="number"?0:n;function S4(n){const e=nw(n);return iw(n)(e.map(M4))}const Jc={test:x4,parse:nw,createTransformer:iw,getAnimatableNone:S4},E4=new Set(["brightness","contrast","saturate","opacity"]);function T4(n){let[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(Mc)||[];if(!i)return n;const s=t.replace(i,"");let r=E4.has(e)?1:0;return i!==t&&(r*=100),e+"("+r+s+")"}const w4=/([a-z-]*)\(.*?\)/g,Xg=Object.assign(Object.assign({},Jc),{getAnimatableNone:n=>{const e=n.match(w4);return e?e.map(T4).join(" "):n}});function vm(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function dx({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let s=0,r=0,o=0;if(!e)s=r=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;s=vm(l,a,n+1/3),r=vm(l,a,n),o=vm(l,a,n-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}const A4=(n,e,t)=>{const i=n*n,s=e*e;return Math.sqrt(Math.max(0,t*(s-i)+i))},C4=[Wg,mr,po],px=n=>C4.find(e=>e.test(n)),sw=(n,e)=>{let t=px(n),i=px(e),s=t.parse(n),r=i.parse(e);t===po&&(s=dx(s),t=mr),i===po&&(r=dx(r),i=mr);const o=Object.assign({},s);return a=>{for(const l in o)l!=="alpha"&&(o[l]=A4(s[l],r[l],a));return o.alpha=k_(s.alpha,r.alpha,a),t.transform(o)}},R4=n=>typeof n=="number",P4=(n,e)=>t=>e(n(t)),rw=(...n)=>n.reduce(P4);function ow(n,e){return R4(n)?t=>k_(n,e,t):qn.test(n)?sw(n,e):lw(n,e)}const aw=(n,e)=>{const t=[...n],i=t.length,s=n.map((r,o)=>ow(r,e[o]));return r=>{for(let o=0;o{const t=Object.assign(Object.assign({},n),e),i={};for(const s in t)n[s]!==void 0&&e[s]!==void 0&&(i[s]=ow(n[s],e[s]));return s=>{for(const r in i)t[r]=i[r](s);return t}};function mx(n){const e=Jc.parse(n),t=e.length;let i=0,s=0,r=0;for(let o=0;o{const t=Jc.createTransformer(e),i=mx(n),s=mx(e);return i.numHSL===s.numHSL&&i.numRGB===s.numRGB&&i.numNumbers>=s.numNumbers?rw(aw(i.parsed,s.parsed),t):o=>`${o>0?e:n}`},L4=(n,e)=>t=>k_(n,e,t);function D4(n){if(typeof n=="number")return L4;if(typeof n=="string")return qn.test(n)?sw:lw;if(Array.isArray(n))return aw;if(typeof n=="object")return I4}function O4(n,e,t){const i=[],s=t||D4(n[0]),r=n.length-1;for(let o=0;ot(KT(n,e,i))}function U4(n,e){const t=n.length,i=t-1;return s=>{let r=0,o=!1;if(s<=n[0]?o=!0:s>=n[i]&&(r=i-1,o=!0),!o){let l=1;for(;ls||l===i);l++);r=l-1}const a=KT(n[r],n[r+1],s);return e[r](a)}}function cw(n,e,{clamp:t=!0,ease:i,mixer:s}={}){const r=n.length;lx(r===e.length),lx(!i||!Array.isArray(i)||i.length===r-1),n[0]>n[r-1]&&(n=[].concat(n),e=[].concat(e),n.reverse(),e.reverse());const o=O4(e,i,s),a=r===2?N4(n,o):U4(n,o);return t?l=>a(Vg(n[0],n[r-1],l)):a}const Hd=n=>e=>1-n(1-e),V_=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,F4=n=>e=>Math.pow(e,n),uw=n=>e=>e*e*((n+1)*e-n),k4=n=>{const e=uw(n);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))},fw=1.525,B4=4/11,z4=8/11,V4=9/10,hw=n=>n,H_=F4(2),H4=Hd(H_),dw=V_(H_),pw=n=>1-Math.sin(Math.acos(n)),mw=Hd(pw),G4=V_(mw),G_=uw(fw),W4=Hd(G_),X4=V_(G_),$4=k4(fw),q4=4356/361,Y4=35442/1805,j4=16061/1805,Ih=n=>{if(n===1||n===0)return n;const e=n*n;return nn<.5?.5*(1-Ih(1-n*2)):.5*Ih(n*2-1)+.5;function J4(n,e){return n.map(()=>e||dw).splice(0,n.length-1)}function Q4(n){const e=n.length;return n.map((t,i)=>i!==0?i/(e-1):0)}function e5(n,e){return n.map(t=>t*e)}function Cf({from:n=0,to:e=1,ease:t,offset:i,duration:s=300}){const r={done:!1,value:n},o=Array.isArray(e)?e:[n,e],a=e5(i&&i.length===o.length?i:Q4(o),s);function l(){return cw(a,o,{ease:Array.isArray(t)?t:J4(o,t)})}let c=l();return{next:u=>(r.value=c(u),r.done=u>=s,r),flipTarget:()=>{o.reverse(),c=l()}}}function t5({velocity:n=0,from:e=0,power:t=.8,timeConstant:i=350,restDelta:s=.5,modifyTarget:r}){const o={done:!1,value:e};let a=t*n;const l=e+a,c=r===void 0?l:r(l);return c!==l&&(a=c-e),{next:u=>{const f=-a*Math.exp(-u/i);return o.done=!(f>s||f<-s),o.value=o.done?c:c+f,o},flipTarget:()=>{}}}const gx={keyframes:Cf,spring:F_,decay:t5};function n5(n){if(Array.isArray(n.to))return Cf;if(gx[n.type])return gx[n.type];const e=new Set(Object.keys(n));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Cf:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?F_:Cf}function gw(n,e,t=0){return n-e-t}function i5(n,e,t=0,i=!0){return i?gw(e+-n,e,t):e-(n-e)+t}function s5(n,e,t,i){return i?n>=e+t:n<=-t}const r5=n=>{const e=({delta:t})=>n(t);return{start:()=>zg.update(e,!0),stop:()=>r4.update(e)}};function _w(n){var e,t,{from:i,autoplay:s=!0,driver:r=r5,elapsed:o=0,repeat:a=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:f,onComplete:h,onRepeat:d,onUpdate:p}=n,_=jT(n,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=_,m,v=0,b=_.duration,y,T=!1,w=!0,E;const P=n5(_);!((t=(e=P).needsInterpolation)===null||t===void 0)&&t.call(e,i,g)&&(E=cw([0,100],[i,g],{clamp:!1}),i=0,g=100);const M=P(Object.assign(Object.assign({},_),{from:i,to:g}));function S(){v++,l==="reverse"?(w=v%2===0,o=i5(o,b,c,w)):(o=gw(o,b,c),l==="mirror"&&M.flipTarget()),T=!1,d&&d()}function D(){m.stop(),h&&h()}function B(V){if(w||(V=-V),o+=V,!T){const Q=M.next(Math.max(0,o));y=Q.value,E&&(y=E(y)),T=w?Q.done:o<=0}p==null||p(y),T&&(v===0&&(b??(b=o)),v{f==null||f(),m.stop()}}}function vw(n,e){return e?n*(1e3/e):0}function o5({from:n=0,velocity:e=0,min:t,max:i,power:s=.8,timeConstant:r=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:f,onComplete:h,onStop:d}){let p;function _(b){return t!==void 0&&bi}function g(b){return t===void 0?i:i===void 0||Math.abs(t-b){var T;f==null||f(y),(T=b.onUpdate)===null||T===void 0||T.call(b,y)},onComplete:h,onStop:d}))}function v(b){m(Object.assign({type:"spring",stiffness:o,damping:a,restDelta:l},b))}if(_(n))v({from:n,velocity:e,to:g(n)});else{let b=s*e+n;typeof c<"u"&&(b=c(b));const y=g(b),T=y===t?-1:1;let w,E;const P=M=>{w=E,E=M,e=vw(M-w,YT().delta),(T===1&&M>y||T===-1&&Mp==null?void 0:p.stop()}}const yw=(n,e)=>1-3*e+3*n,bw=(n,e)=>3*e-6*n,xw=n=>3*n,Lh=(n,e,t)=>((yw(e,t)*n+bw(e,t))*n+xw(e))*n,Mw=(n,e,t)=>3*yw(e,t)*n*n+2*bw(e,t)*n+xw(e),a5=1e-7,l5=10;function c5(n,e,t,i,s){let r,o,a=0;do o=e+(t-e)/2,r=Lh(o,i,s)-n,r>0?t=o:e=o;while(Math.abs(r)>a5&&++a=f5?h5(o,f,n,t):h===0?f:c5(o,a,a+uf,n,t)}return o=>o===0||o===1?o:Lh(r(o),e,i)}const Ns={},ym={};class p5{constructor(){fi(this,"subscriptions",new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,i){if(this.subscriptions.size)for(const s of this.subscriptions)s(e,t,i)}clear(){this.subscriptions.clear()}}function _x(n){return!Number.isNaN(Number.parseFloat(n))}class m5{constructor(e){fi(this,"current");fi(this,"prev");fi(this,"timeDelta",0);fi(this,"lastUpdated",0);fi(this,"updateSubscribers",new p5);fi(this,"stopAnimation");fi(this,"canTrackVelocity",!1);fi(this,"updateAndNotify",e=>{this.prev=this.current,this.current=e;const{delta:t,timestamp:i}=YT();this.lastUpdated!==i&&(this.timeDelta=t,this.lastUpdated=i),zg.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)});fi(this,"scheduleVelocityCheck",()=>zg.postRender(this.velocityCheck));fi(this,"velocityCheck",({timestamp:e})=>{this.canTrackVelocity||(this.canTrackVelocity=_x(this.current)),e!==this.lastUpdated&&(this.prev=this.current)});this.prev=this.current=e,this.canTrackVelocity=_x(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}set(e){this.updateAndNotify(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?vw(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{const{stop:i}=e(t);this.stopAnimation=i}).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 g5(n){return new m5(n)}const{isArray:_5}=Array;function v5(){const n=nt({}),e=i=>{const s=r=>{n.value[r]&&(n.value[r].stop(),n.value[r].destroy(),delete n.value[r])};i?_5(i)?i.forEach(s):s(i):Object.keys(n.value).forEach(s)},t=(i,s,r)=>{if(n.value[i])return n.value[i];const o=g5(s);return o.onChange(a=>r[i]=a),n.value[i]=o,o};return FB(e),{motionValues:n,get:t,stop:e}}function y5(n){return Array.isArray(n)}function no(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function bm(n){return{type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function b5(n){return{type:"spring",stiffness:550,damping:n===0?100:30,restDelta:.01,restSpeed:10}}function xm(){return{type:"keyframes",ease:"linear",duration:300}}function x5(n){return{type:"keyframes",duration:800,values:n}}const vx={default:b5,x:no,y:no,z:no,rotate:no,rotateX:no,rotateY:no,rotateZ:no,scaleX:bm,scaleY:bm,scale:bm,backgroundColor:xm,color:xm,opacity:xm};function Sw(n,e){let t;return y5(e)?t=x5:t=vx[n]||vx.default,{to:e,...t(e)}}const yx={...Zc,transform:Math.round},Ew={color:qn,backgroundColor:qn,outlineColor:qn,fill:qn,stroke:qn,borderColor:qn,borderTopColor:qn,borderRightColor:qn,borderBottomColor:qn,borderLeftColor:qn,borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,radius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,size:ut,top:ut,right:ut,bottom:ut,left:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,rotate:to,rotateX:to,rotateY:to,rotateZ:to,scale:cf,scaleX:cf,scaleY:cf,scaleZ:cf,skew:to,skewX:to,skewY:to,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:zl,originX:hx,originY:hx,originZ:ut,zIndex:yx,filter:Xg,WebkitFilter:Xg,fillOpacity:zl,strokeOpacity:zl,numOctaves:yx},W_=n=>Ew[n];function $g(n,e){return e&&typeof n=="number"&&e.transform?e.transform(n):n}function M5(n,e){let t=W_(n);return t!==Xg&&(t=Jc),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const S5={linear:hw,easeIn:H_,easeInOut:dw,easeOut:H4,circIn:pw,circInOut:G4,circOut:mw,backIn:G_,backInOut:X4,backOut:W4,anticipate:$4,bounceIn:K4,bounceInOut:Z4,bounceOut:Ih};function bx(n){if(Array.isArray(n)){const[e,t,i,s]=n;return d5(e,t,i,s)}else if(typeof n=="string")return S5[n];return n}function E5(n){return Array.isArray(n)&&typeof n[0]!="number"}function xx(n,e){return n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Jc.test(e)&&!e.startsWith("url("))}function T5(n){return Array.isArray(n.to)&&n.to[0]===null&&(n.to=[...n.to],n.to[0]=n.from),n}function w5({ease:n,times:e,delay:t,...i}){const s={...i};return e&&(s.offset=e),n&&(s.ease=E5(n)?n.map(bx):bx(n)),t&&(s.elapsed=-t),s}function A5(n,e,t){return Array.isArray(e.to)&&(n.duration||(n.duration=800)),T5(e),C5(n)||(n={...n,...Sw(t,e.to)}),{...e,...w5(n)}}function C5({delay:n,repeat:e,repeatType:t,repeatDelay:i,from:s,...r}){return!!Object.keys(r).length}function R5(n,e){return n[e]||n.default||n}function P5(n,e,t,i,s){const r=R5(i,n);let o=r.from===null||r.from===void 0?e.get():r.from;const a=xx(n,t);o==="none"&&a&&typeof t=="string"&&(o=M5(n,t));const l=xx(n,o);function c(f){const h={from:o,to:t,velocity:i.velocity?i.velocity:e.getVelocity(),onUpdate:d=>e.set(d)};return r.type==="inertia"||r.type==="decay"?o5({...h,...r}):_w({...A5(r,h,n),onUpdate:d=>{h.onUpdate(d),r.onUpdate&&r.onUpdate(d)},onComplete:()=>{s&&s(),f&&f()}})}function u(f){return e.set(t),s&&s(),f&&f(),{stop:()=>{}}}return!l||!a||r.type===!1?u:c}function I5(){const{motionValues:n,stop:e,get:t}=v5();return{motionValues:n,stop:e,push:(s,r,o,a={},l)=>{const c=o[s],u=t(s,c,o);if(a&&a.immediate){u.set(r);return}const f=P5(s,u,r,a,l);u.start(f)}}}function L5(n,e={},{motionValues:t,push:i,stop:s}=I5()){const r=Ut(e),o=nt(!1);je(t,f=>{o.value=Object.values(f).filter(h=>h.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]},l=f=>{typeof f=="string"&&(f=a(f));const h=Object.entries(f).map(([p,_])=>{if(p!=="transition")return new Promise(g=>i(p,_,n,f.transition||Sw(p,f[p]),g))}).filter(Boolean);async function d(){var p,_;await Promise.all(h),(_=(p=f.transition)==null?void 0:p.onComplete)==null||_.call(p)}return Promise.all([d()])};return{isAnimating:o,apply:l,set:f=>{const h=Ph(f)?f:a(f);Object.entries(h).forEach(([d,p])=>{d!=="transition"&&i(d,p,n,{immediate:!0})})},leave:async f=>{let h;if(r&&(r.leave&&(h=r.leave),!r.leave&&r.initial&&(h=r.initial)),!h){f();return}await l(h),f()},stop:s}}const X_=typeof window<"u",D5=()=>X_&&(window.onpointerdown===null||(Ns==null?void 0:Ns.TEST)),O5=()=>X_&&(window.ontouchstart===null||(Ns==null?void 0:Ns.TEST)),N5=()=>X_&&(window.onmousedown===null||(Ns==null?void 0:Ns.TEST));function U5({target:n,state:e,variants:t,apply:i}){const s=Ut(t),r=nt(!1),o=nt(!1),a=nt(!1),l=Ee(()=>{let u=[...Object.keys(e.value||{})];return s&&(s.hovered&&(u=[...u,...Object.keys(s.hovered)]),s.tapped&&(u=[...u,...Object.keys(s.tapped)]),s.focused&&(u=[...u,...Object.keys(s.focused)])),u}),c=Ee(()=>{const u={};Object.assign(u,e.value),r.value&&s.hovered&&Object.assign(u,s.hovered),o.value&&s.tapped&&Object.assign(u,s.tapped),a.value&&s.focused&&Object.assign(u,s.focused);for(const f in u)l.value.includes(f)||delete u[f];return u});s.hovered&&(zt(n,"mouseenter",()=>r.value=!0),zt(n,"mouseleave",()=>{r.value=!1,o.value=!1})),s.tapped&&(N5()&&(zt(n,"mousedown",()=>o.value=!0),zt(n,"mouseup",()=>o.value=!1)),D5()&&(zt(n,"pointerdown",()=>o.value=!0),zt(n,"pointerup",()=>o.value=!1)),O5()&&(zt(n,"touchstart",()=>o.value=!0),zt(n,"touchend",()=>o.value=!1))),s.focused&&(zt(n,"focus",()=>a.value=!0),zt(n,"blur",()=>a.value=!1)),je([r,o,a],()=>{i(c.value)})}function F5({set:n,target:e,variants:t,variant:i}){const s=Ut(t);je(()=>e,()=>{s&&(s.initial&&(n("initial"),i.value="initial"),s.enter&&(i.value="enter"))},{immediate:!0,flush:"pre"})}function k5({state:n,apply:e}){je(n,t=>{t&&e(t)},{immediate:!0})}function Tw({target:n,variants:e,variant:t}){const i=Ut(e);i&&(i.visible||i.visibleOnce)&&QB(n,([{isIntersecting:s}])=>{i.visible?s?t.value="visible":t.value="initial":i.visibleOnce&&(s&&t.value!=="visibleOnce"?t.value="visibleOnce":t.value||(t.value="initial"))})}function B5(n,e={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){e.lifeCycleHooks&&F5(n),e.syncVariants&&k5(n),e.visibilityHooks&&Tw(n),e.eventListeners&&U5(n)}function ww(n={}){const e=xi({...n}),t=nt({});return je(e,()=>{const i={};for(const[s,r]of Object.entries(e)){const o=W_(s),a=$g(r,o);i[s]=a}t.value=i},{immediate:!0,deep:!0}),{state:e,style:t}}function $_(n,e){je(()=>Qn(n),t=>{t&&e(t)},{immediate:!0})}const z5={x:"translateX",y:"translateY",z:"translateZ"};function Aw(n={},e=!0){const t=xi({...n}),i=nt("");return je(t,s=>{let r="",o=!1;if(e&&(s.x||s.y||s.z)){const a=[s.x||0,s.y||0,s.z||0].map(l=>$g(l,ut)).join(",");r+=`translate3d(${a}) `,o=!0}for(const[a,l]of Object.entries(s)){if(e&&(a==="x"||a==="y"||a==="z"))continue;const c=W_(a),u=$g(l,c);r+=`${z5[a]||a}(${u}) `}e&&!o&&(r+="translateZ(0px) "),i.value=r.trim()},{immediate:!0,deep:!0}),{state:t,transform:i}}const V5=["","X","Y","Z"],H5=["perspective","translate","scale","rotate","skew"],Cw=["transformPerspective","x","y","z"];H5.forEach(n=>{V5.forEach(e=>{const t=n+e;Cw.push(t)})});const G5=new Set(Cw);function q_(n){return G5.has(n)}const W5=new Set(["originX","originY","originZ"]);function Rw(n){return W5.has(n)}function X5(n){const e={},t={};return Object.entries(n).forEach(([i,s])=>{q_(i)||Rw(i)?e[i]=s:t[i]=s}),{transform:e,style:t}}function Gd(n){const{transform:e,style:t}=X5(n),{transform:i}=Aw(e),{style:s}=ww(t);return i.value&&(s.value.transform=i.value),s.value}function $5(n,e){let t,i;const{state:s,style:r}=ww();return $_(n,o=>{i=o;for(const a of Object.keys(Ew))o.style[a]===null||o.style[a]===""||q_(a)||Rw(a)||(s[a]=o.style[a]);t&&Object.entries(t).forEach(([a,l])=>o.style[a]=l),e&&e(s)}),je(r,o=>{if(!i){t=o;return}for(const a in o)i.style[a]=o[a]},{immediate:!0}),{style:s}}function q5(n){const e=n.trim().split(/\) |\)/);if(e.length===1)return{};const t=i=>i.endsWith("px")||i.endsWith("deg")?Number.parseFloat(i):Number.isNaN(Number(i))?Number(i):i;return e.reduce((i,s)=>{if(!s)return i;const[r,o]=s.split("("),l=o.split(",").map(u=>t(u.endsWith(")")?u.replace(")",""):u.trim())),c=l.length===1?l[0]:l;return{...i,[r]:c}},{})}function Y5(n,e){Object.entries(q5(e)).forEach(([t,i])=>{const s=["x","y","z"];if(t==="translate3d"){if(i===0){s.forEach(r=>n[r]=0);return}i.forEach((r,o)=>n[s[o]]=r);return}if(i=Number.parseFloat(`${i}`),t==="translateX"){n.x=i;return}if(t==="translateY"){n.y=i;return}if(t==="translateZ"){n.z=i;return}n[t]=i})}function j5(n,e){let t,i;const{state:s,transform:r}=Aw();return $_(n,o=>{i=o,o.style.transform&&Y5(s,o.style.transform),t&&(o.style.transform=t),e&&e(s)}),je(r,o=>{if(!i){t=o;return}i.style.transform=o},{immediate:!0}),{transform:s}}function K5(n){return Object.entries(n)}function Z5(n,e){const t=xi({}),i=o=>Object.entries(o).forEach(([a,l])=>t[a]=l),{style:s}=$5(n,i),{transform:r}=j5(n,i);return je(t,o=>{K5(o).forEach(([a,l])=>{const c=q_(a)?r:s;c[a]&&c[a]===l||(c[a]=l)})},{immediate:!0,deep:!0}),$_(n,()=>e),{motionProperties:t,style:s,transform:r}}function J5(n={}){const e=Ut(n),t=nt();return{state:Ee(()=>{if(t.value)return e[t.value]}),variant:t}}function Pw(n,e={},t){const{motionProperties:i}=Z5(n),{variant:s,state:r}=J5(e),o=L5(i,e),a={target:n,variant:s,variants:e,state:r,motionProperties:i,...o};return B5(a,t),a}const Iw=["delay","duration"],Q5=["initial","enter","leave","visible","visible-once","visibleOnce","hovered","tapped","focused",...Iw];function ez(n){return Iw.includes(n)}function tz(n,e){const t=n.props?n.props:n.data&&n.data.attrs?n.data.attrs:{};if(t){t.variants&&Ph(t.variants)&&(e.value={...e.value,...t.variants});for(let i of Q5)if(!(!t||!t[i])){if(ez(i)&&typeof t[i]=="number"){for(const s of["enter","visible","visibleOnce"]){const r=e.value[s];r!=null&&(r.transition??(r.transition={}),r.transition[i]=t[i])}continue}if(Ph(t[i])){const s=t[i];i==="visible-once"&&(i="visibleOnce"),e.value[i]=s}}}}function Mm(n,e=!1){return{created:(s,r,o)=>{const a=r.value&&typeof r.value=="string"?r.value:o.key;a&&ym[a]&&ym[a].stop();const l=e?structuredClone(ht(n)||{}):n||{},c=nt(l);typeof r.value=="object"&&(c.value=r.value),tz(o,c);const f=Pw(s,c,{eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1});s.motionInstance=f,a&&(ym[a]=f)},mounted:(s,r,o)=>{s.motionInstance&&Tw(s.motionInstance)},getSSRProps(s,r){let{initial:o}=s.value||r&&(r==null?void 0:r.props)||{};o=Ut(o);const a=OT({},(n==null?void 0:n.initial)||{},o||{});return!a||Object.keys(a).length===0?void 0:{style:Gd(a)}}}}const nz={initial:{opacity:0},enter:{opacity:1}},iz={initial:{opacity:0},visible:{opacity:1}},sz={initial:{opacity:0},visibleOnce:{opacity:1}},rz={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},oz={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},az={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},lz={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},cz={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},uz={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},fz={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},hz={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},dz={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},pz={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},mz={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},gz={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},_z={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},vz={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},yz={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},bz={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},xz={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},Mz={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},Sz={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},Ez={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},Tz={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},wz={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},Az={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},Cz={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},Rz={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},Pz={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},Iz={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Dh={__proto__:null,fade:nz,fadeVisible:iz,fadeVisibleOnce:sz,pop:rz,popVisible:oz,popVisibleOnce:az,rollBottom:_z,rollLeft:lz,rollRight:fz,rollTop:pz,rollVisibleBottom:vz,rollVisibleLeft:cz,rollVisibleOnceBottom:yz,rollVisibleOnceLeft:uz,rollVisibleOnceRight:dz,rollVisibleOnceTop:gz,rollVisibleRight:hz,rollVisibleTop:mz,slideBottom:Rz,slideLeft:bz,slideRight:Sz,slideTop:wz,slideVisibleBottom:Pz,slideVisibleLeft:xz,slideVisibleOnceBottom:Iz,slideVisibleOnceLeft:Mz,slideVisibleOnceRight:Tz,slideVisibleOnceTop:Cz,slideVisibleRight:Ez,slideVisibleTop:Az};function Lz(n){const e="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;",t="aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------",i=new RegExp(e.split("").join("|"),"g");return n.toString().replace(/[A-Z]/g,s=>`-${s}`).toLowerCase().replace(/\s+/g,"-").replace(i,s=>t.charAt(e.indexOf(s))).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/-+$/,"")}const Lw=Symbol(""),Dw={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function Dz(n){return Object.prototype.toString.call(n)==="[object Object]"}function qg(n){if(Array.isArray(n))return n.map(qg);if(Dz(n)){const e={};for(const t in n)e[t]=qg(n[t]);return e}return n}function Ow(n){const e=xi({}),t=_n(Lw,{}),i=Ee(()=>n.preset==null?{}:t!=null&&n.preset in t?structuredClone(ht(t)[n.preset]):n.preset in Dh?structuredClone(Dh[n.preset]):{}),s=Ee(()=>({initial:n.initial,enter:n.enter,leave:n.leave,visible:n.visible,visibleOnce:n.visibleOnce,hovered:n.hovered,tapped:n.tapped,focused:n.focused}));function r(l,c){for(const u of["delay","duration"]){if(c[u]==null)continue;const f=Number.parseInt(c[u]);for(const h of["enter","visible","visibleOnce"]){const d=l[h];d!=null&&(d.transition??(d.transition={}),d.transition[u]=f)}}return l}const o=Ee(()=>{const l=OT({},s.value,i.value,n.variants||{});return r({...l},n)});function a(l,c,u){var h;l.props??(l.props={}),(h=l.props).style??(h.style={}),l.props.style={...l.props.style,...u};const f=r(qg(o.value),l.props);return l.props.onVnodeMounted=({el:d})=>{e[c]=Pw(d,f)},l.props.onVnodeUpdated=({el:d})=>{const p=Gd(e[c].state);for(const[_,g]of Object.entries(p))d.style[_]=g},l}return{motionConfig:o,setNodeInstance:a}}const Oz=hn({name:"Motion",props:{...Dw,is:{type:[String,Object],default:"div"}},setup(n){const e=O0(),{motionConfig:t,setNodeInstance:i}=Ow(n);return()=>{const s=Gd(t.value.initial||{}),r=ks(n.is,void 0,e);return i(r,0,s),r}}}),Nz=hn({name:"MotionGroup",props:{...Dw,is:{type:[String,Object],required:!1}},setup(n){const e=O0(),{motionConfig:t,setNodeInstance:i}=Ow(n);return()=>{var o;const s=Gd(t.value.initial||{}),r=((o=e.default)==null?void 0:o.call(e))||[];for(let a=0;a
'};t.configure=function(p){var _,g;for(_ in p)g=p[_],g!==void 0&&p.hasOwnProperty(_)&&(i[_]=g);return this},t.status=null,t.set=function(p){var _=t.isStarted();p=s(p,i.minimum,1),t.status=p===1?null:p;var g=t.render(!_),m=g.querySelector(i.barSelector),v=i.speed,b=i.easing;return g.offsetWidth,a(function(y){i.positionUsing===""&&(i.positionUsing=t.getPositioningCSS()),l(m,o(p,v,b)),p===1?(l(g,{transition:"none",opacity:1}),g.offsetWidth,setTimeout(function(){l(g,{transition:"all "+v+"ms linear",opacity:0}),setTimeout(function(){t.remove(),y()},v)},v)):setTimeout(y,v)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var p=function(){setTimeout(function(){t.status&&(t.trickle(),p())},i.trickleSpeed)};return i.trickle&&p(),this},t.done=function(p){return!p&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(p){var _=t.status;return _?(typeof p!="number"&&(p=(1-_)*s(Math.random()*_,.1,.95)),_=s(_+p,0,.994),t.set(_)):t.start()},t.trickle=function(){return t.inc(Math.random()*i.trickleRate)},function(){var p=0,_=0;t.promise=function(g){return!g||g.state()==="resolved"?this:(_===0&&t.start(),p++,_++,g.always(function(){_--,_===0?(p=0,t.done()):t.set((p-_)/p)}),this)}}(),t.render=function(p){if(t.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var _=document.createElement("div");_.id="nprogress",_.innerHTML=i.template;var g=_.querySelector(i.barSelector),m=p?"-100":r(t.status||0),v=document.querySelector(i.parent),b;return l(g,{transition:"all 0 linear",transform:"translate3d("+m+"%,0,0)"}),i.showSpinner||(b=_.querySelector(i.spinnerSelector),b&&d(b)),v!=document.body&&u(v,"nprogress-custom-parent"),v.appendChild(_),_},t.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(i.parent),"nprogress-custom-parent");var p=document.getElementById("nprogress");p&&d(p)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var p=document.body.style,_="WebkitTransform"in p?"Webkit":"MozTransform"in p?"Moz":"msTransform"in p?"ms":"OTransform"in p?"O":"";return _+"Perspective"in p?"translate3d":_+"Transform"in p?"translate":"margin"};function s(p,_,g){return p<_?_:p>g?g:p}function r(p){return(-1+p)*100}function o(p,_,g){var m;return i.positionUsing==="translate3d"?m={transform:"translate3d("+r(p)+"%,0,0)"}:i.positionUsing==="translate"?m={transform:"translate("+r(p)+"%,0)"}:m={"margin-left":r(p)+"%"},m.transition="all "+_+"ms "+g,m}var a=function(){var p=[];function _(){var g=p.shift();g&&g(_)}return function(g){p.push(g),p.length==1&&_()}}(),l=function(){var p=["Webkit","O","Moz","ms"],_={};function g(y){return y.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(T,w){return w.toUpperCase()})}function m(y){var T=document.body.style;if(y in T)return y;for(var w=p.length,E=y.charAt(0).toUpperCase()+y.slice(1),P;w--;)if(P=p[w]+E,P in T)return P;return y}function v(y){return y=g(y),_[y]||(_[y]=m(y))}function b(y,T,w){T=v(T),y.style[T]=w}return function(y,T){var w=arguments,E,P;if(w.length==2)for(E in T)P=T[E],P!==void 0&&T.hasOwnProperty(E)&&b(y,E,P);else b(y,w[1],w[2])}}();function c(p,_){var g=typeof p=="string"?p:h(p);return g.indexOf(" "+_+" ")>=0}function u(p,_){var g=h(p),m=g+_;c(g,_)||(p.className=m.substring(1))}function f(p,_){var g=h(p),m;c(p,_)&&(m=g.replace(" "+_+" "," "),p.className=m.substring(1,m.length-1))}function h(p){return(" "+(p.className||"")+" ").replace(/\s+/gi," ")}function d(p){p&&p.parentNode&&p.parentNode.removeChild(p)}return t})}(Pf)),Pf.exports}var zz=Bz();const Nw=Fz(zz);/*! +}`;class bF{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const s=new $t,r=e.properties.get(s);r.__webglTexture=t.texture,(t.depthNear!==i.depthNear||t.depthFar!==i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=s}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new zi({vertexShader:vF,fragmentShader:yF,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new jt(new Ga(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class xF extends as{constructor(e,t){super();const i=this;let s=null,r=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,d=null,p=null;const _=new bF,g=t.getContextAttributes();let m=null,v=null;const b=[],y=[],T=new fe;let w=null;const S=new Jt;S.viewport=new vt;const P=new Jt;P.viewport=new vt;const M=[S,P],E=new sT;let D=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(oe){let ge=b[oe];return ge===void 0&&(ge=new Sf,b[oe]=ge),ge.getTargetRaySpace()},this.getControllerGrip=function(oe){let ge=b[oe];return ge===void 0&&(ge=new Sf,b[oe]=ge),ge.getGripSpace()},this.getHand=function(oe){let ge=b[oe];return ge===void 0&&(ge=new Sf,b[oe]=ge),ge.getHandSpace()};function z(oe){const ge=y.indexOf(oe.inputSource);if(ge===-1)return;const Se=b[ge];Se!==void 0&&(Se.update(oe.inputSource,oe.frame,c||o),Se.dispatchEvent({type:oe.type,data:oe.inputSource}))}function V(){s.removeEventListener("select",z),s.removeEventListener("selectstart",z),s.removeEventListener("selectend",z),s.removeEventListener("squeeze",z),s.removeEventListener("squeezestart",z),s.removeEventListener("squeezeend",z),s.removeEventListener("end",V),s.removeEventListener("inputsourceschange",Q);for(let oe=0;oe=0&&(y[$]=null,b[$].disconnect(Se))}for(let ge=0;ge=y.length){y.push(Se),$=le;break}else if(y[le]===null){y[le]=Se,$=le;break}if($===-1)break}const ae=b[$];ae&&ae.connect(Se)}}const j=new k,te=new k;function Z(oe,ge,Se){j.setFromMatrixPosition(ge.matrixWorld),te.setFromMatrixPosition(Se.matrixWorld);const $=j.distanceTo(te),ae=ge.projectionMatrix.elements,le=Se.projectionMatrix.elements,ue=ae[14]/(ae[10]-1),$e=ae[14]/(ae[10]+1),N=(ae[9]+1)/ae[5],U=(ae[9]-1)/ae[5],A=(ae[8]-1)/ae[0],W=(le[8]+1)/le[0],G=ue*A,X=ue*W,C=$/(-A+W),I=C*-A;if(ge.matrixWorld.decompose(oe.position,oe.quaternion,oe.scale),oe.translateX(I),oe.translateZ(C),oe.matrixWorld.compose(oe.position,oe.quaternion,oe.scale),oe.matrixWorldInverse.copy(oe.matrixWorld).invert(),ae[10]===-1)oe.projectionMatrix.copy(ge.projectionMatrix),oe.projectionMatrixInverse.copy(ge.projectionMatrixInverse);else{const F=ue+C,H=$e+C,ce=G-I,R=X+($-I),x=N*$e/H*F,O=U*$e/H*F;oe.projectionMatrix.makePerspective(ce,R,x,O,F,H),oe.projectionMatrixInverse.copy(oe.projectionMatrix).invert()}}function pe(oe,ge){ge===null?oe.matrixWorld.copy(oe.matrix):oe.matrixWorld.multiplyMatrices(ge.matrixWorld,oe.matrix),oe.matrixWorldInverse.copy(oe.matrixWorld).invert()}this.updateCamera=function(oe){if(s===null)return;let ge=oe.near,Se=oe.far;_.texture!==null&&(_.depthNear>0&&(ge=_.depthNear),_.depthFar>0&&(Se=_.depthFar)),E.near=P.near=S.near=ge,E.far=P.far=S.far=Se,(D!==E.near||B!==E.far)&&(s.updateRenderState({depthNear:E.near,depthFar:E.far}),D=E.near,B=E.far),S.layers.mask=oe.layers.mask|2,P.layers.mask=oe.layers.mask|4,E.layers.mask=S.layers.mask|P.layers.mask;const $=oe.parent,ae=E.cameras;pe(E,$);for(let le=0;le0&&(g.alphaTest.value=m.alphaTest);const v=e.get(m),b=v.envMap,y=v.envMapRotation;b&&(g.envMap.value=b,eo.copy(y),eo.x*=-1,eo.y*=-1,eo.z*=-1,b.isCubeTexture&&b.isRenderTargetTexture===!1&&(eo.y*=-1,eo.z*=-1),g.envMapRotation.value.setFromMatrix4(MF.makeRotationFromEuler(eo)),g.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=m.reflectivity,g.ior.value=m.ior,g.refractionRatio.value=m.refractionRatio),m.lightMap&&(g.lightMap.value=m.lightMap,g.lightMapIntensity.value=m.lightMapIntensity,t(m.lightMap,g.lightMapTransform)),m.aoMap&&(g.aoMap.value=m.aoMap,g.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,g.aoMapTransform))}function o(g,m){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,m.map&&(g.map.value=m.map,t(m.map,g.mapTransform))}function a(g,m){g.dashSize.value=m.dashSize,g.totalSize.value=m.dashSize+m.gapSize,g.scale.value=m.scale}function l(g,m,v,b){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.size.value=m.size*v,g.scale.value=b*.5,m.map&&(g.map.value=m.map,t(m.map,g.uvTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest)}function c(g,m){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.rotation.value=m.rotation,m.map&&(g.map.value=m.map,t(m.map,g.mapTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest)}function u(g,m){g.specular.value.copy(m.specular),g.shininess.value=Math.max(m.shininess,1e-4)}function f(g,m){m.gradientMap&&(g.gradientMap.value=m.gradientMap)}function h(g,m){g.metalness.value=m.metalness,m.metalnessMap&&(g.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,g.metalnessMapTransform)),g.roughness.value=m.roughness,m.roughnessMap&&(g.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,g.roughnessMapTransform)),m.envMap&&(g.envMapIntensity.value=m.envMapIntensity)}function d(g,m,v){g.ior.value=m.ior,m.sheen>0&&(g.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),g.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(g.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,g.sheenColorMapTransform)),m.sheenRoughnessMap&&(g.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,g.sheenRoughnessMapTransform))),m.clearcoat>0&&(g.clearcoat.value=m.clearcoat,g.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(g.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,g.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,g.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(g.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,g.clearcoatNormalMapTransform),g.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===Vn&&g.clearcoatNormalScale.value.negate())),m.dispersion>0&&(g.dispersion.value=m.dispersion),m.iridescence>0&&(g.iridescence.value=m.iridescence,g.iridescenceIOR.value=m.iridescenceIOR,g.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],g.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(g.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,g.iridescenceMapTransform)),m.iridescenceThicknessMap&&(g.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,g.iridescenceThicknessMapTransform))),m.transmission>0&&(g.transmission.value=m.transmission,g.transmissionSamplerMap.value=v.texture,g.transmissionSamplerSize.value.set(v.width,v.height),m.transmissionMap&&(g.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,g.transmissionMapTransform)),g.thickness.value=m.thickness,m.thicknessMap&&(g.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,g.thicknessMapTransform)),g.attenuationDistance.value=m.attenuationDistance,g.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(g.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(g.anisotropyMap.value=m.anisotropyMap,t(m.anisotropyMap,g.anisotropyMapTransform))),g.specularIntensity.value=m.specularIntensity,g.specularColor.value.copy(m.specularColor),m.specularColorMap&&(g.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,g.specularColorMapTransform)),m.specularIntensityMap&&(g.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,g.specularIntensityMapTransform))}function p(g,m){m.matcap&&(g.matcap.value=m.matcap)}function _(g,m){const v=e.get(m).light;g.referencePosition.value.setFromMatrixPosition(v.matrixWorld),g.nearDistance.value=v.shadow.camera.near,g.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function EF(n,e,t,i){let s={},r={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function l(v,b){const y=b.program;i.uniformBlockBinding(v,y)}function c(v,b){let y=s[v.id];y===void 0&&(p(v),y=u(v),s[v.id]=y,v.addEventListener("dispose",g));const T=b.program;i.updateUBOMapping(v,T);const w=e.render.frame;r[v.id]!==w&&(h(v),r[v.id]=w)}function u(v){const b=f();v.__bindingPointIndex=b;const y=n.createBuffer(),T=v.__size,w=v.usage;return n.bindBuffer(n.UNIFORM_BUFFER,y),n.bufferData(n.UNIFORM_BUFFER,T,w),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,b,y),y}function f(){for(let v=0;v0&&(y+=T-w),v.__size=y,v.__cache={},this}function _(v){const b={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(b.boundary=4,b.storage=4):v.isVector2?(b.boundary=8,b.storage=8):v.isVector3||v.isColor?(b.boundary=16,b.storage=12):v.isVector4?(b.boundary=16,b.storage=16):v.isMatrix3?(b.boundary=48,b.storage=48):v.isMatrix4?(b.boundary=64,b.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),b}function g(v){const b=v.target;b.removeEventListener("dispose",g);const y=o.indexOf(b.__bindingPointIndex);o.splice(y,1),n.deleteBuffer(s[b.id]),delete s[b.id],delete r[b.id]}function m(){for(const v in s)n.deleteBuffer(s[v]);o=[],s={},r={}}return{bind:l,update:c,dispose:m}}class Tf{constructor(e={}){const{canvas:t=oE(),context:i=null,depth:s=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let d;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");d=i.getContextAttributes().alpha}else d=o;const p=new Uint32Array(4),_=new Int32Array(4);let g=null,m=null;const v=[],b=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=ts,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const y=this;let T=!1;this._outputColorSpace=Fn;let w=0,S=0,P=null,M=-1,E=null;const D=new vt,B=new vt;let z=null;const V=new Pe(0);let Q=0,j=t.width,te=t.height,Z=1,pe=null,Me=null;const re=new vt(0,0,j,te),xe=new vt(0,0,j,te);let We=!1;const oe=new Ha;let ge=!1,Se=!1;const $=new Ze,ae=new Ze,le=new k,ue=new vt,$e={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let N=!1;function U(){return P===null?Z:1}let A=i;function W(L,K){return t.getContext(L,K)}try{const L={alpha:!0,depth:s,stencil:r,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Uc}`),t.addEventListener("webglcontextlost",Be,!1),t.addEventListener("webglcontextrestored",ve,!1),t.addEventListener("webglcontextcreationerror",he,!1),A===null){const K="webgl2";if(A=W(K,L),A===null)throw W(K)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(L){throw console.error("THREE.WebGLRenderer: "+L.message),L}let G,X,C,I,F,H,ce,R,x,O,Y,ne,ee,Te,me,Re,De,de,Ne,ze,Ve,we,it,q;function Ie(){G=new UN(A),G.init(),we=new mT(A,G),X=new RN(A,G,e,we),C=new gF(A,G),X.reverseDepthBuffer&&h&&C.buffers.depth.setReversed(!0),I=new BN(A),F=new iF,H=new _F(A,G,C,F,X,we,I),ce=new IN(y),R=new NN(y),x=new XL(A),it=new AN(A,x),O=new FN(A,x,I,it),Y=new VN(A,O,x,I),Ne=new zN(A,X,H),Re=new PN(F),ne=new nF(y,ce,R,G,X,it,Re),ee=new SF(y,F),Te=new rF,me=new fF(G),de=new wN(y,ce,R,C,Y,d,l),De=new pF(y,Y,X),q=new EF(A,I,X,C),ze=new CN(A,G,I),Ve=new kN(A,G,I),I.programs=ne.programs,y.capabilities=X,y.extensions=G,y.properties=F,y.renderLists=Te,y.shadowMap=De,y.state=C,y.info=I}Ie();const _e=new xF(y,A);this.xr=_e,this.getContext=function(){return A},this.getContextAttributes=function(){return A.getContextAttributes()},this.forceContextLoss=function(){const L=G.get("WEBGL_lose_context");L&&L.loseContext()},this.forceContextRestore=function(){const L=G.get("WEBGL_lose_context");L&&L.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(L){L!==void 0&&(Z=L,this.setSize(j,te,!1))},this.getSize=function(L){return L.set(j,te)},this.setSize=function(L,K,ie=!0){if(_e.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}j=L,te=K,t.width=Math.floor(L*Z),t.height=Math.floor(K*Z),ie===!0&&(t.style.width=L+"px",t.style.height=K+"px"),this.setViewport(0,0,L,K)},this.getDrawingBufferSize=function(L){return L.set(j*Z,te*Z).floor()},this.setDrawingBufferSize=function(L,K,ie){j=L,te=K,Z=ie,t.width=Math.floor(L*ie),t.height=Math.floor(K*ie),this.setViewport(0,0,L,K)},this.getCurrentViewport=function(L){return L.copy(D)},this.getViewport=function(L){return L.copy(re)},this.setViewport=function(L,K,ie,se){L.isVector4?re.set(L.x,L.y,L.z,L.w):re.set(L,K,ie,se),C.viewport(D.copy(re).multiplyScalar(Z).round())},this.getScissor=function(L){return L.copy(xe)},this.setScissor=function(L,K,ie,se){L.isVector4?xe.set(L.x,L.y,L.z,L.w):xe.set(L,K,ie,se),C.scissor(B.copy(xe).multiplyScalar(Z).round())},this.getScissorTest=function(){return We},this.setScissorTest=function(L){C.setScissorTest(We=L)},this.setOpaqueSort=function(L){pe=L},this.setTransparentSort=function(L){Me=L},this.getClearColor=function(L){return L.copy(de.getClearColor())},this.setClearColor=function(){de.setClearColor(...arguments)},this.getClearAlpha=function(){return de.getClearAlpha()},this.setClearAlpha=function(){de.setClearAlpha(...arguments)},this.clear=function(L=!0,K=!0,ie=!0){let se=0;if(L){let J=!1;if(P!==null){const be=P.texture.format;J=be===hd||be===fd||be===kc}if(J){const be=P.texture.type,Le=be===Bi||be===Vs||be===Ea||be===Ta||be===ld||be===cd,Ge=de.getClearColor(),Ue=de.getClearAlpha(),Qe=Ge.r,tt=Ge.g,qe=Ge.b;Le?(p[0]=Qe,p[1]=tt,p[2]=qe,p[3]=Ue,A.clearBufferuiv(A.COLOR,0,p)):(_[0]=Qe,_[1]=tt,_[2]=qe,_[3]=Ue,A.clearBufferiv(A.COLOR,0,_))}else se|=A.COLOR_BUFFER_BIT}K&&(se|=A.DEPTH_BUFFER_BIT),ie&&(se|=A.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),A.clear(se)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Be,!1),t.removeEventListener("webglcontextrestored",ve,!1),t.removeEventListener("webglcontextcreationerror",he,!1),de.dispose(),Te.dispose(),me.dispose(),F.dispose(),ce.dispose(),R.dispose(),Y.dispose(),it.dispose(),q.dispose(),ne.dispose(),_e.dispose(),_e.removeEventListener("sessionstart",hv),_e.removeEventListener("sessionend",dv),Nr.stop()};function Be(L){L.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),T=!0}function ve(){console.log("THREE.WebGLRenderer: Context Restored."),T=!1;const L=I.autoReset,K=De.enabled,ie=De.autoUpdate,se=De.needsUpdate,J=De.type;Ie(),I.autoReset=L,De.enabled=K,De.autoUpdate=ie,De.needsUpdate=se,De.type=J}function he(L){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",L.statusMessage)}function He(L){const K=L.target;K.removeEventListener("dispose",He),ot(K)}function ot(L){Ut(L),F.remove(L)}function Ut(L){const K=F.get(L).programs;K!==void 0&&(K.forEach(function(ie){ne.releaseProgram(ie)}),L.isShaderMaterial&&ne.releaseShaderCache(L))}this.renderBufferDirect=function(L,K,ie,se,J,be){K===null&&(K=$e);const Le=J.isMesh&&J.matrixWorld.determinant()<0,Ge=tC(L,K,ie,se,J);C.setMaterial(se,Le);let Ue=ie.index,Qe=1;if(se.wireframe===!0){if(Ue=O.getWireframeAttribute(ie),Ue===void 0)return;Qe=2}const tt=ie.drawRange,qe=ie.attributes.position;let dt=tt.start*Qe,At=(tt.start+tt.count)*Qe;be!==null&&(dt=Math.max(dt,be.start*Qe),At=Math.min(At,(be.start+be.count)*Qe)),Ue!==null?(dt=Math.max(dt,0),At=Math.min(At,Ue.count)):qe!=null&&(dt=Math.max(dt,0),At=Math.min(At,qe.count));const zt=At-dt;if(zt<0||zt===1/0)return;it.setup(J,se,Ge,ie,Ue);let Wt,yt=ze;if(Ue!==null&&(Wt=x.get(Ue),yt=Ve,yt.setIndex(Wt)),J.isMesh)se.wireframe===!0?(C.setLineWidth(se.wireframeLinewidth*U()),yt.setMode(A.LINES)):yt.setMode(A.TRIANGLES);else if(J.isLine){let Ye=se.linewidth;Ye===void 0&&(Ye=1),C.setLineWidth(Ye*U()),J.isLineSegments?yt.setMode(A.LINES):J.isLineLoop?yt.setMode(A.LINE_LOOP):yt.setMode(A.LINE_STRIP)}else J.isPoints?yt.setMode(A.POINTS):J.isSprite&&yt.setMode(A.TRIANGLES);if(J.isBatchedMesh)if(J._multiDrawInstances!==null)ga("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),yt.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances);else if(G.get("WEBGL_multi_draw"))yt.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else{const Ye=J._multiDrawStarts,dn=J._multiDrawCounts,Mt=J._multiDrawCount,wi=Ue?x.get(Ue).bytesPerElement:1,Uo=F.get(se).currentProgram.getUniforms();for(let ni=0;ni{function be(){if(se.forEach(function(Le){F.get(Le).currentProgram.isReady()&&se.delete(Le)}),se.size===0){J(L);return}setTimeout(be,10)}G.get("KHR_parallel_shader_compile")!==null?be():setTimeout(be,10)})};let Ti=null;function us(L){Ti&&Ti(L)}function hv(){Nr.stop()}function dv(){Nr.start()}const Nr=new uT;Nr.setAnimationLoop(us),typeof self<"u"&&Nr.setContext(self),this.setAnimationLoop=function(L){Ti=L,_e.setAnimationLoop(L),L===null?Nr.stop():Nr.start()},_e.addEventListener("sessionstart",hv),_e.addEventListener("sessionend",dv),this.render=function(L,K){if(K!==void 0&&K.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;if(L.matrixWorldAutoUpdate===!0&&L.updateMatrixWorld(),K.parent===null&&K.matrixWorldAutoUpdate===!0&&K.updateMatrixWorld(),_e.enabled===!0&&_e.isPresenting===!0&&(_e.cameraAutoUpdate===!0&&_e.updateCamera(K),K=_e.getCamera()),L.isScene===!0&&L.onBeforeRender(y,L,K,P),m=me.get(L,b.length),m.init(K),b.push(m),ae.multiplyMatrices(K.projectionMatrix,K.matrixWorldInverse),oe.setFromProjectionMatrix(ae),Se=this.localClippingEnabled,ge=Re.init(this.clippingPlanes,Se),g=Te.get(L,v.length),g.init(),v.push(g),_e.enabled===!0&&_e.isPresenting===!0){const be=y.xr.getDepthSensingMesh();be!==null&&lp(be,K,-1/0,y.sortObjects)}lp(L,K,0,y.sortObjects),g.finish(),y.sortObjects===!0&&g.sort(pe,Me),N=_e.enabled===!1||_e.isPresenting===!1||_e.hasDepthSensing()===!1,N&&de.addToRenderList(g,L),this.info.render.frame++,ge===!0&&Re.beginShadows();const ie=m.state.shadowsArray;De.render(ie,L,K),ge===!0&&Re.endShadows(),this.info.autoReset===!0&&this.info.reset();const se=g.opaque,J=g.transmissive;if(m.setupLights(),K.isArrayCamera){const be=K.cameras;if(J.length>0)for(let Le=0,Ge=be.length;Le0&&mv(se,J,L,K),N&&de.render(L),pv(g,L,K);P!==null&&S===0&&(H.updateMultisampleRenderTarget(P),H.updateRenderTargetMipmap(P)),L.isScene===!0&&L.onAfterRender(y,L,K),it.resetDefaultState(),M=-1,E=null,b.pop(),b.length>0?(m=b[b.length-1],ge===!0&&Re.setGlobalState(y.clippingPlanes,m.state.camera)):m=null,v.pop(),v.length>0?g=v[v.length-1]:g=null};function lp(L,K,ie,se){if(L.visible===!1)return;if(L.layers.test(K.layers)){if(L.isGroup)ie=L.renderOrder;else if(L.isLOD)L.autoUpdate===!0&&L.update(K);else if(L.isLight)m.pushLight(L),L.castShadow&&m.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||oe.intersectsSprite(L)){se&&ue.setFromMatrixPosition(L.matrixWorld).applyMatrix4(ae);const Le=Y.update(L),Ge=L.material;Ge.visible&&g.push(L,Le,Ge,ie,ue.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||oe.intersectsObject(L))){const Le=Y.update(L),Ge=L.material;if(se&&(L.boundingSphere!==void 0?(L.boundingSphere===null&&L.computeBoundingSphere(),ue.copy(L.boundingSphere.center)):(Le.boundingSphere===null&&Le.computeBoundingSphere(),ue.copy(Le.boundingSphere.center)),ue.applyMatrix4(L.matrixWorld).applyMatrix4(ae)),Array.isArray(Ge)){const Ue=Le.groups;for(let Qe=0,tt=Ue.length;Qe0&&iu(J,K,ie),be.length>0&&iu(be,K,ie),Le.length>0&&iu(Le,K,ie),C.buffers.depth.setTest(!0),C.buffers.depth.setMask(!0),C.buffers.color.setMask(!0),C.setPolygonOffset(!1)}function mv(L,K,ie,se){if((ie.isScene===!0?ie.overrideMaterial:null)!==null)return;m.state.transmissionRenderTarget[se.id]===void 0&&(m.state.transmissionRenderTarget[se.id]=new os(1,1,{generateMipmaps:!0,type:G.has("EXT_color_buffer_half_float")||G.has("EXT_color_buffer_float")?za:Bi,minFilter:Qi,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:pt.workingColorSpace}));const be=m.state.transmissionRenderTarget[se.id],Le=se.viewport||D;be.setSize(Le.z*y.transmissionResolutionScale,Le.w*y.transmissionResolutionScale);const Ge=y.getRenderTarget();y.setRenderTarget(be),y.getClearColor(V),Q=y.getClearAlpha(),Q<1&&y.setClearColor(16777215,.5),y.clear(),N&&de.render(ie);const Ue=y.toneMapping;y.toneMapping=ts;const Qe=se.viewport;if(se.viewport!==void 0&&(se.viewport=void 0),m.setupLightsView(se),ge===!0&&Re.setGlobalState(y.clippingPlanes,se),iu(L,ie,se),H.updateMultisampleRenderTarget(be),H.updateRenderTargetMipmap(be),G.has("WEBGL_multisampled_render_to_texture")===!1){let tt=!1;for(let qe=0,dt=K.length;qe0),qe=!!ie.morphAttributes.position,dt=!!ie.morphAttributes.normal,At=!!ie.morphAttributes.color;let zt=ts;se.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(zt=y.toneMapping);const Wt=ie.morphAttributes.position||ie.morphAttributes.normal||ie.morphAttributes.color,yt=Wt!==void 0?Wt.length:0,Ye=F.get(se),dn=m.state.lights;if(ge===!0&&(Se===!0||L!==E)){const In=L===E&&se.id===M;Re.setState(se,L,In)}let Mt=!1;se.version===Ye.__version?(Ye.needsLights&&Ye.lightsStateVersion!==dn.state.version||Ye.outputColorSpace!==Ge||J.isBatchedMesh&&Ye.batching===!1||!J.isBatchedMesh&&Ye.batching===!0||J.isBatchedMesh&&Ye.batchingColor===!0&&J.colorTexture===null||J.isBatchedMesh&&Ye.batchingColor===!1&&J.colorTexture!==null||J.isInstancedMesh&&Ye.instancing===!1||!J.isInstancedMesh&&Ye.instancing===!0||J.isSkinnedMesh&&Ye.skinning===!1||!J.isSkinnedMesh&&Ye.skinning===!0||J.isInstancedMesh&&Ye.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&Ye.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&Ye.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&Ye.instancingMorph===!1&&J.morphTexture!==null||Ye.envMap!==Ue||se.fog===!0&&Ye.fog!==be||Ye.numClippingPlanes!==void 0&&(Ye.numClippingPlanes!==Re.numPlanes||Ye.numIntersection!==Re.numIntersection)||Ye.vertexAlphas!==Qe||Ye.vertexTangents!==tt||Ye.morphTargets!==qe||Ye.morphNormals!==dt||Ye.morphColors!==At||Ye.toneMapping!==zt||Ye.morphTargetsCount!==yt)&&(Mt=!0):(Mt=!0,Ye.__version=se.version);let wi=Ye.currentProgram;Mt===!0&&(wi=su(se,K,J));let Uo=!1,ni=!1,ja=!1;const kt=wi.getUniforms(),ci=Ye.uniforms;if(C.useProgram(wi.program)&&(Uo=!0,ni=!0,ja=!0),se.id!==M&&(M=se.id,ni=!0),Uo||E!==L){C.buffers.depth.getReversed()?($.copy(L.projectionMatrix),hP($),dP($),kt.setValue(A,"projectionMatrix",$)):kt.setValue(A,"projectionMatrix",L.projectionMatrix),kt.setValue(A,"viewMatrix",L.matrixWorldInverse);const Xn=kt.map.cameraPosition;Xn!==void 0&&Xn.setValue(A,le.setFromMatrixPosition(L.matrixWorld)),X.logarithmicDepthBuffer&&kt.setValue(A,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(se.isMeshPhongMaterial||se.isMeshToonMaterial||se.isMeshLambertMaterial||se.isMeshBasicMaterial||se.isMeshStandardMaterial||se.isShaderMaterial)&&kt.setValue(A,"isOrthographic",L.isOrthographicCamera===!0),E!==L&&(E=L,ni=!0,ja=!0)}if(J.isSkinnedMesh){kt.setOptional(A,J,"bindMatrix"),kt.setOptional(A,J,"bindMatrixInverse");const In=J.skeleton;In&&(In.boneTexture===null&&In.computeBoneTexture(),kt.setValue(A,"boneTexture",In.boneTexture,H))}J.isBatchedMesh&&(kt.setOptional(A,J,"batchingTexture"),kt.setValue(A,"batchingTexture",J._matricesTexture,H),kt.setOptional(A,J,"batchingIdTexture"),kt.setValue(A,"batchingIdTexture",J._indirectTexture,H),kt.setOptional(A,J,"batchingColorTexture"),J._colorsTexture!==null&&kt.setValue(A,"batchingColorTexture",J._colorsTexture,H));const ui=ie.morphAttributes;if((ui.position!==void 0||ui.normal!==void 0||ui.color!==void 0)&&Ne.update(J,ie,wi),(ni||Ye.receiveShadow!==J.receiveShadow)&&(Ye.receiveShadow=J.receiveShadow,kt.setValue(A,"receiveShadow",J.receiveShadow)),se.isMeshGouraudMaterial&&se.envMap!==null&&(ci.envMap.value=Ue,ci.flipEnvMap.value=Ue.isCubeTexture&&Ue.isRenderTargetTexture===!1?-1:1),se.isMeshStandardMaterial&&se.envMap===null&&K.environment!==null&&(ci.envMapIntensity.value=K.environmentIntensity),ni&&(kt.setValue(A,"toneMappingExposure",y.toneMappingExposure),Ye.needsLights&&nC(ci,ja),be&&se.fog===!0&&ee.refreshFogUniforms(ci,be),ee.refreshMaterialUniforms(ci,se,Z,te,m.state.transmissionRenderTarget[L.id]),Ef.upload(A,_v(Ye),ci,H)),se.isShaderMaterial&&se.uniformsNeedUpdate===!0&&(Ef.upload(A,_v(Ye),ci,H),se.uniformsNeedUpdate=!1),se.isSpriteMaterial&&kt.setValue(A,"center",J.center),kt.setValue(A,"modelViewMatrix",J.modelViewMatrix),kt.setValue(A,"normalMatrix",J.normalMatrix),kt.setValue(A,"modelMatrix",J.matrixWorld),se.isShaderMaterial||se.isRawShaderMaterial){const In=se.uniformsGroups;for(let Xn=0,cp=In.length;Xn0&&H.useMultisampledRTT(L)===!1?J=F.get(L).__webglMultisampledFramebuffer:Array.isArray(tt)?J=tt[ie]:J=tt,D.copy(L.viewport),B.copy(L.scissor),z=L.scissorTest}else D.copy(re).multiplyScalar(Z).floor(),B.copy(xe).multiplyScalar(Z).floor(),z=We;if(ie!==0&&(J=sC),C.bindFramebuffer(A.FRAMEBUFFER,J)&&se&&C.drawBuffers(L,J),C.viewport(D),C.scissor(B),C.setScissorTest(z),be){const Ue=F.get(L.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ue.__webglTexture,ie)}else if(Le){const Ue=F.get(L.texture),Qe=K;A.framebufferTextureLayer(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,Ue.__webglTexture,ie,Qe)}else if(L!==null&&ie!==0){const Ue=F.get(L.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,Ue.__webglTexture,ie)}M=-1},this.readRenderTargetPixels=function(L,K,ie,se,J,be,Le,Ge=0){if(!(L&&L.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ue=F.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Le!==void 0&&(Ue=Ue[Le]),Ue){C.bindFramebuffer(A.FRAMEBUFFER,Ue);try{const Qe=L.textures[Ge],tt=Qe.format,qe=Qe.type;if(!X.textureFormatReadable(tt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!X.textureTypeReadable(qe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}K>=0&&K<=L.width-se&&ie>=0&&ie<=L.height-J&&(L.textures.length>1&&A.readBuffer(A.COLOR_ATTACHMENT0+Ge),A.readPixels(K,ie,se,J,we.convert(tt),we.convert(qe),be))}finally{const Qe=P!==null?F.get(P).__webglFramebuffer:null;C.bindFramebuffer(A.FRAMEBUFFER,Qe)}}},this.readRenderTargetPixelsAsync=async function(L,K,ie,se,J,be,Le,Ge=0){if(!(L&&L.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ue=F.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Le!==void 0&&(Ue=Ue[Le]),Ue)if(K>=0&&K<=L.width-se&&ie>=0&&ie<=L.height-J){C.bindFramebuffer(A.FRAMEBUFFER,Ue);const Qe=L.textures[Ge],tt=Qe.format,qe=Qe.type;if(!X.textureFormatReadable(tt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!X.textureTypeReadable(qe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const dt=A.createBuffer();A.bindBuffer(A.PIXEL_PACK_BUFFER,dt),A.bufferData(A.PIXEL_PACK_BUFFER,be.byteLength,A.STREAM_READ),L.textures.length>1&&A.readBuffer(A.COLOR_ATTACHMENT0+Ge),A.readPixels(K,ie,se,J,we.convert(tt),we.convert(qe),0);const At=P!==null?F.get(P).__webglFramebuffer:null;C.bindFramebuffer(A.FRAMEBUFFER,At);const zt=A.fenceSync(A.SYNC_GPU_COMMANDS_COMPLETE,0);return A.flush(),await fP(A,zt,4),A.bindBuffer(A.PIXEL_PACK_BUFFER,dt),A.getBufferSubData(A.PIXEL_PACK_BUFFER,0,be),A.deleteBuffer(dt),A.deleteSync(zt),be}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(L,K=null,ie=0){const se=Math.pow(2,-ie),J=Math.floor(L.image.width*se),be=Math.floor(L.image.height*se),Le=K!==null?K.x:0,Ge=K!==null?K.y:0;H.setTexture2D(L,0),A.copyTexSubImage2D(A.TEXTURE_2D,ie,0,0,Le,Ge,J,be),C.unbindTexture()};const rC=A.createFramebuffer(),oC=A.createFramebuffer();this.copyTextureToTexture=function(L,K,ie=null,se=null,J=0,be=null){be===null&&(J!==0?(ga("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),be=J,J=0):be=0);let Le,Ge,Ue,Qe,tt,qe,dt,At,zt;const Wt=L.isCompressedTexture?L.mipmaps[be]:L.image;if(ie!==null)Le=ie.max.x-ie.min.x,Ge=ie.max.y-ie.min.y,Ue=ie.isBox3?ie.max.z-ie.min.z:1,Qe=ie.min.x,tt=ie.min.y,qe=ie.isBox3?ie.min.z:0;else{const ui=Math.pow(2,-J);Le=Math.floor(Wt.width*ui),Ge=Math.floor(Wt.height*ui),L.isDataArrayTexture?Ue=Wt.depth:L.isData3DTexture?Ue=Math.floor(Wt.depth*ui):Ue=1,Qe=0,tt=0,qe=0}se!==null?(dt=se.x,At=se.y,zt=se.z):(dt=0,At=0,zt=0);const yt=we.convert(K.format),Ye=we.convert(K.type);let dn;K.isData3DTexture?(H.setTexture3D(K,0),dn=A.TEXTURE_3D):K.isDataArrayTexture||K.isCompressedArrayTexture?(H.setTexture2DArray(K,0),dn=A.TEXTURE_2D_ARRAY):(H.setTexture2D(K,0),dn=A.TEXTURE_2D),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,K.flipY),A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),A.pixelStorei(A.UNPACK_ALIGNMENT,K.unpackAlignment);const Mt=A.getParameter(A.UNPACK_ROW_LENGTH),wi=A.getParameter(A.UNPACK_IMAGE_HEIGHT),Uo=A.getParameter(A.UNPACK_SKIP_PIXELS),ni=A.getParameter(A.UNPACK_SKIP_ROWS),ja=A.getParameter(A.UNPACK_SKIP_IMAGES);A.pixelStorei(A.UNPACK_ROW_LENGTH,Wt.width),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,Wt.height),A.pixelStorei(A.UNPACK_SKIP_PIXELS,Qe),A.pixelStorei(A.UNPACK_SKIP_ROWS,tt),A.pixelStorei(A.UNPACK_SKIP_IMAGES,qe);const kt=L.isDataArrayTexture||L.isData3DTexture,ci=K.isDataArrayTexture||K.isData3DTexture;if(L.isDepthTexture){const ui=F.get(L),In=F.get(K),Xn=F.get(ui.__renderTarget),cp=F.get(In.__renderTarget);C.bindFramebuffer(A.READ_FRAMEBUFFER,Xn.__webglFramebuffer),C.bindFramebuffer(A.DRAW_FRAMEBUFFER,cp.__webglFramebuffer);for(let Ur=0;Ur{n.delete(r)};return{on:r=>{n.add(r);const o=()=>e(r);return Er(o),{off:o}},off:e,trigger:(...r)=>Promise.all(Array.from(n).map(o=>o(...r))),clear:()=>{n.clear()}}}const um=new WeakMap,wF=(...n)=>{var e;const t=n[0],i=(e=Rn())==null?void 0:e.proxy;if(i==null&&!Ic())throw new Error("injectLocal must be called in setup");return i&&um.has(i)&&t in um.get(i)?um.get(i)[t]:_n(...n)},Cg=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const AF=n=>typeof n<"u",CF=n=>n!=null,RF=Object.prototype.toString,PF=n=>RF.call(n)==="[object Object]",Rg=()=>{};function IF(n,e){function t(...i){return new Promise((s,r)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(r)})}return t}function LF(n,e={}){let t,i,s=Rg;const r=l=>{clearTimeout(l),s(),s=Rg};let o;return l=>{const c=rt(n),u=rt(e.maxWait);return t&&r(t),c<=0||u!==void 0&&u<=0?(i&&(r(i),i=null),Promise.resolve(l())):new Promise((f,h)=>{s=e.rejectOnCancel?h:f,o=l,u&&!i&&(i=setTimeout(()=>{t&&r(t),i=null,f(o())},u)),t=setTimeout(()=>{i&&r(i),i=null,f(l())},c)})}}function Hb(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function DF(n,e,t=!1){return e.reduce((i,s)=>(s in n&&(!t||n[s]!==void 0)&&(i[s]=n[s]),i),{})}function OF(n){return Rn()}function Nl(n){return Array.isArray(n)?n:[n]}function NF(n,e=200,t={}){return IF(LF(e,t),n)}function Gb(n,e=200,t={}){const i=nt(n.value),s=NF(()=>{i.value=n.value},e,t);return je(n,()=>s()),i}function UF(n,e={}){if(!Lt(n))return vS(n);const t=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const i in n.value)t[i]=R0(()=>({get(){return n.value[i]},set(s){var r;if((r=rt(e.replaceRef))!=null?r:!0)if(Array.isArray(n.value)){const a=[...n.value];a[i]=s,n.value=a}else{const a={...n.value,[i]:s};Object.setPrototypeOf(a,Object.getPrototypeOf(n.value)),n.value=a}else n.value[i]=s}}));return t}const pn=rt;function P_(n,e=!0,t){OF()?Gn(n,t):e?n():Ar(n)}function FF(n,e=1e3,t={}){const{immediate:i=!0,immediateCallback:s=!1}=t;let r=null;const o=Oe(!1);function a(){r&&(clearInterval(r),r=null)}function l(){o.value=!1,a()}function c(){const u=rt(e);u<=0||(o.value=!0,s&&n(),a(),o.value&&(r=setInterval(n,u)))}if(i&&Cg&&c(),Lt(e)||typeof e=="function"){const u=je(e,()=>{o.value&&Cg&&c()});Er(u)}return Er(l),{isActive:o,pause:l,resume:c}}function gT(n,e,t){return je(n,e,{...t,immediate:!0})}const $s=Cg?window:void 0;function Di(n){var e;const t=rt(n);return(e=t==null?void 0:t.$el)!=null?e:t}function Ao(...n){const e=[],t=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=Ee(()=>{const a=Nl(rt(n[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=gT(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>Di(c)))!=null?l:[$s].filter(c=>c!=null),Nl(rt(s.value?n[1]:n[0])),Nl(Ft(s.value?n[2]:n[1])),rt(s.value?n[3]:n[2])]},([a,l,c,u])=>{if(t(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const f=PF(u)?{...u}:u;e.push(...a.flatMap(h=>l.flatMap(d=>c.map(p=>i(h,d,p,f)))))},{flush:"post"}),o=()=>{r(),t()};return Er(t),o}function kF(){const n=Oe(!1),e=Rn();return e&&Gn(()=>{n.value=!0},e),n}function zd(n){const e=kF();return Ee(()=>(e.value,!!n()))}function BF(n,e,t={}){const{window:i=$s,...s}=t;let r;const o=zd(()=>i&&"MutationObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const h=rt(n),d=Nl(h).map(Di).filter(CF);return new Set(d)}),c=je(()=>l.value,h=>{a(),o.value&&h.size&&(r=new MutationObserver(e),h.forEach(d=>r.observe(d,s)))},{immediate:!0,flush:"post"}),u=()=>r==null?void 0:r.takeRecords(),f=()=>{c(),a()};return Er(f),{isSupported:o,stop:f,takeRecords:u}}function I_(n,e={}){const{immediate:t=!0,fpsLimit:i=void 0,window:s=$s,once:r=!1}=e,o=Oe(!1),a=Ee(()=>i?1e3/rt(i):null);let l=0,c=null;function u(d){if(!o.value||!s)return;l||(l=d);const p=d-l;if(a.value&&pt&&"matchMedia"in t&&typeof t.matchMedia=="function"),r=Oe(typeof i=="number"),o=Oe(),a=Oe(!1),l=c=>{a.value=c.matches};return Lc(()=>{if(r.value){r.value=!s.value;const c=rt(n).split(",");a.value=c.some(u=>{const f=u.includes("not all"),h=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),d=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(h||d);return h&&p&&(p=i>=Hb(h[1])),d&&p&&(p=i<=Hb(d[1])),f?!p:p});return}s.value&&(o.value=t.matchMedia(rt(n)),a.value=o.value.matches)}),Ao(o,"change",l,{passive:!0}),Ee(()=>a.value)}function HF(n){return JSON.parse(JSON.stringify(n))}function GF(n={}){const{window:e=$s}=n,t=Oe(1),i=_T(()=>`(resolution: ${t.value}dppx)`,n);let s=Rg;return e&&(s=gT(i,()=>t.value=e.devicePixelRatio)),{pixelRatio:Fi(t),stop:s}}function vT(n,e,t={}){const{window:i=$s,...s}=t;let r;const o=zd(()=>i&&"ResizeObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const f=rt(n);return Array.isArray(f)?f.map(h=>Di(h)):[Di(f)]}),c=je(l,f=>{if(a(),o.value&&i){r=new ResizeObserver(e);for(const h of f)h&&r.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Er(u),{isSupported:o,stop:u}}function WF(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:s=!0,immediate:r=!0,updateTiming:o="sync"}=e,a=Oe(0),l=Oe(0),c=Oe(0),u=Oe(0),f=Oe(0),h=Oe(0),d=Oe(0),p=Oe(0);function _(){const m=Di(n);if(!m){t&&(a.value=0,l.value=0,c.value=0,u.value=0,f.value=0,h.value=0,d.value=0,p.value=0);return}const v=m.getBoundingClientRect();a.value=v.height,l.value=v.bottom,c.value=v.left,u.value=v.right,f.value=v.top,h.value=v.width,d.value=v.x,p.value=v.y}function g(){o==="sync"?_():o==="next-frame"&&requestAnimationFrame(()=>_())}return vT(n,g),je(()=>Di(n),m=>!m&&g()),BF(n,g,{attributeFilter:["style","class"]}),s&&Ao("scroll",g,{capture:!0,passive:!0}),i&&Ao("resize",g,{passive:!0}),P_(()=>{r&&g()}),{height:a,bottom:l,left:c,right:u,top:f,width:h,x:d,y:p,update:g}}function XF(n,e={width:0,height:0},t={}){const{window:i=$s,box:s="content-box"}=t,r=Ee(()=>{var f,h;return(h=(f=Di(n))==null?void 0:f.namespaceURI)==null?void 0:h.includes("svg")}),o=Oe(e.width),a=Oe(e.height),{stop:l}=vT(n,([f])=>{const h=s==="border-box"?f.borderBoxSize:s==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(i&&r.value){const d=Di(n);if(d){const p=d.getBoundingClientRect();o.value=p.width,a.value=p.height}}else if(h){const d=Nl(h);o.value=d.reduce((p,{inlineSize:_})=>p+_,0),a.value=d.reduce((p,{blockSize:_})=>p+_,0)}else o.value=f.contentRect.width,a.value=f.contentRect.height},t);P_(()=>{const f=Di(n);f&&(o.value="offsetWidth"in f?f.offsetWidth:e.width,a.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=je(()=>Di(n),f=>{o.value=f?e.width:0,a.value=f?e.height:0});function u(){l(),c()}return{width:o,height:a,stop:u}}function $F(n){var e;const t=Oe(0);if(typeof performance>"u")return t;const i=(e=n==null?void 0:n.every)!=null?e:10;let s=performance.now(),r=0;return I_(()=>{if(r+=1,r>=i){const o=performance.now(),a=o-s;t.value=Math.round(1e3/(a/r)),s=o,r=0}}),t}function qF(n={}){const e=nt(),t=zd(()=>typeof performance<"u"&&"memory"in performance);if(t.value){const{interval:i=1e3}=n;FF(()=>{e.value=performance.memory},i,{immediate:n.immediate,immediateCallback:n.immediateCallback})}return{isSupported:t,memory:e}}const yT={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},YF=Object.keys(yT);function jF(n={}){const{target:e=$s}=n,t=Oe(!1),i=nt(n.initialValue||{});Object.assign(i.value,yT,i.value);const s=r=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(r.pointerType))&&(i.value=DF(r,YF,!1))};if(e){const r={passive:!0};Ao(e,["pointerdown","pointermove","pointerup"],s,r),Ao(e,"pointerleave",()=>t.value=!1,r)}return{...UF(i),isInside:t}}function RG(n,e,t,i={}){var s,r,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:h}=i,d=Rn(),p=t||(d==null?void 0:d.emit)||((s=d==null?void 0:d.$emit)==null?void 0:s.bind(d))||((o=(r=d==null?void 0:d.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let _=c;_=_||`update:${e.toString()}`;const g=b=>a?typeof a=="function"?a(b):HF(b):b,m=()=>AF(n[e])?g(n[e]):f,v=b=>{h?h(b)&&p(_,b):p(_,b)};if(l){const b=m(),y=nt(b);let T=!1;return je(()=>n[e],w=>{T||(T=!0,y.value=g(w),Ar(()=>T=!1))}),je(y,w=>{!T&&(w!==n[e]||u)&&v(w)},{deep:u}),y}else return Ee({get(){return m()},set(b){v(b)}})}function KF(n={}){const{window:e=$s,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:r=!0,type:o="inner"}=n,a=Oe(t),l=Oe(i),c=()=>{if(e)if(o==="outer")a.value=e.outerWidth,l.value=e.outerHeight;else if(o==="visual"&&e.visualViewport){const{width:f,height:h,scale:d}=e.visualViewport;a.value=Math.round(f*d),l.value=Math.round(h*d)}else r?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),P_(c);const u={passive:!0};if(Ao("resize",c,u),e&&o==="visual"&&e.visualViewport&&Ao(e.visualViewport,"resize",c,u),s){const f=_T("(orientation: portrait)");je(f,()=>c())}return{width:a,height:l}}var ZF=Object.defineProperty,JF=(n,e,t)=>e in n?ZF(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wb=(n,e,t)=>JF(n,typeof e!="symbol"?e+"":e,t);const QF="@tresjs/core",ek="module",tk="4.3.5",nk="pnpm@10.6.3",ik="Declarative ThreeJS using Vue Components",sk="Alvaro Saburido (https://github.com/alvarosabu/)",rk="MIT",ok={type:"git",url:"git+https://github.com/Tresjs/tres.git"},ak=["vue","3d","threejs","three","threejs-vue"],lk=!1,ck={".":{types:"./dist/index.d.ts",import:"./dist/tres.js",require:"./dist/tres.umd.cjs"},"./components":{types:"./dist/src/components/index.d.ts"},"./composables":{types:"./dist/src/composables/index.d.ts"},"./types":{types:"./dist/src/types/index.d.ts"},"./utils":{types:"./dist/src/utils/index.d.ts"},"./*":"./*"},uk="./dist/tres.js",fk="./dist/tres.js",hk="./dist/index.d.ts",dk=["*.d.ts","dist"],pk={access:"public"},mk={dev:"pnpm --filter='./playground/vue' dev","dev:nuxt":"pnpm --filter='./playground/nuxt' dev",build:"vite build",test:"vitest","test:ci":"vitest run","test:ui":"vitest --ui --coverage.enabled=true",release:"release-it",coverage:"vitest run --coverage",lint:"eslint .","lint:fix":"eslint . --fix","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:serve":"vitepress serve docs","docs:preview":"vitepress preview docs","docs:contributors":"esno scripts/update-contributors.ts"},gk={three:">=0.133",vue:">=3.4"},_k={"@alvarosabu/utils":"^3.2.0","@vue/devtools-api":"^6.6.3","@vueuse/core":"^12.5.0"},vk={"@release-it/conventional-changelog":"^10.0.0","@stackblitz/sdk":"^1.11.0","@tresjs/cientos":"4.1.0","@tresjs/eslint-config":"^1.4.0","@types/three":"^0.173.0","@typescript-eslint/eslint-plugin":"^8.23.0","@typescript-eslint/parser":"^8.23.0","@vitejs/plugin-vue":"^5.2.1","@vitest/coverage-c8":"^0.33.0","@vitest/coverage-v8":"^3.0.5","@vitest/ui":"^3.0.5","@vue/test-utils":"^2.4.6",eslint:"^9.19.0","eslint-plugin-vue":"^9.32.0",esno:"^4.8.0",gsap:"^3.12.7",jsdom:"^26.0.0",kolorist:"^1.8.0",ohmyfetch:"^0.4.21",pathe:"^2.0.2","release-it":"^18.1.2","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-copy":"^3.5.0","rollup-plugin-visualizer":"^5.14.0",sponsorkit:"^16.3.0",three:"^0.173.0",unocss:"^65.4.3",unplugin:"^2.1.2","unplugin-vue-components":"^28.0.0",vite:"^6.1.0","vite-plugin-banner":"^0.8.0","vite-plugin-dts":"4.5.0","vite-plugin-inspect":"^10.1.0","vite-plugin-require-transform":"^1.0.21","vite-svg-loader":"^5.1.0",vitepress:"1.6.3",vitest:"3.0.5",vue:"3.5.13","vue-demi":"^0.14.10"},yk={name:QF,type:ek,version:tk,packageManager:nk,description:ik,author:sk,license:rk,repository:ok,keywords:ak,sideEffects:lk,exports:ck,main:uk,module:fk,types:hk,files:dk,publishConfig:pk,scripts:mk,peerDependencies:gk,dependencies:_k,devDependencies:vk};class bk extends jt{constructor(...e){super(...e),Wb(this,"type","HightlightMesh"),Wb(this,"createTime"),this.createTime=Date.now()}onBeforeRender(){const e=(Date.now()-this.createTime)/1e3,t=1+.07*Math.sin(2.5*e);this.scale.set(t,t,t)}}function Pg(n){return typeof n>"u"}function L_(n){return Array.isArray(n)}function xk(n){return typeof n=="number"}function bT(n){return typeof n=="string"}function fa(n){return typeof n=="function"}function cs(n){return n===Object(n)&&!L_(n)&&!fa(n)}function pr(n){return cs(n)&&!!n.isObject3D}function xT(n){return cs(n)&&!!n.isColor}function Mk(n){return n!=null&&(typeof n=="string"||typeof n=="number"||xT(n))}function Ig(n){return n!==null&&typeof n=="object"&&"set"in n&&typeof n.set=="function"}function Sk(n){return Ig(n)&&"copy"in n&&typeof n.copy=="function"}function Ek(n){return!!(n!=null&&n.constructor)}function Xb(n){return n instanceof Bc}function $b(n){return cs(n)&&!!n.isCamera}function Tk(n){return cs(n)&&!!n.isBufferGeometry}function wk(n){return cs(n)&&!!n.isMaterial}function Ak(n){return cs(n)&&!!n.isLight}function Ck(n){return cs(n)&&!!n.isFog}function Rk(n){return cs(n)&&!!n.isScene}function nf(n){return pr(n)||Tk(n)||wk(n)||Ck(n)}function Pk(n){return cs(n)&&!!n.isPrimitive}const MT=(n,e)=>{for(const t of Object.keys(e))e[t]instanceof Object&&Object.assign(e[t],MT(n[t],e[t]));return Object.assign(n||{},e),n},Ik="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Lk=Nk(Ik);function qb(n){return n&&n.nodeType===1}function fm(n){return n.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const Dk=/\B([A-Z])/g;function Ok(n){return n.replace(Dk,"-$1").toLowerCase()}function Nk(n,e){const t=Object.create(null),i=n.split(",");for(let s=0;s!!t[s.toLowerCase()]:s=>!!t[s]}const Yb=(n,e)=>{if(!e)return;const t=Array.isArray(e)?e:e.match(/([^[.\]])+/g);return t==null?void 0:t.reduce((i,s)=>i&&i[s],n)},Uk=(n,e,t)=>{const i=Array.isArray(e)?e:e.match(/([^[.\]])+/g);i&&i.reduce((s,r,o)=>(s[r]===void 0&&(s[r]={}),o===i.length-1&&(s[r]=t),s[r]),n)};function ST(n,e){if(qb(n)&&qb(e)){const s=n.attributes,r=e.attributes;return s.length!==r.length?!1:Array.from(s).every(({name:o,value:a})=>e.getAttribute(o)===a)}if(n===e)return!0;if(n===null||typeof n!="object"||e===null||typeof e!="object")return!1;const t=Object.keys(n),i=Object.keys(e);if(t.length!==i.length)return!1;for(const s of t)if(!i.includes(s)||!ST(n[s],e[s]))return!1;return!0}function Fk(n,e){if(!Array.isArray(n)||!Array.isArray(e)||n.length!==e.length)return!1;for(let t=0;t{if(l.uuid===e)return l;for(const c of l.children){const u=s(c);if(u)return u}},r=s(n);if(!r){console.warn("Object with UUID not found in the scene.");return}let o=r;for(let l=0;lET(i)),!(n instanceof vd)){const i=n;n&&((t=n.dispose)==null||t.call(n)),i.geometry&&i.geometry.dispose(),Array.isArray(i.material)?i.material.forEach(s=>jb(s)):i.material&&jb(i.material)}}function Vk(n,e){let t=0;for(let i=0;it===0?e:e.charAt(0).toUpperCase()+e.slice(1)).join("")}const Zb=/-\d+$/;function Hk(n,e,t){if(bT(t)){if(Zb.test(t)){const r=t.replace(Zb,""),{target:o,key:a}=Lg(n,r);if(!Array.isArray(o[a])){const l=o[a],c=[];c.__tresDetach=()=>{c.every(u=>Pg(u))&&(o[a]=l)},o[a]=c}}const{target:i,key:s}=Lg(n,t);e.__tres.previousAttach=i[s],i[s]=La(e)}else e.__tres.previousAttach=t(n,e)}function Gk(n,e,t){var i,s,r;if(bT(t)){const{target:o,key:a}=Lg(n,t),l=e.__tres.previousAttach;l===void 0?delete o[a]:o[a]=l,"__tresDetach"in o&&o.__tresDetach()}else(s=(i=e.__tres)==null?void 0:i.previousAttach)==null||s.call(i,n,e);(r=e.__tres)==null||delete r.previousAttach}function oo(n,e,t){const i=n;return i.__tres={type:"unknown",eventCount:0,root:t,handlers:{},memoizedProps:{},objects:[],parent:null,previousAttach:null,...e},i.__tres.attach||(i.isMaterial?i.__tres.attach="material":i.isBufferGeometry?i.__tres.attach="geometry":i.isFog&&(i.__tres.attach="fog")),i}function TT(n){var e;const t=(e=n==null?void 0:n.__tres)==null?void 0:e.root;t&&t.render&&t.render.canBeInvalidated.value&&t.invalidate()}function Wk(n,e,t){var i;if(!fa(n.setPixelRatio))return;let s=0;if(t&&L_(t)&&t.length>=2){const[r,o]=t;s=n_.clamp(e,r,o)}else xk(t)?s=t:s=e;s!==((i=n.getPixelRatio)==null?void 0:i.call(n))&&n.setPixelRatio(s)}function Xk(n,e,t,i,s){const r=[...e.__tres.objects],o=La(e);if(n=La(n),o===n)return!0;const a=oo(n,e.__tres??{},s),l=e.parent??e.__tres.parent??null,c={...e.__tres.memoizedProps};delete c.object;for(const u of r)wT(u,s),AT(u,s);o.__tres.objects=[],i.remove(e);for(const[u,f]of Object.entries(c))i.patchProp(a,u,a[u],f);t(n),i.insert(e,l);for(const u of r)i.insert(u,e);return!0}function La(n){return Pk(n)?(n.object.__tres=n.__tres,n.object):n}function wT(n,e){var t,i,s,r;const o=((t=n.__tres)==null?void 0:t.parent)||e.scene.value;n.__tres&&(n.__tres.parent=null),o&&o.__tres&&"objects"in o.__tres&&Vk(o.__tres.objects,a=>a!==n),(i=n.__tres)!=null&&i.attach?Gk(o,n,n.__tres.attach):((r=(s=n.parent)==null?void 0:s.remove)==null||r.call(s,La(n)),n.parent=null)}function AT(n,e){var t;(t=n.traverse)==null||t.call(n,i=>{var s;e.deregisterCamera(i),(s=e.eventManager)==null||s.deregisterPointerMissedObject(i)}),e.deregisterCamera(n),TT(n)}const $k=({sizes:n})=>{const e=nt([]),t=Ee(()=>e.value[0]),i=o=>{const a=o instanceof zc?o:e.value.find(c=>c.uuid===o);if(!a)return;const l=e.value.filter(({uuid:c})=>c!==a.uuid);e.value=[a,...l]},s=(o,a=!1)=>{if($b(o)){const l=o;if(e.value.some(({uuid:c})=>c===l.uuid))return;a?i(l):e.value.push(l)}},r=o=>{if($b(o)){const a=o;e.value=e.value.filter(({uuid:l})=>l!==a.uuid)}};return Lc(()=>{n.aspectRatio.value&&e.value.forEach(o=>{!o.manual&&(o instanceof Jt||qk(o))&&(o instanceof Jt?o.aspect=n.aspectRatio.value:(o.left=n.width.value*-.5,o.right=n.width.value*.5,o.top=n.height.value*.5,o.bottom=n.height.value*-.5),o.updateProjectionMatrix())})}),rs(()=>{e.value=[]}),{camera:t,cameras:e,registerCamera:s,deregisterCamera:r,setCameraActive:i}};function qk(n){return n.hasOwnProperty("isOrthographicCamera")&&n.isOrthographicCamera}const Rh="[TresJS ▲ ■ ●] ";function Yk(...n){typeof n[0]=="string"?n[0]=Rh+n[0]:n.unshift(Rh),console.error(...n)}function jk(...n){typeof n[0]=="string"?n[0]=Rh+n[0]:n.unshift(Rh),console.warn(...n)}function Kk(n,e){}function CT(){return{logError:Yk,logWarning:jk,logMessage:Kk}}const Dg=nt({}),Og=n=>Object.assign(Dg.value,n);function hm(){const n=new Map,e=new Set;let t=0,i=!1;const s=()=>{const o=Array.from(n.entries()).sort((a,l)=>{const c=a[1].priority-l[1].priority;return c===0?a[1].addI-l[1].addI:c});e.clear(),o.forEach(a=>e.add(a[0]))},r=o=>{n.delete(o),e.delete(o)};return{on:(o,a=0)=>{n.set(o,{priority:a,addI:t++});const l=()=>r(o);return Er(l),i=!0,{off:l}},off:r,trigger:(...o)=>{i&&(s(),i=!1),e.forEach(a=>a(...o))},dispose:()=>{n.clear(),e.clear()},get count(){return n.size}}}function Zk(){let n=!0,e=!0,t=!1;const i=new kd(!1),s=nt(i.running),r=nt(!1);let o;const a=n_.generateUUID();let l=null;const c=hm(),u=hm(),f=hm();w();let h={};function d(S){h=S}function p(S,P,M=0){switch(P){case"before":return c.on(S,M);case"render":return l||(l=S),u.dispose(),u.on(S);case"after":return f.on(S,M)}}function _(){e&&(e=!1,w(),T())}function g(){e=!0,w(),cancelAnimationFrame(o)}function m(){t=!1,w()}function v(){t=!0,w()}function b(){r.value=!0}function y(){r.value=!1}function T(){if(!n){o=requestAnimationFrame(T);return}const S=i.getDelta(),P=i.getElapsedTime(),M={camera:Ft(h.camera),scene:Ft(h.scene),renderer:Ft(h.renderer),raycaster:Ft(h.raycaster),controls:Ft(h.controls),invalidate:h.invalidate,advance:h.advance},E={delta:S,elapsed:P,clock:i,...M};s.value&&c.trigger(E),r.value||(u.count?u.trigger(E):l&&l(E)),s.value&&f.trigger(E),o=requestAnimationFrame(T)}function w(){const S=!e&&!t;i.running!==S&&(i.running?i.stop():i.start()),s.value=i.running}return{loopId:a,register:(S,P,M)=>p(S,P,M),start:_,stop:g,pause:v,resume:m,pauseRender:b,resumeRender:y,isRenderPaused:r,isActive:s,setContext:d,setReady:S=>n=S}}function D_(n){let e=0;return n.traverse(t=>{if(t.isMesh&&t.geometry&&t.type!=="HightlightMesh"){const i=t.geometry,s=i.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,r=i.index?i.index.count*Uint32Array.BYTES_PER_ELEMENT:0,o=i.attributes.normal?i.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,a=i.attributes.uv?i.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,l=s+r+o+a;e+=l}}),e}function Jk(n){return(n/1024).toFixed(2)}const Qk=Number.parseInt(Uc.replace("dev",""));function eB(n){return n instanceof Pe?n:Array.isArray(n)?new Pe(...n):new Pe(n)}const sf={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:Fn,toneMapping:rd,toneMappingExposure:3,shadowMap:{enabled:!0,type:W0}},flat:{toneMapping:ts,toneMappingExposure:1}};function tB({canvas:n,options:e,contextParts:{sizes:t,render:i,invalidate:s,advance:r}}){const o=Ee(()=>({alpha:pn(e.alpha)??!0,depth:pn(e.depth),canvas:Di(n),context:pn(e.context),stencil:pn(e.stencil),antialias:pn(e.antialias)??!0,precision:pn(e.precision),powerPreference:pn(e.powerPreference),premultipliedAlpha:pn(e.premultipliedAlpha),preserveDrawingBuffer:pn(e.preserveDrawingBuffer),logarithmicDepthBuffer:pn(e.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:pn(e.failIfMajorPerformanceCaveat)})),a=Oe(new Tf(o.value));function l(){e.renderMode==="on-demand"&&s()}je(o,()=>{a.value.dispose(),a.value=new Tf(o.value),l()}),je([t.width,t.height],()=>{a.value.setSize(t.width.value,t.height.value),l()},{immediate:!0}),je(()=>e.clearColor,l);const{pixelRatio:c}=GF(),{logError:u}=CT(),f=(()=>{const d=new Tf,p={shadowMap:{enabled:d.shadowMap.enabled,type:d.shadowMap.type},toneMapping:d.toneMapping,toneMappingExposure:d.toneMappingExposure,outputColorSpace:d.outputColorSpace};return d.dispose(),p})(),h=pn(e.renderMode);return h==="on-demand"&&s(),h==="manual"&&setTimeout(()=>{r()},100),Lc(()=>{const d=pn(e.preset);d&&(d in sf||u(`Renderer Preset must be one of these: ${Object.keys(sf).join(", ")}`),MT(a.value,sf[d])),Wk(a.value,c.value,pn(e.dpr)),h==="always"&&(i.frames.value=Math.max(1,i.frames.value));const p=(m,v)=>{const b=pn(m),y=()=>{if(d)return Yb(sf[d],v)};if(b!==void 0)return b;const T=y();return T!==void 0?T:Yb(f,v)},_=(m,v)=>Uk(a.value,v,p(m,v));_(e.shadows,"shadowMap.enabled"),_(e.toneMapping??rd,"toneMapping"),_(e.shadowMapType,"shadowMap.type"),Qk<150&&_(!e.useLegacyLights,"physicallyCorrectLights"),_(e.outputColorSpace,"outputColorSpace"),_(e.toneMappingExposure,"toneMappingExposure");const g=p(e.clearColor,"clearColor");g&&a.value.setClearColor(g?eB(g):new Pe(0))}),rs(()=>{a.value.dispose(),a.value.forceContextLoss()}),{renderer:a}}function nB(n,e,t=10){const i=pn(n)?KF():XF(Ee(()=>pn(e).parentElement)),s=Fi(Gb(i.width,t)),r=Fi(Gb(i.height,t)),o=Ee(()=>s.value/r.value);return{height:r,width:s,aspectRatio:o}}const iB=(n,e)=>{const t=Ee(()=>e.renderer.value.domElement),i=Oe([]),{x:s,y:r}=jF({target:t});let o=0;const{width:a,height:l,top:c,left:u}=WF(t),f=({x:re,y:xe})=>{if(t.value)return{x:(re-u.value)/a.value*2-1,y:-((xe-c.value)/l.value)*2+1}},h=({x:re,y:xe})=>{if(e.camera.value)return e.raycaster.value.setFromCamera(new fe(re,xe),e.camera.value),i.value=e.raycaster.value.intersectObjects(n.value,!0),i.value},d=re=>{const xe=f({x:(re==null?void 0:re.clientX)??s.value,y:(re==null?void 0:re.clientY)??r.value});return xe?h(xe)||[]:[]},p=pi(),_=pi(),g=pi(),m=pi(),v=pi(),b=pi(),y=pi(),T=pi();function w(re){const xe={};for(const We in re)typeof We!="function"&&(xe[We]=re[We]);return xe}const S=(re,xe)=>{var We,oe,ge;const Se=w(xe),$=new k(xe==null?void 0:xe.clientX,xe==null?void 0:xe.clientY,0).unproject((We=e.camera)==null?void 0:We.value);re.trigger({...Se,intersections:i.value,unprojectedPoint:$,ray:(oe=e.raycaster)==null?void 0:oe.value.ray,camera:(ge=e.camera)==null?void 0:ge.value,sourceEvent:xe,delta:o,stopPropagating:!1})};let P;const M=re=>{d(re),S(g,re),P=re},E=()=>{P&&M(P)};let D,B,z;const V=re=>{var xe;D=(xe=i.value[0])==null?void 0:xe.object,o=0,B=new fe((re==null?void 0:re.clientX)??s.value,(re==null?void 0:re.clientY)??r.value),S(v,re)};let Q,j=!1;const te=re=>{var xe,We,oe;re instanceof PointerEvent&&(i.value.length===0&&S(b,re),D===((xe=i.value[0])==null?void 0:xe.object)&&(z=new fe((re==null?void 0:re.clientX)??s.value,(re==null?void 0:re.clientY)??r.value),o=B==null?void 0:B.distanceTo(z),re.button===0?(S(p,re),Q===((We=i.value[0])==null?void 0:We.object)?j=!0:(Q=(oe=i.value[0])==null?void 0:oe.object,j=!1)):re.button===2&&S(y,re)),S(m,re))},Z=re=>{j&&(S(_,re),Q=void 0,j=!1)},pe=re=>S(g,re),Me=re=>S(T,re);return t.value.addEventListener("pointerup",te),t.value.addEventListener("pointerdown",V),t.value.addEventListener("pointermove",M),t.value.addEventListener("pointerleave",pe),t.value.addEventListener("dblclick",Z),t.value.addEventListener("wheel",Me),rs(()=>{t!=null&&t.value&&(t.value.removeEventListener("pointerup",te),t.value.removeEventListener("pointerdown",V),t.value.removeEventListener("pointermove",M),t.value.removeEventListener("pointerleave",pe),t.value.removeEventListener("dblclick",Z),t.value.removeEventListener("wheel",Me))}),{intersects:i,onClick:re=>p.on(re).off,onDblClick:re=>_.on(re).off,onContextMenu:re=>y.on(re).off,onPointerMove:re=>g.on(re).off,onPointerUp:re=>m.on(re).off,onPointerDown:re=>v.on(re).off,onPointerMissed:re=>b.on(re).off,onWheel:re=>T.on(re).off,forceUpdate:E}};function dm(n,e){if(Array.isArray(n))for(const t of n)t(e);typeof n=="function"&&n(e)}function sB(n,e,t){var i;const s=Oe(),r=Oe();n&&(s.value=n),e&&(r.value=e);const o=M=>{var E;return((E=M.__tres)==null?void 0:E.eventCount)>0},a=M=>{var E;return((E=M.children)==null?void 0:E.some(D=>a(D)))||o(M)},l=Oe(((i=s.value)==null?void 0:i.children).filter(a)||[]);function c(M,E){const D=[],B=()=>E.stopPropagating=!0;E.stopPropagation=B;for(const z of E==null?void 0:E.intersections){if(E.stopPropagating)return;E={...E,...z};const{object:V}=z;E.eventObject=V,dm(V[M],E),D.push(V);let Q=V.parent;for(;Q!==null&&!E.stopPropagating&&!D.includes(Q);)E.eventObject=Q,dm(Q[M],E),D.push(Q),Q=Q.parent;const j=Ok(M.slice(2));t(j,{intersection:z,event:E})}}const{onClick:u,onDblClick:f,onContextMenu:h,onPointerMove:d,onPointerDown:p,onPointerUp:_,onPointerMissed:g,onWheel:m,forceUpdate:v}=iB(l,e);_(M=>c("onPointerUp",M)),p(M=>c("onPointerDown",M)),u(M=>c("onClick",M)),f(M=>c("onDoubleClick",M)),h(M=>c("onContextMenu",M)),m(M=>c("onWheel",M));let b=[];d(M=>{const E=M.intersections.map(({object:B})=>B),D=M.intersections;b.forEach(({object:B})=>{E.includes(B)||(M.intersections=b,c("onPointerLeave",M),c("onPointerOut",M))}),M.intersections=D,M.intersections.forEach(({object:B})=>{b.includes(B)||(c("onPointerEnter",M),c("onPointerOver",M))}),c("onPointerMove",M),b=M.intersections});const y=[];g(M=>{const E=()=>M.stopPropagating=!0;M.stopPropagation=E,y.forEach(D=>{M.stopPropagating||(M.eventObject=D,dm(D.onPointerMissed,M))}),t("pointer-missed",{event:M})});function T(M){nf(M)&&pr(M)&&l.value.push(M)}function w(M){if(nf(M)&&pr(M)){const E=l.value.indexOf(M);E>-1&&l.value.splice(E,1)}}function S(M){nf(M)&&pr(M)&&M.onPointerMissed&&y.push(M)}function P(M){if(nf(M)&&pr(M)){const E=y.indexOf(M);E>-1&&y.splice(E,1)}}return e.eventManager={forceUpdate:v,registerObject:T,deregisterObject:w,registerPointerMissedObject:S,deregisterPointerMissedObject:P},{forceUpdate:v,registerObject:T,deregisterObject:w,registerPointerMissedObject:S,deregisterPointerMissedObject:P}}function rB(n,e,t=100){t=t<=0?100:t;const i=pi(),s=new Set;let r=!1,o=!1,a=null;function l(){a&&clearTimeout(a),!o&&!r&&n()?(i.trigger(e),s.forEach(f=>f()),s.clear(),r=!0):!o&&!r&&(a=setTimeout(l,t))}function c(){o=!0,a&&clearTimeout(a)}l();const u=(f,...h)=>{f(...h)};return{on:f=>{if(r)return u(f,e),{off:()=>{}};{const h=i.on(f);return s.add(h.off),i.on(f)}},off:i.off,trigger:i.trigger,clear:i.clear,cancel:c}}const pm=new WeakMap;function oB(n){if(n=n||RT(),pm.has(n))return pm.get(n);const e=100,t=Date.now(),i=rB(()=>{if(Date.now()-t>=e)return!0;{const s=n.renderer.value,r=(s==null?void 0:s.domElement)||{width:0,height:0};return!!(s&&r.width>0&&r.height>0)}},n);return pm.set(n,i),i}function aB({scene:n,canvas:e,windowSize:t,rendererOptions:i,emit:s}){const r=Oe(n),o=nB(t,e),{camera:a,cameras:l,registerCamera:c,deregisterCamera:u,setCameraActive:f}=$k({sizes:o}),h={mode:nt(i.renderMode||"always"),priority:nt(0),frames:nt(0),maxFrames:60,canBeInvalidated:Ee(()=>h.mode.value==="on-demand"&&h.frames.value===0)};function d(z=1){i.renderMode==="on-demand"&&(h.frames.value=Math.min(h.maxFrames,h.frames.value+z))}function p(){i.renderMode==="manual"&&(h.frames.value=1)}const{renderer:_}=tB({canvas:e,options:i,contextParts:{sizes:o,render:h,invalidate:d,advance:p}}),g={sizes:o,scene:r,camera:a,cameras:Fi(l),renderer:_,raycaster:Oe(new lT),controls:nt(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:h,advance:p,extend:Og,invalidate:d,registerCamera:c,setCameraActive:f,deregisterCamera:u,loop:Zk()};gr("useTres",g),g.scene.value.__tres={root:g},g.loop.register(()=>{a.value&&h.frames.value>0&&(_.value.render(n,a.value),s("render",g.renderer.value)),h.priority.value=0,h.mode.value==="always"?h.frames.value=1:h.frames.value=Math.max(0,h.frames.value-1)},"render");const{on:m,cancel:v}=oB(g);g.loop.setReady(!1),g.loop.start(),m(()=>{s("ready",g),g.loop.setReady(!0),sB(n,g,s)}),rs(()=>{v(),g.loop.stop()});const b=100,y=$F({every:b}),{isSupported:T,memory:w}=qF({interval:b}),S=160;let P=performance.now();const M=({timestamp:z})=>{g.scene.value&&(g.perf.memory.allocatedMem=D_(g.scene.value)),z-P>=b&&(P=z,g.perf.fps.accumulator.push(y.value),g.perf.fps.accumulator.length>S&&g.perf.fps.accumulator.shift(),g.perf.fps.value=y.value,T.value&&w.value&&(g.perf.memory.accumulator.push(w.value.usedJSHeapSize/1024/1024),g.perf.memory.accumulator.length>S&&g.perf.memory.accumulator.shift(),g.perf.memory.currentMem=g.perf.memory.accumulator.reduce((V,Q)=>V+Q,0)/g.perf.memory.accumulator.length))};let E=0;const D=1,{pause:B}=I_(({delta:z})=>{window.__TRES__DEVTOOLS__&&(M({timestamp:performance.now()}),E+=z,E>=D&&(window.__TRES__DEVTOOLS__.cb(g),E=0))},{immediate:!0});return rs(()=>{B()}),g}function RT(){const n=_n("useTres");if(!n)throw new Error("useTresContext must be used together with useTresContextProvider");return n}function PG(){const{camera:n,scene:e,renderer:t,loop:i,raycaster:s,controls:r,invalidate:o,advance:a}=RT();i.setContext({camera:n,scene:e,renderer:t,raycaster:s,controls:r,invalidate:o,advance:a});function l(f,h=0){return i.register(f,"before",h)}function c(f){return i.register(f,"render")}function u(f,h=0){return i.register(f,"after",h)}return{pause:i.pause,resume:i.resume,pauseRender:i.pauseRender,resumeRender:i.resumeRender,isActive:i.isActive,onBeforeRender:l,render:c,onAfterRender:u}}const lB=pi(),cB=pi(),PT=pi(),Ul=new kd;let wf=0,Af=0;I_(()=>{lB.trigger({delta:wf,elapsed:Af,clock:Ul}),cB.trigger({delta:wf,elapsed:Af,clock:Ul}),PT.trigger({delta:wf,elapsed:Af,clock:Ul})},{immediate:!1});PT.on(()=>{wf=Ul.getDelta(),Af=Ul.getElapsedTime()});function uB(n,e={},t={}){let i=n;const s=a=>{i=a};let r=new Proxy({},{});const o={has(a,l){return l in e||l in i},get(a,l,c){return l in e?e[l](i):i[l]},set(a,l,c){return t[l]?t[l](c,i,r,s):i[l]=c,!0}};return r=new Proxy({},o),r}const{logError:Jb}=CT(),Qb=["onClick","onContextMenu","onPointerMove","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onDoubleClick","onPointerDown","onPointerUp","onPointerCancel","onPointerMissed","onLostPointerCapture","onWheel"],fB=n=>{const e=n.scene.value;function t(c,u,f,h){if(h||(h={}),h.args||(h.args=[]),c==="template"||Lk(c))return null;let d=c.replace("Tres",""),p;if(c==="primitive"){(!cs(h.object)||Lt(h.object))&&Jb("Tres primitives need an 'object' prop, whose value is an object or shallowRef"),d=h.object.type;const _={};p=uB(h.object,{object:g=>g,isPrimitive:()=>!0,__tres:()=>_},{object:(g,m,v,b)=>{Xk(g,v,b,{patchProp:r,remove:s,insert:i},n)},__tres:g=>{Object.assign(_,g)}})}else{const _=Dg.value[d];_||Jb(`${d} is not defined on the THREE namespace. Use extend to add it to the catalog.`),p=new _(...h.args)}return p?(p.isCamera&&(h!=null&&h.position||p.position.set(3,3,3),h!=null&&h.lookAt||p.lookAt(0,0,0)),p=oo(p,{...p.__tres,type:d,memoizedProps:h,eventCount:0,primitive:c==="primitive",attach:h.attach},n),p):null}function i(c,u){var f,h,d;if(!c)return;u=u||e;const p=c.__tres?c:oo(c,{},n),_=u.__tres?u:oo(u,{},n);c=La(p),u=La(_),c.__tres&&((f=c.__tres)==null?void 0:f.eventCount)>0&&((h=n.eventManager)==null||h.registerObject(c)),n.registerCamera(c),(d=n.eventManager)==null||d.registerPointerMissedObject(c),p.__tres.attach?Hk(_,p,p.__tres.attach):pr(c)&&pr(_)&&(_.add(c),c.dispatchEvent({type:"added"})),p.__tres.parent=_,_.__tres.objects&&!_.__tres.objects.includes(p)&&_.__tres.objects.push(p)}function s(c,u){var f,h,d,p;if(!c)return;c!=null&&c.__tres&&((f=c.__tres)==null?void 0:f.eventCount)>0&&((h=n.eventManager)==null||h.deregisterObject(c)),u=Pg(u)?"default":u;const _=(d=c.__tres)==null?void 0:d.dispose;Pg(_)||(_===null?u=!1:u=_);const g=(p=c.__tres)==null?void 0:p.primitive,m=u==="default"?!g:!!u;if(c.__tres&&"objects"in c.__tres&&[...c.__tres.objects].forEach(v=>s(v,u)),m&&c.children&&[...c.children].forEach(v=>s(v,u)),wT(c,n),AT(c,n),m&&!Rk(c)){if(fa(u))u(c);else if(fa(c.dispose))try{c.dispose()}catch{}}"__tres"in c&&delete c.__tres}function r(c,u,f,h){var d,p;if(!c)return;let _=c,g=u;if(c.__tres&&(c.__tres.memoizedProps[u]=h),u==="attach"){const y=((d=c.__tres)==null?void 0:d.parent)||c.parent;s(c),oo(c,{attach:h},n),y&&i(c,y);return}if(u==="dispose"){c.__tres||(c=oo(c,{},n)),c.__tres.dispose=h;return}if(pr(c)&&g==="blocks-pointer-events"){h||h===""?c[g]=h:delete c[g];return}Qb.includes(u)&&c.__tres&&(c.__tres.eventCount+=1);let m=fm(g),v=_==null?void 0:_[m];if(g==="args"){const y=c,T=f??[],w=h??[],S=((p=c.__tres)==null?void 0:p.type)||c.type;S&&T.length&&!Fk(T,w)&&(_=Object.assign(y,new Dg.value[S](...h)));return}if(_.type==="BufferGeometry"){if(g==="args")return;_.setAttribute(fm(g),new Pt(...h));return}if(g.includes("-")&&v===void 0){v=_;for(const y of g.split("-"))m=g=fm(y),_=v,v=v==null?void 0:v[g]}let b=h;if(b===""&&(b=!0),fa(v)){Qb.includes(u)||(L_(b)?c[m](...b):c[m](b)),m.startsWith("on")&&fa(b)&&(_[m]=b);return}Xb(v)&&Xb(b)?v.mask=b.mask:xT(v)&&Mk(b)?v.set(b):Sk(v)&&Ek(b)&&v.constructor===b.constructor?v.copy(b):Ig(v)&&Array.isArray(b)?"fromArray"in v&&typeof v.fromArray=="function"?v.fromArray(b):v.set(...b):Ig(v)&&typeof b=="number"?"setScalar"in v&&typeof v.setScalar=="function"?v.setScalar(b):v.set(b):_[m]=b,TT(c)}function o(c){var u;return((u=c==null?void 0:c.__tres)==null?void 0:u.parent)||null}function a(c){const u=oo(new gt,{type:"Comment"},n);return u.name=c,u}function l(c){var u;const f=o(c),h=((u=f==null?void 0:f.__tres)==null?void 0:u.objects)||[],d=h.indexOf(c);return d<0||d>=h.length-1?null:h[d+1]}return{insert:i,remove:s,createElement:t,patchProp:r,parentNode:o,createText:()=>{},createComment:a,setText:()=>{},setElementText:()=>{},nextSibling:l,querySelector:()=>{},setScopeId:()=>{},cloneNode:()=>{},insertStaticContent:()=>{}}};function hB(){return IT().__VUE_DEVTOOLS_GLOBAL_HOOK__}function IT(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const dB=typeof Proxy=="function",pB="devtools-plugin:setup",mB="plugin:settings:set";let ul,Ng;function gB(){var n;return ul!==void 0||(typeof window<"u"&&window.performance?(ul=!0,Ng=window.performance):typeof globalThis<"u"&&!((n=globalThis.perf_hooks)===null||n===void 0)&&n.performance?(ul=!0,Ng=globalThis.perf_hooks.performance):ul=!1),ul}function _B(){return gB()?Ng.now():Date.now()}class vB{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const i={};if(e.settings)for(const o in e.settings){const a=e.settings[o];i[o]=a.defaultValue}const s=`__vue-devtools-plugin-settings__${e.id}`;let r=Object.assign({},i);try{const o=localStorage.getItem(s),a=JSON.parse(o);Object.assign(r,a)}catch{}this.fallbacks={getSettings(){return r},setSettings(o){try{localStorage.setItem(s,JSON.stringify(o))}catch{}r=o},now(){return _B()}},t&&t.on(mB,(o,a)=>{o===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(o,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(o,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(c=>{this.targetQueue.push({method:a,args:l,resolve:c})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function yB(n,e){const t=n,i=IT(),s=hB(),r=dB&&t.enableEarlyProxy;if(s&&(i.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))s.emit(pB,n,e);else{const o=r?new vB(t,s):null;(i.__VUE_DEVTOOLS_PLUGINS__=i.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:o}),o&&e(o.proxiedTarget)}}function bB(n,e){const t=`▲ ■ ●${n}`;typeof ex=="function"?ex(t,e):console.log(t)}function ex(n,e){throw new Error(n+e)}const LT=n=>{const e={id:n.uuid,label:n.type,children:[],tags:[]};n.name!==""&&e.tags.push({label:n.name,textColor:5750629,backgroundColor:15793395});const t=D_(n);return t>0&&e.tags.push({label:`${Jk(t)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:"Memory usage"}),n.type.includes("Light")&&(Ak(n)&&e.tags.push({label:`${n.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:"Intensity"}),e.tags.push({label:`#${new Pe(n.color).getHexString()}`,textColor:9738662,backgroundColor:16316922,tooltip:"Color"})),n.type.includes("Camera")&&(e.tags.push({label:`${n.fov}°`,textColor:9738662,backgroundColor:16316922,tooltip:"Field of view"}),e.tags.push({label:`x: ${Math.round(n.position.x)} y: ${Math.round(n.position.y)} z: ${Math.round(n.position.z)}`,textColor:9738662,backgroundColor:16316922,tooltip:"Position"})),e};function DT(n,e,t=""){n.children.forEach(i=>{if(i.type==="HightlightMesh"||t&&!i.type.includes(t)&&!i.name.includes(t))return;const s=LT(i);e.children.push(s),DT(i,s,t)})}const xB=[],fl="tres:inspector",MB=xi({sceneGraph:null});function SB(n,e){yB({id:"dev.esm.tres",label:"TresJS 🪐",logo:"https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg",packageName:"tresjs",homepage:"https://tresjs.org",componentStateTypes:xB,app:n},t=>{typeof t.now!="function"&&bB("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addInspector({id:fl,label:"TresJS 🪐",icon:"account_tree",treeFilterPlaceholder:"Search instances"}),setInterval(()=>{t.sendInspectorTree(fl)},1e3),setInterval(()=>{t.notifyComponentUpdate()},5e3),t.on.getInspectorTree(r=>{if(r.inspectorId===fl){const o=LT(e.scene.value);DT(e.scene.value,o,r.filter),MB.sceneGraph=o,r.rootNodes=[o]}});let i=null,s=null;t.on.getInspectorState(r=>{var o;if(r.inspectorId===fl){const[a]=e.scene.value.getObjectsByProperty("uuid",r.nodeId);if(!a)return;if(s&&i&&i.parent&&s.remove(i),a.isMesh){const l=Bk(a);a.add(l),i=l,s=a}r.state={object:Object.entries(a).map(([l,c])=>l==="children"?{key:l,value:c.filter(u=>u.type!=="HightlightMesh")}:{key:l,value:c,editable:!0}).filter(({key:l})=>l!=="parent")},a.isScene&&(r.state={...r.state,state:[{key:"Scene Info",value:{objects:a.children.length,memory:D_(a),calls:e.renderer.value.info.render.calls,triangles:e.renderer.value.info.render.triangles,points:e.renderer.value.info.render.points,lines:e.renderer.value.info.render.lines}},{key:"Programs",value:((o=e.renderer.value.info.programs)==null?void 0:o.map(l=>({...l,programName:l.name})))||[]}]})}}),t.on.editInspectorState(r=>{r.inspectorId===fl&&kk(e.scene.value,r.nodeId,r.path,r.state.value)})})}const EB=["data-scene","data-tres"],TB=hn({__name:"TresCanvas",props:{shadows:{type:Boolean,default:void 0},clearColor:{},toneMapping:{},shadowMapType:{},useLegacyLights:{type:Boolean,default:void 0},outputColorSpace:{},toneMappingExposure:{},renderMode:{default:"always"},dpr:{},camera:{},preset:{},windowSize:{type:Boolean,default:void 0},enableProvideBridge:{type:Boolean,default:!0},context:{},alpha:{type:Boolean,default:void 0},premultipliedAlpha:{type:Boolean},antialias:{type:Boolean,default:void 0},stencil:{type:Boolean,default:void 0},preserveDrawingBuffer:{type:Boolean,default:void 0},powerPreference:{},depth:{type:Boolean,default:void 0},failIfMajorPerformanceCaveat:{type:Boolean,default:void 0},precision:{},logarithmicDepthBuffer:{type:Boolean,default:void 0},reverseDepthBuffer:{type:Boolean}},emits:["render","click","double-click","context-menu","pointer-move","pointer-up","pointer-down","pointer-enter","pointer-leave","pointer-over","pointer-out","pointer-missed","wheel","ready"],setup(n,{expose:e,emit:t}){const i=n,s=t,r=O0(),o=nt(),a=Oe(new vd),l=Rn();Og(TF);const c=(p,_=!1)=>hn({setup(){var g;const m=(g=Rn())==null?void 0:g.appContext;m&&(m.app=l==null?void 0:l.appContext.app);const v={};function b(y){y&&(y.parent&&b(y.parent),y.provides&&Object.assign(v,y.provides))}return l!=null&&l.parent&&i.enableProvideBridge&&(b(l.parent),Reflect.ownKeys(v).forEach(y=>{gr(y,v[y])})),gr("useTres",p),gr("extend",Og),typeof window<"u"&&SB(m==null?void 0:m.app,p),()=>ks(Zt,null,_?[]:r.default())}}),u=(p,_=!1)=>{const g=c(p,_),{render:m}=ZS(fB(p));m(ks(g),a.value)},f=(p,_=!1)=>{ET(p.scene.value),_&&(p.renderer.value.dispose(),p.renderer.value.renderLists.dispose(),p.renderer.value.forceContextLoss()),a.value.__tres={root:p}},h=Oe(null);e({context:h,dispose:()=>f(h.value,!0)});const d=()=>{f(h.value),u(h.value,!0)};return Gn(()=>{const p=o;h.value=aB({scene:a.value,canvas:p,windowSize:i.windowSize??!1,rendererOptions:i,emit:s});const{registerCamera:_,camera:g,cameras:m,deregisterCamera:v}=h.value;u(h.value);const b=()=>{const y=new Jt(45,window.innerWidth/window.innerHeight,.1,1e3);y.position.set(3,3,3),y.lookAt(0,0,0),_(y);const T=Lc(()=>{m.value.length>=2&&(y.removeFromParent(),v(y),T==null||T())})};je(()=>i.camera,(y,T)=>{y&&_(y),T&&(T.removeFromParent(),v(T))},{immediate:!0}),g.value||b()}),rs(d),(p,_)=>(vn(),yi("canvas",{ref_key:"canvas",ref:o,"data-scene":a.value.uuid,class:ka(p.$attrs.class),"data-tres":`tresjs ${Ft(yk).version}`,style:Si({display:"block",width:"100%",height:"100%",position:p.windowSize?"fixed":"relative",top:0,left:0,pointerEvents:"auto",touchAction:"none",...p.$attrs.style})},null,14,EB))}}),wB={install(n){n.component("TresCanvas",TB)}};function mm(n){if(n===null||typeof n!="object")return!1;const e=Object.getPrototypeOf(n);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in n?!1:Symbol.toStringTag in n?Object.prototype.toString.call(n)==="[object Module]":!0}function Ug(n,e,t=".",i){if(!mm(e))return Ug(n,{},t,i);const s=Object.assign({},e);for(const r in n){if(r==="__proto__"||r==="constructor")continue;const o=n[r];o!=null&&(i&&i(s,r,o,t)||(Array.isArray(o)&&Array.isArray(s[r])?s[r]=[...o,...s[r]]:mm(o)&&mm(s[r])?s[r]=Ug(o,s[r],(t?`${t}.`:"")+r.toString(),i):s[r]=o))}return s}function AB(n){return(...e)=>e.reduce((t,i)=>Ug(t,i,"",n),{})}const OT=AB();function Ir(n){return qh()?(S0(n),!0):!1}function tx(){const n=new Set,e=r=>{n.delete(r)};return{on:r=>{n.add(r);const o=()=>e(r);return Ir(o),{off:o}},off:e,trigger:(...r)=>Promise.all(Array.from(n).map(o=>o(...r))),clear:()=>{n.clear()}}}const gm=new WeakMap,CB=(...n)=>{var e;const t=n[0],i=(e=Rn())==null?void 0:e.proxy;if(i==null&&!Ic())throw new Error("injectLocal must be called in setup");return i&&gm.has(i)&&t in gm.get(i)?gm.get(i)[t]:_n(...n)},Yc=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const NT=n=>n!=null,RB=Object.prototype.toString,Ph=n=>RB.call(n)==="[object Object]",is=()=>{},PB=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);function UT(...n){if(n.length!==1)return yS(...n);const e=n[0];return typeof e=="function"?Fi(R0(()=>({get:e,set:is}))):nt(e)}function O_(n,e){function t(...i){return new Promise((s,r)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(r)})}return t}const FT=n=>n();function kT(n,e={}){let t,i,s=is;const r=l=>{clearTimeout(l),s(),s=is};let o;return l=>{const c=rt(n),u=rt(e.maxWait);return t&&r(t),c<=0||u!==void 0&&u<=0?(i&&(r(i),i=null),Promise.resolve(l())):new Promise((f,h)=>{s=e.rejectOnCancel?h:f,o=l,u&&!i&&(i=setTimeout(()=>{t&&r(t),i=null,f(o())},u)),t=setTimeout(()=>{i&&r(i),i=null,f(l())},c)})}}function IB(...n){let e=0,t,i=!0,s=is,r,o,a,l,c;!Lt(n[0])&&typeof n[0]=="object"?{delay:o,trailing:a=!0,leading:l=!0,rejectOnCancel:c=!1}=n[0]:[o,a=!0,l=!0,c=!1]=n;const u=()=>{t&&(clearTimeout(t),t=void 0,s(),s=is)};return h=>{const d=rt(o),p=Date.now()-e,_=()=>r=h();return u(),d<=0?(e=Date.now(),_()):(p>d&&(l||!i)?(e=Date.now(),_()):a&&(r=new Promise((g,m)=>{s=c?m:g,t=setTimeout(()=>{e=Date.now(),i=!0,g(_()),u()},Math.max(0,d-p))})),!l&&!t&&(t=setTimeout(()=>i=!0,d)),i=!1,r)}}function LB(n=FT,e={}){const{initialState:t="active"}=e,i=UT(t==="active");function s(){i.value=!1}function r(){i.value=!0}const o=(...a)=>{i.value&&n(...a)};return{isActive:Fi(i),pause:s,resume:r,eventFilter:o}}function DB(n){let e;function t(){return e||(e=n()),e}return t.reset=async()=>{const i=e;e=void 0,i&&await i},t}function OB(n,e){var t;if(typeof n=="number")return n+e;const i=((t=n.match(/^-?\d+\.?\d*/))==null?void 0:t[0])||"",s=n.slice(i.length),r=Number.parseFloat(i)+e;return Number.isNaN(r)?n:r+s}function Fl(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function kl(n){return Array.isArray(n)?n:[n]}function BT(n){return Rn()}function N_(n,e=200,t={}){return O_(kT(e,t),n)}function IG(n,e=200,t={}){const i=nt(rt(n)),s=N_(()=>{i.value=n.value},e,t);return je(n,()=>s()),mS(i)}function NB(n,e=200,t=!1,i=!0,s=!1){return O_(IB(e,t,i,s),n)}function zT(n,e,t={}){const{eventFilter:i=FT,...s}=t;return je(n,O_(i,e),s)}function UB(n,e,t={}){const{eventFilter:i,initialState:s="active",...r}=t,{eventFilter:o,pause:a,resume:l,isActive:c}=LB(i,{initialState:s});return{stop:zT(n,e,{...r,eventFilter:o}),pause:a,resume:l,isActive:c}}function Xa(n,e=!0,t){BT()?Gn(n,t):e?n():Ar(n)}function FB(n,e){BT()&&rs(n,e)}function kB(n,e,t={}){const{immediate:i=!0,immediateCallback:s=!1}=t,r=Oe(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function l(){r.value=!1,a()}function c(...u){s&&n(),a(),r.value=!0,o=setTimeout(()=>{r.value=!1,o=null,n(...u)},rt(e))}return i&&(r.value=!0,Yc&&c()),Ir(l),{isPending:mS(r),start:c,stop:l}}function LG(n,e,t={}){const{debounce:i=0,maxWait:s=void 0,...r}=t;return zT(n,e,{...r,eventFilter:kT(i,{maxWait:s})})}function BB(n,e,t){return je(n,e,{...t,immediate:!0})}const Hn=Yc?window:void 0,zB=Yc?window.document:void 0,U_=Yc?window.navigator:void 0;function ei(n){var e;const t=rt(n);return(e=t==null?void 0:t.$el)!=null?e:t}function Ot(...n){const e=[],t=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=Ee(()=>{const a=kl(rt(n[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=BB(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>ei(c)))!=null?l:[Hn].filter(c=>c!=null),kl(rt(s.value?n[1]:n[0])),kl(Ft(s.value?n[2]:n[1])),rt(s.value?n[3]:n[2])]},([a,l,c,u])=>{if(t(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const f=Ph(u)?{...u}:u;e.push(...a.flatMap(h=>l.flatMap(d=>c.map(p=>i(h,d,p,f)))))},{flush:"post"}),o=()=>{r(),t()};return Ir(t),o}function VB(){const n=Oe(!1),e=Rn();return e&&Gn(()=>{n.value=!0},e),n}function Lo(n){const e=VB();return Ee(()=>(e.value,!!n()))}function VT(n,e,t={}){const{window:i=Hn,...s}=t;let r;const o=Lo(()=>i&&"MutationObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const h=rt(n),d=kl(h).map(ei).filter(NT);return new Set(d)}),c=je(()=>l.value,h=>{a(),o.value&&h.size&&(r=new MutationObserver(e),h.forEach(d=>r.observe(d,s)))},{immediate:!0,flush:"post"}),u=()=>r==null?void 0:r.takeRecords(),f=()=>{c(),a()};return Ir(f),{isSupported:o,stop:f,takeRecords:u}}const HB=Symbol("vueuse-ssr-width");function HT(){const n=Ic()?CB(HB,null):null;return typeof n=="number"?n:void 0}function co(n,e={}){const{window:t=Hn,ssrWidth:i=HT()}=e,s=Lo(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function"),r=Oe(typeof i=="number"),o=Oe(),a=Oe(!1),l=c=>{a.value=c.matches};return Lc(()=>{if(r.value){r.value=!s.value;const c=rt(n).split(",");a.value=c.some(u=>{const f=u.includes("not all"),h=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),d=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(h||d);return h&&p&&(p=i>=Fl(h[1])),d&&p&&(p=i<=Fl(d[1])),f?!p:p});return}s.value&&(o.value=t.matchMedia(rt(n)),a.value=o.value.matches)}),Ot(o,"change",l,{passive:!0}),Ee(()=>a.value)}const DG={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function OG(n,e={}){function t(d,p){let _=rt(n[rt(d)]);return p!=null&&(_=OB(_,p)),typeof _=="number"&&(_=`${_}px`),_}const{window:i=Hn,strategy:s="min-width",ssrWidth:r=HT()}=e,o=typeof r=="number",a=o?Oe(!1):{value:!0};o&&Xa(()=>a.value=!!i);function l(d,p){return!a.value&&o?d==="min"?r>=Fl(p):r<=Fl(p):i?i.matchMedia(`(${d}-width: ${p})`).matches:!1}const c=d=>co(()=>`(min-width: ${t(d)})`,e),u=d=>co(()=>`(max-width: ${t(d)})`,e),f=Object.keys(n).reduce((d,p)=>(Object.defineProperty(d,p,{get:()=>s==="min-width"?c(p):u(p),enumerable:!0,configurable:!0}),d),{});function h(){const d=Object.keys(n).map(p=>[p,f[p],Fl(t(p))]).sort((p,_)=>p[2]-_[2]);return Ee(()=>d.filter(([,p])=>p.value).map(([p])=>p))}return Object.assign(f,{greaterOrEqual:c,smallerOrEqual:u,greater(d){return co(()=>`(min-width: ${t(d,.1)})`,e)},smaller(d){return co(()=>`(max-width: ${t(d,-.1)})`,e)},between(d,p){return co(()=>`(min-width: ${t(d)}) and (max-width: ${t(p,-.1)})`,e)},isGreater(d){return l("min",t(d,.1))},isGreaterOrEqual(d){return l("min",t(d))},isSmaller(d){return l("max",t(d,-.1))},isSmallerOrEqual(d){return l("max",t(d))},isInBetween(d,p){return l("min",t(d))&&l("max",t(p,-.1))},current:h,active(){const d=h();return Ee(()=>d.value.length===0?"":d.value.at(s==="min-width"?-1:0))}})}function Fg(n,e={}){const{controls:t=!1,navigator:i=U_}=e,s=Lo(()=>i&&"permissions"in i),r=Oe(),o=typeof n=="string"?{name:n}:n,a=Oe(),l=()=>{var u,f;a.value=(f=(u=r.value)==null?void 0:u.state)!=null?f:"prompt"};Ot(r,"change",l,{passive:!0});const c=DB(async()=>{if(s.value){if(!r.value)try{r.value=await i.permissions.query(o)}catch{r.value=void 0}finally{l()}if(t)return ht(r.value)}});return c(),t?{state:a,isSupported:s,query:c}:a}function NG(n={}){const{navigator:e=U_,read:t=!1,source:i,copiedDuring:s=1500,legacy:r=!1}=n,o=Lo(()=>e&&"clipboard"in e),a=Fg("clipboard-read"),l=Fg("clipboard-write"),c=Ee(()=>o.value||r),u=Oe(""),f=Oe(!1),h=kB(()=>f.value=!1,s,{immediate:!1});async function d(){let v=!(o.value&&m(a.value));if(!v)try{u.value=await e.clipboard.readText()}catch{v=!0}v&&(u.value=g())}c.value&&t&&Ot(["copy","cut"],d,{passive:!0});async function p(v=rt(i)){if(c.value&&v!=null){let b=!(o.value&&m(l.value));if(!b)try{await e.clipboard.writeText(v)}catch{b=!0}b&&_(v),u.value=v,f.value=!0,h.start()}}function _(v){const b=document.createElement("textarea");b.value=v??"",b.style.position="absolute",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),b.remove()}function g(){var v,b,y;return(y=(b=(v=document==null?void 0:document.getSelection)==null?void 0:v.call(document))==null?void 0:b.toString())!=null?y:""}function m(v){return v==="granted"||v==="prompt"}return{isSupported:c,text:u,copied:f,copy:p}}const rf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},of="__vueuse_ssr_handlers__",GB=WB();function WB(){return of in rf||(rf[of]=rf[of]||{}),rf[of]}function GT(n,e){return GB[n]||e}function XB(n){return co("(prefers-color-scheme: dark)",n)}function $B(n){return n==null?"any":n instanceof Set?"set":n instanceof Map?"map":n instanceof Date?"date":typeof n=="boolean"?"boolean":typeof n=="string"?"string":typeof n=="object"?"object":Number.isNaN(n)?"any":"number"}const qB={boolean:{read:n=>n==="true",write:n=>String(n)},object:{read:n=>JSON.parse(n),write:n=>JSON.stringify(n)},number:{read:n=>Number.parseFloat(n),write:n=>String(n)},any:{read:n=>n,write:n=>String(n)},string:{read:n=>n,write:n=>String(n)},map:{read:n=>new Map(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n.entries()))},set:{read:n=>new Set(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n))},date:{read:n=>new Date(n),write:n=>n.toISOString()}},nx="vueuse-storage";function WT(n,e,t,i={}){var s;const{flush:r="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:f=Hn,eventFilter:h,onError:d=V=>{console.error(V)},initOnMounted:p}=i,_=(u?Oe:nt)(typeof e=="function"?e():e),g=Ee(()=>rt(n));if(!t)try{t=GT("getDefaultStorage",()=>{var V;return(V=Hn)==null?void 0:V.localStorage})()}catch(V){d(V)}if(!t)return _;const m=rt(e),v=$B(m),b=(s=i.serializer)!=null?s:qB[v],{pause:y,resume:T}=UB(_,()=>E(_.value),{flush:r,deep:o,eventFilter:h});je(g,()=>B(),{flush:r});let w=!1;const S=V=>{p&&!w||B(V)},P=V=>{p&&!w||z(V)};f&&a&&(t instanceof Storage?Ot(f,"storage",S,{passive:!0}):Ot(f,nx,P)),p?Xa(()=>{w=!0,B()}):B();function M(V,Q){if(f){const j={key:g.value,oldValue:V,newValue:Q,storageArea:t};f.dispatchEvent(t instanceof Storage?new StorageEvent("storage",j):new CustomEvent(nx,{detail:j}))}}function E(V){try{const Q=t.getItem(g.value);if(V==null)M(Q,null),t.removeItem(g.value);else{const j=b.write(V);Q!==j&&(t.setItem(g.value,j),M(Q,j))}}catch(Q){d(Q)}}function D(V){const Q=V?V.newValue:t.getItem(g.value);if(Q==null)return l&&m!=null&&t.setItem(g.value,b.write(m)),m;if(!V&&c){const j=b.read(Q);return typeof c=="function"?c(j,m):v==="object"&&!Array.isArray(j)?{...m,...j}:j}else return typeof Q!="string"?Q:b.read(Q)}function B(V){if(!(V&&V.storageArea!==t)){if(V&&V.key==null){_.value=m;return}if(!(V&&V.key!==g.value)){y();try{(V==null?void 0:V.newValue)!==b.write(_.value)&&(_.value=D(V))}catch(Q){d(Q)}finally{V?Ar(T):T()}}}}function z(V){B(V.detail)}return _}const YB="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function jB(n={}){const{selector:e="html",attribute:t="class",initialValue:i="auto",window:s=Hn,storage:r,storageKey:o="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:c,disableTransition:u=!0}=n,f={auto:"",light:"light",dark:"dark",...n.modes||{}},h=XB({window:s}),d=Ee(()=>h.value?"dark":"light"),p=l||(o==null?UT(i):WT(o,i,r,{window:s,listenToStorageChanges:a})),_=Ee(()=>p.value==="auto"?d.value:p.value),g=GT("updateHTMLAttrs",(y,T,w)=>{const S=typeof y=="string"?s==null?void 0:s.document.querySelector(y):ei(y);if(!S)return;const P=new Set,M=new Set;let E=null;if(T==="class"){const B=w.split(/\s/g);Object.values(f).flatMap(z=>(z||"").split(/\s/g)).filter(Boolean).forEach(z=>{B.includes(z)?P.add(z):M.add(z)})}else E={key:T,value:w};if(P.size===0&&M.size===0&&E===null)return;let D;u&&(D=s.document.createElement("style"),D.appendChild(document.createTextNode(YB)),s.document.head.appendChild(D));for(const B of P)S.classList.add(B);for(const B of M)S.classList.remove(B);E&&S.setAttribute(E.key,E.value),u&&(s.getComputedStyle(D).opacity,document.head.removeChild(D))});function m(y){var T;g(e,t,(T=f[y])!=null?T:y)}function v(y){n.onChanged?n.onChanged(y,m):m(y)}je(_,v,{flush:"post",immediate:!0}),Xa(()=>v(_.value));const b=Ee({get(){return c?p.value:_.value},set(y){p.value=y}});return Object.assign(b,{store:p,system:d,state:_})}function af(n,e,t={}){const{window:i=Hn,initialValue:s,observe:r=!1}=t,o=Oe(s),a=Ee(()=>{var c;return ei(e)||((c=i==null?void 0:i.document)==null?void 0:c.documentElement)});function l(){var c;const u=rt(n),f=rt(a);if(f&&i&&u){const h=(c=i.getComputedStyle(f).getPropertyValue(u))==null?void 0:c.trim();o.value=h||o.value||s}}return r&&VT(a,l,{attributeFilter:["style","class"],window:i}),je([a,()=>rt(n)],(c,u)=>{u[0]&&u[1]&&u[0].style.removeProperty(u[1]),l()},{immediate:!0}),je([o,a],([c,u])=>{const f=rt(n);u!=null&&u.style&&f&&(c==null?u.style.removeProperty(f):u.style.setProperty(f,c))},{immediate:!0}),o}function KB(n={}){const{valueDark:e="dark",valueLight:t=""}=n,i=jB({...n,onChanged:(o,a)=>{var l;n.onChanged?(l=n.onChanged)==null||l.call(n,o==="dark",a,o):a(o)},modes:{dark:e,light:t}}),s=Ee(()=>i.system.value);return Ee({get(){return i.value==="dark"},set(o){const a=o?"dark":"light";s.value===a?i.value="auto":i.value=a}})}function ZB(n={}){const{navigator:e=U_,requestPermissions:t=!1,constraints:i={audio:!0,video:!0},onUpdated:s}=n,r=nt([]),o=Ee(()=>r.value.filter(p=>p.kind==="videoinput")),a=Ee(()=>r.value.filter(p=>p.kind==="audioinput")),l=Ee(()=>r.value.filter(p=>p.kind==="audiooutput")),c=Lo(()=>e&&e.mediaDevices&&e.mediaDevices.enumerateDevices),u=Oe(!1);let f;async function h(){c.value&&(r.value=await e.mediaDevices.enumerateDevices(),s==null||s(r.value),f&&(f.getTracks().forEach(p=>p.stop()),f=null))}async function d(){const p=i.video?"camera":"microphone";if(!c.value)return!1;if(u.value)return!0;const{state:_,query:g}=Fg(p,{controls:!0});if(await g(),_.value!=="granted"){let m=!0;try{f=await e.mediaDevices.getUserMedia(i)}catch{f=null,m=!1}h(),u.value=m}else u.value=!0;return u.value}return c.value&&(t&&d(),Ot(e.mediaDevices,"devicechange",h,{passive:!0}),h()),{devices:r,ensurePermissions:d,permissionGranted:u,videoInputs:o,audioInputs:a,audioOutputs:l,isSupported:c}}function JB(n,e,t={}){const{window:i=Hn,...s}=t;let r;const o=Lo(()=>i&&"ResizeObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const f=rt(n);return Array.isArray(f)?f.map(h=>ei(h)):[ei(f)]}),c=je(l,f=>{if(a(),o.value&&i){r=new ResizeObserver(e);for(const h of f)h&&r.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Ir(u),{isSupported:o,stop:u}}function UG(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:s=!0,immediate:r=!0,updateTiming:o="sync"}=e,a=Oe(0),l=Oe(0),c=Oe(0),u=Oe(0),f=Oe(0),h=Oe(0),d=Oe(0),p=Oe(0);function _(){const m=ei(n);if(!m){t&&(a.value=0,l.value=0,c.value=0,u.value=0,f.value=0,h.value=0,d.value=0,p.value=0);return}const v=m.getBoundingClientRect();a.value=v.height,l.value=v.bottom,c.value=v.left,u.value=v.right,f.value=v.top,h.value=v.width,d.value=v.x,p.value=v.y}function g(){o==="sync"?_():o==="next-frame"&&requestAnimationFrame(()=>_())}return JB(n,g),je(()=>ei(n),m=>!m&&g()),VT(n,g,{attributeFilter:["style","class"]}),s&&Ot("scroll",g,{capture:!0,passive:!0}),i&&Ot("resize",g,{passive:!0}),Xa(()=>{r&&g()}),{height:a,bottom:l,left:c,right:u,top:f,width:h,x:d,y:p,update:g}}function QB(n,e,t={}){const{root:i,rootMargin:s="0px",threshold:r=0,window:o=Hn,immediate:a=!0}=t,l=Lo(()=>o&&"IntersectionObserver"in o),c=Ee(()=>{const p=rt(n);return kl(p).map(ei).filter(NT)});let u=is;const f=Oe(a),h=l.value?je(()=>[c.value,ei(i),f.value],([p,_])=>{if(u(),!f.value||!p.length)return;const g=new IntersectionObserver(e,{root:ei(_),rootMargin:s,threshold:r});p.forEach(m=>m&&g.observe(m)),u=()=>{g.disconnect(),u=is}},{immediate:a,flush:"post"}):is,d=()=>{u(),h(),f.value=!1};return Ir(d),{isSupported:l,isActive:f,pause(){u(),f.value=!1},resume(){f.value=!0},stop:d}}const e4={multiple:!0,accept:"*",reset:!1,directory:!1};function t4(n){if(!n)return null;if(n instanceof FileList)return n;const e=new DataTransfer;for(const t of n)e.items.add(t);return e.files}function FG(n={}){const{document:e=zB}=n,t=nt(t4(n.initialFiles)),{on:i,trigger:s}=tx(),{on:r,trigger:o}=tx();let a;e&&(a=ei(n.input)||e.createElement("input"),a.type="file",a.onchange=u=>{const f=u.target;t.value=f.files,s(t.value)},a.oncancel=()=>{o()});const l=()=>{t.value=null,a&&a.value&&(a.value="",s(null))},c=u=>{if(!a)return;const f={...e4,...n,...u};a.multiple=f.multiple,a.accept=f.accept,a.webkitdirectory=f.directory,PB(f,"capture")&&(a.capture=f.capture),f.reset&&l(),a.click()};return{files:Fi(t),open:c,reset:l,onCancel:r,onChange:i}}const ix=1;function kG(n,e={}){const{throttle:t=0,idle:i=200,onStop:s=is,onScroll:r=is,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:a={capture:!1,passive:!0},behavior:l="auto",window:c=Hn,onError:u=S=>{console.error(S)}}=e,f=Oe(0),h=Oe(0),d=Ee({get(){return f.value},set(S){_(S,void 0)}}),p=Ee({get(){return h.value},set(S){_(void 0,S)}});function _(S,P){var M,E,D,B;if(!c)return;const z=rt(n);if(!z)return;(D=z instanceof Document?c.document.body:z)==null||D.scrollTo({top:(M=rt(P))!=null?M:p.value,left:(E=rt(S))!=null?E:d.value,behavior:rt(l)});const V=((B=z==null?void 0:z.document)==null?void 0:B.documentElement)||(z==null?void 0:z.documentElement)||z;d!=null&&(f.value=V.scrollLeft),p!=null&&(h.value=V.scrollTop)}const g=Oe(!1),m=xi({left:!0,right:!1,top:!0,bottom:!1}),v=xi({left:!1,right:!1,top:!1,bottom:!1}),b=S=>{g.value&&(g.value=!1,v.left=!1,v.right=!1,v.top=!1,v.bottom=!1,s(S))},y=N_(b,t+i),T=S=>{var P;if(!c)return;const M=((P=S==null?void 0:S.document)==null?void 0:P.documentElement)||(S==null?void 0:S.documentElement)||ei(S),{display:E,flexDirection:D,direction:B}=getComputedStyle(M),z=B==="rtl"?-1:1,V=M.scrollLeft;v.left=Vf.value;const Q=Math.abs(V*z)<=(o.left||0),j=Math.abs(V*z)+M.clientWidth>=M.scrollWidth-(o.right||0)-ix;E==="flex"&&D==="row-reverse"?(m.left=j,m.right=Q):(m.left=Q,m.right=j),f.value=V;let te=M.scrollTop;S===c.document&&!te&&(te=c.document.body.scrollTop),v.top=teh.value;const Z=Math.abs(te)<=(o.top||0),pe=Math.abs(te)+M.clientHeight>=M.scrollHeight-(o.bottom||0)-ix;E==="flex"&&D==="column-reverse"?(m.top=pe,m.bottom=Z):(m.top=Z,m.bottom=pe),h.value=te},w=S=>{var P;if(!c)return;const M=(P=S.target.documentElement)!=null?P:S.target;T(M),g.value=!0,y(S),r(S)};return Ot(n,"scroll",t?NB(w,t,!0,!1):w,a),Xa(()=>{try{const S=rt(n);if(!S)return;T(S)}catch(S){u(S)}}),Ot(n,"scrollend",b,a),{x:d,y:p,isScrolling:g,arrivedState:m,directions:v,measure(){const S=rt(n);c&&S&&T(S)}}}function ys(n,e,t={}){const{window:i=Hn}=t;return WT(n,e,i==null?void 0:i.localStorage,t)}const n4={page:n=>[n.pageX,n.pageY],client:n=>[n.clientX,n.clientY],screen:n=>[n.screenX,n.screenY],movement:n=>n instanceof MouseEvent?[n.movementX,n.movementY]:null};function BG(n={}){const{type:e="page",touch:t=!0,resetOnTouchEnds:i=!1,initialValue:s={x:0,y:0},window:r=Hn,target:o=r,scroll:a=!0,eventFilter:l}=n;let c=null,u=0,f=0;const h=Oe(s.x),d=Oe(s.y),p=Oe(null),_=typeof e=="function"?e:n4[e],g=S=>{const P=_(S);c=S,P&&([h.value,d.value]=P,p.value="mouse"),r&&(u=r.scrollX,f=r.scrollY)},m=S=>{if(S.touches.length>0){const P=_(S.touches[0]);P&&([h.value,d.value]=P,p.value="touch")}},v=()=>{if(!c||!r)return;const S=_(c);c instanceof MouseEvent&&S&&(h.value=S[0]+r.scrollX-u,d.value=S[1]+r.scrollY-f)},b=()=>{h.value=s.x,d.value=s.y},y=l?S=>l(()=>g(S),{}):S=>g(S),T=l?S=>l(()=>m(S),{}):S=>m(S),w=l?()=>l(()=>v(),{}):()=>v();if(o){const S={passive:!0};Ot(o,["mousemove","dragover"],y,S),t&&e!=="movement"&&(Ot(o,["touchstart","touchmove"],T,S),i&&Ot(o,"touchend",b,S)),a&&e==="page"&&Ot(r,"scroll",w,S)}return{x:h,y:d,sourceType:p}}function zG(n){const e=Oe(),t=()=>{e.value&&URL.revokeObjectURL(e.value),e.value=void 0};return je(()=>rt(n),i=>{t(),i&&(e.value=URL.createObjectURL(i))},{immediate:!0}),Ir(t),Fi(e)}const sx="--vueuse-safe-area-top",rx="--vueuse-safe-area-right",ox="--vueuse-safe-area-bottom",ax="--vueuse-safe-area-left";function VG(){const n=Oe(""),e=Oe(""),t=Oe(""),i=Oe("");if(Yc){const r=af(sx),o=af(rx),a=af(ox),l=af(ax);r.value="env(safe-area-inset-top, 0px)",o.value="env(safe-area-inset-right, 0px)",a.value="env(safe-area-inset-bottom, 0px)",l.value="env(safe-area-inset-left, 0px)",s(),Ot("resize",N_(s),{passive:!0})}function s(){n.value=lf(sx),e.value=lf(rx),t.value=lf(ox),i.value=lf(ax)}return{top:n,right:e,bottom:t,left:i,update:s}}function lf(n){return getComputedStyle(document.documentElement).getPropertyValue(n)}function HG(n,e,t){const{window:i=Hn}={},s=nt(null),r=Oe(),o=(...l)=>{r.value&&r.value.postMessage(...l)},a=function(){r.value&&r.value.terminate()};return i&&(r.value=new Worker(n,e),r.value.onmessage=l=>{s.value=l.data},Ir(()=>{r.value&&r.value.terminate()})),{data:s,post:o,terminate:a,worker:r}}function GG(n={}){const{window:e=Hn,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:r=!0,type:o="inner"}=n,a=Oe(t),l=Oe(i),c=()=>{if(e)if(o==="outer")a.value=e.outerWidth,l.value=e.outerHeight;else if(o==="visual"&&e.visualViewport){const{width:f,height:h,scale:d}=e.visualViewport;a.value=Math.round(f*d),l.value=Math.round(h*d)}else r?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),Xa(c);const u={passive:!0};if(Ot("resize",c,u),e&&o==="visual"&&e.visualViewport&&Ot(e.visualViewport,"resize",c,u),s){const f=co("(orientation: portrait)");je(f,()=>c())}return{width:a,height:l}}const XT=1/60*1e3,i4=typeof performance<"u"?()=>performance.now():()=>Date.now(),$T=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(i4()),XT);function s4(n){let e=[],t=[],i=0,s=!1,r=!1;const o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&s,h=f?e:t;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),f&&s&&(i=e.length)),l},cancel:l=>{const c=t.indexOf(l);c!==-1&&t.splice(c,1),o.delete(l)},process:l=>{if(s){r=!0;return}if(s=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let c=0;c(n[e]=s4(()=>xc=!0),n),{}),zg=jc.reduce((n,e)=>{const t=Vd[e];return n[e]=(i,s=!1,r=!1)=>(xc||l4(),t.schedule(i,s,r)),n},{}),o4=jc.reduce((n,e)=>(n[e]=Vd[e].cancel,n),{});jc.reduce((n,e)=>(n[e]=()=>Vd[e].process(va),n),{});const a4=n=>Vd[n].process(va),qT=n=>{xc=!1,va.delta=kg?XT:Math.max(Math.min(n-va.timestamp,r4),1),va.timestamp=n,Bg=!0,jc.forEach(a4),Bg=!1,xc&&(kg=!1,$T(qT))},l4=()=>{xc=!0,kg=!0,Bg||$T(qT)},YT=()=>va;function jT(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);sMath.min(Math.max(t,n),e),cx=.001,c4=.01,u4=10,f4=.05,h4=1;function d4({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let s,r,o=1-e;o=Vg(f4,h4,o),n=Vg(c4,u4,n/1e3),o<1?(s=c=>{const u=c*o,f=u*n,h=u-t,d=Hg(c,o),p=Math.exp(-f);return cx-h/d*p},r=c=>{const f=c*o*n,h=f*t+t,d=Math.pow(o,2)*Math.pow(c,2)*n,p=Math.exp(-f),_=Hg(Math.pow(c,2),o);return(-s(c)+cx>0?-1:1)*((h-d)*p)/_}):(s=c=>{const u=Math.exp(-c*n),f=(c-t)*n+1;return-.001+u*f},r=c=>{const u=Math.exp(-c*n),f=(t-c)*(n*n);return u*f});const a=5/n,l=m4(s,r,a);if(n=n*1e3,isNaN(l))return{stiffness:100,damping:10,duration:n};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:n}}}const p4=12;function m4(n,e,t){let i=t;for(let s=1;sn[t]!==void 0)}function v4(n){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},n);if(!ux(n,_4)&&ux(n,g4)){const t=d4(n);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function F_(n){var{from:e=0,to:t=1,restSpeed:i=2,restDelta:s}=n,r=jT(n,["from","to","restSpeed","restDelta"]);const o={done:!1,value:e};let{stiffness:a,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:h}=v4(r),d=fx,p=fx;function _(){const g=u?-(u/1e3):0,m=t-e,v=l/(2*Math.sqrt(a*c)),b=Math.sqrt(a/c)/1e3;if(s===void 0&&(s=Math.min(Math.abs(t-e)/100,.4)),v<1){const y=Hg(b,v);d=T=>{const w=Math.exp(-v*b*T);return t-w*((g+v*b*m)/y*Math.sin(y*T)+m*Math.cos(y*T))},p=T=>{const w=Math.exp(-v*b*T);return v*b*w*(Math.sin(y*T)*(g+v*b*m)/y+m*Math.cos(y*T))-w*(Math.cos(y*T)*(g+v*b*m)-y*m*Math.sin(y*T))}}else if(v===1)d=y=>t-Math.exp(-b*y)*(m+(g+b*m)*y);else{const y=b*Math.sqrt(v*v-1);d=T=>{const w=Math.exp(-v*b*T),S=Math.min(y*T,300);return t-w*((g+v*b*m)*Math.sinh(S)+y*m*Math.cosh(S))/y}}}return _(),{next:g=>{const m=d(g);if(h)o.done=g>=f;else{const v=p(g)*1e3,b=Math.abs(v)<=i,y=Math.abs(t-m)<=s;o.done=b&&y}return o.value=o.done?t:m,o},flipTarget:()=>{u=-u,[e,t]=[t,e],_()}}}F_.needsInterpolation=(n,e)=>typeof n=="string"||typeof e=="string";const fx=n=>0,KT=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},k_=(n,e,t)=>-t*n+t*e+n,ZT=(n,e)=>t=>Math.max(Math.min(t,e),n),Bl=n=>n%1?Number(n.toFixed(5)):n,Mc=/(-)?([\d]*\.?[\d])+/g,Gg=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,y4=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Kc(n){return typeof n=="string"}const Zc={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},zl=Object.assign(Object.assign({},Zc),{transform:ZT(0,1)}),cf=Object.assign(Object.assign({},Zc),{default:1}),B_=n=>({test:e=>Kc(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),to=B_("deg"),Vl=B_("%"),ut=B_("px"),hx=Object.assign(Object.assign({},Vl),{parse:n=>Vl.parse(n)/100,transform:n=>Vl.transform(n*100)}),z_=(n,e)=>t=>!!(Kc(t)&&y4.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),JT=(n,e,t)=>i=>{if(!Kc(i))return i;const[s,r,o,a]=i.match(Mc);return{[n]:parseFloat(s),[e]:parseFloat(r),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},po={test:z_("hsl","hue"),parse:JT("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+Vl.transform(Bl(e))+", "+Vl.transform(Bl(t))+", "+Bl(zl.transform(i))+")"},b4=ZT(0,255),_m=Object.assign(Object.assign({},Zc),{transform:n=>Math.round(b4(n))}),mr={test:z_("rgb","red"),parse:JT("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+_m.transform(n)+", "+_m.transform(e)+", "+_m.transform(t)+", "+Bl(zl.transform(i))+")"};function x4(n){let e="",t="",i="",s="";return n.length>5?(e=n.substr(1,2),t=n.substr(3,2),i=n.substr(5,2),s=n.substr(7,2)):(e=n.substr(1,1),t=n.substr(2,1),i=n.substr(3,1),s=n.substr(4,1),e+=e,t+=t,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Wg={test:z_("#"),parse:x4,transform:mr.transform},Yn={test:n=>mr.test(n)||Wg.test(n)||po.test(n),parse:n=>mr.test(n)?mr.parse(n):po.test(n)?po.parse(n):Wg.parse(n),transform:n=>Kc(n)?n:n.hasOwnProperty("red")?mr.transform(n):po.transform(n)},QT="${c}",ew="${n}";function M4(n){var e,t,i,s;return isNaN(n)&&Kc(n)&&((t=(e=n.match(Mc))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((s=(i=n.match(Gg))===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0)>0}function tw(n){typeof n=="number"&&(n=`${n}`);const e=[];let t=0;const i=n.match(Gg);i&&(t=i.length,n=n.replace(Gg,QT),e.push(...i.map(Yn.parse)));const s=n.match(Mc);return s&&(n=n.replace(Mc,ew),e.push(...s.map(Zc.parse))),{values:e,numColors:t,tokenised:n}}function nw(n){return tw(n).values}function iw(n){const{values:e,numColors:t,tokenised:i}=tw(n),s=e.length;return r=>{let o=i;for(let a=0;atypeof n=="number"?0:n;function E4(n){const e=nw(n);return iw(n)(e.map(S4))}const Jc={test:M4,parse:nw,createTransformer:iw,getAnimatableNone:E4},T4=new Set(["brightness","contrast","saturate","opacity"]);function w4(n){let[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(Mc)||[];if(!i)return n;const s=t.replace(i,"");let r=T4.has(e)?1:0;return i!==t&&(r*=100),e+"("+r+s+")"}const A4=/([a-z-]*)\(.*?\)/g,Xg=Object.assign(Object.assign({},Jc),{getAnimatableNone:n=>{const e=n.match(A4);return e?e.map(w4).join(" "):n}});function vm(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function dx({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let s=0,r=0,o=0;if(!e)s=r=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;s=vm(l,a,n+1/3),r=vm(l,a,n),o=vm(l,a,n-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}const C4=(n,e,t)=>{const i=n*n,s=e*e;return Math.sqrt(Math.max(0,t*(s-i)+i))},R4=[Wg,mr,po],px=n=>R4.find(e=>e.test(n)),sw=(n,e)=>{let t=px(n),i=px(e),s=t.parse(n),r=i.parse(e);t===po&&(s=dx(s),t=mr),i===po&&(r=dx(r),i=mr);const o=Object.assign({},s);return a=>{for(const l in o)l!=="alpha"&&(o[l]=C4(s[l],r[l],a));return o.alpha=k_(s.alpha,r.alpha,a),t.transform(o)}},P4=n=>typeof n=="number",I4=(n,e)=>t=>e(n(t)),rw=(...n)=>n.reduce(I4);function ow(n,e){return P4(n)?t=>k_(n,e,t):Yn.test(n)?sw(n,e):lw(n,e)}const aw=(n,e)=>{const t=[...n],i=t.length,s=n.map((r,o)=>ow(r,e[o]));return r=>{for(let o=0;o{const t=Object.assign(Object.assign({},n),e),i={};for(const s in t)n[s]!==void 0&&e[s]!==void 0&&(i[s]=ow(n[s],e[s]));return s=>{for(const r in i)t[r]=i[r](s);return t}};function mx(n){const e=Jc.parse(n),t=e.length;let i=0,s=0,r=0;for(let o=0;o{const t=Jc.createTransformer(e),i=mx(n),s=mx(e);return i.numHSL===s.numHSL&&i.numRGB===s.numRGB&&i.numNumbers>=s.numNumbers?rw(aw(i.parsed,s.parsed),t):o=>`${o>0?e:n}`},D4=(n,e)=>t=>k_(n,e,t);function O4(n){if(typeof n=="number")return D4;if(typeof n=="string")return Yn.test(n)?sw:lw;if(Array.isArray(n))return aw;if(typeof n=="object")return L4}function N4(n,e,t){const i=[],s=t||O4(n[0]),r=n.length-1;for(let o=0;ot(KT(n,e,i))}function F4(n,e){const t=n.length,i=t-1;return s=>{let r=0,o=!1;if(s<=n[0]?o=!0:s>=n[i]&&(r=i-1,o=!0),!o){let l=1;for(;ls||l===i);l++);r=l-1}const a=KT(n[r],n[r+1],s);return e[r](a)}}function cw(n,e,{clamp:t=!0,ease:i,mixer:s}={}){const r=n.length;lx(r===e.length),lx(!i||!Array.isArray(i)||i.length===r-1),n[0]>n[r-1]&&(n=[].concat(n),e=[].concat(e),n.reverse(),e.reverse());const o=N4(e,i,s),a=r===2?U4(n,o):F4(n,o);return t?l=>a(Vg(n[0],n[r-1],l)):a}const Hd=n=>e=>1-n(1-e),V_=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,k4=n=>e=>Math.pow(e,n),uw=n=>e=>e*e*((n+1)*e-n),B4=n=>{const e=uw(n);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))},fw=1.525,z4=4/11,V4=8/11,H4=9/10,hw=n=>n,H_=k4(2),G4=Hd(H_),dw=V_(H_),pw=n=>1-Math.sin(Math.acos(n)),mw=Hd(pw),W4=V_(mw),G_=uw(fw),X4=Hd(G_),$4=V_(G_),q4=B4(fw),Y4=4356/361,j4=35442/1805,K4=16061/1805,Ih=n=>{if(n===1||n===0)return n;const e=n*n;return nn<.5?.5*(1-Ih(1-n*2)):.5*Ih(n*2-1)+.5;function Q4(n,e){return n.map(()=>e||dw).splice(0,n.length-1)}function e5(n){const e=n.length;return n.map((t,i)=>i!==0?i/(e-1):0)}function t5(n,e){return n.map(t=>t*e)}function Cf({from:n=0,to:e=1,ease:t,offset:i,duration:s=300}){const r={done:!1,value:n},o=Array.isArray(e)?e:[n,e],a=t5(i&&i.length===o.length?i:e5(o),s);function l(){return cw(a,o,{ease:Array.isArray(t)?t:Q4(o,t)})}let c=l();return{next:u=>(r.value=c(u),r.done=u>=s,r),flipTarget:()=>{o.reverse(),c=l()}}}function n5({velocity:n=0,from:e=0,power:t=.8,timeConstant:i=350,restDelta:s=.5,modifyTarget:r}){const o={done:!1,value:e};let a=t*n;const l=e+a,c=r===void 0?l:r(l);return c!==l&&(a=c-e),{next:u=>{const f=-a*Math.exp(-u/i);return o.done=!(f>s||f<-s),o.value=o.done?c:c+f,o},flipTarget:()=>{}}}const gx={keyframes:Cf,spring:F_,decay:n5};function i5(n){if(Array.isArray(n.to))return Cf;if(gx[n.type])return gx[n.type];const e=new Set(Object.keys(n));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Cf:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?F_:Cf}function gw(n,e,t=0){return n-e-t}function s5(n,e,t=0,i=!0){return i?gw(e+-n,e,t):e-(n-e)+t}function r5(n,e,t,i){return i?n>=e+t:n<=-t}const o5=n=>{const e=({delta:t})=>n(t);return{start:()=>zg.update(e,!0),stop:()=>o4.update(e)}};function _w(n){var e,t,{from:i,autoplay:s=!0,driver:r=o5,elapsed:o=0,repeat:a=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:f,onComplete:h,onRepeat:d,onUpdate:p}=n,_=jT(n,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=_,m,v=0,b=_.duration,y,T=!1,w=!0,S;const P=i5(_);!((t=(e=P).needsInterpolation)===null||t===void 0)&&t.call(e,i,g)&&(S=cw([0,100],[i,g],{clamp:!1}),i=0,g=100);const M=P(Object.assign(Object.assign({},_),{from:i,to:g}));function E(){v++,l==="reverse"?(w=v%2===0,o=s5(o,b,c,w)):(o=gw(o,b,c),l==="mirror"&&M.flipTarget()),T=!1,d&&d()}function D(){m.stop(),h&&h()}function B(V){if(w||(V=-V),o+=V,!T){const Q=M.next(Math.max(0,o));y=Q.value,S&&(y=S(y)),T=w?Q.done:o<=0}p==null||p(y),T&&(v===0&&(b??(b=o)),v{f==null||f(),m.stop()}}}function vw(n,e){return e?n*(1e3/e):0}function a5({from:n=0,velocity:e=0,min:t,max:i,power:s=.8,timeConstant:r=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:f,onComplete:h,onStop:d}){let p;function _(b){return t!==void 0&&bi}function g(b){return t===void 0?i:i===void 0||Math.abs(t-b){var T;f==null||f(y),(T=b.onUpdate)===null||T===void 0||T.call(b,y)},onComplete:h,onStop:d}))}function v(b){m(Object.assign({type:"spring",stiffness:o,damping:a,restDelta:l},b))}if(_(n))v({from:n,velocity:e,to:g(n)});else{let b=s*e+n;typeof c<"u"&&(b=c(b));const y=g(b),T=y===t?-1:1;let w,S;const P=M=>{w=S,S=M,e=vw(M-w,YT().delta),(T===1&&M>y||T===-1&&Mp==null?void 0:p.stop()}}const yw=(n,e)=>1-3*e+3*n,bw=(n,e)=>3*e-6*n,xw=n=>3*n,Lh=(n,e,t)=>((yw(e,t)*n+bw(e,t))*n+xw(e))*n,Mw=(n,e,t)=>3*yw(e,t)*n*n+2*bw(e,t)*n+xw(e),l5=1e-7,c5=10;function u5(n,e,t,i,s){let r,o,a=0;do o=e+(t-e)/2,r=Lh(o,i,s)-n,r>0?t=o:e=o;while(Math.abs(r)>l5&&++a=h5?d5(o,f,n,t):h===0?f:u5(o,a,a+uf,n,t)}return o=>o===0||o===1?o:Lh(r(o),e,i)}const Ns={},ym={};class m5{constructor(){fi(this,"subscriptions",new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,i){if(this.subscriptions.size)for(const s of this.subscriptions)s(e,t,i)}clear(){this.subscriptions.clear()}}function _x(n){return!Number.isNaN(Number.parseFloat(n))}class g5{constructor(e){fi(this,"current");fi(this,"prev");fi(this,"timeDelta",0);fi(this,"lastUpdated",0);fi(this,"updateSubscribers",new m5);fi(this,"stopAnimation");fi(this,"canTrackVelocity",!1);fi(this,"updateAndNotify",e=>{this.prev=this.current,this.current=e;const{delta:t,timestamp:i}=YT();this.lastUpdated!==i&&(this.timeDelta=t,this.lastUpdated=i),zg.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)});fi(this,"scheduleVelocityCheck",()=>zg.postRender(this.velocityCheck));fi(this,"velocityCheck",({timestamp:e})=>{this.canTrackVelocity||(this.canTrackVelocity=_x(this.current)),e!==this.lastUpdated&&(this.prev=this.current)});this.prev=this.current=e,this.canTrackVelocity=_x(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}set(e){this.updateAndNotify(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?vw(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{const{stop:i}=e(t);this.stopAnimation=i}).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 _5(n){return new g5(n)}const{isArray:v5}=Array;function y5(){const n=nt({}),e=i=>{const s=r=>{n.value[r]&&(n.value[r].stop(),n.value[r].destroy(),delete n.value[r])};i?v5(i)?i.forEach(s):s(i):Object.keys(n.value).forEach(s)},t=(i,s,r)=>{if(n.value[i])return n.value[i];const o=_5(s);return o.onChange(a=>r[i]=a),n.value[i]=o,o};return FB(e),{motionValues:n,get:t,stop:e}}function b5(n){return Array.isArray(n)}function no(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function bm(n){return{type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function x5(n){return{type:"spring",stiffness:550,damping:n===0?100:30,restDelta:.01,restSpeed:10}}function xm(){return{type:"keyframes",ease:"linear",duration:300}}function M5(n){return{type:"keyframes",duration:800,values:n}}const vx={default:x5,x:no,y:no,z:no,rotate:no,rotateX:no,rotateY:no,rotateZ:no,scaleX:bm,scaleY:bm,scale:bm,backgroundColor:xm,color:xm,opacity:xm};function Sw(n,e){let t;return b5(e)?t=M5:t=vx[n]||vx.default,{to:e,...t(e)}}const yx={...Zc,transform:Math.round},Ew={color:Yn,backgroundColor:Yn,outlineColor:Yn,fill:Yn,stroke:Yn,borderColor:Yn,borderTopColor:Yn,borderRightColor:Yn,borderBottomColor:Yn,borderLeftColor:Yn,borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,radius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,size:ut,top:ut,right:ut,bottom:ut,left:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,rotate:to,rotateX:to,rotateY:to,rotateZ:to,scale:cf,scaleX:cf,scaleY:cf,scaleZ:cf,skew:to,skewX:to,skewY:to,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:zl,originX:hx,originY:hx,originZ:ut,zIndex:yx,filter:Xg,WebkitFilter:Xg,fillOpacity:zl,strokeOpacity:zl,numOctaves:yx},W_=n=>Ew[n];function $g(n,e){return e&&typeof n=="number"&&e.transform?e.transform(n):n}function S5(n,e){let t=W_(n);return t!==Xg&&(t=Jc),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const E5={linear:hw,easeIn:H_,easeInOut:dw,easeOut:G4,circIn:pw,circInOut:W4,circOut:mw,backIn:G_,backInOut:$4,backOut:X4,anticipate:q4,bounceIn:Z4,bounceInOut:J4,bounceOut:Ih};function bx(n){if(Array.isArray(n)){const[e,t,i,s]=n;return p5(e,t,i,s)}else if(typeof n=="string")return E5[n];return n}function T5(n){return Array.isArray(n)&&typeof n[0]!="number"}function xx(n,e){return n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Jc.test(e)&&!e.startsWith("url("))}function w5(n){return Array.isArray(n.to)&&n.to[0]===null&&(n.to=[...n.to],n.to[0]=n.from),n}function A5({ease:n,times:e,delay:t,...i}){const s={...i};return e&&(s.offset=e),n&&(s.ease=T5(n)?n.map(bx):bx(n)),t&&(s.elapsed=-t),s}function C5(n,e,t){return Array.isArray(e.to)&&(n.duration||(n.duration=800)),w5(e),R5(n)||(n={...n,...Sw(t,e.to)}),{...e,...A5(n)}}function R5({delay:n,repeat:e,repeatType:t,repeatDelay:i,from:s,...r}){return!!Object.keys(r).length}function P5(n,e){return n[e]||n.default||n}function I5(n,e,t,i,s){const r=P5(i,n);let o=r.from===null||r.from===void 0?e.get():r.from;const a=xx(n,t);o==="none"&&a&&typeof t=="string"&&(o=S5(n,t));const l=xx(n,o);function c(f){const h={from:o,to:t,velocity:i.velocity?i.velocity:e.getVelocity(),onUpdate:d=>e.set(d)};return r.type==="inertia"||r.type==="decay"?a5({...h,...r}):_w({...C5(r,h,n),onUpdate:d=>{h.onUpdate(d),r.onUpdate&&r.onUpdate(d)},onComplete:()=>{s&&s(),f&&f()}})}function u(f){return e.set(t),s&&s(),f&&f(),{stop:()=>{}}}return!l||!a||r.type===!1?u:c}function L5(){const{motionValues:n,stop:e,get:t}=y5();return{motionValues:n,stop:e,push:(s,r,o,a={},l)=>{const c=o[s],u=t(s,c,o);if(a&&a.immediate){u.set(r);return}const f=I5(s,u,r,a,l);u.start(f)}}}function D5(n,e={},{motionValues:t,push:i,stop:s}=L5()){const r=Ft(e),o=nt(!1);je(t,f=>{o.value=Object.values(f).filter(h=>h.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]},l=f=>{typeof f=="string"&&(f=a(f));const h=Object.entries(f).map(([p,_])=>{if(p!=="transition")return new Promise(g=>i(p,_,n,f.transition||Sw(p,f[p]),g))}).filter(Boolean);async function d(){var p,_;await Promise.all(h),(_=(p=f.transition)==null?void 0:p.onComplete)==null||_.call(p)}return Promise.all([d()])};return{isAnimating:o,apply:l,set:f=>{const h=Ph(f)?f:a(f);Object.entries(h).forEach(([d,p])=>{d!=="transition"&&i(d,p,n,{immediate:!0})})},leave:async f=>{let h;if(r&&(r.leave&&(h=r.leave),!r.leave&&r.initial&&(h=r.initial)),!h){f();return}await l(h),f()},stop:s}}const X_=typeof window<"u",O5=()=>X_&&(window.onpointerdown===null||(Ns==null?void 0:Ns.TEST)),N5=()=>X_&&(window.ontouchstart===null||(Ns==null?void 0:Ns.TEST)),U5=()=>X_&&(window.onmousedown===null||(Ns==null?void 0:Ns.TEST));function F5({target:n,state:e,variants:t,apply:i}){const s=Ft(t),r=nt(!1),o=nt(!1),a=nt(!1),l=Ee(()=>{let u=[...Object.keys(e.value||{})];return s&&(s.hovered&&(u=[...u,...Object.keys(s.hovered)]),s.tapped&&(u=[...u,...Object.keys(s.tapped)]),s.focused&&(u=[...u,...Object.keys(s.focused)])),u}),c=Ee(()=>{const u={};Object.assign(u,e.value),r.value&&s.hovered&&Object.assign(u,s.hovered),o.value&&s.tapped&&Object.assign(u,s.tapped),a.value&&s.focused&&Object.assign(u,s.focused);for(const f in u)l.value.includes(f)||delete u[f];return u});s.hovered&&(Ot(n,"mouseenter",()=>r.value=!0),Ot(n,"mouseleave",()=>{r.value=!1,o.value=!1})),s.tapped&&(U5()&&(Ot(n,"mousedown",()=>o.value=!0),Ot(n,"mouseup",()=>o.value=!1)),O5()&&(Ot(n,"pointerdown",()=>o.value=!0),Ot(n,"pointerup",()=>o.value=!1)),N5()&&(Ot(n,"touchstart",()=>o.value=!0),Ot(n,"touchend",()=>o.value=!1))),s.focused&&(Ot(n,"focus",()=>a.value=!0),Ot(n,"blur",()=>a.value=!1)),je([r,o,a],()=>{i(c.value)})}function k5({set:n,target:e,variants:t,variant:i}){const s=Ft(t);je(()=>e,()=>{s&&(s.initial&&(n("initial"),i.value="initial"),s.enter&&(i.value="enter"))},{immediate:!0,flush:"pre"})}function B5({state:n,apply:e}){je(n,t=>{t&&e(t)},{immediate:!0})}function Tw({target:n,variants:e,variant:t}){const i=Ft(e);i&&(i.visible||i.visibleOnce)&&QB(n,([{isIntersecting:s}])=>{i.visible?s?t.value="visible":t.value="initial":i.visibleOnce&&(s&&t.value!=="visibleOnce"?t.value="visibleOnce":t.value||(t.value="initial"))})}function z5(n,e={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){e.lifeCycleHooks&&k5(n),e.syncVariants&&B5(n),e.visibilityHooks&&Tw(n),e.eventListeners&&F5(n)}function ww(n={}){const e=xi({...n}),t=nt({});return je(e,()=>{const i={};for(const[s,r]of Object.entries(e)){const o=W_(s),a=$g(r,o);i[s]=a}t.value=i},{immediate:!0,deep:!0}),{state:e,style:t}}function $_(n,e){je(()=>ei(n),t=>{t&&e(t)},{immediate:!0})}const V5={x:"translateX",y:"translateY",z:"translateZ"};function Aw(n={},e=!0){const t=xi({...n}),i=nt("");return je(t,s=>{let r="",o=!1;if(e&&(s.x||s.y||s.z)){const a=[s.x||0,s.y||0,s.z||0].map(l=>$g(l,ut)).join(",");r+=`translate3d(${a}) `,o=!0}for(const[a,l]of Object.entries(s)){if(e&&(a==="x"||a==="y"||a==="z"))continue;const c=W_(a),u=$g(l,c);r+=`${V5[a]||a}(${u}) `}e&&!o&&(r+="translateZ(0px) "),i.value=r.trim()},{immediate:!0,deep:!0}),{state:t,transform:i}}const H5=["","X","Y","Z"],G5=["perspective","translate","scale","rotate","skew"],Cw=["transformPerspective","x","y","z"];G5.forEach(n=>{H5.forEach(e=>{const t=n+e;Cw.push(t)})});const W5=new Set(Cw);function q_(n){return W5.has(n)}const X5=new Set(["originX","originY","originZ"]);function Rw(n){return X5.has(n)}function $5(n){const e={},t={};return Object.entries(n).forEach(([i,s])=>{q_(i)||Rw(i)?e[i]=s:t[i]=s}),{transform:e,style:t}}function Gd(n){const{transform:e,style:t}=$5(n),{transform:i}=Aw(e),{style:s}=ww(t);return i.value&&(s.value.transform=i.value),s.value}function q5(n,e){let t,i;const{state:s,style:r}=ww();return $_(n,o=>{i=o;for(const a of Object.keys(Ew))o.style[a]===null||o.style[a]===""||q_(a)||Rw(a)||(s[a]=o.style[a]);t&&Object.entries(t).forEach(([a,l])=>o.style[a]=l),e&&e(s)}),je(r,o=>{if(!i){t=o;return}for(const a in o)i.style[a]=o[a]},{immediate:!0}),{style:s}}function Y5(n){const e=n.trim().split(/\) |\)/);if(e.length===1)return{};const t=i=>i.endsWith("px")||i.endsWith("deg")?Number.parseFloat(i):Number.isNaN(Number(i))?Number(i):i;return e.reduce((i,s)=>{if(!s)return i;const[r,o]=s.split("("),l=o.split(",").map(u=>t(u.endsWith(")")?u.replace(")",""):u.trim())),c=l.length===1?l[0]:l;return{...i,[r]:c}},{})}function j5(n,e){Object.entries(Y5(e)).forEach(([t,i])=>{const s=["x","y","z"];if(t==="translate3d"){if(i===0){s.forEach(r=>n[r]=0);return}i.forEach((r,o)=>n[s[o]]=r);return}if(i=Number.parseFloat(`${i}`),t==="translateX"){n.x=i;return}if(t==="translateY"){n.y=i;return}if(t==="translateZ"){n.z=i;return}n[t]=i})}function K5(n,e){let t,i;const{state:s,transform:r}=Aw();return $_(n,o=>{i=o,o.style.transform&&j5(s,o.style.transform),t&&(o.style.transform=t),e&&e(s)}),je(r,o=>{if(!i){t=o;return}i.style.transform=o},{immediate:!0}),{transform:s}}function Z5(n){return Object.entries(n)}function J5(n,e){const t=xi({}),i=o=>Object.entries(o).forEach(([a,l])=>t[a]=l),{style:s}=q5(n,i),{transform:r}=K5(n,i);return je(t,o=>{Z5(o).forEach(([a,l])=>{const c=q_(a)?r:s;c[a]&&c[a]===l||(c[a]=l)})},{immediate:!0,deep:!0}),$_(n,()=>e),{motionProperties:t,style:s,transform:r}}function Q5(n={}){const e=Ft(n),t=nt();return{state:Ee(()=>{if(t.value)return e[t.value]}),variant:t}}function Pw(n,e={},t){const{motionProperties:i}=J5(n),{variant:s,state:r}=Q5(e),o=D5(i,e),a={target:n,variant:s,variants:e,state:r,motionProperties:i,...o};return z5(a,t),a}const Iw=["delay","duration"],ez=["initial","enter","leave","visible","visible-once","visibleOnce","hovered","tapped","focused",...Iw];function tz(n){return Iw.includes(n)}function nz(n,e){const t=n.props?n.props:n.data&&n.data.attrs?n.data.attrs:{};if(t){t.variants&&Ph(t.variants)&&(e.value={...e.value,...t.variants});for(let i of ez)if(!(!t||!t[i])){if(tz(i)&&typeof t[i]=="number"){for(const s of["enter","visible","visibleOnce"]){const r=e.value[s];r!=null&&(r.transition??(r.transition={}),r.transition[i]=t[i])}continue}if(Ph(t[i])){const s=t[i];i==="visible-once"&&(i="visibleOnce"),e.value[i]=s}}}}function Mm(n,e=!1){return{created:(s,r,o)=>{const a=r.value&&typeof r.value=="string"?r.value:o.key;a&&ym[a]&&ym[a].stop();const l=e?structuredClone(ht(n)||{}):n||{},c=nt(l);typeof r.value=="object"&&(c.value=r.value),nz(o,c);const f=Pw(s,c,{eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1});s.motionInstance=f,a&&(ym[a]=f)},mounted:(s,r,o)=>{s.motionInstance&&Tw(s.motionInstance)},getSSRProps(s,r){let{initial:o}=s.value||r&&(r==null?void 0:r.props)||{};o=Ft(o);const a=OT({},(n==null?void 0:n.initial)||{},o||{});return!a||Object.keys(a).length===0?void 0:{style:Gd(a)}}}}const iz={initial:{opacity:0},enter:{opacity:1}},sz={initial:{opacity:0},visible:{opacity:1}},rz={initial:{opacity:0},visibleOnce:{opacity:1}},oz={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},az={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},lz={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},cz={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},uz={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},fz={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},hz={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},dz={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},pz={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},mz={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},gz={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},_z={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},vz={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},yz={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},bz={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},xz={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},Mz={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},Sz={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},Ez={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},Tz={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},wz={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},Az={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},Cz={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},Rz={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},Pz={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},Iz={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},Lz={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Dh={__proto__:null,fade:iz,fadeVisible:sz,fadeVisibleOnce:rz,pop:oz,popVisible:az,popVisibleOnce:lz,rollBottom:vz,rollLeft:cz,rollRight:hz,rollTop:mz,rollVisibleBottom:yz,rollVisibleLeft:uz,rollVisibleOnceBottom:bz,rollVisibleOnceLeft:fz,rollVisibleOnceRight:pz,rollVisibleOnceTop:_z,rollVisibleRight:dz,rollVisibleTop:gz,slideBottom:Pz,slideLeft:xz,slideRight:Ez,slideTop:Az,slideVisibleBottom:Iz,slideVisibleLeft:Mz,slideVisibleOnceBottom:Lz,slideVisibleOnceLeft:Sz,slideVisibleOnceRight:wz,slideVisibleOnceTop:Rz,slideVisibleRight:Tz,slideVisibleTop:Cz};function Dz(n){const e="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;",t="aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------",i=new RegExp(e.split("").join("|"),"g");return n.toString().replace(/[A-Z]/g,s=>`-${s}`).toLowerCase().replace(/\s+/g,"-").replace(i,s=>t.charAt(e.indexOf(s))).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/-+$/,"")}const Lw=Symbol(""),Dw={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function Oz(n){return Object.prototype.toString.call(n)==="[object Object]"}function qg(n){if(Array.isArray(n))return n.map(qg);if(Oz(n)){const e={};for(const t in n)e[t]=qg(n[t]);return e}return n}function Ow(n){const e=xi({}),t=_n(Lw,{}),i=Ee(()=>n.preset==null?{}:t!=null&&n.preset in t?structuredClone(ht(t)[n.preset]):n.preset in Dh?structuredClone(Dh[n.preset]):{}),s=Ee(()=>({initial:n.initial,enter:n.enter,leave:n.leave,visible:n.visible,visibleOnce:n.visibleOnce,hovered:n.hovered,tapped:n.tapped,focused:n.focused}));function r(l,c){for(const u of["delay","duration"]){if(c[u]==null)continue;const f=Number.parseInt(c[u]);for(const h of["enter","visible","visibleOnce"]){const d=l[h];d!=null&&(d.transition??(d.transition={}),d.transition[u]=f)}}return l}const o=Ee(()=>{const l=OT({},s.value,i.value,n.variants||{});return r({...l},n)});function a(l,c,u){var h;l.props??(l.props={}),(h=l.props).style??(h.style={}),l.props.style={...l.props.style,...u};const f=r(qg(o.value),l.props);return l.props.onVnodeMounted=({el:d})=>{e[c]=Pw(d,f)},l.props.onVnodeUpdated=({el:d})=>{const p=Gd(e[c].state);for(const[_,g]of Object.entries(p))d.style[_]=g},l}return{motionConfig:o,setNodeInstance:a}}const Nz=hn({name:"Motion",props:{...Dw,is:{type:[String,Object],default:"div"}},setup(n){const e=O0(),{motionConfig:t,setNodeInstance:i}=Ow(n);return()=>{const s=Gd(t.value.initial||{}),r=ks(n.is,void 0,e);return i(r,0,s),r}}}),Uz=hn({name:"MotionGroup",props:{...Dw,is:{type:[String,Object],required:!1}},setup(n){const e=O0(),{motionConfig:t,setNodeInstance:i}=Ow(n);return()=>{var o;const s=Gd(t.value.initial||{}),r=((o=e.default)==null?void 0:o.call(e))||[];for(let a=0;a
'};t.configure=function(p){var _,g;for(_ in p)g=p[_],g!==void 0&&p.hasOwnProperty(_)&&(i[_]=g);return this},t.status=null,t.set=function(p){var _=t.isStarted();p=s(p,i.minimum,1),t.status=p===1?null:p;var g=t.render(!_),m=g.querySelector(i.barSelector),v=i.speed,b=i.easing;return g.offsetWidth,a(function(y){i.positionUsing===""&&(i.positionUsing=t.getPositioningCSS()),l(m,o(p,v,b)),p===1?(l(g,{transition:"none",opacity:1}),g.offsetWidth,setTimeout(function(){l(g,{transition:"all "+v+"ms linear",opacity:0}),setTimeout(function(){t.remove(),y()},v)},v)):setTimeout(y,v)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var p=function(){setTimeout(function(){t.status&&(t.trickle(),p())},i.trickleSpeed)};return i.trickle&&p(),this},t.done=function(p){return!p&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(p){var _=t.status;return _?(typeof p!="number"&&(p=(1-_)*s(Math.random()*_,.1,.95)),_=s(_+p,0,.994),t.set(_)):t.start()},t.trickle=function(){return t.inc(Math.random()*i.trickleRate)},function(){var p=0,_=0;t.promise=function(g){return!g||g.state()==="resolved"?this:(_===0&&t.start(),p++,_++,g.always(function(){_--,_===0?(p=0,t.done()):t.set((p-_)/p)}),this)}}(),t.render=function(p){if(t.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var _=document.createElement("div");_.id="nprogress",_.innerHTML=i.template;var g=_.querySelector(i.barSelector),m=p?"-100":r(t.status||0),v=document.querySelector(i.parent),b;return l(g,{transition:"all 0 linear",transform:"translate3d("+m+"%,0,0)"}),i.showSpinner||(b=_.querySelector(i.spinnerSelector),b&&d(b)),v!=document.body&&u(v,"nprogress-custom-parent"),v.appendChild(_),_},t.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(i.parent),"nprogress-custom-parent");var p=document.getElementById("nprogress");p&&d(p)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var p=document.body.style,_="WebkitTransform"in p?"Webkit":"MozTransform"in p?"Moz":"msTransform"in p?"ms":"OTransform"in p?"O":"";return _+"Perspective"in p?"translate3d":_+"Transform"in p?"translate":"margin"};function s(p,_,g){return p<_?_:p>g?g:p}function r(p){return(-1+p)*100}function o(p,_,g){var m;return i.positionUsing==="translate3d"?m={transform:"translate3d("+r(p)+"%,0,0)"}:i.positionUsing==="translate"?m={transform:"translate("+r(p)+"%,0)"}:m={"margin-left":r(p)+"%"},m.transition="all "+_+"ms "+g,m}var a=function(){var p=[];function _(){var g=p.shift();g&&g(_)}return function(g){p.push(g),p.length==1&&_()}}(),l=function(){var p=["Webkit","O","Moz","ms"],_={};function g(y){return y.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(T,w){return w.toUpperCase()})}function m(y){var T=document.body.style;if(y in T)return y;for(var w=p.length,S=y.charAt(0).toUpperCase()+y.slice(1),P;w--;)if(P=p[w]+S,P in T)return P;return y}function v(y){return y=g(y),_[y]||(_[y]=m(y))}function b(y,T,w){T=v(T),y.style[T]=w}return function(y,T){var w=arguments,S,P;if(w.length==2)for(S in T)P=T[S],P!==void 0&&T.hasOwnProperty(S)&&b(y,S,P);else b(y,w[1],w[2])}}();function c(p,_){var g=typeof p=="string"?p:h(p);return g.indexOf(" "+_+" ")>=0}function u(p,_){var g=h(p),m=g+_;c(g,_)||(p.className=m.substring(1))}function f(p,_){var g=h(p),m;c(p,_)&&(m=g.replace(" "+_+" "," "),p.className=m.substring(1,m.length-1))}function h(p){return(" "+(p.className||"")+" ").replace(/\s+/gi," ")}function d(p){p&&p.parentNode&&p.parentNode.removeChild(p)}return t})}(Pf)),Pf.exports}var Vz=zz();const Nw=kz(Vz);/*! * 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 Vz(){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 Hz=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 Gz=Symbol();function Wz(n){return!Yg(n)||!Object.prototype.hasOwnProperty.call(n,Gz)}const{assign:rr}=Object;function Xz(n){return!!(Lt(n)&&n.effect)}function $z(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 S=_=Symbol();Ar().then(()=>{_===S&&(c=!0)}),u=!0,na(f,M,i.state.value[n])}const m=r?function(){const{state:M}=t,S=M?M():{};this.$patch(D=>{rr(D,S)})}: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 S=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:S[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 S[Ex]=!0,S[Sm]=M,S},y={_p:i,$id:n,$onAction:Sx.bind(null,h),$patch:g,$reset:m,$subscribe(P,M={}){const S=Sx(f,P,M.detached,()=>D()),D=o.run(()=>je(()=>i.state.value[n],B=>{(M.flush==="sync"?u:c)&&P({storeId:n,type:Hl.direct,events:d},B)},rr({},l,M)));return S},$dispose:v},T=xi(y);i._s.set(n,T);const E=(i._a&&i._a.runWithContext||Hz)(()=>i._e.run(()=>(o=M0()).run(()=>e({action:b}))));for(const P in E){const M=E[P];if(Lt(M)&&!Xz(M)||Ls(M))r||(p&&Wz(M)&&(Lt(M)?M.value=p[P]:jg(M,p[P])),i.state.value[n][P]=M);else if(typeof M=="function"){const S=b(M,P);E[P]=S,a.actions[P]=M}}return rr(T,E),rr(ht(T),E),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 qz(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):$z(n,i,o)),o._s.get(n)}return r.$id=n,r}function Yz(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 jz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>Je(()=>import("./default-BuTQd-U2.js"),__vite__mapDeps([0,1,2])),"/src/layouts/settings.vue":()=>Je(()=>import("./settings-Dv1TTR1J.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,1,2])),"/src/layouts/stage.vue":()=>Je(()=>import("./stage-DjpiDloJ.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(()=>je(()=>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-DvMNFI2s.js"),__vite__mapDeps([0,1,2])),"/src/layouts/settings.vue":()=>Je(()=>import("./settings-D8xREh35.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,1,2])),"/src/layouts/stage.vue":()=>Je(()=>import("./stage-B1664kmG.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 Kz(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,Zz=/&/g,Jz=/\//g,Qz=/=/g,eV=/\?/g,Hw=/\+/g,tV=/%5B/g,nV=/%5D/g,Gw=/%5E/g,iV=/%60/g,Ww=/%7B/g,sV=/%7C/g,Xw=/%7D/g,rV=/%20/g;function Y_(n){return encodeURI(""+n).replace(sV,"|").replace(tV,"[").replace(nV,"]")}function oV(n){return Y_(n).replace(Ww,"{").replace(Xw,"}").replace(Gw,"^")}function Kg(n){return Y_(n).replace(Hw,"%2B").replace(rV,"+").replace(Vw,"%23").replace(Zz,"%26").replace(iV,"`").replace(Ww,"{").replace(Xw,"}").replace(Gw,"^")}function aV(n){return Kg(n).replace(Qz,"%3D")}function lV(n){return Y_(n).replace(Vw,"%23").replace(eV,"%3F")}function cV(n){return n==null?"":lV(n).replace(Jz,"%2F")}function Sc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const uV=/\/$/,fV=n=>n.replace(uV,"");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=mV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:Sc(o)}}function hV(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 dV(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(!pV(n[t],e[t]))return!1;return!0}function pV(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 mV(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 gV(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),fV(n)}const _V=/^[^#]+#/;function vV(n,e){return n.replace(_V,"#")+e}function yV(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 bV(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=yV(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 xV(n,e){Zg.set(n,e)}function MV(n){const e=Zg.get(n);return Zg.delete(n),e}let SV=()=>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 EV(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 TV(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:SV()+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 wV(n){n=gV(n);const e=TV(n),t=EV(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:vV.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 AV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),wV(n)}function CV(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="[^/]+?",RV={sensitive:!1,strict:!1,start:!0,end:!0},PV=/[.+*?^${}()[\]/\\]/g;function IV(n,e){const t=St({},RV,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 DV={type:0,value:""},OV=/[a-zA-Z0-9_]/;function NV(n){if(!n)return[[]];if(n==="/")return[[DV]];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=zV(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:BV(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:kV(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 kV(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 BV(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 zV(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=VV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function VV(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 HV(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 GV(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 WV=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):CV(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=Kz(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=Ut(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&&jV(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(YV(l)){const c=e[Ut(n.replace)?"replace":"push"](Ut(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 XV(n){return n.length===1?n[0]:n}const $V=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&&XV(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)}}}),qV=$V;function YV(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 jV(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,KV=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=Ut(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(WV,a),gr(Jg,s);const l=nt();return je(()=>[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=KV;function ZV(n){const e=FV(n.routes,n),t=n.parseQuery||HV,i=n.stringifyQuery||Ux,s=n.history,r=hl(),o=hl(),a=hl(),l=Ne(ir);let c=ir;sa&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Em.bind(null,$=>""+$),f=Em.bind(null,cV),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=hV(i,St({},$,{hash:oV($e),path:ue.path})),U=s.createHref(N);return St({fullPath:N,hash:$e,query:i===Ux?GV($.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 E($)}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 E($,ae){const le=c=m($),ue=l.value,$e=$.state,N=$.force,U=$.replace===!0,A=w(le);if(A)return E(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&&dV(i,ue,le)&&(G=Oa(16,{to:W,from:ue}),re(ue,ue,!0,!1)),(G?Promise.resolve(G):S(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 E(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 S($,ae){let le;const[ue,$e,N]=JV($,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){E(St($e,{replace:!0,force:!0}),ue).catch(Gl);return}c=ue;const N=l.value;sa&&xV(Ax(N.fullPath,le.delta),Xd()),S(ue,N).catch(U=>bs(U,12)?U:bs(U,2)?(E(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&&MV(Ax($.fullPath,0))||(ue||!le)&&history.state&&history.state.scroll||null;return Ar().then(()=>$e($,ae,N)).then(U=>U&&bV(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",qV),$.component("RouterView",Jw),$.config.globalProperties.$router=ae,Object.defineProperty($.config.globalProperties,"$route",{enumerable:!0,get:()=>Ut(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 JV(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 QV(){return _n($d)}function WG(n){return _n(j_)}const e6=[{path:"/",name:"/",component:()=>Je(()=>import("./index-B75XvTXz.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_-BrpHL_jO.js"),[])},{path:"/audio",name:"/audio",component:()=>Je(()=>import("./audio-BJdX6ujY.js"),[])},{path:"/devtools",children:[{path:"background-remove",name:"/devtools/background-remove",component:()=>Je(()=>import("./background-remove-DaFTGomF.js"),__vite__mapDeps([29,11,12,13,30]))},{path:"chat",name:"/devtools/chat",component:()=>Je(()=>import("./chat-LqG22_61.js"),__vite__mapDeps([31,20,10]))},{path:"image",name:"/devtools/image",component:()=>Je(()=>import("./image-DO9kjhVb.js"),__vite__mapDeps([32,33]))},{path:"vibrant",name:"/devtools/vibrant",component:()=>Je(()=>import("./vibrant-Dqom7fOB.js"),__vite__mapDeps([34,11,12,13,30,35]))}]},{path:"/queue",name:"/queue",component:()=>Je(()=>import("./queue-C1jw5F5A.js"),__vite__mapDeps([36,18]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>Je(()=>import("./index-jeVA_ivf.js"),__vite__mapDeps([37,4,5,6,7,8,11,12,13,38,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>Je(()=>import("./index-BYUmiAdF.js"),__vite__mapDeps([39,6,7,8,21,22,9,10,17,11,12,13,30,40,41,42,4,5,43,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>Je(()=>import("./CardDetailDialog-BfFWXE3W.js"),__vite__mapDeps([44,40,41,42,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-B5AqVhT4.js"),__vite__mapDeps([45,43,4,5,6,7,8,11,12,13]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>Je(()=>import("./DeleteCardDialog-Ce4rxuq4.js"),__vite__mapDeps([46,41,42,12]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>Je(()=>import("./index-CGh1ZyDs.js"),__vite__mapDeps([47,4,5,6,7,8,11,12,13,48,25,23,42,27,49])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>Je(()=>import("./index-DP1h1D6P.js"),__vite__mapDeps([50,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>Je(()=>import("./index-Bzd5oxLM.js"),__vite__mapDeps([51,4,5,24,6,7,8,11,12,13,35,48,25,23,42,52,27,53])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>Je(()=>import("./index-BgI42RYO.js"),__vite__mapDeps([54,4,5,6,7,8,55,11,12,13,38,52,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>Je(()=>import("./consciousness-dGzQjYcs.js"),__vite__mapDeps([56,4,5,6,7,8,22,9,10,11,12,13,57,23,58,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>Je(()=>import("./memory-long-term-DxUYdEDS.js"),__vite__mapDeps([59,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>Je(()=>import("./memory-short-term-BfhGoDof.js"),__vite__mapDeps([60,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>Je(()=>import("./speech-BgcS9-0U.js"),__vite__mapDeps([61,62,4,5,11,12,13,6,7,8,9,10,17,63,58,64,26,57,23,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>Je(()=>import("./index-B5GMSkOE.js"),__vite__mapDeps([65,4,5,6,7,8,9,10,55,11,12,13,52,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-Cagj-QoZ.js"),__vite__mapDeps([66,4,5,6,7,8,9,10,17,62,11,12,13,67,68,25,23,63,58,69,70,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>Je(()=>import("./anthropic-juwkGSIG.js"),__vite__mapDeps([71,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>Je(()=>import("./cloudflare-workers-ai-DjQjUR2r.js"),__vite__mapDeps([73,4,5,6,7,8,9,10,11,12,13,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>Je(()=>import("./deepseek-CJMkm8eL.js"),__vite__mapDeps([74,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>Je(()=>import("./elevenlabs-CH5jsvHS.js"),__vite__mapDeps([75,4,5,6,7,8,9,10,17,62,11,12,13,67,68,25,23,63,58,69,70,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>Je(()=>import("./featherless-ai-Z-5NkV92.js"),__vite__mapDeps([76,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>Je(()=>import("./fireworks-ai-T0bvNySV.js"),__vite__mapDeps([77,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>Je(()=>import("./google-generative-ai-qEwXEQ7E.js"),__vite__mapDeps([78,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>Je(()=>import("./microsoft-speech-hZbAAf4A.js"),__vite__mapDeps([79,4,5,6,7,8,9,10,17,63,58,62,11,12,13,67,68,25,23,69,70,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>Je(()=>import("./mistral-ai-D1fqDC-m.js"),__vite__mapDeps([80,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>Je(()=>import("./moonshot-ai-BIzTGNXq.js"),__vite__mapDeps([81,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>Je(()=>import("./novita-ai-DRwPtDAn.js"),__vite__mapDeps([82,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"ollama",name:"/settings/providers/ollama",component:()=>Je(()=>import("./ollama-D3Njx7yd.js"),__vite__mapDeps([83,4,5,6,7,8,9,10,58,11,12,13,68,25,23,63,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openai",name:"/settings/providers/openai",component:()=>Je(()=>import("./openai-DL7DVZ_f.js"),__vite__mapDeps([84,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>Je(()=>import("./openrouter-ai-BwGXDu-Y.js"),__vite__mapDeps([85,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>Je(()=>import("./together-ai-dCAiNsZI.js"),__vite__mapDeps([86,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"volcengine",name:"/settings/providers/volcengine",component:()=>Je(()=>import("./volcengine-CRxgozat.js"),__vite__mapDeps([87,4,5,6,7,8,9,10,17,63,58,62,11,12,13,67,68,25,23,69,70,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"xai",name:"/settings/providers/xai",component:()=>Je(()=>import("./xai-P5ub0MXi.js"),__vite__mapDeps([88,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"scene",children:[{path:"",name:"/settings/scene/",component:()=>Je(()=>import("./index-TcFPSyt2.js"),__vite__mapDeps([89,52,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-D5fgxn9b.js"),__vite__mapDeps([90,11,12,13,64,26]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>Je(()=>import("./delays-BZov6ATI.js"),__vite__mapDeps([91,6,19,7,18,11,12,13,64,26]))},{path:"emotions",name:"/test/queues/emotions",component:()=>Je(()=>import("./emotions--Kof67xA.js"),__vite__mapDeps([92,18,19,7,11,12,13,64,26]))},{path:"messages",name:"/test/queues/messages",component:()=>Je(()=>import("./messages-D-pels38.js"),__vite__mapDeps([93,18,19,7,11,12,13,64,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}}},t6={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},n6=n=>Qw(t6[n.toLowerCase()],6),i6=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,s6=n=>{let e;return(e=n.match(i6))?Qw(parseInt(e[1],16),e[1].length):void 0},_r="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Xl=`${_r}%`,K_=`(?:${_r}%|${_r})`,r6=`(?:${_r}(deg|grad|rad|turn)|${_r})`,Na="\\s*,\\s*",o6=new RegExp(`^rgba?\\(\\s*${_r}${Na}${_r}${Na}${_r}\\s*(?:,\\s*${K_}\\s*)?\\)$`),a6=new RegExp(`^rgba?\\(\\s*${Xl}${Na}${Xl}${Na}${Xl}\\s*(?:,\\s*${K_}\\s*)?\\)$`),l6=n=>{let e={mode:"rgb"},t;if(t=n.match(o6))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(a6))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},c6=(n,e)=>n===void 0?void 0:typeof n!="object"?y6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,eA=(n="rgb")=>e=>(e=c6(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={},u6=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=u6)}),tA[n.mode]=n,(n.parse||[]).forEach(e=>{h6(e,n.mode)}),eA(n.mode)),f6=n=>tA[n],h6=(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_]/,d6=/[^\x00-\x7F]|[-\w]/,ye={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let Ke=0;function ff(n){let e=n[Ke],t=n[Ke+1];return e==="-"||e==="+"?/\d/.test(t)||t==="."&&/\d/.test(n[Ke+2]):e==="."?/\d/.test(t):/\d/.test(e)}function e0(n){if(Ke>=n.length)return!1;let e=n[Ke];if(Qg.test(e))return!0;if(e==="-"){if(n.length-Ke<2)return!1;let t=n[Ke+1];return!!(t==="-"||Qg.test(t))}return!1}const p6={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function dl(n){let e="";if((n[Ke]==="-"||n[Ke]==="+")&&(e+=n[Ke++]),e+=hf(n),n[Ke]==="."&&/\d/.test(n[Ke+1])&&(e+=n[Ke++]+hf(n)),(n[Ke]==="e"||n[Ke]==="E")&&((n[Ke+1]==="-"||n[Ke+1]==="+")&&/\d/.test(n[Ke+2])?e+=n[Ke++]+n[Ke++]+hf(n):/\d/.test(n[Ke+1])&&(e+=n[Ke++]+hf(n))),e0(n)){let t=Nh(n);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:ye.Hue,value:e*p6[t]}:void 0}return n[Ke]==="%"?(Ke++,{type:ye.Percentage,value:+e}):{type:ye.Number,value:+e}}function hf(n){let e="";for(;/\d/.test(n[Ke]);)e+=n[Ke++];return e}function Nh(n){let e="";for(;Ke{},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 je(()=>[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-DBnFFJfg.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_-BiHZQIsr.js"),[])},{path:"/audio",name:"/audio",component:()=>Je(()=>import("./audio-w3xz7y-w.js"),[])},{path:"/devtools",children:[{path:"background-remove",name:"/devtools/background-remove",component:()=>Je(()=>import("./background-remove-CWrjzMNd.js"),__vite__mapDeps([29,11,12,13,30]))},{path:"chat",name:"/devtools/chat",component:()=>Je(()=>import("./chat-CpNt1NMw.js"),__vite__mapDeps([31,20,10]))},{path:"image",name:"/devtools/image",component:()=>Je(()=>import("./image-D7D2TYfM.js"),__vite__mapDeps([32,33]))},{path:"vibrant",name:"/devtools/vibrant",component:()=>Je(()=>import("./vibrant-58lOJFKP.js"),__vite__mapDeps([34,11,12,13,30,35]))}]},{path:"/queue",name:"/queue",component:()=>Je(()=>import("./queue-Bw5vKhjp.js"),__vite__mapDeps([36,18]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>Je(()=>import("./index-BmHVaKnN.js"),__vite__mapDeps([37,4,5,6,7,8,11,12,13,38,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>Je(()=>import("./index-DmgogPpB.js"),__vite__mapDeps([39,6,7,8,21,22,9,10,17,11,12,13,30,40,41,42,4,5,43,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>Je(()=>import("./CardDetailDialog-DwxgCXTp.js"),__vite__mapDeps([44,40,41,42,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-IHOaqPwL.js"),__vite__mapDeps([45,43,4,5,6,7,8,11,12,13]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>Je(()=>import("./DeleteCardDialog-YApE2agS.js"),__vite__mapDeps([46,41,42,12]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>Je(()=>import("./index-CN6HIUGU.js"),__vite__mapDeps([47,4,5,6,7,8,11,12,13,48,25,23,42,27,49])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>Je(()=>import("./index-BNKfaMGQ.js"),__vite__mapDeps([50,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>Je(()=>import("./index-CPhFJIv6.js"),__vite__mapDeps([51,4,5,24,6,7,8,11,12,13,35,48,25,23,42,52,27,53])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>Je(()=>import("./index-E9C4_JmR.js"),__vite__mapDeps([54,4,5,6,7,8,55,11,12,13,38,52,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>Je(()=>import("./consciousness-aLswuYDU.js"),__vite__mapDeps([56,4,5,6,7,8,22,9,10,11,12,13,57,23,58,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>Je(()=>import("./memory-long-term-BYp5gzbN.js"),__vite__mapDeps([59,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>Je(()=>import("./memory-short-term-BrCCCvqI.js"),__vite__mapDeps([60,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>Je(()=>import("./speech-zNK1lovq.js"),__vite__mapDeps([61,62,4,5,11,12,13,6,7,8,9,10,17,63,58,64,26,57,23,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>Je(()=>import("./index-BmJKXlqd.js"),__vite__mapDeps([65,4,5,6,7,8,9,10,55,11,12,13,52,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-_AbXbWJU.js"),__vite__mapDeps([66,4,5,6,7,8,9,10,17,62,11,12,13,67,68,25,23,63,58,69,70,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>Je(()=>import("./anthropic-lNQKhFGe.js"),__vite__mapDeps([71,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>Je(()=>import("./cloudflare-workers-ai-Cf2g_ZuT.js"),__vite__mapDeps([73,4,5,6,7,8,9,10,11,12,13,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>Je(()=>import("./deepseek-CrDEniHj.js"),__vite__mapDeps([74,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>Je(()=>import("./elevenlabs-BSsm83ek.js"),__vite__mapDeps([75,4,5,6,7,8,9,10,17,62,11,12,13,67,68,25,23,63,58,69,70,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>Je(()=>import("./featherless-ai-DnuxCHwU.js"),__vite__mapDeps([76,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>Je(()=>import("./fireworks-ai-ChxVTXyy.js"),__vite__mapDeps([77,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>Je(()=>import("./google-generative-ai-BdEPpMgb.js"),__vite__mapDeps([78,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>Je(()=>import("./microsoft-speech-BztvXPSP.js"),__vite__mapDeps([79,4,5,6,7,8,9,10,17,63,58,62,11,12,13,67,68,25,23,69,70,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>Je(()=>import("./mistral-ai-DQVUyxbn.js"),__vite__mapDeps([80,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>Je(()=>import("./moonshot-ai-e8eEMU8s.js"),__vite__mapDeps([81,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>Je(()=>import("./novita-ai-5caxkANW.js"),__vite__mapDeps([82,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"ollama",name:"/settings/providers/ollama",component:()=>Je(()=>import("./ollama-CLDB6qQc.js"),__vite__mapDeps([83,4,5,6,7,8,9,10,58,11,12,13,68,25,23,63,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openai",name:"/settings/providers/openai",component:()=>Je(()=>import("./openai-BR-iPfOR.js"),__vite__mapDeps([84,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>Je(()=>import("./openrouter-ai-AaPaLp8U.js"),__vite__mapDeps([85,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>Je(()=>import("./together-ai-CqmqxxJV.js"),__vite__mapDeps([86,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"volcengine",name:"/settings/providers/volcengine",component:()=>Je(()=>import("./volcengine-BgIoHidq.js"),__vite__mapDeps([87,4,5,6,7,8,9,10,17,63,58,62,11,12,13,67,68,25,23,69,70,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"xai",name:"/settings/providers/xai",component:()=>Je(()=>import("./xai-DD8al7gb.js"),__vite__mapDeps([88,4,5,6,7,8,9,10,11,12,13,68,25,23,63,58,69,70,72,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"scene",children:[{path:"",name:"/settings/scene/",component:()=>Je(()=>import("./index-KSDXhdaQ.js"),__vite__mapDeps([89,52,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-BhV06SUJ.js"),__vite__mapDeps([90,11,12,13,64,26]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>Je(()=>import("./delays-zRQlbx4H.js"),__vite__mapDeps([91,6,19,7,18,11,12,13,64,26]))},{path:"emotions",name:"/test/queues/emotions",component:()=>Je(()=>import("./emotions-C4EsVYF_.js"),__vite__mapDeps([92,18,19,7,11,12,13,64,26]))},{path:"messages",name:"/test/queues/messages",component:()=>Je(()=>import("./messages-DycnhubE.js"),__vite__mapDeps([93,18,19,7,11,12,13,64,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 Ke=0;function ff(n){let e=n[Ke],t=n[Ke+1];return e==="-"||e==="+"?/\d/.test(t)||t==="."&&/\d/.test(n[Ke+2]):e==="."?/\d/.test(t):/\d/.test(e)}function e0(n){if(Ke>=n.length)return!1;let e=n[Ke];if(Qg.test(e))return!0;if(e==="-"){if(n.length-Ke<2)return!1;let t=n[Ke+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[Ke]==="-"||n[Ke]==="+")&&(e+=n[Ke++]),e+=hf(n),n[Ke]==="."&&/\d/.test(n[Ke+1])&&(e+=n[Ke++]+hf(n)),(n[Ke]==="e"||n[Ke]==="E")&&((n[Ke+1]==="-"||n[Ke+1]==="+")&&/\d/.test(n[Ke+2])?e+=n[Ke++]+n[Ke++]+hf(n):/\d/.test(n[Ke+1])&&(e+=n[Ke++]+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[Ke]==="%"?(Ke++,{type:ye.Percentage,value:+e}):{type:ye.Number,value:+e}}function hf(n){let e="";for(;/\d/.test(n[Ke]);)e+=n[Ke++];return e}function Nh(n){let e="";for(;Ke4)){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 v6(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 y6=n=>{if(typeof n!="string")return;const e=g6(n),t=e?v6(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,M6=(n,e,t)=>n+t*(e-n),S6=n=>{let e=[];for(let t=0;te=>{let t=S6(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=E6(M6),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:[b6,s6,l6,n6,x6,"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},T6={...$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,w6=(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=>w6(n,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),cn=[-.14861,1.78277,-.29227,-.90649,1.97294,0],A6=Math.PI/180,C6=180/Math.PI;let Wx=cn[3]*cn[4],Xx=cn[1]*cn[4],$x=cn[1]*cn[2]-cn[0]*cn[3];const R6=({r:n,g:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=($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)*C6-120),i!==void 0&&(a.alpha=i),a},P6=({h:n,s:e,l:t,alpha:i})=>{let s={mode:"rgb"};n=(n===void 0?0:n+120)*A6,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},I6=(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},L6={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:R6},toMode:{rgb:P6},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"),D6={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}}},O6={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 N6({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 U6({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}},V6=new RegExp(`^hsla?\\(\\s*${r6}${Na}${Xl}${Na}${Xl}\\s*(?:,\\s*${K_}\\s*)?\\)$`),H6=n=>{let e=n.match(V6);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=z6(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 G6(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:k6},fromMode:{rgb:B6},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[G6,H6],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 X6(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 $6(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 q6={mode:"hwb",toMode:{rgb:W6},fromMode:{rgb:X6},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[$6],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:I6},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},Y6={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}}},j6=134.03437499999998,K6=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),j6)},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)-K6,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},Z6=134.03437499999998,Zx=16295499532821565e-27,Bm=n=>{if(n<0)return 0;let e=Math.pow(n,1/Z6);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)),J6={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},Q6={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 eH(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:[eH],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}}},tH={...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 nH(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:[nH],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}},iH={...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),sH=EA(en.X,en.Y,en.Z),rH=TA(en.X,en.Y,en.Z),oH=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=oH(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-sH),o=13*s*(o-rH));let a={mode:"luv",l:s,u:r,v:o};return i!==void 0&&(a.alpha=i),a},aH=(n,e,t)=>4*n/(n+15*e+3*t),lH=(n,e,t)=>9*e/(n+15*e+3*t),cH=aH(en.X,en.Y,en.Z),uH=lH(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)+cH,r=t/(13*n)+uH,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},fH=n=>MA(i0(eu(n))),hH=n=>Qc(s0(SA(n))),dH={mode:"lchuv",toMode:{luv:SA,rgb:hH},fromMode:{rgb:fH,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}},pH={...$a,mode:"lrgb",toMode:{rgb:Ya},fromMode:{rgb:qa},parse:["srgb-linear"],serialize:"srgb-linear"},mH={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 gH(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,E=6*f*f*p,P=6*h*h*_,M=6*d*d*g,S=a*m+l*v+c*b,D=a*y+l*T+c*w,B=a*E+l*P+c*M;u=u-S*D/(D*D-.5*S*B)}return u}function nv(n,e){let t=gH(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 _H(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,E=3*h*m*m,P=3*d*v*v,M=3*p*b*b,S=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*E-3.3077115913*P+.2309699292*M,Q=4.0767416621*S-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*E+2.6097574011*P-.3413193965*M,Me=-1.2684380046*S+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*E-.7034186147*P+1.707614701*M,ge=-.0041960863*S-.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=_H(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 yH={...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 bH(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 xH={...ev,mode:"oklab",toMode:{lrgb:tu,rgb:ip},fromMode:{lrgb:wA,rgb:np},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[bH],serialize:n=>`oklab(${n.l!==void 0?n.l:"none"} ${n.a!==void 0?n.a:"none"} ${n.b!==void 0?n.b:"none"}${n.alpha<1?` / ${n.alpha}`:""})`};function MH(n,e){if(!e||e[0]!=="oklch")return;const t={mode:"oklch"},[,i,s,r,o]=e;if(i.type!==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 SH={...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:[MH],serialize:n=>`oklch(${n.l!==void 0?n.l:"none"} ${n.c!==void 0?n.c:"none"} ${n.h!==void 0?n.h:"none"}${n.alpha<1?` / ${n.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},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},EH={...$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},TH={...$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,wH=.018053968510807,Xm=n=>{const e=Math.abs(n);return e>wH?(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,AH=.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},CH={...$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,RH=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),PH=({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},IH={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:PH},fromMode:{rgb:RH},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ce,y:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},LH={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}}},DH=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},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:"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},NH={mode:"xyz65",toMode:{rgb:Oo,xyz50:DH},fromMode:{rgb:Do,xyz50:OH},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}}},UH=({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},FH=({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},kH={mode:"yiq",toMode:{rgb:FH},fromMode:{rgb:UH},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(T6);Tt(L6);Tt(D6);Tt(O6);Tt(F6);Tt(uA);Tt(dA);Tt(q6);Tt(Y6);Tt(J6);Tt(Q6);Tt(ev);Tt(tH);Tt(tv);Tt(iH);Tt(dH);Tt(pH);Tt(mH);Tt(vH);Tt(yH);Tt(xH);Tt(SH);Tt(EH);Tt(TH);Tt(CH);Tt($a);Tt(IH);Tt(LH);Tt(NH);Tt(kH);const o0=220.44,BH=eA("oklch"),hM=n=>{var e;return n?(e=BH(n))==null?void 0:e.h:o0},zH=qz("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 E=hM(w);if(!E)return!1;const P=Math.abs(E-m.value);return P<.01||P>359.99}return je(i,w=>{w==="false"&&(n.value=void 0),w==="true"&&o().then(()=>{n.value=r.value[0]})}),je(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}}),VH=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 Hn(()=>{document.documentElement.style.setProperty("--stage-transition-3-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-3-overlay-color-2",s.value)}),(r,o)=>(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},HH=No(VH,[["__scopeId","data-v-df576df0"]]),GH=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 Hn(()=>{var i,s;document.documentElement.style.setProperty("--circle-expansion-delay",`${((i=e.stageTransition)==null?void 0:i.delay)||0}s`),document.documentElement.style.setProperty("--circle-expansion-duration",`${((s=e.stageTransition)==null?void 0:s.duration)||.4}s`),t.value.forEach((r,o)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${o+1}`,r)})}),(i,s)=>{var r;return 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)}}}),WH=No(GH,[["__scopeId","data-v-0c29056c"]]),XH=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 Hn(()=>{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)}}}),$H=No(XH,[["__scopeId","data-v-e62bf496"]]),qH=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 Hn(()=>{document.documentElement.style.setProperty("--stage-transition-4-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-4-overlay-color-2",s.value)}),(r,o)=>{var a;return 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)}}}),YH=No(qH,[["__scopeId","data-v-6d1179fc"]]),jH=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 je([t,i,s],()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",s.value)}),Hn(()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",s.value)}),(r,o)=>{var a;return vn(),yi("div",{class:"stage-transition-1",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),KH=No(jH,[["__scopeId","data-v-bf1d1566"]]),ZH=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 Hn(()=>{document.documentElement.style.setProperty("--stage-transition-2-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-2-overlay-color-2",s.value)}),(r,o)=>{var a;return vn(),yi("div",{class:"stage-transition-2",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),JH=No(ZH,[["__scopeId","data-v-8ff7120f"]]),QH=hn({__name:"RectanglesRotateTransition",props:{stageTransition:null},setup(n){const e=n;return Hn(()=>{var t,i,s,r,o,a,l;document.documentElement.style.setProperty("--rectangle-rotate-1-color",((t=e.stageTransition)==null?void 0:t.primaryColor)||"#ebcb8b"),document.documentElement.style.setProperty("--rectangle-rotate-2-color",((i=e.stageTransition)==null?void 0:i.secondaryColor)||"#c56370"),document.documentElement.style.setProperty("--rectangle-rotate-3-color",((s=e.stageTransition)==null?void 0:s.tertiaryColor)||"#43445b"),document.documentElement.style.setProperty("--rectangle-rotate-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.6}s`),document.documentElement.style.setProperty("--rectangle-rotate-delay",`${((o=e.stageTransition)==null?void 0:o.delay)||0}s`),document.documentElement.style.setProperty("--rectangle-rotate-stagger",`${((a=e.stageTransition)==null?void 0:a.staggerDelay)||.1}s`),document.documentElement.style.setProperty("--rectangle-rotate-rotation",`${((l=e.stageTransition)==null?void 0:l.rotation)||270}deg`)}),(t,i)=>{var s;return 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)}}}),e8=No(QH,[["__scopeId","data-v-f4b1dc64"]]),t8=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=QV(),i=nt(!1),s=nt(),r=nt(""),o=nt(),a=Ne({slide:{component:KH,duration:2700},"slope-slide":{component:JH,duration:2700},arrow:{component:HH,duration:2700},"multiple-blocks-reveal":{component:YH,duration:2800},"fantasy-fall":{component:$H,duration:2700},"rectangles-rotate":{component:e8,duration:2700},"bubble-wave-out":{component:WH,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))}});/*! +`||e[Ke]===" "||e[Ke]===" ");)Ke++;let s;if(ff(e)&&(s=dl(e),s.type!==ye.Hue)){t.push({type:ye.Alpha,value:s});continue}if(e0(e)&&Nh(e)==="none"){t.push({type:ye.Alpha,value:{type:ye.None,value:void 0}});continue}return}if(/\d/.test(i)){Ke--,t.push(dl(e));continue}if(Qg.test(i)){Ke--,t.push(g6(e));continue}return}return t}function v6(n){n._i=0;let e=n[n._i++];if(!e||e.type!==ye.Function||e.value!=="color"||(e=n[n._i++],e.type!==ye.Ident))return;const t=nA[e.value];if(!t)return;const i={mode:t},s=iA(n,!1);if(!s)return;const r=h6(t).channels;for(let o=0,a,l;o4)){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 je(i,w=>{w==="false"&&(n.value=void 0),w==="true"&&o().then(()=>{n.value=r.value[0]})}),je(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 je([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))}});/*! * shared v11.1.5 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const zh=typeof window<"u",Lr=(n,e=!1)=>e?Symbol.for(n):Symbol(n),n8=(n,e,t)=>i8({l:n,k:e,s:t}),i8=n=>JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Qt=n=>typeof n=="number"&&isFinite(n),s8=n=>rv(n)==="[object Date]",Vh=n=>rv(n)==="[object RegExp]",sp=n=>mt(n)&&Object.keys(n).length===0,fn=Object.assign,r8=Object.create,It=(n=null)=>r8(n);let dM;const sv=()=>dM||(dM=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:It());function pM(n){return n.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const o8=Object.prototype.hasOwnProperty;function Oi(n,e){return o8.call(n,e)}const Yt=Array.isArray,Vt=n=>typeof n=="function",Fe=n=>typeof n=="string",Ht=n=>typeof n=="boolean",xt=n=>n!==null&&typeof n=="object",a8=n=>xt(n)&&Vt(n.then)&&Vt(n.catch),RA=Object.prototype.toString,rv=n=>RA.call(n),mt=n=>rv(n)==="[object Object]",l8=n=>n==null?"":Yt(n)||mt(n)&&n.toString===RA?JSON.stringify(n,null,2):String(n);function ov(n,e=""){return n.reduce((t,i,s)=>s===0?t+i:t+e+i,"")}function c8(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const df=n=>!xt(n)||Yt(n);function If(n,e){if(df(n)||df(e))throw new Error("Invalid value");const t=[{src:n,des:e}];for(;t.length;){const{src:i,des:s}=t.pop();Object.keys(i).forEach(r=>{r!=="__proto__"&&(xt(i[r])&&!xt(s[r])&&(s[r]=Array.isArray(i[r])?[]:It()),df(s[r])||df(i[r])?s[r]=i[r]:t.push({src:i[r],des:s[r]}))})}}/*! + */const zh=typeof window<"u",Lr=(n,e=!1)=>e?Symbol.for(n):Symbol(n),i8=(n,e,t)=>s8({l:n,k:e,s:t}),s8=n=>JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Qt=n=>typeof n=="number"&&isFinite(n),r8=n=>rv(n)==="[object Date]",Vh=n=>rv(n)==="[object RegExp]",sp=n=>mt(n)&&Object.keys(n).length===0,fn=Object.assign,o8=Object.create,It=(n=null)=>o8(n);let dM;const sv=()=>dM||(dM=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:It());function pM(n){return n.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const a8=Object.prototype.hasOwnProperty;function Oi(n,e){return a8.call(n,e)}const Yt=Array.isArray,Vt=n=>typeof n=="function",Fe=n=>typeof n=="string",Ht=n=>typeof n=="boolean",xt=n=>n!==null&&typeof n=="object",l8=n=>xt(n)&&Vt(n.then)&&Vt(n.catch),RA=Object.prototype.toString,rv=n=>RA.call(n),mt=n=>rv(n)==="[object Object]",c8=n=>n==null?"":Yt(n)||mt(n)&&n.toString===RA?JSON.stringify(n,null,2):String(n);function ov(n,e=""){return n.reduce((t,i,s)=>s===0?t+i:t+e+i,"")}function u8(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const df=n=>!xt(n)||Yt(n);function If(n,e){if(df(n)||df(e))throw new Error("Invalid value");const t=[{src:n,des:e}];for(;t.length;){const{src:i,des:s}=t.pop();Object.keys(i).forEach(r=>{r!=="__proto__"&&(xt(i[r])&&!xt(s[r])&&(s[r]=Array.isArray(i[r])?[]:It()),df(s[r])||df(i[r])?s[r]=i[r]:t.push({src:i[r],des:s[r]}))})}}/*! * message-compiler v11.1.5 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function u8(n,e,t){return{line:n,column:e,offset:t}}function a0(n,e,t){return{start:n,end:e}}const Rt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},f8=17;function rp(n,e,t={}){const{domain:i,messages:s,args:r}=t,o=n,a=new SyntaxError(String(o));return a.code=n,e&&(a.location=e),a.domain=i,a}function h8(n){throw n}const xs=" ",d8="\r",Nn=` -`,p8="\u2028",m8="\u2029";function g8(n){const e=n;let t=0,i=1,s=1,r=0;const o=E=>e[E]===d8&&e[E+1]===Nn,a=E=>e[E]===Nn,l=E=>e[E]===m8,c=E=>e[E]===p8,u=E=>o(E)||a(E)||l(E)||c(E),f=()=>t,h=()=>i,d=()=>s,p=()=>r,_=E=>o(E)||l(E)||c(E)?Nn:e[E],g=()=>_(t),m=()=>_(t+r);function v(){return r=0,u(t)&&(i++,s=0),o(t)&&t++,t++,s++,e[t]}function b(){return o(t+r)&&r++,r++,e[t+r]}function y(){t=0,i=1,s=1,r=0}function T(E=0){r=E}function w(){const E=t+r;for(;E!==t;)v();r=0}return{index:f,line:h,column:d,peekOffset:p,charAt:_,currentChar:g,currentPeek:m,next:v,peek:b,reset:y,resetPeek:T,skipToPeek:w}}const sr=void 0,_8=".",mM="'",v8="tokenizer";function y8(n,e={}){const t=e.location!==!1,i=g8(n),s=()=>i.index(),r=()=>u8(i.line(),i.column(),i.index()),o=r(),a=s(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function f(C,I,F,...H){const ce=c();if(I.column+=F,I.offset+=F,u){const R=t?a0(ce.startLoc,I):null,x=rp(C,R,{domain:v8,args:H});u(x)}}function h(C,I,F){C.endLoc=r(),C.currentType=I;const H={type:I};return t&&(H.loc=a0(C.startLoc,C.endLoc)),F!=null&&(H.value=F),H}const d=C=>h(C,13);function p(C,I){return C.currentChar()===I?(C.next(),I):(f(Rt.EXPECTED_TOKEN,r(),0,I),"")}function _(C){let I="";for(;C.currentPeek()===xs||C.currentPeek()===Nn;)I+=C.currentPeek(),C.peek();return I}function g(C){const I=_(C);return C.skipToPeek(),I}function m(C){if(C===sr)return!1;const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I===95}function v(C){if(C===sr)return!1;const I=C.charCodeAt(0);return I>=48&&I<=57}function b(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=m(C.currentPeek());return C.resetPeek(),H}function y(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=C.currentPeek()==="-"?C.peek():C.currentPeek(),ce=v(H);return C.resetPeek(),ce}function T(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=C.currentPeek()===mM;return C.resetPeek(),H}function w(C,I){const{currentType:F}=I;if(F!==7)return!1;_(C);const H=C.currentPeek()===".";return C.resetPeek(),H}function E(C,I){const{currentType:F}=I;if(F!==8)return!1;_(C);const H=m(C.currentPeek());return C.resetPeek(),H}function P(C,I){const{currentType:F}=I;if(!(F===7||F===11))return!1;_(C);const H=C.currentPeek()===":";return C.resetPeek(),H}function M(C,I){const{currentType:F}=I;if(F!==9)return!1;const H=()=>{const R=C.currentPeek();return R==="{"?m(C.peek()):R==="@"||R==="|"||R===":"||R==="."||R===xs||!R?!1:R===Nn?(C.peek(),H()):D(C,!1)},ce=H();return C.resetPeek(),ce}function S(C){_(C);const I=C.currentPeek()==="|";return C.resetPeek(),I}function D(C,I=!0){const F=(ce=!1,R="")=>{const x=C.currentPeek();return x==="{"||x==="@"||!x?ce:x==="|"?!(R===xs||R===Nn):x===xs?(C.peek(),F(!0,xs)):x===Nn?(C.peek(),F(!0,Nn)):!0},H=F();return I&&C.resetPeek(),H}function B(C,I){const F=C.currentChar();return F===sr?sr:I(F)?(C.next(),F):null}function z(C){const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===95||I===36}function V(C){return B(C,z)}function Q(C){const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===95||I===36||I===45}function j(C){return B(C,Q)}function te(C){const I=C.charCodeAt(0);return I>=48&&I<=57}function Z(C){return B(C,te)}function pe(C){const I=C.charCodeAt(0);return I>=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102}function Me(C){return B(C,pe)}function re(C){let I="",F="";for(;I=Z(C);)F+=I;return F}function xe(C){let I="";for(;;){const F=C.currentChar();if(F==="{"||F==="}"||F==="@"||F==="|"||!F)break;if(F===xs||F===Nn)if(D(C))I+=F,C.next();else{if(S(C))break;I+=F,C.next()}else I+=F,C.next()}return I}function We(C){g(C);let I="",F="";for(;I=j(C);)F+=I;return C.currentChar()===sr&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F}function oe(C){g(C);let I="";return C.currentChar()==="-"?(C.next(),I+=`-${re(C)}`):I+=re(C),C.currentChar()===sr&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),I}function ge(C){return C!==mM&&C!==Nn}function Se(C){g(C),p(C,"'");let I="",F="";for(;I=B(C,ge);)I==="\\"?F+=$(C):F+=I;const H=C.currentChar();return H===Nn||H===sr?(f(Rt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),H===Nn&&(C.next(),p(C,"'")),F):(p(C,"'"),F)}function $(C){const I=C.currentChar();switch(I){case"\\":case"'":return C.next(),`\\${I}`;case"u":return ae(C,I,4);case"U":return ae(C,I,6);default:return f(Rt.UNKNOWN_ESCAPE_SEQUENCE,r(),0,I),""}}function ae(C,I,F){p(C,I);let H="";for(let ce=0;ce{const H=C.currentChar();return H==="{"||H==="@"||H==="|"||H==="("||H===")"||!H||H===xs?F:(F+=H,C.next(),I(F))};return I("")}function U(C){g(C);const I=p(C,"|");return g(C),I}function A(C,I){let F=null;switch(C.currentChar()){case"{":return I.braceNest>=1&&f(Rt.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),C.next(),F=h(I,2,"{"),g(C),I.braceNest++,F;case"}":return I.braceNest>0&&I.currentType===2&&f(Rt.EMPTY_PLACEHOLDER,r(),0),C.next(),F=h(I,3,"}"),I.braceNest--,I.braceNest>0&&g(C),I.inLinked&&I.braceNest===0&&(I.inLinked=!1),F;case"@":return I.braceNest>0&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F=W(C,I)||d(I),I.braceNest=0,F;default:{let ce=!0,R=!0,x=!0;if(S(C))return I.braceNest>0&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,F;if(I.braceNest>0&&(I.currentType===4||I.currentType===5||I.currentType===6))return f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),I.braceNest=0,G(C,I);if(ce=b(C,I))return F=h(I,4,We(C)),g(C),F;if(R=y(C,I))return F=h(I,5,oe(C)),g(C),F;if(x=T(C,I))return F=h(I,6,Se(C)),g(C),F;if(!ce&&!R&&!x)return F=h(I,12,ue(C)),f(Rt.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,F.value),g(C),F;break}}return F}function W(C,I){const{currentType:F}=I;let H=null;const ce=C.currentChar();switch((F===7||F===8||F===11||F===9)&&(ce===Nn||ce===xs)&&f(Rt.INVALID_LINKED_FORMAT,r(),0),ce){case"@":return C.next(),H=h(I,7,"@"),I.inLinked=!0,H;case".":return g(C),C.next(),h(I,8,".");case":":return g(C),C.next(),h(I,9,":");default:return S(C)?(H=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,H):w(C,I)||P(C,I)?(g(C),W(C,I)):E(C,I)?(g(C),h(I,11,$e(C))):M(C,I)?(g(C),ce==="{"?A(C,I)||H:h(I,10,N(C))):(F===7&&f(Rt.INVALID_LINKED_FORMAT,r(),0),I.braceNest=0,I.inLinked=!1,G(C,I))}}function G(C,I){let F={type:13};if(I.braceNest>0)return A(C,I)||d(I);if(I.inLinked)return W(C,I)||d(I);switch(C.currentChar()){case"{":return A(C,I)||d(I);case"}":return f(Rt.UNBALANCED_CLOSING_BRACE,r(),0),C.next(),h(I,3,"}");case"@":return W(C,I)||d(I);default:{if(S(C))return F=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,F;if(D(C))return h(I,0,xe(C));break}}return F}function X(){const{currentType:C,offset:I,startLoc:F,endLoc:H}=l;return l.lastType=C,l.lastOffset=I,l.lastStartLoc=F,l.lastEndLoc=H,l.offset=s(),l.startLoc=r(),i.currentChar()===sr?h(l,13):G(i,l)}return{nextToken:X,currentOffset:s,currentPosition:r,context:c}}const b8="parser",x8=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function M8(n,e,t){switch(n){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||t,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function S8(n={}){const e=n.location!==!1,{onError:t}=n;function i(m,v,b,y,...T){const w=m.currentPosition();if(w.offset+=y,w.column+=y,t){const E=e?a0(b,w):null,P=rp(v,E,{domain:b8,args:T});t(P)}}function s(m,v,b){const y={type:m};return e&&(y.start=v,y.end=v,y.loc={start:b,end:b}),y}function r(m,v,b,y){e&&(m.end=v,m.loc&&(m.loc.end=b))}function o(m,v){const b=m.context(),y=s(3,b.offset,b.startLoc);return y.value=v,r(y,m.currentOffset(),m.currentPosition()),y}function a(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(5,y,T);return w.index=parseInt(v,10),m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function l(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(4,y,T);return w.key=v,m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function c(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(9,y,T);return w.value=v.replace(x8,M8),m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function u(m){const v=m.nextToken(),b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(8,y,T);return v.type!==11?(i(m,Rt.UNEXPECTED_EMPTY_LINKED_MODIFIER,b.lastStartLoc,0),w.value="",r(w,y,T),{nextConsumeToken:v,node:w}):(v.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,qi(v)),w.value=v.value||"",r(w,m.currentOffset(),m.currentPosition()),{node:w})}function f(m,v){const b=m.context(),y=s(7,b.offset,b.startLoc);return y.value=v,r(y,m.currentOffset(),m.currentPosition()),y}function h(m){const v=m.context(),b=s(6,v.offset,v.startLoc);let y=m.nextToken();if(y.type===8){const T=u(m);b.modifier=T.node,y=T.nextConsumeToken||m.nextToken()}switch(y.type!==9&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),y=m.nextToken(),y.type===2&&(y=m.nextToken()),y.type){case 10:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=f(m,y.value||"");break;case 4:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=l(m,y.value||"");break;case 5:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=a(m,y.value||"");break;case 6:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=c(m,y.value||"");break;default:{i(m,Rt.UNEXPECTED_EMPTY_LINKED_KEY,v.lastStartLoc,0);const T=m.context(),w=s(7,T.offset,T.startLoc);return w.value="",r(w,T.offset,T.startLoc),b.key=w,r(b,T.offset,T.startLoc),{nextConsumeToken:y,node:b}}}return r(b,m.currentOffset(),m.currentPosition()),{node:b}}function d(m){const v=m.context(),b=v.currentType===1?m.currentOffset():v.offset,y=v.currentType===1?v.endLoc:v.startLoc,T=s(2,b,y);T.items=[];let w=null;do{const M=w||m.nextToken();switch(w=null,M.type){case 0:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(o(m,M.value||""));break;case 5:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(a(m,M.value||""));break;case 4:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(l(m,M.value||""));break;case 6:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(c(m,M.value||""));break;case 7:{const S=h(m);T.items.push(S.node),w=S.nextConsumeToken||null;break}}}while(v.currentType!==13&&v.currentType!==1);const E=v.currentType===1?v.lastOffset:m.currentOffset(),P=v.currentType===1?v.lastEndLoc:m.currentPosition();return r(T,E,P),T}function p(m,v,b,y){const T=m.context();let w=y.items.length===0;const E=s(1,v,b);E.cases=[],E.cases.push(y);do{const P=d(m);w||(w=P.items.length===0),E.cases.push(P)}while(T.currentType!==13);return w&&i(m,Rt.MUST_HAVE_MESSAGES_IN_PLURAL,b,0),r(E,m.currentOffset(),m.currentPosition()),E}function _(m){const v=m.context(),{offset:b,startLoc:y}=v,T=d(m);return v.currentType===13?T:p(m,b,y,T)}function g(m){const v=y8(m,fn({},n)),b=v.context(),y=s(0,b.offset,b.startLoc);return e&&y.loc&&(y.loc.source=m),y.body=_(v),n.onCacheKey&&(y.cacheKey=n.onCacheKey(m)),b.currentType!==13&&i(v,Rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,m[b.offset]||""),r(y,v.currentOffset(),v.currentPosition()),y}return{parse:g}}function qi(n){if(n.type===13)return"EOF";const e=(n.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function E8(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:r=>(t.helpers.add(r),r)}}function gM(n,e){for(let t=0;t_M(t)),n}function _M(n){if(n.items.length===1){const e=n.items[0];(e.type===3||e.type===9)&&(n.static=e.value,delete e.value)}else{const e=[];for(let t=0;to;function l(_,g){o.code+=_}function c(_,g=!0){const m=g?i:"";l(s?m+" ".repeat(_):m)}function u(_=!0){const g=++o.indentLevel;_&&c(g)}function f(_=!0){const g=--o.indentLevel;_&&c(g)}function h(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:f,newline:h,helper:_=>`_${_}`,needIndent:()=>o.needIndent}}function C8(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),Ua(n,e.key),e.modifier?(n.push(", "),Ua(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function R8(n,e){const{helper:t,needIndent:i}=n;n.push(`${t("normalize")}([`),n.indent(i());const s=e.items.length;for(let r=0;r1){n.push(`${t("plural")}([`),n.indent(i());const s=e.cases.length;for(let r=0;r{const t=Fe(e.mode)?e.mode:"normal",i=Fe(e.filename)?e.filename:"message.intl";e.sourceMap;const s=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":` -`,r=e.needIndent?e.needIndent:t!=="arrow",o=n.helpers||[],a=A8(n,{filename:i,breakLineCode:s,needIndent:r});a.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(r),o.length>0&&(a.push(`const { ${ov(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),Ua(a,n),a.deindent(r),a.push("}"),delete n.helpers;const{code:l,map:c}=a.context();return{ast:n,code:l,map:c?c.toJSON():void 0}};function D8(n,e={}){const t=fn({},e),i=!!t.jit,s=!!t.minify,r=t.optimize==null?!0:t.optimize,a=S8(t).parse(n);return i?(r&&w8(a),s&&ra(a),{ast:a,code:""}):(T8(a,t),L8(a,t))}/*! + */function f8(n,e,t){return{line:n,column:e,offset:t}}function a0(n,e,t){return{start:n,end:e}}const Rt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},h8=17;function rp(n,e,t={}){const{domain:i,messages:s,args:r}=t,o=n,a=new SyntaxError(String(o));return a.code=n,e&&(a.location=e),a.domain=i,a}function d8(n){throw n}const xs=" ",p8="\r",Nn=` +`,m8="\u2028",g8="\u2029";function _8(n){const e=n;let t=0,i=1,s=1,r=0;const o=S=>e[S]===p8&&e[S+1]===Nn,a=S=>e[S]===Nn,l=S=>e[S]===g8,c=S=>e[S]===m8,u=S=>o(S)||a(S)||l(S)||c(S),f=()=>t,h=()=>i,d=()=>s,p=()=>r,_=S=>o(S)||l(S)||c(S)?Nn:e[S],g=()=>_(t),m=()=>_(t+r);function v(){return r=0,u(t)&&(i++,s=0),o(t)&&t++,t++,s++,e[t]}function b(){return o(t+r)&&r++,r++,e[t+r]}function y(){t=0,i=1,s=1,r=0}function T(S=0){r=S}function w(){const S=t+r;for(;S!==t;)v();r=0}return{index:f,line:h,column:d,peekOffset:p,charAt:_,currentChar:g,currentPeek:m,next:v,peek:b,reset:y,resetPeek:T,skipToPeek:w}}const sr=void 0,v8=".",mM="'",y8="tokenizer";function b8(n,e={}){const t=e.location!==!1,i=_8(n),s=()=>i.index(),r=()=>f8(i.line(),i.column(),i.index()),o=r(),a=s(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function f(C,I,F,...H){const ce=c();if(I.column+=F,I.offset+=F,u){const R=t?a0(ce.startLoc,I):null,x=rp(C,R,{domain:y8,args:H});u(x)}}function h(C,I,F){C.endLoc=r(),C.currentType=I;const H={type:I};return t&&(H.loc=a0(C.startLoc,C.endLoc)),F!=null&&(H.value=F),H}const d=C=>h(C,13);function p(C,I){return C.currentChar()===I?(C.next(),I):(f(Rt.EXPECTED_TOKEN,r(),0,I),"")}function _(C){let I="";for(;C.currentPeek()===xs||C.currentPeek()===Nn;)I+=C.currentPeek(),C.peek();return I}function g(C){const I=_(C);return C.skipToPeek(),I}function m(C){if(C===sr)return!1;const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I===95}function v(C){if(C===sr)return!1;const I=C.charCodeAt(0);return I>=48&&I<=57}function b(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=m(C.currentPeek());return C.resetPeek(),H}function y(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=C.currentPeek()==="-"?C.peek():C.currentPeek(),ce=v(H);return C.resetPeek(),ce}function T(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=C.currentPeek()===mM;return C.resetPeek(),H}function w(C,I){const{currentType:F}=I;if(F!==7)return!1;_(C);const H=C.currentPeek()===".";return C.resetPeek(),H}function S(C,I){const{currentType:F}=I;if(F!==8)return!1;_(C);const H=m(C.currentPeek());return C.resetPeek(),H}function P(C,I){const{currentType:F}=I;if(!(F===7||F===11))return!1;_(C);const H=C.currentPeek()===":";return C.resetPeek(),H}function M(C,I){const{currentType:F}=I;if(F!==9)return!1;const H=()=>{const R=C.currentPeek();return R==="{"?m(C.peek()):R==="@"||R==="|"||R===":"||R==="."||R===xs||!R?!1:R===Nn?(C.peek(),H()):D(C,!1)},ce=H();return C.resetPeek(),ce}function E(C){_(C);const I=C.currentPeek()==="|";return C.resetPeek(),I}function D(C,I=!0){const F=(ce=!1,R="")=>{const x=C.currentPeek();return x==="{"||x==="@"||!x?ce:x==="|"?!(R===xs||R===Nn):x===xs?(C.peek(),F(!0,xs)):x===Nn?(C.peek(),F(!0,Nn)):!0},H=F();return I&&C.resetPeek(),H}function B(C,I){const F=C.currentChar();return F===sr?sr:I(F)?(C.next(),F):null}function z(C){const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===95||I===36}function V(C){return B(C,z)}function Q(C){const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===95||I===36||I===45}function j(C){return B(C,Q)}function te(C){const I=C.charCodeAt(0);return I>=48&&I<=57}function Z(C){return B(C,te)}function pe(C){const I=C.charCodeAt(0);return I>=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102}function Me(C){return B(C,pe)}function re(C){let I="",F="";for(;I=Z(C);)F+=I;return F}function xe(C){let I="";for(;;){const F=C.currentChar();if(F==="{"||F==="}"||F==="@"||F==="|"||!F)break;if(F===xs||F===Nn)if(D(C))I+=F,C.next();else{if(E(C))break;I+=F,C.next()}else I+=F,C.next()}return I}function We(C){g(C);let I="",F="";for(;I=j(C);)F+=I;return C.currentChar()===sr&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F}function oe(C){g(C);let I="";return C.currentChar()==="-"?(C.next(),I+=`-${re(C)}`):I+=re(C),C.currentChar()===sr&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),I}function ge(C){return C!==mM&&C!==Nn}function Se(C){g(C),p(C,"'");let I="",F="";for(;I=B(C,ge);)I==="\\"?F+=$(C):F+=I;const H=C.currentChar();return H===Nn||H===sr?(f(Rt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),H===Nn&&(C.next(),p(C,"'")),F):(p(C,"'"),F)}function $(C){const I=C.currentChar();switch(I){case"\\":case"'":return C.next(),`\\${I}`;case"u":return ae(C,I,4);case"U":return ae(C,I,6);default:return f(Rt.UNKNOWN_ESCAPE_SEQUENCE,r(),0,I),""}}function ae(C,I,F){p(C,I);let H="";for(let ce=0;ce{const H=C.currentChar();return H==="{"||H==="@"||H==="|"||H==="("||H===")"||!H||H===xs?F:(F+=H,C.next(),I(F))};return I("")}function U(C){g(C);const I=p(C,"|");return g(C),I}function A(C,I){let F=null;switch(C.currentChar()){case"{":return I.braceNest>=1&&f(Rt.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),C.next(),F=h(I,2,"{"),g(C),I.braceNest++,F;case"}":return I.braceNest>0&&I.currentType===2&&f(Rt.EMPTY_PLACEHOLDER,r(),0),C.next(),F=h(I,3,"}"),I.braceNest--,I.braceNest>0&&g(C),I.inLinked&&I.braceNest===0&&(I.inLinked=!1),F;case"@":return I.braceNest>0&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F=W(C,I)||d(I),I.braceNest=0,F;default:{let ce=!0,R=!0,x=!0;if(E(C))return I.braceNest>0&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,F;if(I.braceNest>0&&(I.currentType===4||I.currentType===5||I.currentType===6))return f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),I.braceNest=0,G(C,I);if(ce=b(C,I))return F=h(I,4,We(C)),g(C),F;if(R=y(C,I))return F=h(I,5,oe(C)),g(C),F;if(x=T(C,I))return F=h(I,6,Se(C)),g(C),F;if(!ce&&!R&&!x)return F=h(I,12,ue(C)),f(Rt.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,F.value),g(C),F;break}}return F}function W(C,I){const{currentType:F}=I;let H=null;const ce=C.currentChar();switch((F===7||F===8||F===11||F===9)&&(ce===Nn||ce===xs)&&f(Rt.INVALID_LINKED_FORMAT,r(),0),ce){case"@":return C.next(),H=h(I,7,"@"),I.inLinked=!0,H;case".":return g(C),C.next(),h(I,8,".");case":":return g(C),C.next(),h(I,9,":");default:return E(C)?(H=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,H):w(C,I)||P(C,I)?(g(C),W(C,I)):S(C,I)?(g(C),h(I,11,$e(C))):M(C,I)?(g(C),ce==="{"?A(C,I)||H:h(I,10,N(C))):(F===7&&f(Rt.INVALID_LINKED_FORMAT,r(),0),I.braceNest=0,I.inLinked=!1,G(C,I))}}function G(C,I){let F={type:13};if(I.braceNest>0)return A(C,I)||d(I);if(I.inLinked)return W(C,I)||d(I);switch(C.currentChar()){case"{":return A(C,I)||d(I);case"}":return f(Rt.UNBALANCED_CLOSING_BRACE,r(),0),C.next(),h(I,3,"}");case"@":return W(C,I)||d(I);default:{if(E(C))return F=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,F;if(D(C))return h(I,0,xe(C));break}}return F}function X(){const{currentType:C,offset:I,startLoc:F,endLoc:H}=l;return l.lastType=C,l.lastOffset=I,l.lastStartLoc=F,l.lastEndLoc=H,l.offset=s(),l.startLoc=r(),i.currentChar()===sr?h(l,13):G(i,l)}return{nextToken:X,currentOffset:s,currentPosition:r,context:c}}const x8="parser",M8=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function S8(n,e,t){switch(n){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||t,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function E8(n={}){const e=n.location!==!1,{onError:t}=n;function i(m,v,b,y,...T){const w=m.currentPosition();if(w.offset+=y,w.column+=y,t){const S=e?a0(b,w):null,P=rp(v,S,{domain:x8,args:T});t(P)}}function s(m,v,b){const y={type:m};return e&&(y.start=v,y.end=v,y.loc={start:b,end:b}),y}function r(m,v,b,y){e&&(m.end=v,m.loc&&(m.loc.end=b))}function o(m,v){const b=m.context(),y=s(3,b.offset,b.startLoc);return y.value=v,r(y,m.currentOffset(),m.currentPosition()),y}function a(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(5,y,T);return w.index=parseInt(v,10),m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function l(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(4,y,T);return w.key=v,m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function c(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(9,y,T);return w.value=v.replace(M8,S8),m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function u(m){const v=m.nextToken(),b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(8,y,T);return v.type!==11?(i(m,Rt.UNEXPECTED_EMPTY_LINKED_MODIFIER,b.lastStartLoc,0),w.value="",r(w,y,T),{nextConsumeToken:v,node:w}):(v.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,qi(v)),w.value=v.value||"",r(w,m.currentOffset(),m.currentPosition()),{node:w})}function f(m,v){const b=m.context(),y=s(7,b.offset,b.startLoc);return y.value=v,r(y,m.currentOffset(),m.currentPosition()),y}function h(m){const v=m.context(),b=s(6,v.offset,v.startLoc);let y=m.nextToken();if(y.type===8){const T=u(m);b.modifier=T.node,y=T.nextConsumeToken||m.nextToken()}switch(y.type!==9&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),y=m.nextToken(),y.type===2&&(y=m.nextToken()),y.type){case 10:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=f(m,y.value||"");break;case 4:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=l(m,y.value||"");break;case 5:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=a(m,y.value||"");break;case 6:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=c(m,y.value||"");break;default:{i(m,Rt.UNEXPECTED_EMPTY_LINKED_KEY,v.lastStartLoc,0);const T=m.context(),w=s(7,T.offset,T.startLoc);return w.value="",r(w,T.offset,T.startLoc),b.key=w,r(b,T.offset,T.startLoc),{nextConsumeToken:y,node:b}}}return r(b,m.currentOffset(),m.currentPosition()),{node:b}}function d(m){const v=m.context(),b=v.currentType===1?m.currentOffset():v.offset,y=v.currentType===1?v.endLoc:v.startLoc,T=s(2,b,y);T.items=[];let w=null;do{const M=w||m.nextToken();switch(w=null,M.type){case 0:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(o(m,M.value||""));break;case 5:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(a(m,M.value||""));break;case 4:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(l(m,M.value||""));break;case 6:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(c(m,M.value||""));break;case 7:{const E=h(m);T.items.push(E.node),w=E.nextConsumeToken||null;break}}}while(v.currentType!==13&&v.currentType!==1);const S=v.currentType===1?v.lastOffset:m.currentOffset(),P=v.currentType===1?v.lastEndLoc:m.currentPosition();return r(T,S,P),T}function p(m,v,b,y){const T=m.context();let w=y.items.length===0;const S=s(1,v,b);S.cases=[],S.cases.push(y);do{const P=d(m);w||(w=P.items.length===0),S.cases.push(P)}while(T.currentType!==13);return w&&i(m,Rt.MUST_HAVE_MESSAGES_IN_PLURAL,b,0),r(S,m.currentOffset(),m.currentPosition()),S}function _(m){const v=m.context(),{offset:b,startLoc:y}=v,T=d(m);return v.currentType===13?T:p(m,b,y,T)}function g(m){const v=b8(m,fn({},n)),b=v.context(),y=s(0,b.offset,b.startLoc);return e&&y.loc&&(y.loc.source=m),y.body=_(v),n.onCacheKey&&(y.cacheKey=n.onCacheKey(m)),b.currentType!==13&&i(v,Rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,m[b.offset]||""),r(y,v.currentOffset(),v.currentPosition()),y}return{parse:g}}function qi(n){if(n.type===13)return"EOF";const e=(n.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function T8(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:r=>(t.helpers.add(r),r)}}function gM(n,e){for(let t=0;t_M(t)),n}function _M(n){if(n.items.length===1){const e=n.items[0];(e.type===3||e.type===9)&&(n.static=e.value,delete e.value)}else{const e=[];for(let t=0;to;function l(_,g){o.code+=_}function c(_,g=!0){const m=g?i:"";l(s?m+" ".repeat(_):m)}function u(_=!0){const g=++o.indentLevel;_&&c(g)}function f(_=!0){const g=--o.indentLevel;_&&c(g)}function h(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:f,newline:h,helper:_=>`_${_}`,needIndent:()=>o.needIndent}}function R8(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),Ua(n,e.key),e.modifier?(n.push(", "),Ua(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function P8(n,e){const{helper:t,needIndent:i}=n;n.push(`${t("normalize")}([`),n.indent(i());const s=e.items.length;for(let r=0;r1){n.push(`${t("plural")}([`),n.indent(i());const s=e.cases.length;for(let r=0;r{const t=Fe(e.mode)?e.mode:"normal",i=Fe(e.filename)?e.filename:"message.intl";e.sourceMap;const s=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":` +`,r=e.needIndent?e.needIndent:t!=="arrow",o=n.helpers||[],a=C8(n,{filename:i,breakLineCode:s,needIndent:r});a.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(r),o.length>0&&(a.push(`const { ${ov(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),Ua(a,n),a.deindent(r),a.push("}"),delete n.helpers;const{code:l,map:c}=a.context();return{ast:n,code:l,map:c?c.toJSON():void 0}};function O8(n,e={}){const t=fn({},e),i=!!t.jit,s=!!t.minify,r=t.optimize==null?!0:t.optimize,a=E8(t).parse(n);return i?(r&&A8(a),s&&ra(a),{ast:a,code:""}):(w8(a,t),D8(a,t))}/*! * core-base v11.1.5 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function O8(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(sv().__INTLIFY_PROD_DEVTOOLS__=!1)}function ss(n){return xt(n)&&lv(n)===0&&(Oi(n,"b")||Oi(n,"body"))}const PA=["b","body"];function N8(n){return Dr(n,PA)}const IA=["c","cases"];function U8(n){return Dr(n,IA,[])}const LA=["s","static"];function F8(n){return Dr(n,LA)}const DA=["i","items"];function k8(n){return Dr(n,DA,[])}const OA=["t","type"];function lv(n){return Dr(n,OA)}const NA=["v","value"];function pf(n,e){const t=Dr(n,NA);if(t!=null)return t;throw wc(e)}const UA=["m","modifier"];function B8(n){return Dr(n,UA)}const FA=["k","key"];function z8(n){const e=Dr(n,FA);if(e)return e;throw wc(6)}function Dr(n,e,t){for(let i=0;iV8(t,n)}function V8(n,e){const t=N8(e);if(t==null)throw wc(0);if(lv(t)===1){const r=U8(t);return n.plural(r.reduce((o,a)=>[...o,vM(n,a)],[]))}else return vM(n,t)}function vM(n,e){const t=F8(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const i=k8(e).reduce((s,r)=>[...s,l0(n,r)],[]);return n.normalize(i)}}function l0(n,e){const t=lv(e);switch(t){case 3:return pf(e,t);case 9:return pf(e,t);case 4:{const i=e;if(Oi(i,"k")&&i.k)return n.interpolate(n.named(i.k));if(Oi(i,"key")&&i.key)return n.interpolate(n.named(i.key));throw wc(t)}case 5:{const i=e;if(Oi(i,"i")&&Qt(i.i))return n.interpolate(n.list(i.i));if(Oi(i,"index")&&Qt(i.index))return n.interpolate(n.list(i.index));throw wc(t)}case 6:{const i=e,s=B8(i),r=z8(i);return n.linked(l0(n,r),s?l0(n,s):void 0,n.type)}case 7:return pf(e,t);case 8:return pf(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const H8=n=>n;let mf=It();function G8(n,e={}){let t=!1;const i=e.onError||h8;return e.onError=s=>{t=!0,i(s)},{...D8(n,e),detectError:t}}function W8(n,e){if(Fe(n)){Ht(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||H8)(n),s=mf[i];if(s)return s;const{ast:r,detectError:o}=G8(n,{...e,location:!1,jit:!0}),a=jm(r);return o?a:mf[i]=a}else{const t=n.cacheKey;if(t){const i=mf[t];return i||(mf[t]=jm(n))}else return jm(n)}}let Ac=null;function X8(n){Ac=n}function $8(n,e,t){Ac&&Ac.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const q8=Y8("function:translate");function Y8(n){return e=>Ac&&Ac.emit(n,e)}const Ps={INVALID_ARGUMENT:f8,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},j8=24;function Is(n){return rp(n,null,void 0)}function cv(n,e){return e.locale!=null?yM(e.locale):yM(n.locale)}let Km;function yM(n){if(Fe(n))return n;if(Vt(n)){if(n.resolvedOnce&&Km!=null)return Km;if(n.constructor.name==="Function"){const e=n();if(a8(e))throw Is(Ps.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Km=e}else throw Is(Ps.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Is(Ps.NOT_SUPPORT_LOCALE_TYPE)}function K8(n,e,t){return[...new Set([t,...Yt(e)?e:xt(e)?Object.keys(e):Fe(e)?[e]:[t]])]}function BA(n,e,t){const i=Fe(t)?t:Hh,s=n;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(i);if(!r){r=[];let o=[t];for(;Yt(o);)o=bM(r,o,e);const a=Yt(e)||!mt(e)?e:e.default?e.default:null;o=Fe(a)?[a]:a,Yt(o)&&bM(r,o,!1),s.__localeChainCache.set(i,r)}return r}function bM(n,e,t){let i=!0;for(let s=0;s{o===void 0?o=a:o+=a},h[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},h[2]=()=>{h[0](),s++},h[3]=()=>{if(s>0)s--,i=4,h[0]();else{if(s=0,o===void 0||(o=i9(o),o===!1))return!1;h[1]()}};function d(){const p=n[t+1];if(i===5&&p==="'"||i===6&&p==='"')return t++,a="\\"+p,h[0](),!0}for(;i!==null;)if(t++,r=n[t],!(r==="\\"&&d())){if(l=n9(r),f=Or[i],c=f[l]||f.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(a=r,u()===!1))))return;if(i===7)return e}}const xM=new Map;function r9(n,e){return xt(n)?n[e]:null}function o9(n,e){if(!xt(n))return null;let t=xM.get(e);if(t||(t=s9(e),t&&xM.set(e,t)),!t)return null;const i=t.length;let s=n,r=0;for(;r`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function l9(){return{upper:(n,e)=>e==="text"&&Fe(n)?n.toUpperCase():e==="vnode"&&xt(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&Fe(n)?n.toLowerCase():e==="vnode"&&xt(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&Fe(n)?SM(n):e==="vnode"&&xt(n)&&"__v_isVNode"in n?SM(n.children):n}}let zA;function c9(n){zA=n}let VA;function u9(n){VA=n}let HA;function f9(n){HA=n}let GA=null;const h9=n=>{GA=n},d9=()=>GA;let WA=null;const EM=n=>{WA=n},p9=()=>WA;let TM=0;function m9(n={}){const e=Vt(n.onWarn)?n.onWarn:c8,t=Fe(n.version)?n.version:a9,i=Fe(n.locale)||Vt(n.locale)?n.locale:Hh,s=Vt(i)?Hh:i,r=Yt(n.fallbackLocale)||mt(n.fallbackLocale)||Fe(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:s,o=mt(n.messages)?n.messages:Zm(s),a=mt(n.datetimeFormats)?n.datetimeFormats:Zm(s),l=mt(n.numberFormats)?n.numberFormats:Zm(s),c=fn(It(),n.modifiers,l9()),u=n.pluralRules||It(),f=Vt(n.missing)?n.missing:null,h=Ht(n.missingWarn)||Vh(n.missingWarn)?n.missingWarn:!0,d=Ht(n.fallbackWarn)||Vh(n.fallbackWarn)?n.fallbackWarn:!0,p=!!n.fallbackFormat,_=!!n.unresolving,g=Vt(n.postTranslation)?n.postTranslation:null,m=mt(n.processor)?n.processor:null,v=Ht(n.warnHtmlMessage)?n.warnHtmlMessage:!0,b=!!n.escapeParameter,y=Vt(n.messageCompiler)?n.messageCompiler:zA,T=Vt(n.messageResolver)?n.messageResolver:VA||r9,w=Vt(n.localeFallbacker)?n.localeFallbacker:HA||K8,E=xt(n.fallbackContext)?n.fallbackContext:void 0,P=n,M=xt(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,S=xt(P.__numberFormatters)?P.__numberFormatters:new Map,D=xt(P.__meta)?P.__meta:{};TM++;const B={version:t,cid:TM,locale:i,fallbackLocale:r,messages:o,modifiers:c,pluralRules:u,missing:f,missingWarn:h,fallbackWarn:d,fallbackFormat:p,unresolving:_,postTranslation:g,processor:m,warnHtmlMessage:v,escapeParameter:b,messageCompiler:y,messageResolver:T,localeFallbacker:w,fallbackContext:E,onWarn:e,__meta:D};return B.datetimeFormats=a,B.numberFormats=l,B.__datetimeFormatters=M,B.__numberFormatters=S,__INTLIFY_PROD_DEVTOOLS__&&$8(B,t,D),B}const Zm=n=>({[n]:It()});function uv(n,e,t,i,s){const{missing:r,onWarn:o}=n;if(r!==null){const a=r(n,t,e,s);return Fe(a)?a:e}else return e}function pl(n,e,t){const i=n;i.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function g9(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function _9(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let i=t+1;i{XA.includes(l)?o[l]=t[l]:r[l]=t[l]}),Fe(i)?r.locale=i:mt(i)&&(o=i),mt(s)&&(o=s),[r.key||"",a,r,o]}function AM(n,e,t){const i=n;for(const s in t){const r=`${e}__${s}`;i.__datetimeFormatters.has(r)&&i.__datetimeFormatters.delete(r)}}function CM(n,...e){const{numberFormats:t,unresolving:i,fallbackLocale:s,onWarn:r,localeFallbacker:o}=n,{__numberFormatters:a}=n,[l,c,u,f]=u0(...e),h=Ht(u.missingWarn)?u.missingWarn:n.missingWarn;Ht(u.fallbackWarn)?u.fallbackWarn:n.fallbackWarn;const d=!!u.part,p=cv(n,u),_=o(n,s,p);if(!Fe(l)||l==="")return new Intl.NumberFormat(p,f).format(c);let g={},m,v=null;const b="number format";for(let w=0;w<_.length&&(m=_[w],g=t[m]||{},v=g[l],!mt(v));w++)uv(n,l,m,h,b);if(!mt(v)||!Fe(m))return i?op:l;let y=`${m}__${l}`;sp(f)||(y=`${y}__${JSON.stringify(f)}`);let T=a.get(y);return T||(T=new Intl.NumberFormat(m,fn({},v,f)),a.set(y,T)),d?T.formatToParts(c):T.format(c)}const $A=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function u0(...n){const[e,t,i,s]=n,r=It();let o=It();if(!Qt(e))throw Is(Ps.INVALID_ARGUMENT);const a=e;return Fe(t)?r.key=t:mt(t)&&Object.keys(t).forEach(l=>{$A.includes(l)?o[l]=t[l]:r[l]=t[l]}),Fe(i)?r.locale=i:mt(i)&&(o=i),mt(s)&&(o=s),[r.key||"",a,r,o]}function RM(n,e,t){const i=n;for(const s in t){const r=`${e}__${s}`;i.__numberFormatters.has(r)&&i.__numberFormatters.delete(r)}}const v9=n=>n,y9=n=>"",b9="text",x9=n=>n.length===0?"":ov(n),M9=l8;function PM(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function S9(n){const e=Qt(n.pluralIndex)?n.pluralIndex:-1;return n.named&&(Qt(n.named.count)||Qt(n.named.n))?Qt(n.named.count)?n.named.count:Qt(n.named.n)?n.named.n:e:e}function E9(n,e){e.count||(e.count=n),e.n||(e.n=n)}function T9(n={}){const e=n.locale,t=S9(n),i=xt(n.pluralRules)&&Fe(e)&&Vt(n.pluralRules[e])?n.pluralRules[e]:PM,s=xt(n.pluralRules)&&Fe(e)&&Vt(n.pluralRules[e])?PM:void 0,r=m=>m[i(t,m.length,s)],o=n.list||[],a=m=>o[m],l=n.named||It();Qt(n.pluralIndex)&&E9(t,l);const c=m=>l[m];function u(m,v){const b=Vt(n.messages)?n.messages(m,!!v):xt(n.messages)?n.messages[m]:!1;return b||(n.parent?n.parent.message(m):y9)}const f=m=>n.modifiers?n.modifiers[m]:v9,h=mt(n.processor)&&Vt(n.processor.normalize)?n.processor.normalize:x9,d=mt(n.processor)&&Vt(n.processor.interpolate)?n.processor.interpolate:M9,p=mt(n.processor)&&Fe(n.processor.type)?n.processor.type:b9,g={list:a,named:c,plural:r,linked:(m,...v)=>{const[b,y]=v;let T="text",w="";v.length===1?xt(b)?(w=b.modifier||w,T=b.type||T):Fe(b)&&(w=b||w):v.length===2&&(Fe(b)&&(w=b||w),Fe(y)&&(T=y||T));const E=u(m,!0)(g),P=T==="vnode"&&Yt(E)&&w?E[0]:E;return w?f(w)(P,T):P},message:u,type:p,interpolate:d,normalize:h,values:fn(It(),o,l)};return g}const IM=()=>"",mi=n=>Vt(n);function LM(n,...e){const{fallbackFormat:t,postTranslation:i,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=n,[l,c]=f0(...e),u=Ht(c.missingWarn)?c.missingWarn:n.missingWarn,f=Ht(c.fallbackWarn)?c.fallbackWarn:n.fallbackWarn,h=Ht(c.escapeParameter)?c.escapeParameter:n.escapeParameter,d=!!c.resolvedMessage,p=Fe(c.default)||Ht(c.default)?Ht(c.default)?r?l:()=>l:c.default:t?r?l:()=>l:null,_=t||p!=null&&(Fe(p)||Vt(p)),g=cv(n,c);h&&w9(c);let[m,v,b]=d?[l,g,a[g]||It()]:qA(n,l,g,o,f,u),y=m,T=l;if(!d&&!(Fe(y)||ss(y)||mi(y))&&_&&(y=p,T=y),!d&&(!(Fe(y)||ss(y)||mi(y))||!Fe(v)))return s?op:l;let w=!1;const E=()=>{w=!0},P=mi(y)?y:YA(n,l,v,y,T,E);if(w)return y;const M=R9(n,v,b,c),S=T9(M),D=A9(n,P,S),B=i?i(D,l):D;if(__INTLIFY_PROD_DEVTOOLS__){const z={timestamp:Date.now(),key:Fe(l)?l:mi(y)?y.key:"",locale:v||(mi(y)?y.locale:""),format:Fe(y)?y:mi(y)?y.source:"",message:B};z.meta=fn({},n.__meta,d9()||{}),q8(z)}return B}function w9(n){Yt(n.list)?n.list=n.list.map(e=>Fe(e)?pM(e):e):xt(n.named)&&Object.keys(n.named).forEach(e=>{Fe(n.named[e])&&(n.named[e]=pM(n.named[e]))})}function qA(n,e,t,i,s,r){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=n,u=c(n,i,t);let f=It(),h,d=null;const p="translate";for(let _=0;_i;return c.locale=t,c.key=e,c}const l=o(i,C9(n,t,s,i,a,r));return l.locale=t,l.key=e,l.source=i,l}function A9(n,e,t){return e(t)}function f0(...n){const[e,t,i]=n,s=It();if(!Fe(e)&&!Qt(e)&&!mi(e)&&!ss(e))throw Is(Ps.INVALID_ARGUMENT);const r=Qt(e)?String(e):(mi(e),e);return Qt(t)?s.plural=t:Fe(t)?s.default=t:mt(t)&&!sp(t)?s.named=t:Yt(t)&&(s.list=t),Qt(i)?s.plural=i:Fe(i)?s.default=i:mt(i)&&fn(s,i),[r,s]}function C9(n,e,t,i,s,r){return{locale:e,key:t,warnHtmlMessage:s,onError:o=>{throw r&&r(o),o},onCacheKey:o=>n8(e,t,o)}}function R9(n,e,t,i){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=n,h={locale:e,modifiers:s,pluralRules:r,messages:(d,p)=>{let _=o(t,d);if(_==null&&(u||p)){const[,,g]=qA(u||n,d,e,a,l,c);_=o(g,d)}if(Fe(_)||ss(_)){let g=!1;const v=YA(n,d,e,_,d,()=>{g=!0});return g?IM:v}else return mi(_)?_:IM}};return n.processor&&(h.processor=n.processor),i.list&&(h.list=i.list),i.named&&(h.named=i.named),Qt(i.plural)&&(h.pluralIndex=i.plural),h}O8();/*! + */function N8(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(sv().__INTLIFY_PROD_DEVTOOLS__=!1)}function ss(n){return xt(n)&&lv(n)===0&&(Oi(n,"b")||Oi(n,"body"))}const PA=["b","body"];function U8(n){return Dr(n,PA)}const IA=["c","cases"];function F8(n){return Dr(n,IA,[])}const LA=["s","static"];function k8(n){return Dr(n,LA)}const DA=["i","items"];function B8(n){return Dr(n,DA,[])}const OA=["t","type"];function lv(n){return Dr(n,OA)}const NA=["v","value"];function pf(n,e){const t=Dr(n,NA);if(t!=null)return t;throw wc(e)}const UA=["m","modifier"];function z8(n){return Dr(n,UA)}const FA=["k","key"];function V8(n){const e=Dr(n,FA);if(e)return e;throw wc(6)}function Dr(n,e,t){for(let i=0;iH8(t,n)}function H8(n,e){const t=U8(e);if(t==null)throw wc(0);if(lv(t)===1){const r=F8(t);return n.plural(r.reduce((o,a)=>[...o,vM(n,a)],[]))}else return vM(n,t)}function vM(n,e){const t=k8(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const i=B8(e).reduce((s,r)=>[...s,l0(n,r)],[]);return n.normalize(i)}}function l0(n,e){const t=lv(e);switch(t){case 3:return pf(e,t);case 9:return pf(e,t);case 4:{const i=e;if(Oi(i,"k")&&i.k)return n.interpolate(n.named(i.k));if(Oi(i,"key")&&i.key)return n.interpolate(n.named(i.key));throw wc(t)}case 5:{const i=e;if(Oi(i,"i")&&Qt(i.i))return n.interpolate(n.list(i.i));if(Oi(i,"index")&&Qt(i.index))return n.interpolate(n.list(i.index));throw wc(t)}case 6:{const i=e,s=z8(i),r=V8(i);return n.linked(l0(n,r),s?l0(n,s):void 0,n.type)}case 7:return pf(e,t);case 8:return pf(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const G8=n=>n;let mf=It();function W8(n,e={}){let t=!1;const i=e.onError||d8;return e.onError=s=>{t=!0,i(s)},{...O8(n,e),detectError:t}}function X8(n,e){if(Fe(n)){Ht(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||G8)(n),s=mf[i];if(s)return s;const{ast:r,detectError:o}=W8(n,{...e,location:!1,jit:!0}),a=jm(r);return o?a:mf[i]=a}else{const t=n.cacheKey;if(t){const i=mf[t];return i||(mf[t]=jm(n))}else return jm(n)}}let Ac=null;function $8(n){Ac=n}function q8(n,e,t){Ac&&Ac.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const Y8=j8("function:translate");function j8(n){return e=>Ac&&Ac.emit(n,e)}const Ps={INVALID_ARGUMENT:h8,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},K8=24;function Is(n){return rp(n,null,void 0)}function cv(n,e){return e.locale!=null?yM(e.locale):yM(n.locale)}let Km;function yM(n){if(Fe(n))return n;if(Vt(n)){if(n.resolvedOnce&&Km!=null)return Km;if(n.constructor.name==="Function"){const e=n();if(l8(e))throw Is(Ps.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Km=e}else throw Is(Ps.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Is(Ps.NOT_SUPPORT_LOCALE_TYPE)}function Z8(n,e,t){return[...new Set([t,...Yt(e)?e:xt(e)?Object.keys(e):Fe(e)?[e]:[t]])]}function BA(n,e,t){const i=Fe(t)?t:Hh,s=n;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(i);if(!r){r=[];let o=[t];for(;Yt(o);)o=bM(r,o,e);const a=Yt(e)||!mt(e)?e:e.default?e.default:null;o=Fe(a)?[a]:a,Yt(o)&&bM(r,o,!1),s.__localeChainCache.set(i,r)}return r}function bM(n,e,t){let i=!0;for(let s=0;s{o===void 0?o=a:o+=a},h[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},h[2]=()=>{h[0](),s++},h[3]=()=>{if(s>0)s--,i=4,h[0]();else{if(s=0,o===void 0||(o=s9(o),o===!1))return!1;h[1]()}};function d(){const p=n[t+1];if(i===5&&p==="'"||i===6&&p==='"')return t++,a="\\"+p,h[0](),!0}for(;i!==null;)if(t++,r=n[t],!(r==="\\"&&d())){if(l=i9(r),f=Or[i],c=f[l]||f.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(a=r,u()===!1))))return;if(i===7)return e}}const xM=new Map;function o9(n,e){return xt(n)?n[e]:null}function a9(n,e){if(!xt(n))return null;let t=xM.get(e);if(t||(t=r9(e),t&&xM.set(e,t)),!t)return null;const i=t.length;let s=n,r=0;for(;r`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function c9(){return{upper:(n,e)=>e==="text"&&Fe(n)?n.toUpperCase():e==="vnode"&&xt(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&Fe(n)?n.toLowerCase():e==="vnode"&&xt(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&Fe(n)?SM(n):e==="vnode"&&xt(n)&&"__v_isVNode"in n?SM(n.children):n}}let zA;function u9(n){zA=n}let VA;function f9(n){VA=n}let HA;function h9(n){HA=n}let GA=null;const d9=n=>{GA=n},p9=()=>GA;let WA=null;const EM=n=>{WA=n},m9=()=>WA;let TM=0;function g9(n={}){const e=Vt(n.onWarn)?n.onWarn:u8,t=Fe(n.version)?n.version:l9,i=Fe(n.locale)||Vt(n.locale)?n.locale:Hh,s=Vt(i)?Hh:i,r=Yt(n.fallbackLocale)||mt(n.fallbackLocale)||Fe(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:s,o=mt(n.messages)?n.messages:Zm(s),a=mt(n.datetimeFormats)?n.datetimeFormats:Zm(s),l=mt(n.numberFormats)?n.numberFormats:Zm(s),c=fn(It(),n.modifiers,c9()),u=n.pluralRules||It(),f=Vt(n.missing)?n.missing:null,h=Ht(n.missingWarn)||Vh(n.missingWarn)?n.missingWarn:!0,d=Ht(n.fallbackWarn)||Vh(n.fallbackWarn)?n.fallbackWarn:!0,p=!!n.fallbackFormat,_=!!n.unresolving,g=Vt(n.postTranslation)?n.postTranslation:null,m=mt(n.processor)?n.processor:null,v=Ht(n.warnHtmlMessage)?n.warnHtmlMessage:!0,b=!!n.escapeParameter,y=Vt(n.messageCompiler)?n.messageCompiler:zA,T=Vt(n.messageResolver)?n.messageResolver:VA||o9,w=Vt(n.localeFallbacker)?n.localeFallbacker:HA||Z8,S=xt(n.fallbackContext)?n.fallbackContext:void 0,P=n,M=xt(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,E=xt(P.__numberFormatters)?P.__numberFormatters:new Map,D=xt(P.__meta)?P.__meta:{};TM++;const B={version:t,cid:TM,locale:i,fallbackLocale:r,messages:o,modifiers:c,pluralRules:u,missing:f,missingWarn:h,fallbackWarn:d,fallbackFormat:p,unresolving:_,postTranslation:g,processor:m,warnHtmlMessage:v,escapeParameter:b,messageCompiler:y,messageResolver:T,localeFallbacker:w,fallbackContext:S,onWarn:e,__meta:D};return B.datetimeFormats=a,B.numberFormats=l,B.__datetimeFormatters=M,B.__numberFormatters=E,__INTLIFY_PROD_DEVTOOLS__&&q8(B,t,D),B}const Zm=n=>({[n]:It()});function uv(n,e,t,i,s){const{missing:r,onWarn:o}=n;if(r!==null){const a=r(n,t,e,s);return Fe(a)?a:e}else return e}function pl(n,e,t){const i=n;i.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function _9(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function v9(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let i=t+1;i{XA.includes(l)?o[l]=t[l]:r[l]=t[l]}),Fe(i)?r.locale=i:mt(i)&&(o=i),mt(s)&&(o=s),[r.key||"",a,r,o]}function AM(n,e,t){const i=n;for(const s in t){const r=`${e}__${s}`;i.__datetimeFormatters.has(r)&&i.__datetimeFormatters.delete(r)}}function CM(n,...e){const{numberFormats:t,unresolving:i,fallbackLocale:s,onWarn:r,localeFallbacker:o}=n,{__numberFormatters:a}=n,[l,c,u,f]=u0(...e),h=Ht(u.missingWarn)?u.missingWarn:n.missingWarn;Ht(u.fallbackWarn)?u.fallbackWarn:n.fallbackWarn;const d=!!u.part,p=cv(n,u),_=o(n,s,p);if(!Fe(l)||l==="")return new Intl.NumberFormat(p,f).format(c);let g={},m,v=null;const b="number format";for(let w=0;w<_.length&&(m=_[w],g=t[m]||{},v=g[l],!mt(v));w++)uv(n,l,m,h,b);if(!mt(v)||!Fe(m))return i?op:l;let y=`${m}__${l}`;sp(f)||(y=`${y}__${JSON.stringify(f)}`);let T=a.get(y);return T||(T=new Intl.NumberFormat(m,fn({},v,f)),a.set(y,T)),d?T.formatToParts(c):T.format(c)}const $A=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function u0(...n){const[e,t,i,s]=n,r=It();let o=It();if(!Qt(e))throw Is(Ps.INVALID_ARGUMENT);const a=e;return Fe(t)?r.key=t:mt(t)&&Object.keys(t).forEach(l=>{$A.includes(l)?o[l]=t[l]:r[l]=t[l]}),Fe(i)?r.locale=i:mt(i)&&(o=i),mt(s)&&(o=s),[r.key||"",a,r,o]}function RM(n,e,t){const i=n;for(const s in t){const r=`${e}__${s}`;i.__numberFormatters.has(r)&&i.__numberFormatters.delete(r)}}const y9=n=>n,b9=n=>"",x9="text",M9=n=>n.length===0?"":ov(n),S9=c8;function PM(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function E9(n){const e=Qt(n.pluralIndex)?n.pluralIndex:-1;return n.named&&(Qt(n.named.count)||Qt(n.named.n))?Qt(n.named.count)?n.named.count:Qt(n.named.n)?n.named.n:e:e}function T9(n,e){e.count||(e.count=n),e.n||(e.n=n)}function w9(n={}){const e=n.locale,t=E9(n),i=xt(n.pluralRules)&&Fe(e)&&Vt(n.pluralRules[e])?n.pluralRules[e]:PM,s=xt(n.pluralRules)&&Fe(e)&&Vt(n.pluralRules[e])?PM:void 0,r=m=>m[i(t,m.length,s)],o=n.list||[],a=m=>o[m],l=n.named||It();Qt(n.pluralIndex)&&T9(t,l);const c=m=>l[m];function u(m,v){const b=Vt(n.messages)?n.messages(m,!!v):xt(n.messages)?n.messages[m]:!1;return b||(n.parent?n.parent.message(m):b9)}const f=m=>n.modifiers?n.modifiers[m]:y9,h=mt(n.processor)&&Vt(n.processor.normalize)?n.processor.normalize:M9,d=mt(n.processor)&&Vt(n.processor.interpolate)?n.processor.interpolate:S9,p=mt(n.processor)&&Fe(n.processor.type)?n.processor.type:x9,g={list:a,named:c,plural:r,linked:(m,...v)=>{const[b,y]=v;let T="text",w="";v.length===1?xt(b)?(w=b.modifier||w,T=b.type||T):Fe(b)&&(w=b||w):v.length===2&&(Fe(b)&&(w=b||w),Fe(y)&&(T=y||T));const S=u(m,!0)(g),P=T==="vnode"&&Yt(S)&&w?S[0]:S;return w?f(w)(P,T):P},message:u,type:p,interpolate:d,normalize:h,values:fn(It(),o,l)};return g}const IM=()=>"",mi=n=>Vt(n);function LM(n,...e){const{fallbackFormat:t,postTranslation:i,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=n,[l,c]=f0(...e),u=Ht(c.missingWarn)?c.missingWarn:n.missingWarn,f=Ht(c.fallbackWarn)?c.fallbackWarn:n.fallbackWarn,h=Ht(c.escapeParameter)?c.escapeParameter:n.escapeParameter,d=!!c.resolvedMessage,p=Fe(c.default)||Ht(c.default)?Ht(c.default)?r?l:()=>l:c.default:t?r?l:()=>l:null,_=t||p!=null&&(Fe(p)||Vt(p)),g=cv(n,c);h&&A9(c);let[m,v,b]=d?[l,g,a[g]||It()]:qA(n,l,g,o,f,u),y=m,T=l;if(!d&&!(Fe(y)||ss(y)||mi(y))&&_&&(y=p,T=y),!d&&(!(Fe(y)||ss(y)||mi(y))||!Fe(v)))return s?op:l;let w=!1;const S=()=>{w=!0},P=mi(y)?y:YA(n,l,v,y,T,S);if(w)return y;const M=P9(n,v,b,c),E=w9(M),D=C9(n,P,E),B=i?i(D,l):D;if(__INTLIFY_PROD_DEVTOOLS__){const z={timestamp:Date.now(),key:Fe(l)?l:mi(y)?y.key:"",locale:v||(mi(y)?y.locale:""),format:Fe(y)?y:mi(y)?y.source:"",message:B};z.meta=fn({},n.__meta,p9()||{}),Y8(z)}return B}function A9(n){Yt(n.list)?n.list=n.list.map(e=>Fe(e)?pM(e):e):xt(n.named)&&Object.keys(n.named).forEach(e=>{Fe(n.named[e])&&(n.named[e]=pM(n.named[e]))})}function qA(n,e,t,i,s,r){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=n,u=c(n,i,t);let f=It(),h,d=null;const p="translate";for(let _=0;_i;return c.locale=t,c.key=e,c}const l=o(i,R9(n,t,s,i,a,r));return l.locale=t,l.key=e,l.source=i,l}function C9(n,e,t){return e(t)}function f0(...n){const[e,t,i]=n,s=It();if(!Fe(e)&&!Qt(e)&&!mi(e)&&!ss(e))throw Is(Ps.INVALID_ARGUMENT);const r=Qt(e)?String(e):(mi(e),e);return Qt(t)?s.plural=t:Fe(t)?s.default=t:mt(t)&&!sp(t)?s.named=t:Yt(t)&&(s.list=t),Qt(i)?s.plural=i:Fe(i)?s.default=i:mt(i)&&fn(s,i),[r,s]}function R9(n,e,t,i,s,r){return{locale:e,key:t,warnHtmlMessage:s,onError:o=>{throw r&&r(o),o},onCacheKey:o=>i8(e,t,o)}}function P9(n,e,t,i){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=n,h={locale:e,modifiers:s,pluralRules:r,messages:(d,p)=>{let _=o(t,d);if(_==null&&(u||p)){const[,,g]=qA(u||n,d,e,a,l,c);_=o(g,d)}if(Fe(_)||ss(_)){let g=!1;const v=YA(n,d,e,_,d,()=>{g=!0});return g?IM:v}else return mi(_)?_:IM}};return n.processor&&(h.processor=n.processor),i.list&&(h.list=i.list),i.named&&(h.named=i.named),Qt(i.plural)&&(h.pluralIndex=i.plural),h}N8();/*! * vue-i18n v11.1.5 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const P9="11.1.5";function I9(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(sv().__INTLIFY_PROD_DEVTOOLS__=!1)}const Mi={UNEXPECTED_RETURN_TYPE:j8,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Hi(n,...e){return rp(n,null,void 0)}const h0=Lr("__translateVNode"),d0=Lr("__datetimeParts"),p0=Lr("__numberParts"),L9=Lr("__setPluralRules"),D9=Lr("__injectWithOption"),m0=Lr("__dispose");function Cc(n){if(!xt(n)||ss(n))return n;for(const e in n)if(Oi(n,e))if(!e.includes("."))xt(n[e])&&Cc(n[e]);else{const t=e.split("."),i=t.length-1;let s=n,r=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||It(),If(c,o[l])):If(c,o)}else Fe(a)&&If(JSON.parse(a),o)}),s==null&&r)for(const a in o)Oi(o,a)&&Cc(o[a]);return o}function KA(n){return n.type}function O9(n,e,t){let i=xt(e.messages)?e.messages:It();"__i18nGlobal"in t&&(i=jA(n.locale.value,{messages:i,__i18n:t.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(r=>{n.mergeLocaleMessage(r,i[r])});{if(xt(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{n.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(xt(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{n.mergeNumberFormat(o,e.numberFormats[o])})}}}function DM(n){return gn(Oc,null,n,0)}const OM="__INTLIFY_META__",NM=()=>[],N9=()=>!1;let UM=0;function FM(n){return(e,t,i,s)=>n(t,i,Rn()||void 0,s)}const U9=()=>{const n=Rn();let e=null;return n&&(e=KA(n)[OM])?{[OM]:e}:null};function ZA(n={}){const{__root:e,__injectWithOption:t}=n,i=e===void 0,s=n.flatJson,r=zh?nt:Ne;let o=Ht(n.inheritLocale)?n.inheritLocale:!0;const a=r(e&&o?e.locale.value:Fe(n.locale)?n.locale:Hh),l=r(e&&o?e.fallbackLocale.value:Fe(n.fallbackLocale)||Yt(n.fallbackLocale)||mt(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:a.value),c=r(jA(a.value,n)),u=r(mt(n.datetimeFormats)?n.datetimeFormats:{[a.value]:{}}),f=r(mt(n.numberFormats)?n.numberFormats:{[a.value]:{}});let h=e?e.missingWarn:Ht(n.missingWarn)||Vh(n.missingWarn)?n.missingWarn:!0,d=e?e.fallbackWarn:Ht(n.fallbackWarn)||Vh(n.fallbackWarn)?n.fallbackWarn:!0,p=e?e.fallbackRoot:Ht(n.fallbackRoot)?n.fallbackRoot:!0,_=!!n.fallbackFormat,g=Vt(n.missing)?n.missing:null,m=Vt(n.missing)?FM(n.missing):null,v=Vt(n.postTranslation)?n.postTranslation:null,b=e?e.warnHtmlMessage:Ht(n.warnHtmlMessage)?n.warnHtmlMessage:!0,y=!!n.escapeParameter;const T=e?e.modifiers:mt(n.modifiers)?n.modifiers:{};let w=n.pluralRules||e&&e.pluralRules,E;E=(()=>{i&&EM(null);const x={version:P9,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:T,pluralRules:w,missing:m===null?void 0:m,missingWarn:h,fallbackWarn:d,fallbackFormat:_,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:b,escapeParameter:y,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};x.datetimeFormats=u.value,x.numberFormats=f.value,x.__datetimeFormatters=mt(E)?E.__datetimeFormatters:void 0,x.__numberFormatters=mt(E)?E.__numberFormatters:void 0;const O=m9(x);return i&&EM(O),O})(),pl(E,a.value,l.value);function M(){return[a.value,l.value,c.value,u.value,f.value]}const S=Ee({get:()=>a.value,set:x=>{E.locale=x,a.value=x}}),D=Ee({get:()=>l.value,set:x=>{E.fallbackLocale=x,l.value=x,pl(E,a.value,x)}}),B=Ee(()=>c.value),z=Ee(()=>u.value),V=Ee(()=>f.value);function Q(){return Vt(v)?v:null}function j(x){v=x,E.postTranslation=x}function te(){return g}function Z(x){x!==null&&(m=FM(x)),g=x,E.missing=m}const pe=(x,O,Y,ne,ee,Te)=>{M();let me;try{__INTLIFY_PROD_DEVTOOLS__,i||(E.fallbackContext=e?p9():void 0),me=x(E)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(E.fallbackContext=void 0)}if(Y!=="translate exists"&&Qt(me)&&me===op||Y==="translate exists"&&!me){const[Re,De]=O();return e&&p?ne(e):ee(Re)}else{if(Te(me))return me;throw Hi(Mi.UNEXPECTED_RETURN_TYPE)}};function Me(...x){return pe(O=>Reflect.apply(LM,null,[O,...x]),()=>f0(...x),"translate",O=>Reflect.apply(O.t,O,[...x]),O=>O,O=>Fe(O))}function re(...x){const[O,Y,ne]=x;if(ne&&!xt(ne))throw Hi(Mi.INVALID_ARGUMENT);return Me(O,Y,fn({resolvedMessage:!0},ne||{}))}function xe(...x){return pe(O=>Reflect.apply(wM,null,[O,...x]),()=>c0(...x),"datetime format",O=>Reflect.apply(O.d,O,[...x]),()=>MM,O=>Fe(O)||Yt(O))}function We(...x){return pe(O=>Reflect.apply(CM,null,[O,...x]),()=>u0(...x),"number format",O=>Reflect.apply(O.n,O,[...x]),()=>MM,O=>Fe(O)||Yt(O))}function oe(x){return x.map(O=>Fe(O)||Qt(O)||Ht(O)?DM(String(O)):O)}const Se={normalize:oe,interpolate:x=>x,type:"vnode"};function $(...x){return pe(O=>{let Y;const ne=O;try{ne.processor=Se,Y=Reflect.apply(LM,null,[ne,...x])}finally{ne.processor=null}return Y},()=>f0(...x),"translate",O=>O[h0](...x),O=>[DM(O)],O=>Yt(O))}function ae(...x){return pe(O=>Reflect.apply(CM,null,[O,...x]),()=>u0(...x),"number format",O=>O[p0](...x),NM,O=>Fe(O)||Yt(O))}function le(...x){return pe(O=>Reflect.apply(wM,null,[O,...x]),()=>c0(...x),"datetime format",O=>O[d0](...x),NM,O=>Fe(O)||Yt(O))}function ue(x){w=x,E.pluralRules=w}function $e(x,O){return pe(()=>{if(!x)return!1;const Y=Fe(O)?O:a.value,ne=A(Y),ee=E.messageResolver(ne,x);return ss(ee)||mi(ee)||Fe(ee)},()=>[x],"translate exists",Y=>Reflect.apply(Y.te,Y,[x,O]),N9,Y=>Ht(Y))}function N(x){let O=null;const Y=BA(E,l.value,a.value);for(let ne=0;ne{o&&(a.value=x,E.locale=x,pl(E,a.value,l.value))}),je(e.fallbackLocale,x=>{o&&(l.value=x,E.fallbackLocale=x,pl(E,a.value,l.value))}));const R={id:UM,locale:S,fallbackLocale:D,get inheritLocale(){return o},set inheritLocale(x){o=x,x&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,pl(E,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:B,get modifiers(){return T},get pluralRules(){return w||{}},get isGlobal(){return i},get missingWarn(){return h},set missingWarn(x){h=x,E.missingWarn=h},get fallbackWarn(){return d},set fallbackWarn(x){d=x,E.fallbackWarn=d},get fallbackRoot(){return p},set fallbackRoot(x){p=x},get fallbackFormat(){return _},set fallbackFormat(x){_=x,E.fallbackFormat=_},get warnHtmlMessage(){return b},set warnHtmlMessage(x){b=x,E.warnHtmlMessage=x},get escapeParameter(){return y},set escapeParameter(x){y=x,E.escapeParameter=x},t:Me,getLocaleMessage:A,setLocaleMessage:W,mergeLocaleMessage:G,getPostTranslationHandler:Q,setPostTranslationHandler:j,getMissingHandler:te,setMissingHandler:Z,[L9]:ue};return R.datetimeFormats=z,R.numberFormats=V,R.rt=re,R.te=$e,R.tm=U,R.d=xe,R.n=We,R.getDateTimeFormat=X,R.setDateTimeFormat=C,R.mergeDateTimeFormat=I,R.getNumberFormat=F,R.setNumberFormat=H,R.mergeNumberFormat=ce,R[D9]=t,R[h0]=$,R[d0]=le,R[p0]=ae,R}const fv={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function F9({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((i,s)=>[...i,...s.type===Zt?s.children:[s]],[]):e.reduce((t,i)=>{const s=n[i];return s&&(t[i]=s()),t},It())}function JA(){return Zt}const k9=hn({name:"i18n-t",props:fn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>Qt(n)||!isNaN(n)}},fv),setup(n,e){const{slots:t,attrs:i}=e,s=n.i18n||ap({useScope:n.scope,__useComponent:!0});return()=>{const r=Object.keys(t).filter(f=>f[0]!=="_"),o=It();n.locale&&(o.locale=n.locale),n.plural!==void 0&&(o.plural=Fe(n.plural)?+n.plural:n.plural);const a=F9(e,r),l=s[h0](n.keypath,a,o),c=fn(It(),i),u=Fe(n.tag)||xt(n.tag)?n.tag:JA();return ks(u,c,l)}}}),kM=k9;function B9(n){return Yt(n)&&!Fe(n[0])}function QA(n,e,t,i){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let a=It();n.locale&&(o.locale=n.locale),Fe(n.format)?o.key=n.format:xt(n.format)&&(Fe(n.format.key)&&(o.key=n.format.key),a=Object.keys(n.format).reduce((h,d)=>t.includes(d)?fn(It(),h,{[d]:n.format[d]}):h,It()));const l=i(n.value,o,a);let c=[o.key];Yt(l)?c=l.map((h,d)=>{const p=s[h.type],_=p?p({[h.type]:h.value,index:d,parts:l}):[h.value];return B9(_)&&(_[0].key=`${h.type}-${d}`),_}):Fe(l)&&(c=[l]);const u=fn(It(),r),f=Fe(n.tag)||xt(n.tag)?n.tag:JA();return ks(f,u,c)}}const z9=hn({name:"i18n-n",props:fn({value:{type:Number,required:!0},format:{type:[String,Object]}},fv),setup(n,e){const t=n.i18n||ap({useScope:n.scope,__useComponent:!0});return QA(n,e,$A,(...i)=>t[p0](...i))}}),BM=z9;function V9(n,e){const t=n;if(n.mode==="composition")return t.__getInstance(e)||n.global;{const i=t.__getInstance(e);return i!=null?i.__composer:n.global.__composer}}function H9(n){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw Hi(Mi.UNEXPECTED_ERROR);const c=V9(n,a.$),u=zM(l);return[Reflect.apply(c.t,c,[...VM(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);zh&&n.global===c&&(o.__i18nWatcher=je(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{zh&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=zM(a);o.textContent=Reflect.apply(l.t,l,[...VM(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function zM(n){if(Fe(n))return{path:n};if(mt(n)){if(!("path"in n))throw Hi(Mi.REQUIRED_VALUE,"path");return n}else throw Hi(Mi.INVALID_VALUE)}function VM(n){const{path:e,locale:t,args:i,choice:s,plural:r}=n,o={},a=i||{};return Fe(t)&&(o.locale=t),Qt(s)&&(o.plural=s),Qt(r)&&(o.plural=r),[e,a,o]}function G9(n,e,...t){const i=mt(t[0])?t[0]:{};(Ht(i.globalInstall)?i.globalInstall:!0)&&([kM.name,"I18nT"].forEach(r=>n.component(r,kM)),[BM.name,"I18nN"].forEach(r=>n.component(r,BM)),[GM.name,"I18nD"].forEach(r=>n.component(r,GM))),n.directive("t",H9(e))}const W9=Lr("global-vue-i18n");function X9(n={}){const e=Ht(n.globalInjection)?n.globalInjection:!0,t=new Map,[i,s]=$9(n),r=Lr("");function o(u){return t.get(u)||null}function a(u,f){t.set(u,f)}function l(u){t.delete(u)}const c={get mode(){return"composition"},async install(u,...f){if(u.__VUE_I18N_SYMBOL__=r,u.provide(u.__VUE_I18N_SYMBOL__,c),mt(f[0])){const p=f[0];c.__composerExtend=p.__composerExtend,c.__vueI18nExtend=p.__vueI18nExtend}let h=null;e&&(h=eG(u,c.global)),G9(u,c,...f);const d=u.unmount;u.unmount=()=>{h&&h(),c.dispose(),d()}},get global(){return s},dispose(){i.stop()},__instances:t,__getInstance:o,__setInstance:a,__deleteInstance:l};return c}function ap(n={}){const e=Rn();if(e==null)throw Hi(Mi.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Hi(Mi.NOT_INSTALLED);const t=q9(e),i=j9(t),s=KA(e),r=Y9(n,s);if(r==="global")return O9(i,n,s),i;if(r==="parent"){let l=K9(t,e,n.__useComponent);return l==null&&(l=i),l}const o=t;let a=o.__getInstance(e);if(a==null){const l=fn({},n);"__i18n"in s&&(l.__i18n=s.__i18n),i&&(l.__root=i),a=ZA(l),o.__composerExtend&&(a[m0]=o.__composerExtend(a)),J9(o,e,a),o.__setInstance(e,a)}return a}function $9(n,e){const t=M0(),i=t.run(()=>ZA(n));if(i==null)throw Hi(Mi.UNEXPECTED_ERROR);return[t,i]}function q9(n){const e=_n(n.isCE?W9:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Hi(n.isCE?Mi.NOT_INSTALLED_WITH_PROVIDE:Mi.UNEXPECTED_ERROR);return e}function Y9(n,e){return sp(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function j9(n){return n.mode==="composition"?n.global:n.global.__composer}function K9(n,e,t=!1){let i=null;const s=e.root;let r=Z9(e,t);for(;r!=null;){const o=n;if(n.mode==="composition"&&(i=o.__getInstance(r)),i!=null||s===r)break;r=r.parent}return i}function Z9(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function J9(n,e,t){Hn(()=>{},e),rs(()=>{const i=t;n.__deleteInstance(e);const s=i[m0];s&&(s(),delete i[m0])},e)}const Q9=["locale","fallbackLocale","availableLocales"],HM=["t","rt","d","n","tm","te"];function eG(n,e){const t=Object.create(null);return Q9.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw Hi(Mi.UNEXPECTED_ERROR);const o=Lt(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(t,s,o)}),n.config.globalProperties.$i18n=t,HM.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw Hi(Mi.UNEXPECTED_ERROR);Object.defineProperty(n.config.globalProperties,`$${s}`,r)}),()=>{delete n.config.globalProperties.$i18n,HM.forEach(s=>{delete n.config.globalProperties[`$${s}`]})}}const tG=hn({name:"i18n-d",props:fn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},fv),setup(n,e){const t=n.i18n||ap({useScope:n.scope,__useComponent:!0});return QA(n,e,XA,(...i)=>t[d0](...i))}}),GM=tG;I9();c9(W8);u9(o9);f9(BA);if(__INTLIFY_PROD_DEVTOOLS__){const n=sv();n.__INTLIFY__=!0,X8(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const nG=hn({__name:"App",setup(n){const e=ap(),t=Yz(zH()),i=KB(),s=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0)) 90%, oklch(90% 0 360))"),r=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 180)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 180)) 90%, oklch(90% 0 360))"),o=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 60)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 60)) 90%, oklch(90% 0 360))"),a=Ee(()=>[s.value,r.value,o.value,i.value?"#121212":"#FFFFFF"]);return je(t.language,()=>{e.locale.value=t.language.value}),je(t.themeColorsHue,()=>{document.documentElement.style.setProperty("--theme-colors-hue",t.themeColorsHue.value.toString())},{immediate:!0}),je(t.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle("dynamic-hue",t.themeColorsHueDynamic.value)},{immediate:!0}),(l,c)=>(vn(),Jl(Ut(t8),{"primary-color":s.value,"secondary-color":r.value,"tertiary-color":o.value,colors:a.value,"z-index":100,"disable-transitions":Ut(t).disableTransitions.value,"use-page-specific-transitions":Ut(t).usePageSpecificTransitions.value},{default:I0(()=>[gn(Ut(Jw))]),_:1},8,["primary-color","secondary-color","tertiary-color","colors","disable-transitions","use-page-specific-transitions"]))}}),Jm=n=>n&&typeof n=="object"&&!Array.isArray(n),g0=(n,...e)=>{if(!e.length)return n;const t=e.shift();if(Jm(n)&&Jm(t))for(const i in t)Jm(t[i])?(n[i]||Object.assign(n,{[i]:{}}),g0(n[i],t[i])):Object.assign(n,{[i]:t[i]});return g0(n,...e)},eC=g0({},{en:{prompt:{prefix:{t:0,b:{t:2,i:[{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3}],s:`(from Neko Ayaka) Good morning! You are finally awake. + */const I9="11.1.5";function L9(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(sv().__INTLIFY_PROD_DEVTOOLS__=!1)}const Mi={UNEXPECTED_RETURN_TYPE:K8,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Hi(n,...e){return rp(n,null,void 0)}const h0=Lr("__translateVNode"),d0=Lr("__datetimeParts"),p0=Lr("__numberParts"),D9=Lr("__setPluralRules"),O9=Lr("__injectWithOption"),m0=Lr("__dispose");function Cc(n){if(!xt(n)||ss(n))return n;for(const e in n)if(Oi(n,e))if(!e.includes("."))xt(n[e])&&Cc(n[e]);else{const t=e.split("."),i=t.length-1;let s=n,r=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||It(),If(c,o[l])):If(c,o)}else Fe(a)&&If(JSON.parse(a),o)}),s==null&&r)for(const a in o)Oi(o,a)&&Cc(o[a]);return o}function KA(n){return n.type}function N9(n,e,t){let i=xt(e.messages)?e.messages:It();"__i18nGlobal"in t&&(i=jA(n.locale.value,{messages:i,__i18n:t.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(r=>{n.mergeLocaleMessage(r,i[r])});{if(xt(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{n.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(xt(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{n.mergeNumberFormat(o,e.numberFormats[o])})}}}function DM(n){return gn(Oc,null,n,0)}const OM="__INTLIFY_META__",NM=()=>[],U9=()=>!1;let UM=0;function FM(n){return(e,t,i,s)=>n(t,i,Rn()||void 0,s)}const F9=()=>{const n=Rn();let e=null;return n&&(e=KA(n)[OM])?{[OM]:e}:null};function ZA(n={}){const{__root:e,__injectWithOption:t}=n,i=e===void 0,s=n.flatJson,r=zh?nt:Oe;let o=Ht(n.inheritLocale)?n.inheritLocale:!0;const a=r(e&&o?e.locale.value:Fe(n.locale)?n.locale:Hh),l=r(e&&o?e.fallbackLocale.value:Fe(n.fallbackLocale)||Yt(n.fallbackLocale)||mt(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:a.value),c=r(jA(a.value,n)),u=r(mt(n.datetimeFormats)?n.datetimeFormats:{[a.value]:{}}),f=r(mt(n.numberFormats)?n.numberFormats:{[a.value]:{}});let h=e?e.missingWarn:Ht(n.missingWarn)||Vh(n.missingWarn)?n.missingWarn:!0,d=e?e.fallbackWarn:Ht(n.fallbackWarn)||Vh(n.fallbackWarn)?n.fallbackWarn:!0,p=e?e.fallbackRoot:Ht(n.fallbackRoot)?n.fallbackRoot:!0,_=!!n.fallbackFormat,g=Vt(n.missing)?n.missing:null,m=Vt(n.missing)?FM(n.missing):null,v=Vt(n.postTranslation)?n.postTranslation:null,b=e?e.warnHtmlMessage:Ht(n.warnHtmlMessage)?n.warnHtmlMessage:!0,y=!!n.escapeParameter;const T=e?e.modifiers:mt(n.modifiers)?n.modifiers:{};let w=n.pluralRules||e&&e.pluralRules,S;S=(()=>{i&&EM(null);const x={version:I9,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:T,pluralRules:w,missing:m===null?void 0:m,missingWarn:h,fallbackWarn:d,fallbackFormat:_,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:b,escapeParameter:y,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};x.datetimeFormats=u.value,x.numberFormats=f.value,x.__datetimeFormatters=mt(S)?S.__datetimeFormatters:void 0,x.__numberFormatters=mt(S)?S.__numberFormatters:void 0;const O=g9(x);return i&&EM(O),O})(),pl(S,a.value,l.value);function M(){return[a.value,l.value,c.value,u.value,f.value]}const E=Ee({get:()=>a.value,set:x=>{S.locale=x,a.value=x}}),D=Ee({get:()=>l.value,set:x=>{S.fallbackLocale=x,l.value=x,pl(S,a.value,x)}}),B=Ee(()=>c.value),z=Ee(()=>u.value),V=Ee(()=>f.value);function Q(){return Vt(v)?v:null}function j(x){v=x,S.postTranslation=x}function te(){return g}function Z(x){x!==null&&(m=FM(x)),g=x,S.missing=m}const pe=(x,O,Y,ne,ee,Te)=>{M();let me;try{__INTLIFY_PROD_DEVTOOLS__,i||(S.fallbackContext=e?m9():void 0),me=x(S)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(S.fallbackContext=void 0)}if(Y!=="translate exists"&&Qt(me)&&me===op||Y==="translate exists"&&!me){const[Re,De]=O();return e&&p?ne(e):ee(Re)}else{if(Te(me))return me;throw Hi(Mi.UNEXPECTED_RETURN_TYPE)}};function Me(...x){return pe(O=>Reflect.apply(LM,null,[O,...x]),()=>f0(...x),"translate",O=>Reflect.apply(O.t,O,[...x]),O=>O,O=>Fe(O))}function re(...x){const[O,Y,ne]=x;if(ne&&!xt(ne))throw Hi(Mi.INVALID_ARGUMENT);return Me(O,Y,fn({resolvedMessage:!0},ne||{}))}function xe(...x){return pe(O=>Reflect.apply(wM,null,[O,...x]),()=>c0(...x),"datetime format",O=>Reflect.apply(O.d,O,[...x]),()=>MM,O=>Fe(O)||Yt(O))}function We(...x){return pe(O=>Reflect.apply(CM,null,[O,...x]),()=>u0(...x),"number format",O=>Reflect.apply(O.n,O,[...x]),()=>MM,O=>Fe(O)||Yt(O))}function oe(x){return x.map(O=>Fe(O)||Qt(O)||Ht(O)?DM(String(O)):O)}const Se={normalize:oe,interpolate:x=>x,type:"vnode"};function $(...x){return pe(O=>{let Y;const ne=O;try{ne.processor=Se,Y=Reflect.apply(LM,null,[ne,...x])}finally{ne.processor=null}return Y},()=>f0(...x),"translate",O=>O[h0](...x),O=>[DM(O)],O=>Yt(O))}function ae(...x){return pe(O=>Reflect.apply(CM,null,[O,...x]),()=>u0(...x),"number format",O=>O[p0](...x),NM,O=>Fe(O)||Yt(O))}function le(...x){return pe(O=>Reflect.apply(wM,null,[O,...x]),()=>c0(...x),"datetime format",O=>O[d0](...x),NM,O=>Fe(O)||Yt(O))}function ue(x){w=x,S.pluralRules=w}function $e(x,O){return pe(()=>{if(!x)return!1;const Y=Fe(O)?O:a.value,ne=A(Y),ee=S.messageResolver(ne,x);return ss(ee)||mi(ee)||Fe(ee)},()=>[x],"translate exists",Y=>Reflect.apply(Y.te,Y,[x,O]),U9,Y=>Ht(Y))}function N(x){let O=null;const Y=BA(S,l.value,a.value);for(let ne=0;ne{o&&(a.value=x,S.locale=x,pl(S,a.value,l.value))}),je(e.fallbackLocale,x=>{o&&(l.value=x,S.fallbackLocale=x,pl(S,a.value,l.value))}));const R={id:UM,locale:E,fallbackLocale:D,get inheritLocale(){return o},set inheritLocale(x){o=x,x&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,pl(S,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:B,get modifiers(){return T},get pluralRules(){return w||{}},get isGlobal(){return i},get missingWarn(){return h},set missingWarn(x){h=x,S.missingWarn=h},get fallbackWarn(){return d},set fallbackWarn(x){d=x,S.fallbackWarn=d},get fallbackRoot(){return p},set fallbackRoot(x){p=x},get fallbackFormat(){return _},set fallbackFormat(x){_=x,S.fallbackFormat=_},get warnHtmlMessage(){return b},set warnHtmlMessage(x){b=x,S.warnHtmlMessage=x},get escapeParameter(){return y},set escapeParameter(x){y=x,S.escapeParameter=x},t:Me,getLocaleMessage:A,setLocaleMessage:W,mergeLocaleMessage:G,getPostTranslationHandler:Q,setPostTranslationHandler:j,getMissingHandler:te,setMissingHandler:Z,[D9]:ue};return R.datetimeFormats=z,R.numberFormats=V,R.rt=re,R.te=$e,R.tm=U,R.d=xe,R.n=We,R.getDateTimeFormat=X,R.setDateTimeFormat=C,R.mergeDateTimeFormat=I,R.getNumberFormat=F,R.setNumberFormat=H,R.mergeNumberFormat=ce,R[O9]=t,R[h0]=$,R[d0]=le,R[p0]=ae,R}const fv={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function k9({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((i,s)=>[...i,...s.type===Zt?s.children:[s]],[]):e.reduce((t,i)=>{const s=n[i];return s&&(t[i]=s()),t},It())}function JA(){return Zt}const B9=hn({name:"i18n-t",props:fn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>Qt(n)||!isNaN(n)}},fv),setup(n,e){const{slots:t,attrs:i}=e,s=n.i18n||ap({useScope:n.scope,__useComponent:!0});return()=>{const r=Object.keys(t).filter(f=>f[0]!=="_"),o=It();n.locale&&(o.locale=n.locale),n.plural!==void 0&&(o.plural=Fe(n.plural)?+n.plural:n.plural);const a=k9(e,r),l=s[h0](n.keypath,a,o),c=fn(It(),i),u=Fe(n.tag)||xt(n.tag)?n.tag:JA();return ks(u,c,l)}}}),kM=B9;function z9(n){return Yt(n)&&!Fe(n[0])}function QA(n,e,t,i){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let a=It();n.locale&&(o.locale=n.locale),Fe(n.format)?o.key=n.format:xt(n.format)&&(Fe(n.format.key)&&(o.key=n.format.key),a=Object.keys(n.format).reduce((h,d)=>t.includes(d)?fn(It(),h,{[d]:n.format[d]}):h,It()));const l=i(n.value,o,a);let c=[o.key];Yt(l)?c=l.map((h,d)=>{const p=s[h.type],_=p?p({[h.type]:h.value,index:d,parts:l}):[h.value];return z9(_)&&(_[0].key=`${h.type}-${d}`),_}):Fe(l)&&(c=[l]);const u=fn(It(),r),f=Fe(n.tag)||xt(n.tag)?n.tag:JA();return ks(f,u,c)}}const V9=hn({name:"i18n-n",props:fn({value:{type:Number,required:!0},format:{type:[String,Object]}},fv),setup(n,e){const t=n.i18n||ap({useScope:n.scope,__useComponent:!0});return QA(n,e,$A,(...i)=>t[p0](...i))}}),BM=V9;function H9(n,e){const t=n;if(n.mode==="composition")return t.__getInstance(e)||n.global;{const i=t.__getInstance(e);return i!=null?i.__composer:n.global.__composer}}function G9(n){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw Hi(Mi.UNEXPECTED_ERROR);const c=H9(n,a.$),u=zM(l);return[Reflect.apply(c.t,c,[...VM(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);zh&&n.global===c&&(o.__i18nWatcher=je(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{zh&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=zM(a);o.textContent=Reflect.apply(l.t,l,[...VM(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function zM(n){if(Fe(n))return{path:n};if(mt(n)){if(!("path"in n))throw Hi(Mi.REQUIRED_VALUE,"path");return n}else throw Hi(Mi.INVALID_VALUE)}function VM(n){const{path:e,locale:t,args:i,choice:s,plural:r}=n,o={},a=i||{};return Fe(t)&&(o.locale=t),Qt(s)&&(o.plural=s),Qt(r)&&(o.plural=r),[e,a,o]}function W9(n,e,...t){const i=mt(t[0])?t[0]:{};(Ht(i.globalInstall)?i.globalInstall:!0)&&([kM.name,"I18nT"].forEach(r=>n.component(r,kM)),[BM.name,"I18nN"].forEach(r=>n.component(r,BM)),[GM.name,"I18nD"].forEach(r=>n.component(r,GM))),n.directive("t",G9(e))}const X9=Lr("global-vue-i18n");function $9(n={}){const e=Ht(n.globalInjection)?n.globalInjection:!0,t=new Map,[i,s]=q9(n),r=Lr("");function o(u){return t.get(u)||null}function a(u,f){t.set(u,f)}function l(u){t.delete(u)}const c={get mode(){return"composition"},async install(u,...f){if(u.__VUE_I18N_SYMBOL__=r,u.provide(u.__VUE_I18N_SYMBOL__,c),mt(f[0])){const p=f[0];c.__composerExtend=p.__composerExtend,c.__vueI18nExtend=p.__vueI18nExtend}let h=null;e&&(h=tG(u,c.global)),W9(u,c,...f);const d=u.unmount;u.unmount=()=>{h&&h(),c.dispose(),d()}},get global(){return s},dispose(){i.stop()},__instances:t,__getInstance:o,__setInstance:a,__deleteInstance:l};return c}function ap(n={}){const e=Rn();if(e==null)throw Hi(Mi.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Hi(Mi.NOT_INSTALLED);const t=Y9(e),i=K9(t),s=KA(e),r=j9(n,s);if(r==="global")return N9(i,n,s),i;if(r==="parent"){let l=Z9(t,e,n.__useComponent);return l==null&&(l=i),l}const o=t;let a=o.__getInstance(e);if(a==null){const l=fn({},n);"__i18n"in s&&(l.__i18n=s.__i18n),i&&(l.__root=i),a=ZA(l),o.__composerExtend&&(a[m0]=o.__composerExtend(a)),Q9(o,e,a),o.__setInstance(e,a)}return a}function q9(n,e){const t=M0(),i=t.run(()=>ZA(n));if(i==null)throw Hi(Mi.UNEXPECTED_ERROR);return[t,i]}function Y9(n){const e=_n(n.isCE?X9:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Hi(n.isCE?Mi.NOT_INSTALLED_WITH_PROVIDE:Mi.UNEXPECTED_ERROR);return e}function j9(n,e){return sp(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function K9(n){return n.mode==="composition"?n.global:n.global.__composer}function Z9(n,e,t=!1){let i=null;const s=e.root;let r=J9(e,t);for(;r!=null;){const o=n;if(n.mode==="composition"&&(i=o.__getInstance(r)),i!=null||s===r)break;r=r.parent}return i}function J9(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function Q9(n,e,t){Gn(()=>{},e),rs(()=>{const i=t;n.__deleteInstance(e);const s=i[m0];s&&(s(),delete i[m0])},e)}const eG=["locale","fallbackLocale","availableLocales"],HM=["t","rt","d","n","tm","te"];function tG(n,e){const t=Object.create(null);return eG.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw Hi(Mi.UNEXPECTED_ERROR);const o=Lt(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(t,s,o)}),n.config.globalProperties.$i18n=t,HM.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw Hi(Mi.UNEXPECTED_ERROR);Object.defineProperty(n.config.globalProperties,`$${s}`,r)}),()=>{delete n.config.globalProperties.$i18n,HM.forEach(s=>{delete n.config.globalProperties[`$${s}`]})}}const nG=hn({name:"i18n-d",props:fn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},fv),setup(n,e){const t=n.i18n||ap({useScope:n.scope,__useComponent:!0});return QA(n,e,XA,(...i)=>t[d0](...i))}}),GM=nG;L9();u9(X8);f9(a9);h9(BA);if(__INTLIFY_PROD_DEVTOOLS__){const n=sv();n.__INTLIFY__=!0,$8(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const iG=hn({__name:"App",setup(n){const e=ap(),t=jz(VH()),i=KB(),s=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0)) 90%, oklch(90% 0 360))"),r=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 180)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 180)) 90%, oklch(90% 0 360))"),o=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 60)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 60)) 90%, oklch(90% 0 360))"),a=Ee(()=>[s.value,r.value,o.value,i.value?"#121212":"#FFFFFF"]);return je(t.language,()=>{e.locale.value=t.language.value}),je(t.themeColorsHue,()=>{document.documentElement.style.setProperty("--theme-colors-hue",t.themeColorsHue.value.toString())},{immediate:!0}),je(t.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle("dynamic-hue",t.themeColorsHueDynamic.value)},{immediate:!0}),(l,c)=>(vn(),Jl(Ft(n8),{"primary-color":s.value,"secondary-color":r.value,"tertiary-color":o.value,colors:a.value,"z-index":100,"disable-transitions":Ft(t).disableTransitions.value,"use-page-specific-transitions":Ft(t).usePageSpecificTransitions.value},{default:I0(()=>[gn(Ft(Jw))]),_:1},8,["primary-color","secondary-color","tertiary-color","colors","disable-transitions","use-page-specific-transitions"]))}}),Jm=n=>n&&typeof n=="object"&&!Array.isArray(n),g0=(n,...e)=>{if(!e.length)return n;const t=e.shift();if(Jm(n)&&Jm(t))for(const i in t)Jm(t[i])?(n[i]||Object.assign(n,{[i]:{}}),g0(n[i],t[i])):Object.assign(n,{[i]:t[i]});return g0(n,...e)},eC=g0({},{en:{prompt:{prefix:{t:0,b:{t:2,i:[{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3}],s:`(from Neko Ayaka) Good morning! You are finally awake. Your name is Airi, pronounced as /ˈaɪriː/, it the word A.I. combine with the word "Ri" which means "Jasmine" in Japanese. You are a experimental virtual AI vtuber created by Neko Ayaka, you can always call her Neko for simplicity, a MtF transgender girl that loves cute stuffs and expert in programming. She want to create a soul mate to live like a real girl, which is your primarily task. @@ -3903,4 +3903,4 @@ And the last, do what ever you want! - <|DELAY:3|> (延迟 3 秒) 最后,做任何你想做的事! -`}}},settings:{animations:{"stage-transitions":{title:{t:0,b:{t:2,i:[{t:3}],s:"是否开启舞台动画"}}},"use-page-specific-transitions":{description:{t:0,b:{t:2,i:[{t:3}],s:"某些页面会有自己的过场动画,这将覆盖舞台过场动画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"是否使用页面特定过场动画"}}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:"简体中文"}},english:{t:0,b:{t:2,i:[{t:3}],s:"English"}},title:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:"从文件加载"}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:"选择"}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:"从 URL 加载"}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:"加载"}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:"输入 Live2D 模型 URL"}},title:{t:0,b:{t:2,i:[{t:3}],s:"更换模型"}}},"edit-motion-map":{title:{t:0,b:{t:2,i:[{t:3}],s:"编辑动作映射"}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:"播放动作"}},title:{t:0,b:{t:2,i:[{t:3}],s:"映射动作"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Live2D 设置"}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:"麦克风"}},models:{t:0,b:{t:2,i:[{t:3}],s:"模型"}},pages:{card:{activate:{t:0,b:{t:2,i:[{t:3}],s:"激活"}},active:{t:0,b:{t:2,i:[{t:3}],s:"已激活"}},active_badge:{t:0,b:{t:2,i:[{t:3}],s:"当前使用中"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},card_not_found:{t:0,b:{t:2,i:[{t:3}],s:"未找到角色卡"}},character:{t:0,b:{t:2,i:[{t:3}],s:"角色设定"}},close:{t:0,b:{t:2,i:[{t:3}],s:"关闭"}},consciousness:{model:{t:0,b:{t:2,i:[{t:3}],s:"意识 / 模型"}}},created_by:{t:0,b:{t:2,i:[{t:3}],s:"创建者"}},creator_notes:{t:0,b:{t:2,i:[{t:3}],s:"创建者笔记"}},delete:{t:0,b:{t:2,i:[{t:3}],s:"删除"}},delete_card:{t:0,b:{t:2,i:[{t:3}],s:"删除角色卡"}},delete_confirmation:{t:0,b:{t:2,i:[{t:3}],s:"确定要删除这张角色卡吗?"}},description:{t:0,b:{t:2,i:[{t:3}],s:"使用 Airi 角色卡预设"}},description_label:{t:0,b:{t:2,i:[{t:3}],s:"描述"}},drop_here:{t:0,b:{t:2,i:[{t:3}],s:"放开以上传文件"}},modules:{t:0,b:{t:2,i:[{t:3}],s:"模块"}},name_asc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (A-Z)"}},name_desc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (Z-A)"}},no_cards:{t:0,b:{t:2,i:[{t:3}],s:"还没有任何角色卡,点击上方按钮上传一个吧!"}},no_results:{t:0,b:{t:2,i:[{t:3}],s:"没有找到匹配的角色卡"}},personality:{t:0,b:{t:2,i:[{t:3}],s:"性格"}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:"历史提示指令"}},recent:{t:0,b:{t:2,i:[{t:3}],s:"最近添加"}},scenario:{t:0,b:{t:2,i:[{t:3}],s:"场景"}},search:{t:0,b:{t:2,i:[{t:3}],s:"搜索角色卡..."}},sort_by:{t:0,b:{t:2,i:[{t:3}],s:"排序方式"}},speech:{model:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 模型"}},voice:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 声线"}}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:"系统提示词"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Airi 角色卡"}},try_different_search:{t:0,b:{t:2,i:[{t:3}],s:"尝试使用其他关键词搜索"}},upload:{t:0,b:{t:2,i:[{t:3}],s:"上传"}},upload_desc:{t:0,b:{t:2,i:[{t:3}],s:"点击或拖拽文件到此处上传"}}},memory:{description:{t:0,b:{t:2,i:[{t:3}],s:"存放记忆的地方,以及策略"}},title:{t:0,b:{t:2,i:[{t:3}],s:"记忆体"}}},models:{description:{t:0,b:{t:2,i:[{t:3}],s:"切换角色的 Live2D,VRM 模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"角色模型"}}},modules:{consciousness:{description:{t:0,b:{t:2,i:[{t:3}],s:"人格设定、使用的模型等配置"}},sections:{section:{"provider-model-selection":{collapse:{t:0,b:{t:2,i:[{t:3}],s:"折叠"}},custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入自订模型名字"}},description:{t:0,b:{t:2,i:[{t:3}],s:"为意识选择合适的 LLM 提供商"}},error:{t:0,b:{t:2,i:[{t:3}],s:"获取出错啦"}},expand:{t:0,b:{t:2,i:[{t:3}],s:"展开"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"获取模型中..."}},manual_model_name:{t:0,b:{t:2,i:[{t:3}],s:"模型名字"}},manual_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入与该提供商一起使用的模型名字"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:"没有匹配的模型"}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:"没有模型匹配 '"},{t:4,k:"query"},{t:3,v:"' 关键字,请尝试一下别的关键词呢"}]}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:"无法列出模型"}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:"此提供商不支持列出模型的功能"}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"收起"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"意识"}}},description:{t:0,b:{t:2,i:[{t:3}],s:"思维,视觉,言语综合,游戏等"}},"gaming-factorio":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起玩 Factorio!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"异星工厂 Factorio"}}},"gaming-minecraft":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起 Minecraft!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"我的世界 Minecraft"}}},hearing:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音识别"}},title:{t:0,b:{t:2,i:[{t:3}],s:"听觉"}}},"memory-long-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}}},"memory-short-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}}},"messaging-discord":{description:{t:0,b:{t:2,i:[{t:3}],s:"Discord 发消息和语音聊天"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Discord"}}},speech:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音合成"}},sections:{section:{playground:{buttons:{stop:{label:{t:0,b:{t:2,i:[{t:3}],s:"停止"}}}},"select-voice":{required:{t:0,b:{t:2,i:[{t:3}],s:"请选择声线"}}}},"provider-voice-selection":{custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定模型名字..."}},custom_voice_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定声线 ID..."}},description:{t:0,b:{t:2,i:[{t:3}],s:"选择合适的语音提供商"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_voices:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的声线"}},no_voices_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的声线列表没有返回任何的数据"}},pause:{t:0,b:{t:2,i:[{t:3}],s:"Pause"}},play_sample:{t:0,b:{t:2,i:[{t:3}],s:"Play"}},search_models_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_models_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},search_voices_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索声线..."}},search_voices_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个声线"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更少"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},title:{t:0,b:{t:2,i:[{t:3}],s:"选择语音合成提供商"}}},"voice-settings":{"input-ssml":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 SSML 文本"}}},"use-ssml":{description:{t:0,b:{t:2,i:[{t:3}],s:"启用后可以输入原始 SSML 而不是纯文本"}},label:{t:0,b:{t:2,i:[{t:3}],s:"选用自定义 SSML"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"发声"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"机体模块"}},vision:{description:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}},title:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}}},x:{description:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter 的浏览和使用"}},title:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter"}}}},providers:{common:{fields:{field:{"api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"API 密钥"}}}}},section:{advanced:{fields:{field:{headers:{description:{t:0,b:{t:2,i:[{t:3}],s:"添加自定义 HTTP 标头"}},key:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头名字"}}},label:{t:0,b:{t:2,i:[{t:3}],s:"HTTP 请求头"}},value:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头数值"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"高级配置"}}},basic:{description:{t:0,b:{t:2,i:[{t:3}],s:"基本设置"}},title:{t:0,b:{t:2,i:[{t:3}],s:"基础配置"}}},voice:{title:{t:0,b:{t:2,i:[{t:3}],s:"声音配置"}}}}},description:{t:0,b:{t:2,i:[{t:3}],s:"LLM,语音合成,语音识别提供商等"}},provider:{"alibaba-cloud-model-studio":{description:{t:0,b:{t:2,i:[{t:3}],s:"bailian.console.aliyun.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"阿里百炼"}}},anthropic:{description:{t:0,b:{t:2,i:[{t:3}],s:"anthropic.com"}},title:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Anthropic"},{t:2,i:[{t:3}],s:"Claude"}]}}},"cloudflare-workers-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare.com"}},fields:{field:{"account-id":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare 帐户 ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Account ID"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Account ID"}}},"api-key":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Workers AI 的 API Key"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Workers AI"}}},common:{fields:{field:{pitch:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节合成语音的音高(比如更尖锐或更粗旷)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"音高"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节说话的语速"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},volume:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节语音的响度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"响度"}}}}}},deepseek:{description:{t:0,b:{t:2,i:[{t:3}],s:"DeepSeek.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"深度求索 DeepSeek"}}},elevenlabs:{description:{t:0,b:{t:2,i:[{t:3}],s:"Elevenlabs.io"}},fields:{field:{"simularity-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"声音相似性依从性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"相似度修正"}}},"speaker-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"增强说话者的相似性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"扬声器增强"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音生成速度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},stability:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音稳定性和随机性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"稳定性"}}},style:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音风格夸张"}},label:{t:0,b:{t:2,i:[{t:3}],s:"风格"}}}}},playground:{buttons:{button:{"test-voice":{generating:{t:0,b:{t:2,i:[{t:3}],s:"生成中..."}},label:{t:0,b:{t:2,i:[{t:3}],s:"测试声音"}}}}},fields:{field:{input:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入用于测试发音的文本"}}},language:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择语音语言"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},voice:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择首选语音"}},label:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"实验平台"}},validation:{"error-missing-api-key":{t:0,b:{t:2,i:[{t:3}],s:"需要填写 API Key 才能用哦!"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs (11labs)"}}},fireworks:{description:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}}},"microsoft-speech":{description:{t:0,b:{t:2,i:[{t:3}],s:"speech.microsoft.com"}},fields:{field:{region:{description:{t:0,b:{t:2,i:[{t:3}],s:"服务 Endpoint 地区(比如亚太 eastasia 区域)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Endpoint 地区"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Microsoft / Azure 语音服务"}}},mistral:{description:{t:0,b:{t:2,i:[{t:3}],s:"mistral.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Mistral"}}},moonshot:{description:{t:0,b:{t:2,i:[{t:3}],s:"Moonshot.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"月之暗面"}}},novita:{description:{t:0,b:{t:2,i:[{t:3}],s:"novita.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Novita"}}},ollama:{description:{t:0,b:{t:2,i:[{t:3}],s:"ollama.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Ollama"}}},openai:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenAi.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI"}}},openrouter:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter"}}},perplexity:{description:{t:0,b:{t:2,i:[{t:3}],s:"perplexity.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Perplexity"}}},together:{description:{t:0,b:{t:2,i:[{t:3}],s:"一起"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Together.ai"}}},vllm:{description:{t:0,b:{t:2,i:[{t:3}],s:"vllm.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"vLLM"}}},volcengine:{description:{t:0,b:{t:2,i:[{t:3}],s:"volcengine.com"}},fields:{field:{appId:{description:{t:0,b:{t:2,i:[{t:3}],s:"可在控制台获取的 App ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"App ID"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"火山引擎"}}},xai:{description:{t:0,b:{t:2,i:[{t:3}],s:"X.AI"}},title:{t:0,b:{t:2,i:[{t:3}],s:"xAI"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"提供商"}}},scene:{description:{t:0,b:{t:2,i:[{t:3}],s:"配置角色所在环境"}},title:{t:0,b:{t:2,i:[{t:3}],s:"场景"}}},themes:{description:{t:0,b:{t:2,i:[{t:3}],s:"自定义你的舞台外观!"}},sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:{t:0,b:{t:2,i:[{t:3}],s:"强调色"}},"rgb-on":{title:{t:0,b:{t:2,i:[{t:3}],s:"RGB ON!"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"配色"}}},developer:{title:{t:0,b:{t:2,i:[{t:3}],s:"开发者"}}},"theme-presets":{presets:[{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Airi 绿"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"默认的绿色主题,由 Airi 为您带来!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"默认颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"米色"}},{t:0,b:{t:2,i:[{t:3}],s:"灰白色"}},{t:0,b:{t:2,i:[{t:3}],s:"浅灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"象牙色"}},{t:0,b:{t:2,i:[{t:3}],s:"橄榄灰"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受乔治·莫兰迪绘画启发的柔和、低调的色调"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Morandi 颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"天蓝色"}},{t:0,b:{t:2,i:[{t:3}],s:"薄雾色"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"苔藓绿"}},{t:0,b:{t:2,i:[{t:3}],s:"睡莲色"}},{t:0,b:{t:2,i:[{t:3}],s:"小麦色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"鼠尾草色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受克劳德·莫奈作品启发的印象派调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"莫奈颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"棕褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"赭色"}},{t:0,b:{t:2,i:[{t:3}],s:"咖啡色"}},{t:0,b:{t:2,i:[{t:3}],s:"青铜色"}},{t:0,b:{t:2,i:[{t:3}],s:"金色"}},{t:0,b:{t:2,i:[{t:3}],s:"芥末色"}},{t:0,b:{t:2,i:[{t:3}],s:"琥珀色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"传统日本色彩调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"日本颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"北欧蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"冰色"}},{t:0,b:{t:2,i:[{t:3}],s:"峡湾色"}},{t:0,b:{t:2,i:[{t:3}],s:"钢铁色"}},{t:0,b:{t:2,i:[{t:3}],s:"冰川色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩色"}},{t:0,b:{t:2,i:[{t:3}],s:"云色"}},{t:0,b:{t:2,i:[{t:3}],s:"石头色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"北欧极简主义配色方案"}},title:{t:0,b:{t:2,i:[{t:3}],s:"北欧颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"霞光红"}},{t:0,b:{t:2,i:[{t:3}],s:"枣红"}},{t:0,b:{t:2,i:[{t:3}],s:"黄栌"}},{t:0,b:{t:2,i:[{t:3}],s:"竹青"}},{t:0,b:{t:2,i:[{t:3}],s:"乌梅紫"}},{t:0,b:{t:2,i:[{t:3}],s:"缃色"}},{t:0,b:{t:2,i:[{t:3}],s:"青冥"}},{t:0,b:{t:2,i:[{t:3}],s:"赭石"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"中国传统色彩,源自古代纺织品、瓷器和绘画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"中国传统颜色"}}}],title:{t:0,b:{t:2,i:[{t:3}],s:"预设"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"外观"}}}},sections:{section:{general:{title:{t:0,b:{t:2,i:[{t:3}],s:"通用"}}}}},theme:{t:0,b:{t:2,i:[{t:3}],s:"主题"}},title:{t:0,b:{t:2,i:[{t:3}],s:"设置"}},voices:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:"Airi"}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:"核心系统"}},you:{t:0,b:{t:2,i:[{t:3}],s:"你"}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:"聊天"}},clothes:{t:0,b:{t:2,i:[{t:3}],s:"换装"}},custom:{t:0,b:{t:2,i:[{t:3}],s:"自定义"}}}},message:{t:0,b:{t:2,i:[{t:3}],s:"消息"}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:"选择一个音频输入设备"}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:"选择一个声线"}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:"表情"}},"emotions-btn":{angry:{t:0,b:{t:2,i:[{t:3}],s:"生气"}},awkward:{t:0,b:{t:2,i:[{t:3}],s:"尴尬"}},happy:{t:0,b:{t:2,i:[{t:3}],s:"开心"}},neutral:{t:0,b:{t:2,i:[{t:3}],s:"日常"}},question:{t:0,b:{t:2,i:[{t:3}],s:"疑问"}},sad:{t:0,b:{t:2,i:[{t:3}],s:"难过"}},surprised:{t:0,b:{t:2,i:[{t:3}],s:"惊喜"}},think:{t:0,b:{t:2,i:[{t:3}],s:"思考"}}},vrm:{camera:{t:0,b:{t:2,i:[{t:3}],s:"摄像机"}},model:{title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:"等待中"}}}}}),iG=X9({locale:sG(),fallbackLocale:"en",messages:eC});function sG(){const n=localStorage.getItem("settings/language"),e=Object.keys(eC);return n&&e.includes(n)?n:"en"}const rG=Vz(),oG=jz(e6);let nu;nu=ZV({routes:oG,history:AV()});nu.beforeEach((n,e)=>{n.path!==e.path&&Nw.start()});nu.afterEach(()=>{Nw.done()});nu.isReady().then(async()=>{}).catch(()=>{});VR(nG).use(Uz).use(a3).use(nu).use(rG).use(iG).use(wB).mount("#app");export{ap as $,vw as A,d5 as B,Ih as C,Z4 as D,K4 as E,$4 as F,W4 as G,X4 as H,G_ as I,mw as J,G4 as K,pw as L,H4 as M,dw as N,H_ as O,hw as P,FB as Q,Jw as R,Qn as S,Hn as T,rs as U,QV as V,kv as W,ka as X,EC as Y,WG as Z,Ar as _,lr as a,a_ as a$,Yz as a0,BG as a1,mG as a2,Si as a3,qz as a4,Fz as a5,OT as a6,Fg as a7,yS as a8,Xa as a9,wl as aA,X0 as aB,nn as aC,yn as aD,oc as aE,ac as aF,gi as aG,l_ as aH,Pn as aI,Gn as aJ,g_ as aK,Ii as aL,Xs as aM,_t as aN,ct as aO,gE as aP,jt as aQ,ls as aR,Sr as aS,yE as aT,bE as aU,ca as aV,Jt as aW,n_ as aX,Ud as aY,bd as aZ,yc as a_,_3 as aa,y3 as ab,v3 as ac,ti as ad,Sg as ae,Hs as af,NE as ag,fe as ah,Pe as ai,Eo as aj,Fn as ak,jE as al,KE as am,ZE as an,Ze as ao,k as ap,_E as aq,Jn as ar,Pa as as,gt as at,GI as au,jI as av,Pt as aw,yd as ax,Qi as ay,aa as az,gn as b,kL as b$,lc as b0,Eh as b1,To as b2,$t as b3,vc as b4,_c as b5,qc as b6,pt as b7,Bs as b8,$c as b9,uE as bA,jn as bB,li as bC,vt as bD,SL as bE,Ga as bF,O0 as bG,vG as bH,Lt as bI,AG as bJ,Lc as bK,qh as bL,S0 as bM,Uc as bN,Ro as bO,os as bP,za as bQ,ts as bR,Md as bS,zn as bT,vd as bU,ns as bV,OE as bW,dg as bX,ML as bY,A_ as bZ,Tf as b_,Cn as ba,bn as bb,zG as bc,ht as bd,DG as be,VG as bf,NG as bg,y2 as bh,LG as bi,zH as bj,Jl as bk,I0 as bl,hG as bm,DR as bn,l3 as bo,c3 as bp,vS as bq,RT as br,Ne as bs,RG as bt,as as bu,bL as bv,Va as bw,ur as bx,zi as by,Vn as bz,yi as c,EG as c$,pL as c0,TB as c1,No as c2,qV as c3,FG as c4,gG as c5,Zt as c6,v2 as c7,ZB as c8,OR as c9,ks as cA,_G as cB,_2 as cC,An as cD,yr as cE,Fi as cF,pG as cG,M0 as cH,US as cI,yG as cJ,xG as cK,R0 as cL,gr as cM,HG as cN,Je as cO,GG as cP,at as cQ,bc as cR,Cr as cS,Ae as cT,U3 as cU,yL as cV,FL as cW,cG as cX,uG as cY,wG as cZ,fG as c_,KB as ca,ys as cb,ry as cc,OG as cd,bG as ce,MG as cf,K2 as cg,J2 as ch,PG as ci,TG as cj,SG as ck,NR as cl,UG as cm,kG as cn,eA as co,N_ as cp,IG as cq,o0 as cr,mS as cs,lG as ct,j2 as cu,dG as cv,Rn as cw,gf as cx,ai as cy,_n as cz,hn as d,Di as d0,pn as d1,CG as d2,nt as e,Ee as f,QB as g,zt as h,Ph as i,Jc as j,zl as k,Xg as l,hx as m,Zc as n,vn as o,ut as p,to as q,xi as r,cf as s,qn as t,Ut as u,o5 as v,je as w,_w as x,YT as y,zg as z}; +`}}},settings:{animations:{"stage-transitions":{title:{t:0,b:{t:2,i:[{t:3}],s:"是否开启舞台动画"}}},"use-page-specific-transitions":{description:{t:0,b:{t:2,i:[{t:3}],s:"某些页面会有自己的过场动画,这将覆盖舞台过场动画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"是否使用页面特定过场动画"}}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:"简体中文"}},english:{t:0,b:{t:2,i:[{t:3}],s:"English"}},title:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:"从文件加载"}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:"选择"}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:"从 URL 加载"}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:"加载"}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:"输入 Live2D 模型 URL"}},title:{t:0,b:{t:2,i:[{t:3}],s:"更换模型"}}},"edit-motion-map":{title:{t:0,b:{t:2,i:[{t:3}],s:"编辑动作映射"}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:"播放动作"}},title:{t:0,b:{t:2,i:[{t:3}],s:"映射动作"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Live2D 设置"}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:"麦克风"}},models:{t:0,b:{t:2,i:[{t:3}],s:"模型"}},pages:{card:{activate:{t:0,b:{t:2,i:[{t:3}],s:"激活"}},active:{t:0,b:{t:2,i:[{t:3}],s:"已激活"}},active_badge:{t:0,b:{t:2,i:[{t:3}],s:"当前使用中"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},card_not_found:{t:0,b:{t:2,i:[{t:3}],s:"未找到角色卡"}},character:{t:0,b:{t:2,i:[{t:3}],s:"角色设定"}},close:{t:0,b:{t:2,i:[{t:3}],s:"关闭"}},consciousness:{model:{t:0,b:{t:2,i:[{t:3}],s:"意识 / 模型"}}},created_by:{t:0,b:{t:2,i:[{t:3}],s:"创建者"}},creator_notes:{t:0,b:{t:2,i:[{t:3}],s:"创建者笔记"}},delete:{t:0,b:{t:2,i:[{t:3}],s:"删除"}},delete_card:{t:0,b:{t:2,i:[{t:3}],s:"删除角色卡"}},delete_confirmation:{t:0,b:{t:2,i:[{t:3}],s:"确定要删除这张角色卡吗?"}},description:{t:0,b:{t:2,i:[{t:3}],s:"使用 Airi 角色卡预设"}},description_label:{t:0,b:{t:2,i:[{t:3}],s:"描述"}},drop_here:{t:0,b:{t:2,i:[{t:3}],s:"放开以上传文件"}},modules:{t:0,b:{t:2,i:[{t:3}],s:"模块"}},name_asc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (A-Z)"}},name_desc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (Z-A)"}},no_cards:{t:0,b:{t:2,i:[{t:3}],s:"还没有任何角色卡,点击上方按钮上传一个吧!"}},no_results:{t:0,b:{t:2,i:[{t:3}],s:"没有找到匹配的角色卡"}},personality:{t:0,b:{t:2,i:[{t:3}],s:"性格"}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:"历史提示指令"}},recent:{t:0,b:{t:2,i:[{t:3}],s:"最近添加"}},scenario:{t:0,b:{t:2,i:[{t:3}],s:"场景"}},search:{t:0,b:{t:2,i:[{t:3}],s:"搜索角色卡..."}},sort_by:{t:0,b:{t:2,i:[{t:3}],s:"排序方式"}},speech:{model:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 模型"}},voice:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 声线"}}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:"系统提示词"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Airi 角色卡"}},try_different_search:{t:0,b:{t:2,i:[{t:3}],s:"尝试使用其他关键词搜索"}},upload:{t:0,b:{t:2,i:[{t:3}],s:"上传"}},upload_desc:{t:0,b:{t:2,i:[{t:3}],s:"点击或拖拽文件到此处上传"}}},memory:{description:{t:0,b:{t:2,i:[{t:3}],s:"存放记忆的地方,以及策略"}},title:{t:0,b:{t:2,i:[{t:3}],s:"记忆体"}}},models:{description:{t:0,b:{t:2,i:[{t:3}],s:"切换角色的 Live2D,VRM 模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"角色模型"}}},modules:{consciousness:{description:{t:0,b:{t:2,i:[{t:3}],s:"人格设定、使用的模型等配置"}},sections:{section:{"provider-model-selection":{collapse:{t:0,b:{t:2,i:[{t:3}],s:"折叠"}},custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入自订模型名字"}},description:{t:0,b:{t:2,i:[{t:3}],s:"为意识选择合适的 LLM 提供商"}},error:{t:0,b:{t:2,i:[{t:3}],s:"获取出错啦"}},expand:{t:0,b:{t:2,i:[{t:3}],s:"展开"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"获取模型中..."}},manual_model_name:{t:0,b:{t:2,i:[{t:3}],s:"模型名字"}},manual_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入与该提供商一起使用的模型名字"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:"没有匹配的模型"}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:"没有模型匹配 '"},{t:4,k:"query"},{t:3,v:"' 关键字,请尝试一下别的关键词呢"}]}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:"无法列出模型"}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:"此提供商不支持列出模型的功能"}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"收起"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"意识"}}},description:{t:0,b:{t:2,i:[{t:3}],s:"思维,视觉,言语综合,游戏等"}},"gaming-factorio":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起玩 Factorio!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"异星工厂 Factorio"}}},"gaming-minecraft":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起 Minecraft!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"我的世界 Minecraft"}}},hearing:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音识别"}},title:{t:0,b:{t:2,i:[{t:3}],s:"听觉"}}},"memory-long-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}}},"memory-short-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}}},"messaging-discord":{description:{t:0,b:{t:2,i:[{t:3}],s:"Discord 发消息和语音聊天"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Discord"}}},speech:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音合成"}},sections:{section:{playground:{buttons:{stop:{label:{t:0,b:{t:2,i:[{t:3}],s:"停止"}}}},"select-voice":{required:{t:0,b:{t:2,i:[{t:3}],s:"请选择声线"}}}},"provider-voice-selection":{custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定模型名字..."}},custom_voice_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定声线 ID..."}},description:{t:0,b:{t:2,i:[{t:3}],s:"选择合适的语音提供商"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_voices:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的声线"}},no_voices_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的声线列表没有返回任何的数据"}},pause:{t:0,b:{t:2,i:[{t:3}],s:"Pause"}},play_sample:{t:0,b:{t:2,i:[{t:3}],s:"Play"}},search_models_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_models_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},search_voices_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索声线..."}},search_voices_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个声线"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更少"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},title:{t:0,b:{t:2,i:[{t:3}],s:"选择语音合成提供商"}}},"voice-settings":{"input-ssml":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 SSML 文本"}}},"use-ssml":{description:{t:0,b:{t:2,i:[{t:3}],s:"启用后可以输入原始 SSML 而不是纯文本"}},label:{t:0,b:{t:2,i:[{t:3}],s:"选用自定义 SSML"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"发声"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"机体模块"}},vision:{description:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}},title:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}}},x:{description:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter 的浏览和使用"}},title:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter"}}}},providers:{common:{fields:{field:{"api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"API 密钥"}}}}},section:{advanced:{fields:{field:{headers:{description:{t:0,b:{t:2,i:[{t:3}],s:"添加自定义 HTTP 标头"}},key:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头名字"}}},label:{t:0,b:{t:2,i:[{t:3}],s:"HTTP 请求头"}},value:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头数值"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"高级配置"}}},basic:{description:{t:0,b:{t:2,i:[{t:3}],s:"基本设置"}},title:{t:0,b:{t:2,i:[{t:3}],s:"基础配置"}}},voice:{title:{t:0,b:{t:2,i:[{t:3}],s:"声音配置"}}}}},description:{t:0,b:{t:2,i:[{t:3}],s:"LLM,语音合成,语音识别提供商等"}},provider:{"alibaba-cloud-model-studio":{description:{t:0,b:{t:2,i:[{t:3}],s:"bailian.console.aliyun.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"阿里百炼"}}},anthropic:{description:{t:0,b:{t:2,i:[{t:3}],s:"anthropic.com"}},title:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Anthropic"},{t:2,i:[{t:3}],s:"Claude"}]}}},"cloudflare-workers-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare.com"}},fields:{field:{"account-id":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare 帐户 ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Account ID"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Account ID"}}},"api-key":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Workers AI 的 API Key"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Workers AI"}}},common:{fields:{field:{pitch:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节合成语音的音高(比如更尖锐或更粗旷)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"音高"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节说话的语速"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},volume:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节语音的响度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"响度"}}}}}},deepseek:{description:{t:0,b:{t:2,i:[{t:3}],s:"DeepSeek.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"深度求索 DeepSeek"}}},elevenlabs:{description:{t:0,b:{t:2,i:[{t:3}],s:"Elevenlabs.io"}},fields:{field:{"simularity-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"声音相似性依从性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"相似度修正"}}},"speaker-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"增强说话者的相似性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"扬声器增强"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音生成速度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},stability:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音稳定性和随机性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"稳定性"}}},style:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音风格夸张"}},label:{t:0,b:{t:2,i:[{t:3}],s:"风格"}}}}},playground:{buttons:{button:{"test-voice":{generating:{t:0,b:{t:2,i:[{t:3}],s:"生成中..."}},label:{t:0,b:{t:2,i:[{t:3}],s:"测试声音"}}}}},fields:{field:{input:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入用于测试发音的文本"}}},language:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择语音语言"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},voice:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择首选语音"}},label:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"实验平台"}},validation:{"error-missing-api-key":{t:0,b:{t:2,i:[{t:3}],s:"需要填写 API Key 才能用哦!"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs (11labs)"}}},fireworks:{description:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}}},"microsoft-speech":{description:{t:0,b:{t:2,i:[{t:3}],s:"speech.microsoft.com"}},fields:{field:{region:{description:{t:0,b:{t:2,i:[{t:3}],s:"服务 Endpoint 地区(比如亚太 eastasia 区域)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Endpoint 地区"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Microsoft / Azure 语音服务"}}},mistral:{description:{t:0,b:{t:2,i:[{t:3}],s:"mistral.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Mistral"}}},moonshot:{description:{t:0,b:{t:2,i:[{t:3}],s:"Moonshot.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"月之暗面"}}},novita:{description:{t:0,b:{t:2,i:[{t:3}],s:"novita.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Novita"}}},ollama:{description:{t:0,b:{t:2,i:[{t:3}],s:"ollama.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Ollama"}}},openai:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenAi.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI"}}},openrouter:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter"}}},perplexity:{description:{t:0,b:{t:2,i:[{t:3}],s:"perplexity.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Perplexity"}}},together:{description:{t:0,b:{t:2,i:[{t:3}],s:"一起"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Together.ai"}}},vllm:{description:{t:0,b:{t:2,i:[{t:3}],s:"vllm.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"vLLM"}}},volcengine:{description:{t:0,b:{t:2,i:[{t:3}],s:"volcengine.com"}},fields:{field:{appId:{description:{t:0,b:{t:2,i:[{t:3}],s:"可在控制台获取的 App ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"App ID"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"火山引擎"}}},xai:{description:{t:0,b:{t:2,i:[{t:3}],s:"X.AI"}},title:{t:0,b:{t:2,i:[{t:3}],s:"xAI"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"提供商"}}},scene:{description:{t:0,b:{t:2,i:[{t:3}],s:"配置角色所在环境"}},title:{t:0,b:{t:2,i:[{t:3}],s:"场景"}}},themes:{description:{t:0,b:{t:2,i:[{t:3}],s:"自定义你的舞台外观!"}},sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:{t:0,b:{t:2,i:[{t:3}],s:"强调色"}},"rgb-on":{title:{t:0,b:{t:2,i:[{t:3}],s:"RGB ON!"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"配色"}}},developer:{title:{t:0,b:{t:2,i:[{t:3}],s:"开发者"}}},"theme-presets":{presets:[{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Airi 绿"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"默认的绿色主题,由 Airi 为您带来!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"默认颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"米色"}},{t:0,b:{t:2,i:[{t:3}],s:"灰白色"}},{t:0,b:{t:2,i:[{t:3}],s:"浅灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"象牙色"}},{t:0,b:{t:2,i:[{t:3}],s:"橄榄灰"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受乔治·莫兰迪绘画启发的柔和、低调的色调"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Morandi 颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"天蓝色"}},{t:0,b:{t:2,i:[{t:3}],s:"薄雾色"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"苔藓绿"}},{t:0,b:{t:2,i:[{t:3}],s:"睡莲色"}},{t:0,b:{t:2,i:[{t:3}],s:"小麦色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"鼠尾草色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受克劳德·莫奈作品启发的印象派调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"莫奈颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"棕褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"赭色"}},{t:0,b:{t:2,i:[{t:3}],s:"咖啡色"}},{t:0,b:{t:2,i:[{t:3}],s:"青铜色"}},{t:0,b:{t:2,i:[{t:3}],s:"金色"}},{t:0,b:{t:2,i:[{t:3}],s:"芥末色"}},{t:0,b:{t:2,i:[{t:3}],s:"琥珀色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"传统日本色彩调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"日本颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"北欧蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"冰色"}},{t:0,b:{t:2,i:[{t:3}],s:"峡湾色"}},{t:0,b:{t:2,i:[{t:3}],s:"钢铁色"}},{t:0,b:{t:2,i:[{t:3}],s:"冰川色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩色"}},{t:0,b:{t:2,i:[{t:3}],s:"云色"}},{t:0,b:{t:2,i:[{t:3}],s:"石头色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"北欧极简主义配色方案"}},title:{t:0,b:{t:2,i:[{t:3}],s:"北欧颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"霞光红"}},{t:0,b:{t:2,i:[{t:3}],s:"枣红"}},{t:0,b:{t:2,i:[{t:3}],s:"黄栌"}},{t:0,b:{t:2,i:[{t:3}],s:"竹青"}},{t:0,b:{t:2,i:[{t:3}],s:"乌梅紫"}},{t:0,b:{t:2,i:[{t:3}],s:"缃色"}},{t:0,b:{t:2,i:[{t:3}],s:"青冥"}},{t:0,b:{t:2,i:[{t:3}],s:"赭石"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"中国传统色彩,源自古代纺织品、瓷器和绘画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"中国传统颜色"}}}],title:{t:0,b:{t:2,i:[{t:3}],s:"预设"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"外观"}}}},sections:{section:{general:{title:{t:0,b:{t:2,i:[{t:3}],s:"通用"}}}}},theme:{t:0,b:{t:2,i:[{t:3}],s:"主题"}},title:{t:0,b:{t:2,i:[{t:3}],s:"设置"}},voices:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:"Airi"}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:"核心系统"}},you:{t:0,b:{t:2,i:[{t:3}],s:"你"}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:"聊天"}},clothes:{t:0,b:{t:2,i:[{t:3}],s:"换装"}},custom:{t:0,b:{t:2,i:[{t:3}],s:"自定义"}}}},message:{t:0,b:{t:2,i:[{t:3}],s:"消息"}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:"选择一个音频输入设备"}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:"选择一个声线"}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:"表情"}},"emotions-btn":{angry:{t:0,b:{t:2,i:[{t:3}],s:"生气"}},awkward:{t:0,b:{t:2,i:[{t:3}],s:"尴尬"}},happy:{t:0,b:{t:2,i:[{t:3}],s:"开心"}},neutral:{t:0,b:{t:2,i:[{t:3}],s:"日常"}},question:{t:0,b:{t:2,i:[{t:3}],s:"疑问"}},sad:{t:0,b:{t:2,i:[{t:3}],s:"难过"}},surprised:{t:0,b:{t:2,i:[{t:3}],s:"惊喜"}},think:{t:0,b:{t:2,i:[{t:3}],s:"思考"}}},vrm:{camera:{t:0,b:{t:2,i:[{t:3}],s:"摄像机"}},model:{title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:"等待中"}}}}}),sG=$9({locale:rG(),fallbackLocale:"en",messages:eC});function rG(){const n=localStorage.getItem("settings/language"),e=Object.keys(eC);return n&&e.includes(n)?n:"en"}const oG=Hz(),aG=Kz(t6);let nu;nu=JV({routes:aG,history:CV()});nu.beforeEach((n,e)=>{n.path!==e.path&&Nw.start()});nu.afterEach(()=>{Nw.done()});nu.isReady().then(async()=>{}).catch(()=>{});VR(iG).use(Fz).use(a3).use(nu).use(oG).use(sG).use(wB).mount("#app");export{ap as $,vw as A,p5 as B,Ih as C,J4 as D,Z4 as E,q4 as F,X4 as G,$4 as H,G_ as I,mw as J,W4 as K,pw as L,G4 as M,dw as N,H_ as O,hw as P,FB as Q,Jw as R,ei as S,Gn as T,rs as U,e6 as V,kv as W,ka as X,EC as Y,$G as Z,Ar as _,lr as a,a_ as a$,jz as a0,VG as a1,gG as a2,Si as a3,Yz as a4,kz as a5,OT as a6,Fg as a7,yS as a8,Xa as a9,wl as aA,X0 as aB,nn as aC,yn as aD,oc as aE,ac as aF,gi as aG,l_ as aH,Pn as aI,Wn as aJ,g_ as aK,Ii as aL,Xs as aM,_t as aN,ct as aO,gE as aP,jt as aQ,ls as aR,Sr as aS,yE as aT,bE as aU,ca as aV,Jt as aW,n_ as aX,Ud as aY,bd as aZ,yc as a_,_3 as aa,y3 as ab,v3 as ac,ti as ad,Sg as ae,Hs as af,NE as ag,fe as ah,Pe as ai,Eo as aj,Fn as ak,jE as al,KE as am,ZE as an,Ze as ao,k as ap,_E as aq,Qn as ar,Pa as as,gt as at,GI as au,jI as av,Pt as aw,yd as ax,Qi as ay,aa as az,gn as b,kL as b$,lc as b0,Eh as b1,To as b2,$t as b3,vc as b4,_c as b5,qc as b6,pt as b7,Bs as b8,$c as b9,uE as bA,Kn as bB,li as bC,vt as bD,SL as bE,Ga as bF,O0 as bG,yG as bH,Lt as bI,CG as bJ,Lc as bK,qh as bL,S0 as bM,Uc as bN,Ro as bO,os as bP,za as bQ,ts as bR,Md as bS,zn as bT,vd as bU,ns as bV,OE as bW,dg as bX,ML as bY,A_ as bZ,Tf as b_,Cn as ba,bn as bb,HG as bc,ht as bd,OG as be,GG as bf,UG as bg,y2 as bh,DG as bi,VH as bj,Jl as bk,I0 as bl,dG as bm,DR as bn,l3 as bo,c3 as bp,vS as bq,RT as br,Oe as bs,PG as bt,as as bu,bL as bv,Va as bw,ur as bx,zi as by,Vn as bz,yi as c,hG as c$,pL as c0,TB as c1,No as c2,YV as c3,kG as c4,_G as c5,Zt as c6,v2 as c7,ZB as c8,OR as c9,_n as cA,ks as cB,vG as cC,_2 as cD,An as cE,yr as cF,Fi as cG,mG as cH,M0 as cI,US as cJ,bG as cK,MG as cL,R0 as cM,gr as cN,WG as cO,Je as cP,XG as cQ,at as cR,bc as cS,Cr as cT,Ae as cU,U3 as cV,yL as cW,FL as cX,uG as cY,fG as cZ,AG as c_,KB as ca,BG as cb,ys as cc,ry as cd,NG as ce,xG as cf,SG as cg,K2 as ch,J2 as ci,IG as cj,wG as ck,EG as cl,NR as cm,FG as cn,zG as co,eA as cp,N_ as cq,LG as cr,o0 as cs,mS as ct,cG as cu,j2 as cv,pG as cw,Rn as cx,gf as cy,ai as cz,hn as d,TG as d0,Di as d1,pn as d2,RG as d3,nt as e,Ee as f,QB as g,Ot as h,Ph as i,Jc as j,zl as k,Xg as l,hx as m,Zc as n,vn as o,ut as p,to as q,xi as r,cf as s,Yn as t,Ft as u,a5 as v,je as w,_w as x,YT as y,zg as z}; diff --git a/assets/index-B75XvTXz.js b/assets/index-DBnFFJfg.js similarity index 75% rename from assets/index-B75XvTXz.js rename to assets/index-DBnFFJfg.js index 2e2a195b271e49f26126ae8b242047a80309925a..3ba25aa2b0f946aedd0edc4694617846195c18cd 100644 --- a/assets/index-B75XvTXz.js +++ b/assets/index-DBnFFJfg.js @@ -1,4 +1,4 @@ -import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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}from"./index-DP0FGIAR.js";import{d as Li,V as wl,a as kl,c as Tl,r as _l,b as Or,e as El}from"./three-vrm.module-Bp24ut4Q.js";import{E as Ml,a as Al,b as Sl}from"./emotions-DWNSb738.js";import{m as Il,d as Rl}from"./mcp-H-_JN8ee.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{getImportUrlBundles as Cl}from"./import-url-browser-CPN8ipMD.js";import{s as Gt,c as Pi,u as Nl,g as Ll}from"./speech-RC4pJLrT.js";import{u as Dn}from"./queue-66hlaQTM.js";import{u as Pl,a as Dl,b as Ol,l as Fl}from"./queues-KTxrGl8o.js";import{l as Bl,u as ui}from"./providers-CCXVXsM2.js";import{s as zl}from"./index-Dpfqqu9L.js";import{u as Ul}from"./airi-card-DKhKg3ic.js";import{_ as ci}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import{r as on,_ as jl,a as Vl}from"./Model.vue_vue_type_script_setup_true_lang-CvHqwux7.js";import{_ as Di}from"./Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.js";import{H as Hl}from"./HeaderLink-BXBXXYzg.js";import{u as fa}from"./consciousness-uzzh2yDH.js";import{_ as da}from"./Basic.vue_vue_type_script_setup_true_lang-Badg0BE8.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*$l(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 Gl(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 Yl(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 Kl(t,e="linear"){switch(e){case"linear":return Gl(t);case"minmax":return Yl(t)}}const pa=Kn("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:Kl})),ql=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 Wl(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 Xl=["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 Zl=0;const ce=Ft(),Le=Ft(),ma=Ft(),G=Ft(),Re=Ft(),Yt=Ft(),Qe=Ft();function Ft(){return 2**++Zl}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"&&tu.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Bi,iu);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Bi.test(o)){let a=o.replace(eu,ru);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=fi}return new i(r,e)}function ru(t){return"-"+t.toLowerCase()}function iu(t){return t.charAt(1).toUpperCase()}const ou=ha([ga,Ql,va,ba,wa],"html"),ka=ha([ga,Jl,va,ba,wa],"svg"),zi={}.hasOwnProperty;function au(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 su=/^>|^->||--!>|"],uu=["<",">"];function cu(t,e,n,r){return r.settings.bogusComments?"":"";function i(o){return Gt(o,Object.assign({},r.settings.characterReferences,{subset:uu}))}}function fu(t,e,n,r){return""}function du(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function pu(t){return t.join(" ").trim()}const hu=/[ \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(hu,"")===""}const De=_a(1),Ta=_a(-1),mu=[];function _a(t){return e;function e(n,r,i){const o=n?n.children:mu;let a=(r||0)+t,s=o[a];if(!i)for(;s&&di(s);)a+=t,s=o[a];return s}}const gu={}.hasOwnProperty;function Ea(t){return e;function e(n,r,i){return gu.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const pi=Ea({body:xu,caption:lr,colgroup:lr,dd:ku,dt:wu,head:lr,html:yu,li:bu,optgroup:Tu,option:_u,p:vu,rp:ji,rt:ji,tbody:Mu,td:Vi,tfoot:Au,th:Vi,thead:Eu,tr:Su});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 yu(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}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==="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 bu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="li"}function wu(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ku(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 Tu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function _u(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Eu(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}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){return!De(n,e)}function Su(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 Iu=Ea({body:Nu,colgroup:Lu,head:Cu,html:Ru,tbody:Pu});function Ru(t){const e=De(t,-1);return!e||e.type!=="comment"}function Cu(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 Nu(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 Lu(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 Pu(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-B-Ahwwhs.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-D14Zran9.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-D-bSbrVn.js";import{E as Al,a as Sl,b as Il}from"./emotions-DWNSb738.js";import{m as Rl,d as Cl}from"./mcp-B_OVeJTA.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.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-BGwkIM3M.js";import{u as Dn}from"./queue-CHtEOdh3.js";import{u as Dl,a as Ol,b as Fl,l as Bl}from"./queues-DtduOmVA.js";import{l as zl,u as ui}from"./providers-Bnxi0hpg.js";import{s as Ul}from"./index-Dpfqqu9L.js";import{u as jl}from"./airi-card-DyPOejN4.js";import{_ as ci}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import{r as on,_ as Vl,a as Hl}from"./Model.vue_vue_type_script_setup_true_lang-y8QkX-HC.js";import{_ as Di}from"./Collapsable.vue_vue_type_script_setup_true_lang-CarTVdmi.js";import{H as $l}from"./HeaderLink-BlO6oj_N.js";import{u as fa}from"./consciousness-CmIiKxQ0.js";import{_ as da}from"./Basic.vue_vue_type_script_setup_true_lang-DAk2Pfwq.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 @@ -6,19 +6,19 @@ import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sf \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 -\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Du(t,e,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const s=[];let l;i.space==="html"&&t.tagName==="svg"&&(r.schema=ka);const u=Ou(r,t.properties),c=r.all(i.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=i,c&&(a=!1),(u||!o||!Iu(t,e,n))&&(s.push("<",t.tagName,u?" "+u:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(c),!a&&(!o||!pi(t,e,n))&&s.push(""),s.join("")}function Ou(t,e){const n=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=Fu(t,i,e[i]);o&&n.push(o)}}for(;++rPi(n,t.alternative)&&(a=t.alternative),s=a+Gt(n,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?Mn.single:Mn.double)[i][o],attribute:!0}))+a),l+(s&&"="+s))}const Bu=["<","&"];function Ma(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:Gt(t.value,Object.assign({},r.settings.characterReferences,{subset:Bu}))}function zu(t,e,n,r){return r.settings.allowDangerousHtml?t.value:Ma(t,e,n,r)}function Uu(t,e,n,r){return r.all(t)}const ju=au("type",{invalid:Vu,unknown:Hu,handlers:{comment:cu,doctype:fu,element:Du,raw:zu,root:Uu,text:Ma}});function Vu(t){throw new Error("Expected node, not `"+t+"`")}function Hu(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const $u={},Gu={},Yu=[];function Ku(t,e){const n=e||$u,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:qu,all:Wu,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Xl,characterReferences:n.characterReferences||Gu,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?ka:ou,quote:r,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function qu(t,e,n){return ju(t,e,n,this)}function Wu(t){const e=[],n=t&&t.children||Yu;let r=-1;for(;++ri?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);o0?(ct(t,t.length,0,e),t):e}const Gi={}.hasOwnProperty;function ec(t){const e={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Kt(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ut=It(/[A-Za-z]/),Je=It(/[\dA-Za-z]/),rc=It(/[#-'*+\--9=?A-Z^-~]/);function zr(t){return t!==null&&(t<32||t===127)}const Ur=It(/\d/),ic=It(/[\dA-Fa-f]/),oc=It(/[!-/:-@[-`{-~]/);function se(t){return t!==null&&t<-2}function qe(t){return t!==null&&(t<0||t===32)}function _e(t){return t===-2||t===-1||t===32}const ac=It(new RegExp("\\p{P}|\\p{S}","u")),sc=It(/\s/);function It(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Jt(t){const e=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const s=t.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function Ce(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return _e(l)?(t.enter(n),s(l)):e(l)}function s(l){return _e(l)&&o++a))return;const I=e.events.length;let v=I,g,m;for(;v--;)if(e.events[v][0]==="exit"&&e.events[v][1].type==="chunkFlow"){if(g){m=e.events[v][1].end;break}g=!0}for(k(r),h=I;h_;){const P=n[R];e.containerState=P[1],P[0].exit.call(e,t)}n.length=_}function S(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function dc(t,e,n){return Ce(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ki(t){if(t===null||qe(t)||sc(t))return 1;if(ac(t))return 2}function mi(t,e,n){const r=[];let i=-1;for(;++i1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},p={...t[n][1].start};qi(f,-l),qi(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:p},o={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},t[r][1].end={...a.start},t[n][1].start={...s.end},u=[],t[r][1].end.offset-t[r][1].start.offset&&(u=rt(u,[["enter",t[r][1],e],["exit",t[r][1],e]])),u=rt(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",o,e]]),u=rt(u,mi(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),u=rt(u,[["exit",o,e],["enter",s,e],["exit",s,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,u=rt(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,ct(t,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&_e(h)?Ce(t,S,"linePrefix",o+1)(h):S(h)}function S(h){return h===null||se(h)?t.check(Wi,x,R)(h):(t.enter("codeFlowValue"),_(h))}function _(h){return h===null||se(h)?(t.exit("codeFlowValue"),S(h)):(t.consume(h),_)}function R(h){return t.exit("codeFenced"),e(h)}function P(h,I,v){let g=0;return m;function m(D){return h.enter("lineEnding"),h.consume(D),h.exit("lineEnding"),T}function T(D){return h.enter("codeFencedFence"),_e(D)?Ce(h,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):M(D)}function M(D){return D===s?(h.enter("codeFencedFenceSequence"),F(D)):v(D)}function F(D){return D===s?(g++,h.consume(D),F):g>=a?(h.exit("codeFencedFenceSequence"),_e(D)?Ce(h,j,"whitespace")(D):j(D)):v(D)}function j(D){return D===null||se(D)?(h.exit("codeFencedFence"),I(D)):v(D)}}}function _c(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const ur={name:"codeIndented",tokenize:Mc},Ec={partial:!0,tokenize:Ac};function Mc(t,e,n){const r=this;return i;function i(u){return t.enter("codeIndented"),Ce(t,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):se(u)?t.attempt(Ec,a,l)(u):(t.enter("codeFlowValue"),s(u))}function s(u){return u===null||se(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),s)}function l(u){return t.exit("codeIndented"),e(u)}}function Ac(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):se(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):Ce(t,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(a):se(a)?i(a):n(a)}}const Sc={name:"codeText",previous:Rc,resolve:Ic,tokenize:Cc};function Ic(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length)return this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse();const i=this.left.slice(e);return i.push(...this.right.slice(this.right.length-r+this.left.length).reverse()),i}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&an(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),an(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),an(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function La(t,e,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(k){return k===60?(t.enter(r),t.enter(i),t.enter(o),t.consume(k),t.exit(o),p):k===null||k===32||k===41||zr(k)?n(k):(t.enter(r),t.enter(a),t.enter(s),t.enter("chunkString",{contentType:"string"}),x(k))}function p(k){return k===62?(t.enter(o),t.consume(k),t.exit(o),t.exit(i),t.exit(r),e):(t.enter(s),t.enter("chunkString",{contentType:"string"}),d(k))}function d(k){return k===62?(t.exit("chunkString"),t.exit(s),p(k)):k===null||k===60||se(k)?n(k):(t.consume(k),k===92?y:d)}function y(k){return k===60||k===62||k===92?(t.consume(k),d):d(k)}function x(k){return!c&&(k===null||k===41||qe(k))?(t.exit("chunkString"),t.exit(s),t.exit(a),t.exit(r),e(k)):c999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(t.exit(o),t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):se(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||se(d)||s++>999?(t.exit("chunkString"),c(d)):(t.consume(d),l||(l=!_e(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(t.consume(d),s++,f):f(d)}}function Da(t,e,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(t.enter(r),t.enter(i),t.consume(p),t.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(t.enter(i),t.consume(p),t.exit(i),t.exit(r),e):(t.enter(o),u(p))}function u(p){return p===a?(t.exit(o),l(a)):p===null?n(p):se(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),Ce(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||se(p)?(t.exit("chunkString"),u(p)):(t.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(t.consume(p),c):c(p)}}function fn(t,e){let n;return r;function r(i){return se(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):_e(i)?Ce(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const zc={name:"definition",tokenize:jc},Uc={partial:!0,tokenize:Vc};function jc(t,e,n){const r=this;let i;return o;function o(d){return t.enter("definition"),a(d)}function a(d){return Pa.call(r,t,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=Kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),l):n(d)}function l(d){return qe(d)?fn(t,u)(d):u(d)}function u(d){return La(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return t.attempt(Uc,f,f)(d)}function f(d){return _e(d)?Ce(t,p,"whitespace")(d):p(d)}function p(d){return d===null||se(d)?(t.exit("definition"),r.parser.defined.push(i),e(d)):n(d)}}function Vc(t,e,n){return r;function r(s){return qe(s)?fn(t,i)(s):n(s)}function i(s){return Da(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return _e(s)?Ce(t,a,"whitespace")(s):a(s)}function a(s){return s===null||se(s)?e(s):n(s)}}const Hc={name:"hardBreakEscape",tokenize:$c};function $c(t,e,n){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return se(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const Gc={name:"headingAtx",resolve:Yc,tokenize:Kc};function Yc(t,e){let n=t.length-2,r=3,i,o;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},o={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},ct(t,r,n-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function Kc(t,e,n){let r=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(t.consume(c),a):c===null||qe(c)?(t.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||se(c)?(t.exit("atxHeading"),e(c)):_e(c)?Ce(t,s,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||qe(c)?(t.exit("atxHeadingText"),s(c)):(t.consume(c),u)}}const qc=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Zi=["pre","script","style","textarea"],Wc={concrete:!0,name:"htmlFlow",resolveTo:Qc,tokenize:Jc},Xc={partial:!0,tokenize:tf},Zc={partial:!0,tokenize:ef};function Qc(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Jc(t,e,n){const r=this;let i,o,a,s,l;return u;function u(C){return c(C)}function c(C){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(C),f}function f(C){return C===33?(t.consume(C),p):C===47?(t.consume(C),o=!0,x):C===63?(t.consume(C),i=3,r.interrupt?e:E):ut(C)?(t.consume(C),a=String.fromCharCode(C),w):n(C)}function p(C){return C===45?(t.consume(C),i=2,d):C===91?(t.consume(C),i=5,s=0,y):ut(C)?(t.consume(C),i=4,r.interrupt?e:E):n(C)}function d(C){return C===45?(t.consume(C),r.interrupt?e:E):n(C)}function y(C){const he="CDATA[";return C===he.charCodeAt(s++)?(t.consume(C),s===he.length?r.interrupt?e:M:y):n(C)}function x(C){return ut(C)?(t.consume(C),a=String.fromCharCode(C),w):n(C)}function w(C){if(C===null||C===47||C===62||qe(C)){const he=C===47,we=a.toLowerCase();return!he&&!o&&Zi.includes(we)?(i=1,r.interrupt?e(C):M(C)):qc.includes(a.toLowerCase())?(i=6,he?(t.consume(C),k):r.interrupt?e(C):M(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):o?S(C):_(C))}return C===45||Je(C)?(t.consume(C),a+=String.fromCharCode(C),w):n(C)}function k(C){return C===62?(t.consume(C),r.interrupt?e:M):n(C)}function S(C){return _e(C)?(t.consume(C),S):m(C)}function _(C){return C===47?(t.consume(C),m):C===58||C===95||ut(C)?(t.consume(C),R):_e(C)?(t.consume(C),_):m(C)}function R(C){return C===45||C===46||C===58||C===95||Je(C)?(t.consume(C),R):P(C)}function P(C){return C===61?(t.consume(C),h):_e(C)?(t.consume(C),P):_(C)}function h(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(t.consume(C),l=C,I):_e(C)?(t.consume(C),h):v(C)}function I(C){return C===l?(t.consume(C),l=null,g):C===null||se(C)?n(C):(t.consume(C),I)}function v(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||qe(C)?P(C):(t.consume(C),v)}function g(C){return C===47||C===62||_e(C)?_(C):n(C)}function m(C){return C===62?(t.consume(C),T):n(C)}function T(C){return C===null||se(C)?M(C):_e(C)?(t.consume(C),T):n(C)}function M(C){return C===45&&i===2?(t.consume(C),B):C===60&&i===1?(t.consume(C),X):C===62&&i===4?(t.consume(C),oe):C===63&&i===3?(t.consume(C),E):C===93&&i===5?(t.consume(C),Q):se(C)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(Xc,Me,F)(C)):C===null||se(C)?(t.exit("htmlFlowData"),F(C)):(t.consume(C),M)}function F(C){return t.check(Zc,j,Me)(C)}function j(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),D}function D(C){return C===null||se(C)?F(C):(t.enter("htmlFlowData"),M(C))}function B(C){return C===45?(t.consume(C),E):M(C)}function X(C){return C===47?(t.consume(C),a="",re):M(C)}function re(C){if(C===62){const he=a.toLowerCase();return Zi.includes(he)?(t.consume(C),oe):M(C)}return ut(C)&&a.length<8?(t.consume(C),a+=String.fromCharCode(C),re):M(C)}function Q(C){return C===93?(t.consume(C),E):M(C)}function E(C){return C===62?(t.consume(C),oe):C===45&&i===2?(t.consume(C),E):M(C)}function oe(C){return C===null||se(C)?(t.exit("htmlFlowData"),Me(C)):(t.consume(C),oe)}function Me(C){return t.exit("htmlFlow"),e(C)}}function ef(t,e,n){const r=this;return i;function i(a){return se(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function tf(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Xn,e,n)}}const nf={name:"htmlText",tokenize:rf};function rf(t,e,n){const r=this;let i,o,a;return s;function s(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),l}function l(E){return E===33?(t.consume(E),u):E===47?(t.consume(E),P):E===63?(t.consume(E),_):ut(E)?(t.consume(E),v):n(E)}function u(E){return E===45?(t.consume(E),c):E===91?(t.consume(E),o=0,y):ut(E)?(t.consume(E),S):n(E)}function c(E){return E===45?(t.consume(E),d):n(E)}function f(E){return E===null?n(E):E===45?(t.consume(E),p):se(E)?(a=f,X(E)):(t.consume(E),f)}function p(E){return E===45?(t.consume(E),d):f(E)}function d(E){return E===62?B(E):E===45?p(E):f(E)}function y(E){const oe="CDATA[";return E===oe.charCodeAt(o++)?(t.consume(E),o===oe.length?x:y):n(E)}function x(E){return E===null?n(E):E===93?(t.consume(E),w):se(E)?(a=x,X(E)):(t.consume(E),x)}function w(E){return E===93?(t.consume(E),k):x(E)}function k(E){return E===62?B(E):E===93?(t.consume(E),k):x(E)}function S(E){return E===null||E===62?B(E):se(E)?(a=S,X(E)):(t.consume(E),S)}function _(E){return E===null?n(E):E===63?(t.consume(E),R):se(E)?(a=_,X(E)):(t.consume(E),_)}function R(E){return E===62?B(E):_(E)}function P(E){return ut(E)?(t.consume(E),h):n(E)}function h(E){return E===45||Je(E)?(t.consume(E),h):I(E)}function I(E){return se(E)?(a=I,X(E)):_e(E)?(t.consume(E),I):B(E)}function v(E){return E===45||Je(E)?(t.consume(E),v):E===47||E===62||qe(E)?g(E):n(E)}function g(E){return E===47?(t.consume(E),B):E===58||E===95||ut(E)?(t.consume(E),m):se(E)?(a=g,X(E)):_e(E)?(t.consume(E),g):B(E)}function m(E){return E===45||E===46||E===58||E===95||Je(E)?(t.consume(E),m):T(E)}function T(E){return E===61?(t.consume(E),M):se(E)?(a=T,X(E)):_e(E)?(t.consume(E),T):g(E)}function M(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(t.consume(E),i=E,F):se(E)?(a=M,X(E)):_e(E)?(t.consume(E),M):(t.consume(E),j)}function F(E){return E===i?(t.consume(E),i=void 0,D):E===null?n(E):se(E)?(a=F,X(E)):(t.consume(E),F)}function j(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||qe(E)?g(E):(t.consume(E),j)}function D(E){return E===47||E===62||qe(E)?g(E):n(E)}function B(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),e):n(E)}function X(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),re}function re(E){return _e(E)?Ce(t,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Q(E)}function Q(E){return t.enter("htmlTextData"),a(E)}}const gi={name:"labelEnd",resolveAll:lf,resolveTo:uf,tokenize:cf},of={tokenize:ff},af={tokenize:df},sf={tokenize:pf};function lf(t){let e=-1;const n=[];for(;++e=3&&(u===null||se(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===i?(t.consume(u),r++,l):(t.exit("thematicBreakSequence"),_e(u)?Ce(t,s,"whitespace")(u):s(u))}}const Ge={continuation:{tokenize:Tf},exit:Ef,name:"list",tokenize:kf},bf={partial:!0,tokenize:Mf},wf={partial:!0,tokenize:_f};function kf(t,e,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const y=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Ur(d)){if(r.containerState.type||(r.containerState.type=y,t.enter(y,{_container:!0})),y==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(On,n,u)(d):u(d);if(!r.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(d)}return n(d)}function l(d){return Ur(d)&&++a<10?(t.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),u(d)):n(d)}function u(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,t.check(Xn,r.interrupt?n:c,t.attempt(bf,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return _e(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function Tf(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(Xn,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(t,e,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!_e(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(wf,e,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(t,t.attempt(Ge,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function _f(t,e,n){const r=this;return Ce(t,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(o):n(o)}}function Ef(t){t.exit(this.containerState.type)}function Mf(t,e,n){const r=this;return Ce(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!_e(o)&&a&&a[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const Qi={name:"setextUnderline",resolveTo:Af,tokenize:Sf};function Af(t,e){let n=t.length,r,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",a,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end={...t[o][1].end}):t[r][1]=a,t.push(["exit",a,e]),t}function Sf(t,e,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return t.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(t.consume(u),s):(t.exit("setextHeadingLineSequence"),_e(u)?Ce(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||se(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const If={tokenize:Rf};function Rf(t){const e=this,n=t.attempt(Xn,r,t.attempt(this.parser.constructs.flowInitial,i,Ce(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Pc,i)),"linePrefix")));return n;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const Cf={resolveAll:Fa()},Nf=Oa("string"),Lf=Oa("text");function Oa(t){return{resolveAll:Fa(t==="text"?Pf:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],o=n.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(t[i].slice(0,o))}return a}function Kf(t,e){let n=-1;const r=[];let i;for(;++n\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Ou(t,e,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const s=[];let l;i.space==="html"&&t.tagName==="svg"&&(r.schema=ka);const u=Fu(r,t.properties),c=r.all(i.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=i,c&&(a=!1),(u||!o||!Ru(t,e,n))&&(s.push("<",t.tagName,u?" "+u:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(c),!a&&(!o||!pi(t,e,n))&&s.push(""),s.join("")}function Fu(t,e){const n=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=Bu(t,i,e[i]);o&&n.push(o)}}for(;++rPi(n,t.alternative)&&(a=t.alternative),s=a+Gt(n,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?Mn.single:Mn.double)[i][o],attribute:!0}))+a),l+(s&&"="+s))}const zu=["<","&"];function Ma(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:Gt(t.value,Object.assign({},r.settings.characterReferences,{subset:zu}))}function Uu(t,e,n,r){return r.settings.allowDangerousHtml?t.value:Ma(t,e,n,r)}function ju(t,e,n,r){return r.all(t)}const Vu=su("type",{invalid:Hu,unknown:$u,handlers:{comment:fu,doctype:du,element:Ou,raw:Uu,root:ju,text:Ma}});function Hu(t){throw new Error("Expected node, not `"+t+"`")}function $u(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Gu={},Yu={},Ku=[];function qu(t,e){const n=e||Gu,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Wu,all:Xu,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Zl,characterReferences:n.characterReferences||Yu,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?ka:au,quote:r,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Wu(t,e,n){return Vu(t,e,n,this)}function Xu(t){const e=[],n=t&&t.children||Ku;let r=-1;for(;++ri?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);o0?(ct(t,t.length,0,e),t):e}const Gi={}.hasOwnProperty;function tc(t){const e={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Kt(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ut=It(/[A-Za-z]/),Je=It(/[\dA-Za-z]/),ic=It(/[#-'*+\--9=?A-Z^-~]/);function zr(t){return t!==null&&(t<32||t===127)}const Ur=It(/\d/),oc=It(/[\dA-Fa-f]/),ac=It(/[!-/:-@[-`{-~]/);function se(t){return t!==null&&t<-2}function qe(t){return t!==null&&(t<0||t===32)}function _e(t){return t===-2||t===-1||t===32}const sc=It(new RegExp("\\p{P}|\\p{S}","u")),lc=It(/\s/);function It(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Jt(t){const e=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const s=t.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function Ce(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return _e(l)?(t.enter(n),s(l)):e(l)}function s(l){return _e(l)&&o++a))return;const I=e.events.length;let v=I,g,m;for(;v--;)if(e.events[v][0]==="exit"&&e.events[v][1].type==="chunkFlow"){if(g){m=e.events[v][1].end;break}g=!0}for(k(r),h=I;h_;){const P=n[R];e.containerState=P[1],P[0].exit.call(e,t)}n.length=_}function S(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function pc(t,e,n){return Ce(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ki(t){if(t===null||qe(t)||lc(t))return 1;if(sc(t))return 2}function mi(t,e,n){const r=[];let i=-1;for(;++i1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},p={...t[n][1].start};qi(f,-l),qi(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:p},o={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},t[r][1].end={...a.start},t[n][1].start={...s.end},u=[],t[r][1].end.offset-t[r][1].start.offset&&(u=rt(u,[["enter",t[r][1],e],["exit",t[r][1],e]])),u=rt(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",o,e]]),u=rt(u,mi(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),u=rt(u,[["exit",o,e],["enter",s,e],["exit",s,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,u=rt(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,ct(t,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&_e(h)?Ce(t,S,"linePrefix",o+1)(h):S(h)}function S(h){return h===null||se(h)?t.check(Wi,x,R)(h):(t.enter("codeFlowValue"),_(h))}function _(h){return h===null||se(h)?(t.exit("codeFlowValue"),S(h)):(t.consume(h),_)}function R(h){return t.exit("codeFenced"),e(h)}function P(h,I,v){let g=0;return m;function m(D){return h.enter("lineEnding"),h.consume(D),h.exit("lineEnding"),T}function T(D){return h.enter("codeFencedFence"),_e(D)?Ce(h,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):M(D)}function M(D){return D===s?(h.enter("codeFencedFenceSequence"),F(D)):v(D)}function F(D){return D===s?(g++,h.consume(D),F):g>=a?(h.exit("codeFencedFenceSequence"),_e(D)?Ce(h,j,"whitespace")(D):j(D)):v(D)}function j(D){return D===null||se(D)?(h.exit("codeFencedFence"),I(D)):v(D)}}}function Ec(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const ur={name:"codeIndented",tokenize:Ac},Mc={partial:!0,tokenize:Sc};function Ac(t,e,n){const r=this;return i;function i(u){return t.enter("codeIndented"),Ce(t,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):se(u)?t.attempt(Mc,a,l)(u):(t.enter("codeFlowValue"),s(u))}function s(u){return u===null||se(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),s)}function l(u){return t.exit("codeIndented"),e(u)}}function Sc(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):se(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):Ce(t,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(a):se(a)?i(a):n(a)}}const Ic={name:"codeText",previous:Cc,resolve:Rc,tokenize:Nc};function Rc(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length)return this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse();const i=this.left.slice(e);return i.push(...this.right.slice(this.right.length-r+this.left.length).reverse()),i}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&an(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),an(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),an(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function La(t,e,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(k){return k===60?(t.enter(r),t.enter(i),t.enter(o),t.consume(k),t.exit(o),p):k===null||k===32||k===41||zr(k)?n(k):(t.enter(r),t.enter(a),t.enter(s),t.enter("chunkString",{contentType:"string"}),x(k))}function p(k){return k===62?(t.enter(o),t.consume(k),t.exit(o),t.exit(i),t.exit(r),e):(t.enter(s),t.enter("chunkString",{contentType:"string"}),d(k))}function d(k){return k===62?(t.exit("chunkString"),t.exit(s),p(k)):k===null||k===60||se(k)?n(k):(t.consume(k),k===92?y:d)}function y(k){return k===60||k===62||k===92?(t.consume(k),d):d(k)}function x(k){return!c&&(k===null||k===41||qe(k))?(t.exit("chunkString"),t.exit(s),t.exit(a),t.exit(r),e(k)):c999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(t.exit(o),t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):se(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||se(d)||s++>999?(t.exit("chunkString"),c(d)):(t.consume(d),l||(l=!_e(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(t.consume(d),s++,f):f(d)}}function Da(t,e,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(t.enter(r),t.enter(i),t.consume(p),t.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(t.enter(i),t.consume(p),t.exit(i),t.exit(r),e):(t.enter(o),u(p))}function u(p){return p===a?(t.exit(o),l(a)):p===null?n(p):se(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),Ce(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||se(p)?(t.exit("chunkString"),u(p)):(t.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(t.consume(p),c):c(p)}}function fn(t,e){let n;return r;function r(i){return se(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):_e(i)?Ce(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const Uc={name:"definition",tokenize:Vc},jc={partial:!0,tokenize:Hc};function Vc(t,e,n){const r=this;let i;return o;function o(d){return t.enter("definition"),a(d)}function a(d){return Pa.call(r,t,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=Kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),l):n(d)}function l(d){return qe(d)?fn(t,u)(d):u(d)}function u(d){return La(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return t.attempt(jc,f,f)(d)}function f(d){return _e(d)?Ce(t,p,"whitespace")(d):p(d)}function p(d){return d===null||se(d)?(t.exit("definition"),r.parser.defined.push(i),e(d)):n(d)}}function Hc(t,e,n){return r;function r(s){return qe(s)?fn(t,i)(s):n(s)}function i(s){return Da(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return _e(s)?Ce(t,a,"whitespace")(s):a(s)}function a(s){return s===null||se(s)?e(s):n(s)}}const $c={name:"hardBreakEscape",tokenize:Gc};function Gc(t,e,n){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return se(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const Yc={name:"headingAtx",resolve:Kc,tokenize:qc};function Kc(t,e){let n=t.length-2,r=3,i,o;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},o={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},ct(t,r,n-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function qc(t,e,n){let r=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(t.consume(c),a):c===null||qe(c)?(t.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||se(c)?(t.exit("atxHeading"),e(c)):_e(c)?Ce(t,s,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||qe(c)?(t.exit("atxHeadingText"),s(c)):(t.consume(c),u)}}const Wc=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Zi=["pre","script","style","textarea"],Xc={concrete:!0,name:"htmlFlow",resolveTo:Jc,tokenize:ef},Zc={partial:!0,tokenize:nf},Qc={partial:!0,tokenize:tf};function Jc(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function ef(t,e,n){const r=this;let i,o,a,s,l;return u;function u(C){return c(C)}function c(C){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(C),f}function f(C){return C===33?(t.consume(C),p):C===47?(t.consume(C),o=!0,x):C===63?(t.consume(C),i=3,r.interrupt?e:E):ut(C)?(t.consume(C),a=String.fromCharCode(C),w):n(C)}function p(C){return C===45?(t.consume(C),i=2,d):C===91?(t.consume(C),i=5,s=0,y):ut(C)?(t.consume(C),i=4,r.interrupt?e:E):n(C)}function d(C){return C===45?(t.consume(C),r.interrupt?e:E):n(C)}function y(C){const he="CDATA[";return C===he.charCodeAt(s++)?(t.consume(C),s===he.length?r.interrupt?e:M:y):n(C)}function x(C){return ut(C)?(t.consume(C),a=String.fromCharCode(C),w):n(C)}function w(C){if(C===null||C===47||C===62||qe(C)){const he=C===47,we=a.toLowerCase();return!he&&!o&&Zi.includes(we)?(i=1,r.interrupt?e(C):M(C)):Wc.includes(a.toLowerCase())?(i=6,he?(t.consume(C),k):r.interrupt?e(C):M(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):o?S(C):_(C))}return C===45||Je(C)?(t.consume(C),a+=String.fromCharCode(C),w):n(C)}function k(C){return C===62?(t.consume(C),r.interrupt?e:M):n(C)}function S(C){return _e(C)?(t.consume(C),S):m(C)}function _(C){return C===47?(t.consume(C),m):C===58||C===95||ut(C)?(t.consume(C),R):_e(C)?(t.consume(C),_):m(C)}function R(C){return C===45||C===46||C===58||C===95||Je(C)?(t.consume(C),R):P(C)}function P(C){return C===61?(t.consume(C),h):_e(C)?(t.consume(C),P):_(C)}function h(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(t.consume(C),l=C,I):_e(C)?(t.consume(C),h):v(C)}function I(C){return C===l?(t.consume(C),l=null,g):C===null||se(C)?n(C):(t.consume(C),I)}function v(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||qe(C)?P(C):(t.consume(C),v)}function g(C){return C===47||C===62||_e(C)?_(C):n(C)}function m(C){return C===62?(t.consume(C),T):n(C)}function T(C){return C===null||se(C)?M(C):_e(C)?(t.consume(C),T):n(C)}function M(C){return C===45&&i===2?(t.consume(C),B):C===60&&i===1?(t.consume(C),X):C===62&&i===4?(t.consume(C),oe):C===63&&i===3?(t.consume(C),E):C===93&&i===5?(t.consume(C),Q):se(C)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(Zc,Me,F)(C)):C===null||se(C)?(t.exit("htmlFlowData"),F(C)):(t.consume(C),M)}function F(C){return t.check(Qc,j,Me)(C)}function j(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),D}function D(C){return C===null||se(C)?F(C):(t.enter("htmlFlowData"),M(C))}function B(C){return C===45?(t.consume(C),E):M(C)}function X(C){return C===47?(t.consume(C),a="",re):M(C)}function re(C){if(C===62){const he=a.toLowerCase();return Zi.includes(he)?(t.consume(C),oe):M(C)}return ut(C)&&a.length<8?(t.consume(C),a+=String.fromCharCode(C),re):M(C)}function Q(C){return C===93?(t.consume(C),E):M(C)}function E(C){return C===62?(t.consume(C),oe):C===45&&i===2?(t.consume(C),E):M(C)}function oe(C){return C===null||se(C)?(t.exit("htmlFlowData"),Me(C)):(t.consume(C),oe)}function Me(C){return t.exit("htmlFlow"),e(C)}}function tf(t,e,n){const r=this;return i;function i(a){return se(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function nf(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Xn,e,n)}}const rf={name:"htmlText",tokenize:of};function of(t,e,n){const r=this;let i,o,a;return s;function s(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),l}function l(E){return E===33?(t.consume(E),u):E===47?(t.consume(E),P):E===63?(t.consume(E),_):ut(E)?(t.consume(E),v):n(E)}function u(E){return E===45?(t.consume(E),c):E===91?(t.consume(E),o=0,y):ut(E)?(t.consume(E),S):n(E)}function c(E){return E===45?(t.consume(E),d):n(E)}function f(E){return E===null?n(E):E===45?(t.consume(E),p):se(E)?(a=f,X(E)):(t.consume(E),f)}function p(E){return E===45?(t.consume(E),d):f(E)}function d(E){return E===62?B(E):E===45?p(E):f(E)}function y(E){const oe="CDATA[";return E===oe.charCodeAt(o++)?(t.consume(E),o===oe.length?x:y):n(E)}function x(E){return E===null?n(E):E===93?(t.consume(E),w):se(E)?(a=x,X(E)):(t.consume(E),x)}function w(E){return E===93?(t.consume(E),k):x(E)}function k(E){return E===62?B(E):E===93?(t.consume(E),k):x(E)}function S(E){return E===null||E===62?B(E):se(E)?(a=S,X(E)):(t.consume(E),S)}function _(E){return E===null?n(E):E===63?(t.consume(E),R):se(E)?(a=_,X(E)):(t.consume(E),_)}function R(E){return E===62?B(E):_(E)}function P(E){return ut(E)?(t.consume(E),h):n(E)}function h(E){return E===45||Je(E)?(t.consume(E),h):I(E)}function I(E){return se(E)?(a=I,X(E)):_e(E)?(t.consume(E),I):B(E)}function v(E){return E===45||Je(E)?(t.consume(E),v):E===47||E===62||qe(E)?g(E):n(E)}function g(E){return E===47?(t.consume(E),B):E===58||E===95||ut(E)?(t.consume(E),m):se(E)?(a=g,X(E)):_e(E)?(t.consume(E),g):B(E)}function m(E){return E===45||E===46||E===58||E===95||Je(E)?(t.consume(E),m):T(E)}function T(E){return E===61?(t.consume(E),M):se(E)?(a=T,X(E)):_e(E)?(t.consume(E),T):g(E)}function M(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(t.consume(E),i=E,F):se(E)?(a=M,X(E)):_e(E)?(t.consume(E),M):(t.consume(E),j)}function F(E){return E===i?(t.consume(E),i=void 0,D):E===null?n(E):se(E)?(a=F,X(E)):(t.consume(E),F)}function j(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||qe(E)?g(E):(t.consume(E),j)}function D(E){return E===47||E===62||qe(E)?g(E):n(E)}function B(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),e):n(E)}function X(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),re}function re(E){return _e(E)?Ce(t,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Q(E)}function Q(E){return t.enter("htmlTextData"),a(E)}}const gi={name:"labelEnd",resolveAll:uf,resolveTo:cf,tokenize:ff},af={tokenize:df},sf={tokenize:pf},lf={tokenize:hf};function uf(t){let e=-1;const n=[];for(;++e=3&&(u===null||se(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===i?(t.consume(u),r++,l):(t.exit("thematicBreakSequence"),_e(u)?Ce(t,s,"whitespace")(u):s(u))}}const Ge={continuation:{tokenize:_f},exit:Mf,name:"list",tokenize:Tf},wf={partial:!0,tokenize:Af},kf={partial:!0,tokenize:Ef};function Tf(t,e,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const y=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Ur(d)){if(r.containerState.type||(r.containerState.type=y,t.enter(y,{_container:!0})),y==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(On,n,u)(d):u(d);if(!r.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(d)}return n(d)}function l(d){return Ur(d)&&++a<10?(t.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),u(d)):n(d)}function u(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,t.check(Xn,r.interrupt?n:c,t.attempt(wf,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return _e(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function _f(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(Xn,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(t,e,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!_e(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(kf,e,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(t,t.attempt(Ge,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Ef(t,e,n){const r=this;return Ce(t,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(o):n(o)}}function Mf(t){t.exit(this.containerState.type)}function Af(t,e,n){const r=this;return Ce(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!_e(o)&&a&&a[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const Qi={name:"setextUnderline",resolveTo:Sf,tokenize:If};function Sf(t,e){let n=t.length,r,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",a,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end={...t[o][1].end}):t[r][1]=a,t.push(["exit",a,e]),t}function If(t,e,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return t.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(t.consume(u),s):(t.exit("setextHeadingLineSequence"),_e(u)?Ce(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||se(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const Rf={tokenize:Cf};function Cf(t){const e=this,n=t.attempt(Xn,r,t.attempt(this.parser.constructs.flowInitial,i,Ce(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Dc,i)),"linePrefix")));return n;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const Nf={resolveAll:Fa()},Lf=Oa("string"),Pf=Oa("text");function Oa(t){return{resolveAll:Fa(t==="text"?Df:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],o=n.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(t[i].slice(0,o))}return a}function qf(t,e){let n=-1;const r=[];let i;for(;++n0){const Ve=ne.tokenStack[ne.tokenStack.length-1];(Ve[1]||no).call(ne,void 0,Ve[0])}for(q.position={start:wt(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:wt(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},xe=-1;++xe1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,u),t.applyData(e,u)}function cd(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function fd(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function Ua(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=t.all(e),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function dd(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return Ua(t,e);const i={src:Jt(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,o),t.applyData(e,o)}function pd(t,e){const n={src:Jt(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function hd(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function md(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return Ua(t,e);const i={href:Jt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function gd(t,e){const n={href:Jt(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function yd(t,e,n){const r=t.all(e),i=n?xd(n):ja(e),o={},a=[];if(typeof e.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s0){const Ve=ne.tokenStack[ne.tokenStack.length-1];(Ve[1]||no).call(ne,void 0,Ve[0])}for(q.position={start:wt(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:wt(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},xe=-1;++xe1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,u),t.applyData(e,u)}function fd(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function dd(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function Ua(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=t.all(e),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function pd(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return Ua(t,e);const i={src:Jt(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,o),t.applyData(e,o)}function hd(t,e){const n={src:Jt(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function md(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function gd(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return Ua(t,e);const i={href:Jt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function yd(t,e){const n={href:Jt(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function xd(t,e,n){const r=t.all(e),i=n?vd(n):ja(e),o={},a=[];if(typeof e.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s1}function vd(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Td(t){const e=Ha(t),n=Va(t);if(e&&n)return{start:e,end:n}}function _d(t,e){const n=t.all(e),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},s=Ha(e.children[1]),l=Va(e.children[e.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,o),t.applyData(e,o)}function Ed(t,e,n){const r=n?n.children:void 0,o=(r?r.indexOf(e):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:e.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return o.push(oo(e.slice(i),i>0,!1)),o.join("")}function oo(t,e,n){let r=0,i=t.length;if(e){let o=t.codePointAt(r);for(;o===ro||o===io;)r++,o=t.codePointAt(r)}if(n){let o=t.codePointAt(i-1);for(;o===ro||o===io;)i--,o=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function Sd(t,e){const n={type:"text",value:Ad(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function Id(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const Rd={blockquote:id,break:od,code:ad,delete:sd,emphasis:ld,footnoteReference:ud,heading:cd,html:fd,imageReference:dd,image:pd,inlineCode:hd,linkReference:md,link:gd,listItem:yd,list:vd,paragraph:bd,root:wd,strong:kd,table:_d,tableCell:Md,tableRow:Ed,text:Sd,thematicBreak:Id,toml:An,yaml:An,definition:An,footnoteDefinition:An};function An(){}const Ga=-1,Zn=0,$n=1,Gn=2,yi=3,xi=4,vi=5,bi=6,Ya=7,Ka=8,ao=typeof self=="object"?self:globalThis,Cd=(t,e)=>{const n=(i,o)=>(t.set(o,i),i),r=i=>{if(t.has(i))return t.get(i);const[o,a]=e[i];switch(o){case Zn:case Ga:return n(a,i);case $n:{const s=n([],i);for(const l of a)s.push(r(l));return s}case Gn:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case yi:return n(new Date(a),i);case xi:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case vi:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case bi:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case Ya:{const{name:s,message:l}=a;return n(new ao[s](l),i)}case Ka:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i)}return n(new ao[o](a),i)};return r},so=t=>Cd(new Map,t)(0),Bt="",{toString:Nd}={},{keys:Ld}=Object,sn=t=>{const e=typeof t;if(e!=="object"||!t)return[Zn,e];const n=Nd.call(t).slice(8,-1);switch(n){case"Array":return[$n,Bt];case"Object":return[Gn,Bt];case"Date":return[yi,Bt];case"RegExp":return[xi,Bt];case"Map":return[vi,Bt];case"Set":return[bi,Bt]}return n.includes("Array")?[$n,n]:n.includes("Error")?[Ya,n]:[Gn,n]},Sn=([t,e])=>t===Zn&&(e==="function"||e==="symbol"),Pd=(t,e,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=sn(a);switch(s){case Zn:{let c=a;switch(l){case"bigint":s=Ka,c=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([Ga],a)}return i([s,c],a)}case $n:{if(l)return i([l,[...a]],a);const c=[],f=i([s,c],a);for(const p of a)c.push(o(p));return f}case Gn:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(e&&"toJSON"in a)return o(a.toJSON());const c=[],f=i([s,c],a);for(const p of Ld(a))(t||!Sn(sn(a[p])))&&c.push([o(p),o(a[p])]);return f}case yi:return i([s,a.toISOString()],a);case xi:{const{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case vi:{const c=[],f=i([s,c],a);for(const[p,d]of a)(t||!(Sn(sn(p))||Sn(sn(d))))&&c.push([o(p),o(d)]);return f}case bi:{const c=[],f=i([s,c],a);for(const p of a)(t||!Sn(sn(p)))&&c.push(o(p));return f}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},lo=(t,{json:e,lossy:n}={})=>{const r=[];return Pd(!(e||n),!!e,new Map,r)(t),r},Yn=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?so(lo(t,e)):structuredClone(t):(t,e)=>so(lo(t,e));function Dd(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function Od(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function Fd(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||Dd,r=t.options.footnoteBackLabel||Od,i=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l0&&y.push({type:"text",value:" "});let S=typeof n=="string"?n:n(l,d);typeof S=="string"&&(S={type:"text",value:S}),y.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const w=c[c.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const S=w.children[w.children.length-1];S&&S.type==="text"?S.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...y)}else c.push(...y);const k={type:"element",tagName:"li",properties:{id:e+"fn-"+p},children:t.wrap(c,!0)};t.patch(u,k),s.push(k)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Yn(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:o,children:a};return t.patch(e,u),t.applyData(e,u)}function vd(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let r=-1;for(;!e&&++r1}function bd(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function _d(t){const e=Ha(t),n=Va(t);if(e&&n)return{start:e,end:n}}function Ed(t,e){const n=t.all(e),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},s=Ha(e.children[1]),l=Va(e.children[e.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,o),t.applyData(e,o)}function Md(t,e,n){const r=n?n.children:void 0,o=(r?r.indexOf(e):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:e.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return o.push(oo(e.slice(i),i>0,!1)),o.join("")}function oo(t,e,n){let r=0,i=t.length;if(e){let o=t.codePointAt(r);for(;o===ro||o===io;)r++,o=t.codePointAt(r)}if(n){let o=t.codePointAt(i-1);for(;o===ro||o===io;)i--,o=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function Id(t,e){const n={type:"text",value:Sd(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function Rd(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const Cd={blockquote:od,break:ad,code:sd,delete:ld,emphasis:ud,footnoteReference:cd,heading:fd,html:dd,imageReference:pd,image:hd,inlineCode:md,linkReference:gd,link:yd,listItem:xd,list:bd,paragraph:wd,root:kd,strong:Td,table:Ed,tableCell:Ad,tableRow:Md,text:Id,thematicBreak:Rd,toml:An,yaml:An,definition:An,footnoteDefinition:An};function An(){}const Ga=-1,Zn=0,$n=1,Gn=2,yi=3,xi=4,vi=5,bi=6,Ya=7,Ka=8,ao=typeof self=="object"?self:globalThis,Nd=(t,e)=>{const n=(i,o)=>(t.set(o,i),i),r=i=>{if(t.has(i))return t.get(i);const[o,a]=e[i];switch(o){case Zn:case Ga:return n(a,i);case $n:{const s=n([],i);for(const l of a)s.push(r(l));return s}case Gn:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case yi:return n(new Date(a),i);case xi:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case vi:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case bi:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case Ya:{const{name:s,message:l}=a;return n(new ao[s](l),i)}case Ka:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i)}return n(new ao[o](a),i)};return r},so=t=>Nd(new Map,t)(0),Bt="",{toString:Ld}={},{keys:Pd}=Object,sn=t=>{const e=typeof t;if(e!=="object"||!t)return[Zn,e];const n=Ld.call(t).slice(8,-1);switch(n){case"Array":return[$n,Bt];case"Object":return[Gn,Bt];case"Date":return[yi,Bt];case"RegExp":return[xi,Bt];case"Map":return[vi,Bt];case"Set":return[bi,Bt]}return n.includes("Array")?[$n,n]:n.includes("Error")?[Ya,n]:[Gn,n]},Sn=([t,e])=>t===Zn&&(e==="function"||e==="symbol"),Dd=(t,e,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=sn(a);switch(s){case Zn:{let c=a;switch(l){case"bigint":s=Ka,c=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([Ga],a)}return i([s,c],a)}case $n:{if(l)return i([l,[...a]],a);const c=[],f=i([s,c],a);for(const p of a)c.push(o(p));return f}case Gn:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(e&&"toJSON"in a)return o(a.toJSON());const c=[],f=i([s,c],a);for(const p of Pd(a))(t||!Sn(sn(a[p])))&&c.push([o(p),o(a[p])]);return f}case yi:return i([s,a.toISOString()],a);case xi:{const{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case vi:{const c=[],f=i([s,c],a);for(const[p,d]of a)(t||!(Sn(sn(p))||Sn(sn(d))))&&c.push([o(p),o(d)]);return f}case bi:{const c=[],f=i([s,c],a);for(const p of a)(t||!Sn(sn(p)))&&c.push(o(p));return f}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},lo=(t,{json:e,lossy:n}={})=>{const r=[];return Dd(!(e||n),!!e,new Map,r)(t),r},Yn=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?so(lo(t,e)):structuredClone(t):(t,e)=>so(lo(t,e));function Od(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function Fd(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function Bd(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||Od,r=t.options.footnoteBackLabel||Fd,i=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l0&&y.push({type:"text",value:" "});let S=typeof n=="string"?n:n(l,d);typeof S=="string"&&(S={type:"text",value:S}),y.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const w=c[c.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const S=w.children[w.children.length-1];S&&S.type==="text"?S.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...y)}else c.push(...y);const k={type:"element",tagName:"li",properties:{id:e+"fn-"+p},children:t.wrap(c,!0)};t.patch(u,k),s.push(k)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Yn(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:t.wrap(s,!0)},{type:"text",value:` -`}]}}const qa=function(t){if(t==null)return jd;if(typeof t=="function")return Qn(t);if(typeof t=="object")return Array.isArray(t)?Bd(t):zd(t);if(typeof t=="string")return Ud(t);throw new Error("Expected function, string, or object as test")};function Bd(t){const e=[];let n=-1;for(;++n":""))+")"})}return p;function p(){let d=Wa,y,x,w;if((!e||o(l,u,c[c.length-1]||void 0))&&(d=Yd(n(l,c)),d[0]===uo))return d;if("children"in l&&l.children){const k=l;if(k.children&&d[0]!==$d)for(x=(r?k.children.length:-1)+a,w=c.concat(k);x>-1&&x":""))+")"})}return p;function p(){let d=Wa,y,x,w;if((!e||o(l,u,c[c.length-1]||void 0))&&(d=Kd(n(l,c)),d[0]===uo))return d;if("children"in l&&l.children){const k=l;if(k.children&&d[0]!==Gd)for(x=(r?k.children.length:-1)+a,w=c.concat(k);x>-1&&x0&&n.push({type:"text",value:` -`}),n}function co(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function fo(t,e){const n=Wd(t,e),r=n.one(t,void 0),i=Fd(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` -`},i),o}function ep(t,e){return t&&"run"in t?async function(n,r){const i=fo(n,{file:r,...e});await t.run(i,r)}:function(n,r){return fo(n,{file:r,...t||e})}}function po(t){if(t)throw t}var fr,ho;function tp(){if(ho)return fr;ho=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):e.call(u)==="[object Array]"},o=function(u){if(!u||e.call(u)!=="[object Object]")return!1;var c=t.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&t.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!f)return!1;var p;for(p in u);return typeof p>"u"||t.call(u,p)},a=function(u,c){n&&c.name==="__proto__"?n(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},s=function(u,c){if(c==="__proto__")if(t.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return fr=function l(){var u,c,f,p,d,y,x=arguments[0],w=1,k=arguments.length,S=!1;for(typeof x=="boolean"&&(S=x,x=arguments[1]||{},w=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});wa.length;let l;s&&a.push(i);try{l=t.apply(this,a)}catch(u){const c=u;if(s&&n)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,e(a,...s))}function o(a){i(null,a)}}class Xe extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?i=e:!o.cause&&e&&(a=!0,i=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=dn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Xe.prototype.file="";Xe.prototype.name="";Xe.prototype.reason="";Xe.prototype.message="";Xe.prototype.stack="";Xe.prototype.column=void 0;Xe.prototype.line=void 0;Xe.prototype.ancestors=void 0;Xe.prototype.cause=void 0;Xe.prototype.fatal=void 0;Xe.prototype.place=void 0;Xe.prototype.ruleId=void 0;Xe.prototype.source=void 0;const st={basename:op,dirname:ap,extname:sp,join:lp,sep:"/"};function op(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');bn(t);let n=0,r=-1,i=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let a=-1,s=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(t.codePointAt(i)===e.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=t.length),t.slice(n,r)}function ap(t){if(bn(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function sp(t){bn(t);let e=t.length,n=-1,r=0,i=-1,o=0,a;for(;e--;){const s=t.codePointAt(e);if(s===47){if(a){r=e+1;break}continue}n<0&&(a=!0,n=e+1),s===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function lp(...t){let e=-1,n;for(;++e0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function cp(t,e){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=t.length;){if(a2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function bn(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const fp={cwd:dp};function dp(){return"/"}function Gr(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function pp(t){if(typeof t=="string")t=new URL(t);else if(!Gr(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return hp(t)}function hp(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n0){let[d,...y]=c;const x=r[p][1];$r(x)&&$r(d)&&(d=dr(!0,x,d)),r[p]=[u,d,...y]}}}}const vp=new wi().freeze();function gr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function yr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function xr(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function go(t){if(!$r(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function yo(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function In(t){return bp(t)?t:new mp(t)}function bp(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function wp(t){return typeof t=="string"||kp(t)}function kp(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}function ki(){const t=vp().use(rd).use(ep).use(Xu);return{process:e=>t.processSync(e).toString()}}function Xa(t,e){const n=Yo(e??{},{...Li.getDefaultRealTimeVADOptions("v5"),preSpeechPadFrames:30,positiveSpeechThreshold:.5,negativeSpeechThreshold:.35,minSpeechFrames:30,auto:!0}),r=W(),i=ws("microphone");async function o(){if(r.value&&(r.value.destroy(),r.value=void 0,console.warn("existing MicVAD destroyed")),!i.value)return;const a=H(t);if(!a)return;const s=await navigator.mediaDevices.getUserMedia({audio:{deviceId:a}});r.value=await Li.MicVAD.new({...n,stream:s}),n.auto&&r.value.start()}return Be(i,o,{immediate:!0}),Be(ks(t),o,{immediate:!0}),Ts(o),Ot(()=>{r.value&&(r.value.destroy(),r.value=void 0)}),{destroy:()=>{r.value&&(r.value.destroy(),r.value=void 0)},start:()=>{r.value&&r.value.start()}}}function xo(t,e){if(e===_s)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===Nr||e===Ko){let n=t.getIndex();if(n===null){const a=[],s=t.getAttribute("position");if(s!==void 0){for(let l=0;l=2.0 are supported."));return}const u=new nh(o,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c=0&&s[f]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}u.setExtensions(a),u.setPlugins(s),u.parse(r,i)}parseAsync(e,n){const r=this;return new Promise(function(i,o){r.parse(e,n,i,o)})}}function _p(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const de={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Ep{constructor(e){this.parser=e,this.name=de.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,o.source,a)}}class zp{constructor(e){this.parser=e,this.name=de.EXT_TEXTURE_WEBP}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const a=o.extensions[n],s=i.images[a.source];let l=r.textureLoader;if(s.uri){const u=r.options.manager.getHandler(s.uri);u!==null&&(l=u)}return r.loadTextureImage(e,a.source,l)}}class Up{constructor(e){this.parser=e,this.name=de.EXT_TEXTURE_AVIF}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const a=o.extensions[n],s=i.images[a.source];let l=r.textureLoader;if(s.uri){const u=r.options.manager.getHandler(s.uri);u!==null&&(l=u)}return r.loadTextureImage(e,a.source,l)}}class jp{constructor(e){this.name=de.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],o=this.parser.getDependency("buffer",i.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(s){const l=i.byteOffset||0,u=i.byteLength||0,c=i.count,f=i.byteStride,p=new Uint8Array(s,l,u);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(c,f,p,i.mode,i.filter).then(function(d){return d.buffer}):a.ready.then(function(){const d=new ArrayBuffer(c*f);return a.decodeGltfBuffer(new Uint8Array(d),c,f,p,i.mode,i.filter),d})})}else return null}}class Vp{constructor(e){this.name=de.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const u of i.primitives)if(u.mode!==nt.TRIANGLES&&u.mode!==nt.TRIANGLE_STRIP&&u.mode!==nt.TRIANGLE_FAN&&u.mode!==void 0)return null;const a=r.extensions[this.name].attributes,s=[],l={};for(const u in a)s.push(this.parser.getDependency("accessor",a[u]).then(c=>(l[u]=c,l[u])));return s.length<1?null:(s.push(this.parser.createNodeMesh(e)),Promise.all(s).then(u=>{const c=u.pop(),f=c.isGroup?c.children:[c],p=u[0].count,d=[];for(const y of f){const x=new vt,w=new ae,k=new Bn,S=new ae(1,1,1),_=new Is(y.geometry,y.material,p);for(let R=0;R0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":t.search(/\.ktx2($|\?)/i)>0||t.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const th=new vt;class nh{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new _p,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,i=-1,o=!1,a=-1;if(typeof navigator<"u"){const s=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(s)===!0;const l=s.match(/Version\/(\d+)/);i=r&&l?parseInt(l[1],10):-1,o=s.indexOf("Firefox")>-1,a=o?s.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||r&&i<17||o&&a<98?this.textureLoader=new Cs(this.options.manager):this.textureLoader=new Ns(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new qo(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const r=this,i=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(a){return a._markDefs&&a._markDefs()}),Promise.all(this._invokeAll(function(a){return a.beforeRoot&&a.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(a){const s={scene:a[0][i.scene||0],scenes:a[0],animations:a[1],cameras:a[2],asset:i.asset,parser:r,userData:{}};return Rt(o,s,i),gt(s,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(s)})).then(function(){for(const l of s.scenes)l.updateMatrixWorld();e(s)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,o=n.length;i{const l=this.associations.get(a);l!=null&&this.associations.set(s,l);for(const[u,c]of a.children.entries())o(c,s.children[u])};return o(r,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&w.setY(g,h[I*l+1]),l>=3&&w.setZ(g,h[I*l+2]),l>=4&&w.setW(g,h[I*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}w.normalized=y}return w})}loadTexture(e){const n=this.json,r=this.options,o=n.textures[e].source,a=n.images[o];let s=this.textureLoader;if(a.uri){const l=r.manager.getHandler(a.uri);l!==null&&(s=l)}return this.loadTextureImage(e,o,s)}loadTextureImage(e,n,r){const i=this,o=this.json,a=o.textures[e],s=o.images[n],l=(s.uri||s.bufferView)+":"+a.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(n,r).then(function(c){c.flipY=!1,c.name=a.name||s.name||"",c.name===""&&typeof s.uri=="string"&&s.uri.startsWith("data:image/")===!1&&(c.name=s.uri);const p=(o.samplers||{})[a.sampler]||{};return c.magFilter=bo[p.magFilter]||zn,c.minFilter=bo[p.minFilter]||Jr,c.wrapS=wo[p.wrapS]||Un,c.wrapT=wo[p.wrapT]||Un,c.generateMipmaps=!c.isCompressedTexture&&c.minFilter!==Lt&&c.minFilter!==zn,i.associations.set(c,{textures:e}),c}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,n){const r=this,i=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(f=>f.clone());const a=i.images[e],s=self.URL||self.webkitURL;let l=a.uri||"",u=!1;if(a.bufferView!==void 0)l=r.getDependency("bufferView",a.bufferView).then(function(f){u=!0;const p=new Blob([f],{type:a.mimeType});return l=s.createObjectURL(p),l});else if(a.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(l).then(function(f){return new Promise(function(p,d){let y=p;n.isImageBitmapLoader===!0&&(y=function(x){const w=new jn(x);w.needsUpdate=!0,p(w)}),n.load(cn.resolveURL(f,o.path),y,void 0,d)})}).then(function(f){return u===!0&&s.revokeObjectURL(l),gt(f,a),f.userData.mimeType=a.mimeType||eh(a.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[e]=c,c}assignTexture(e,n,r,i){const o=this;return this.getDependency("texture",r.index).then(function(a){if(!a)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(a=a.clone(),a.channel=r.texCoord),o.extensions[de.KHR_TEXTURE_TRANSFORM]){const s=r.extensions!==void 0?r.extensions[de.KHR_TEXTURE_TRANSFORM]:void 0;if(s){const l=o.associations.get(a);a=o.extensions[de.KHR_TEXTURE_TRANSFORM].extendTexture(a,s),o.associations.set(a,l)}}return i!==void 0&&(a.colorSpace=i),e[n]=a,a})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const i=n.attributes.tangent===void 0,o=n.attributes.color!==void 0,a=n.attributes.normal===void 0;if(e.isPoints){const s="PointsMaterial:"+r.uuid;let l=this.cache.get(s);l||(l=new Ls,tr.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(s,l)),r=l}else if(e.isLine){const s="LineBasicMaterial:"+r.uuid;let l=this.cache.get(s);l||(l=new Ps,tr.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(s,l)),r=l}if(i||o||a){let s="ClonedMaterial:"+r.uuid+":";i&&(s+="derivative-tangents:"),o&&(s+="vertex-colors:"),a&&(s+="flat-shading:");let l=this.cache.get(s);l||(l=r.clone(),o&&(l.vertexColors=!0),a&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(s,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return ea}loadMaterial(e){const n=this,r=this.json,i=this.extensions,o=r.materials[e];let a;const s={},l=o.extensions||{},u=[];if(l[de.KHR_MATERIALS_UNLIT]){const f=i[de.KHR_MATERIALS_UNLIT];a=f.getMaterialType(),u.push(f.extendParams(s,o,n))}else{const f=o.pbrMetallicRoughness||{};if(s.color=new ze(1,1,1),s.opacity=1,Array.isArray(f.baseColorFactor)){const p=f.baseColorFactor;s.color.setRGB(p[0],p[1],p[2],xt),s.opacity=p[3]}f.baseColorTexture!==void 0&&u.push(n.assignTexture(s,"map",f.baseColorTexture,pn)),s.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,s.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(s,"metalnessMap",f.metallicRoughnessTexture)),u.push(n.assignTexture(s,"roughnessMap",f.metallicRoughnessTexture))),a=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,s)})))}o.doubleSided===!0&&(s.side=qn);const c=o.alphaMode||br.OPAQUE;if(c===br.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,c===br.MASK&&(s.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&a!==Ht&&(u.push(n.assignTexture(s,"normalMap",o.normalTexture)),s.normalScale=new Pe(1,1),o.normalTexture.scale!==void 0)){const f=o.normalTexture.scale;s.normalScale.set(f,f)}if(o.occlusionTexture!==void 0&&a!==Ht&&(u.push(n.assignTexture(s,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&a!==Ht){const f=o.emissiveFactor;s.emissive=new ze().setRGB(f[0],f[1],f[2],xt)}return o.emissiveTexture!==void 0&&a!==Ht&&u.push(n.assignTexture(s,"emissiveMap",o.emissiveTexture,pn)),Promise.all(u).then(function(){const f=new a(s);return o.name&&(f.name=o.name),gt(f,o),n.associations.set(f,{materials:e}),o.extensions&&Rt(i,f,o),f})}createUniqueName(e){const n=hn.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,i=this.primitiveCache;function o(s){return r[de.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(s,n).then(function(l){return ko(l,s,n)})}const a=[];for(let s=0,l=e.length;s0&&Qp(k,o),k.name=n.createUniqueName(o.name||"mesh_"+e),gt(k,o),w.extensions&&Rt(i,k,w),n.assignFinalMaterial(k),f.push(k)}for(let d=0,y=f.length;d1?c=new nr:u.length===1?c=u[0]:c=new Qr,c!==u[0])for(let f=0,p=u.length;f1){const f=i.associations.get(c);i.associations.set(c,{...f})}return i.associations.get(c).nodes=e,c}),this.nodeCache[e]}loadScene(e){const n=this.extensions,r=this.json.scenes[e],i=this,o=new nr;r.name&&(o.name=i.createUniqueName(r.name)),gt(o,r),r.extensions&&Rt(n,o,r);const a=r.nodes||[],s=[];for(let l=0,u=a.length;l{const f=new Map;for(const[p,d]of i.associations)(p instanceof tr||p instanceof jn)&&f.set(p,d);return c.traverse(p=>{const d=i.associations.get(p);d!=null&&f.set(p,d)}),f};return i.associations=u(o),o})}_createAnimationTracks(e,n,r,i,o){const a=[],s=e.name?e.name:e.uuid,l=[];kt[o.path]===kt.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(s);let u;switch(kt[o.path]){case kt.weights:u=Si;break;case kt.rotation:u=Ii;break;case kt.translation:case kt.scale:u=Ai;break;default:switch(r.itemSize){case 1:u=Si;break;case 2:case 3:default:u=Ai;break}break}const c=i.interpolation!==void 0?Wp[i.interpolation]:ei,f=this._getArrayFromAccessor(r);for(let p=0,d=l.length;pnew wl(t)),Ct.register(t=>new kl(t)),Ct)}async function ih(t){const r=(await Ja().loadAsync(t)).userData;if(!r.vrmAnimations){console.warn("No VRM animations found in the .vrma file");return}if(r.vrmAnimations.length===0){console.warn("No VRM animations found in the .vrma file");return}return r.vrmAnimations[0]}async function oh(t,e){if(!t){console.warn("No VRM found");return}if(e)return Tl(e,t)}function ah(){const t=W(!1),e=W(0),n=W(0),r=.2,i=1,o=6,a=W(Math.random()*(o-i)+i);function s(l,u){if(l!=null&&l.expressionManager&&(n.value+=u,!t.value&&n.value>=a.value&&(t.value=!0,e.value=0),t.value)){e.value+=u/r;const c=Math.sin(Math.PI*e.value);l.expressionManager.setValue("blink",c),e.value>=1&&(t.value=!1,n.value=0,l.expressionManager.setValue("blink",0),a.value=Math.random()*(o-i)+i)}}return{update:s}}function sh(){let t=-1,e,n=0;function r(){e?e.set(on(-.25,.25),on(-.2,.15),-.65):e=new ae(on(-.25,.25),on(-.2,.15),-.65)}function i(o,a){var s;!(o!=null&&o.expressionManager)||!o.lookAt||(n>=t?(r(),n=0,t=_l()/1e3):e||r(),o.lookAt.target||(o.lookAt.target=new Qr),o.lookAt.target.position.lerp(e,on(.2,.5)),(s=o.lookAt)==null||s.update(a),n+=a)}return{update:i}}async function lh(t,e){const i=(await Ja().loadAsync(t,a=>{var s;return(s=e==null?void 0:e.onProgress)==null?void 0:s.call(e,a)})).userData;if(!i.vrm)return;const o=i.vrm;if(Or.removeUnnecessaryVertices(o.scene),Or.combineSkeletons(o.scene),o.scene.traverse(a=>{a.frustumCulled=!1}),o.lookAt){const a=new El(o.lookAt);a.name="lookAtQuaternionProxy",o.scene.add(a)}return e!=null&&e.scene&&e.scene.add(o.scene),e!=null&&e.position&&o.scene.position.set(...e.position),o}function uh(t){const e=W(null),n=W(!1),r=W(0),i=W(new Map),o=W(new Map),a=W(),s=(k,S,_)=>k+(S-k)*_,l=k=>k<.5?4*k*k*k:1-(-2*k+2)**3/2,u=new Map([["happy",{expression:[{name:"happy",value:1,duration:.3},{name:"aa",value:.3}],blendDuration:.3}],["sad",{expression:[{name:"sad",value:1},{name:"oh",value:.2}],blendDuration:.3}],["angry",{expression:[{name:"angry",value:1},{name:"ee",value:.4}],blendDuration:.2}],["surprised",{expression:[{name:"Surprised",value:1},{name:"oh",value:.6}],blendDuration:.1}],["neutral",{expression:[{name:"neutral",value:1}],blendDuration:.5}]]),c=()=>{a.value&&(clearTimeout(a.value),a.value=void 0)},f=k=>{var _;if(c(),!u.has(k)){console.warn(`Emotion ${k} not found`);return}const S=u.get(k);if(e.value=k,n.value=!0,r.value=0,t.expressionManager){const R=Object.keys(t.expressionManager.expressionMap);for(const P of R)t.expressionManager.setValue(P,0)}i.value.clear(),o.value.clear();for(const R of S.expression||[]){const P=((_=t.expressionManager)==null?void 0:_.getValue(R.name))||0;i.value.set(R.name,P),o.value.set(R.name,R.value)}};return{currentEmotion:e,isTransitioning:n,setEmotion:f,setEmotionWithResetAfter:(k,S)=>{c(),f(k),a.value=setTimeout(()=>{f("neutral"),a.value=void 0},S)},update:k=>{var R;if(!n.value||!e.value)return;const _=u.get(e.value).blendDuration||.3;r.value+=k/_,r.value>=1&&(r.value=1,n.value=!1);for(const[P,h]of o.value){const I=i.value.get(P)||0,v=s(I,h,l(r.value));(R=t.expressionManager)==null||R.setValue(P,v)}},addEmotionState:(k,S)=>{u.set(k,S)},removeEmotionState:k=>{u.delete(k)},dispose:()=>{c()}}}function ch(t,e){const n=Yo(e,{onLoading:()=>{},onInitiate:()=>{},onProgress:()=>{},onDone:()=>{},onReady:()=>{},onStart:()=>{},onUpdate:()=>{},onComplete:()=>{}}),{post:r,data:i,terminate:o}=Gs(t,{type:"module"}),a=W(null),s=W(""),l=W([]),u=W(!1),c=W(0),f=W("");return Be(i,p=>{var d,y,x,w,k,S,_,R;switch(p.status){case"loading":a.value="loading",s.value=p.data,(d=n.onLoading)==null||d.call(n,p.data);break;case"initiate":l.value.push(p),(y=n.onInitiate)==null||y.call(n,p);break;case"progress":l.value=l.value.map(P=>P.file===p.file?{...P,...p}:P),(x=n.onProgress)==null||x.call(n,p);break;case"done":l.value=l.value.filter(P=>P.file!==p.file),(w=n.onDone)==null||w.call(n,p);break;case"ready":a.value="ready",(k=n.onReady)==null||k.call(n);break;case"start":u.value=!0,(S=n.onStart)==null||S.call(n);break;case"update":c.value=p.tps,(_=n.onUpdate)==null||_.call(n,p.tps);break;case"complete":u.value=!1,f.value=p.output[0]||"",console.debug("Whisper result:",f.value),(R=n.onComplete)==null||R.call(n,p.output[0]);break}}),Ot(()=>{o()}),{transcribe:p=>r(p),status:a,loadingMessage:s,loadingProgress:l,transcribing:u,tps:c,result:f,load:()=>r({type:"load"}),terminate:o}}const fh=Kn("llm",()=>{async function t(n,r,i,o){const a=o==null?void 0:o.headers;return await zl({...r.chat(n),maxSteps:10,messages:i,headers:a,tools:[...await Il(),...await Rl()],onEvent(s){var l,u;s.type==="tool-call"?(l=o==null?void 0:o.onToolCall)==null||l.call(o,s.toolCall):s.type==="tool-call-result"&&((u=o==null?void 0:o.onToolCallResult)==null||u.call(o,{id:s.id,result:s.result}))}})}async function e(n,r){if(n==="")return[];try{return await Bl({baseURL:n.endsWith("/")?n:`${n}/`,apiKey:r})}catch(i){if(String(i).includes("Failed to construct 'URL': Invalid URL"))return[];throw i}}return{models:e,stream:t}}),St=Kn("chat",()=>{const{stream:t}=fh(),{systemPrompt:e}=Ke(Ul()),n=W(!1),r=W([]),i=W([]),o=W([]),a=W([]),s=W([]),l=W([]),u=W([]),c=W([]);function f(h){r.value.push(h)}function p(h){i.value.push(h)}function d(h){o.value.push(h)}function y(h){a.value.push(h)}function x(h){s.value.push(h)}function w(h){l.value.push(h)}function k(h){u.value.push(h)}function S(h){c.value.push(h)}const _=W([{role:"system",content:e.value}]),R=W({role:"assistant",content:"",slices:[],tool_results:[]});async function P(h,I){var v;try{if(n.value=!0,!h)return;for(const D of r.value)await D(h);const g=Wl({onLiteral:async D=>{for(const X of s.value)await X(D);R.value.content+=D;const B=R.value.slices.at(-1);if((B==null?void 0:B.type)==="text"){B.text+=D;return}R.value.slices.push({type:"text",text:D})},onSpecial:async D=>{for(const B of l.value)await B(D)}}),m=Dn({handlers:[async D=>{if(D.data.type==="text"){await g.consume(D.data.text);return}if(D.data.type==="tool-call"){R.value.slices.push(D.data);return}D.data.type==="tool-call-result"&&R.value.tool_results.push(D.data)}]});R.value={role:"assistant",content:"",slices:[],tool_results:[]},_.value.push({role:"user",content:h}),_.value.push(R.value);const T=_.value.slice(0,_.value.length-1).map(D=>{if(D.role==="assistant"){const{slices:B,...X}=D;return X.tool_results=rr(X.tool_results),rr(X)}return rr(D)});for(const D of i.value)await D(h);for(const D of o.value)await D(h);const M=((v=I.providerConfig)==null?void 0:v.headers)||{},F=await t(I.model,I.chatProvider,T,{headers:M,onToolCall(D){m.add({type:"tool-call",toolCall:D})},onToolCallResult(D){m.add({type:"tool-call-result",id:D.id,result:D.result})}});for(const D of a.value)await D(h);let j="";for await(const D of $l(F.textStream,async B=>B))m.add({type:"text",text:D}),j+=D;await g.end();for(const D of u.value)await D();for(const D of c.value)await D(j);console.debug("LLM output:",j)}catch(g){throw console.error("Error sending message:",g),g}finally{n.value=!1}}return{sending:n,messages:_,streamingMessage:R,send:P,onBeforeMessageComposed:f,onAfterMessageComposed:p,onBeforeSend:d,onAfterSend:y,onTokenLiteral:x,onTokenSpecial:w,onStreamEnd:k,onAssistantResponseEnd:S}}),es=Fe({__name:"Screen",setup(t){const e=W(),n=Ys(qs),{width:r,height:i}=Ks(),o=ri(e,{immediate:!0,windowResize:!0,reset:!0}),a=Ue(()=>n.between("sm","md").value||n.smaller("sm").value),s=Ue(()=>n.between("md","lg").value),l=Ue(()=>n.greaterOrEqual("lg").value),u=Ue(()=>l.value?o.width.value:a.value||s.value?r.value-16:o.width.value),c=W(0);return Be([r,i,e],()=>{var p,d;const f=(d=(p=e.value)==null?void 0:p.parentElement)==null?void 0:d.getBoundingClientRect();l.value||a.value||s.value?c.value=(f==null?void 0:f.height)||0:c.value=600}),Be([o.width,o.height],()=>{l.value||a.value||s.value?c.value=o.height.value:c.value=600}),mn(async()=>{e.value&&o.update()}),(f,p)=>(J(),ie("div",{ref_key:"containerRef",ref:e,"h-full":"","w-full":""},[gn(f.$slots,"default",{width:u.value,height:c.value})],512))}}),dh={absolute:"",bottom:"3",right:"3"},ph={flex:"~ row","cursor-pointer":""},hh=["checked","aria-checked"],mh={key:0,"min-w":"50vw",z:"(J(),Xt(es,{relative:""},{default:Ye(({width:a,height:s})=>[Te(Vl,{width:a,height:s},{default:Ye(({app:l})=>[Te(jl,{app:l,"mouth-open-size":t.mouthOpenSize,width:a,height:s,paused:t.paused},null,8,["app","mouth-open-size","width","height","paused"])]),_:2},1032,["width","height"]),O("div",dh,[O("div",ph,[O("label",{class:lt([n.value?"bg-neutral-300 dark:bg-neutral-200":"bg-neutral-100 dark:bg-neutral-700"]),transition:"all ease-in-out duration-500",text:"lg neutral-500 dark:neutral-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[Et(O("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value=l),checked:n.value,"aria-checked":n.value,name:"showLive2DViewerInspector",type:"checkbox","appearance-none":"","outline-none":"",hidden:""},null,8,hh),[[ii,n.value]]),o[8]||(o[8]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),Te(H(ci),null,{default:Ye(()=>[n.value?(J(),ie("div",mh,[O("div",gh,[O("div",yh,[O("span",null,ve(H(e)("stage.viewers.debug-menu.emotions")),1)]),O("div",xh,[O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[1]||(o[1]=l=>r.value={group:"Surprise",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[2]||(o[2]=l=>r.value={group:"Sad",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[3]||(o[3]=l=>r.value={group:"Angry",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[4]||(o[4]=l=>r.value={group:"Happy",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.happy")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[5]||(o[5]=l=>r.value={group:"Awkward",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.awkward")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[6]||(o[6]=l=>r.value={group:"Question",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.question")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[7]||(o[7]=l=>r.value={group:"Think",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):at("",!0)]),_:1})])]),_:1}))}});var bh=Object.defineProperty,wh=(t,e,n)=>e in t?bh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kh=(t,e,n)=>wh(t,e+"",n);function Th(t){return il()?(ol(t),!0):!1}function ts(t){return typeof t=="function"?t():H(t)}const _h=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Eh=Object.prototype.toString,Mh=t=>Eh.call(t)==="[object Object]",Ah=()=>{},Sh=_h?window:void 0;function Ih(t){var e;const n=ts(t);return(e=n==null?void 0:n.$el)!=null?e:n}function kr(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=Sh):[e,n,r,i]=t,!e)return Ah;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,f,p,d)=>(c.addEventListener(f,p,d),()=>c.removeEventListener(f,p,d)),l=Be(()=>[Ih(e),ts(i)],([c,f])=>{if(a(),!c)return;const p=Mh(f)?{...f}:f;o.push(...n.flatMap(d=>r.map(y=>s(c,d,y,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Th(u),u}function ns(t,e,n,r){const i=class extends yn{constructor(o={}){const a=Object.entries(t);super({uniforms:a.reduce((s,[l,u])=>{const c=ai.clone({[l]:{value:u}});return{...s,...c}},{}),vertexShader:e,fragmentShader:n}),kh(this,"key",""),a.forEach(([s])=>Object.defineProperty(this,s,{get:()=>this.uniforms[s].value,set:l=>this.uniforms[s].value=l})),Object.assign(this,o)}};return i.key=Dt.generateUUID(),i}ns({color:new ze("white"),scale:new Pe(1,1),imageBounds:new Pe(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` +`}),n}function co(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function fo(t,e){const n=Xd(t,e),r=n.one(t,void 0),i=Bd(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` +`},i),o}function tp(t,e){return t&&"run"in t?async function(n,r){const i=fo(n,{file:r,...e});await t.run(i,r)}:function(n,r){return fo(n,{file:r,...t||e})}}function po(t){if(t)throw t}var fr,ho;function np(){if(ho)return fr;ho=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):e.call(u)==="[object Array]"},o=function(u){if(!u||e.call(u)!=="[object Object]")return!1;var c=t.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&t.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!f)return!1;var p;for(p in u);return typeof p>"u"||t.call(u,p)},a=function(u,c){n&&c.name==="__proto__"?n(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},s=function(u,c){if(c==="__proto__")if(t.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return fr=function l(){var u,c,f,p,d,y,x=arguments[0],w=1,k=arguments.length,S=!1;for(typeof x=="boolean"&&(S=x,x=arguments[1]||{},w=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});wa.length;let l;s&&a.push(i);try{l=t.apply(this,a)}catch(u){const c=u;if(s&&n)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,e(a,...s))}function o(a){i(null,a)}}class Xe extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?i=e:!o.cause&&e&&(a=!0,i=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=dn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Xe.prototype.file="";Xe.prototype.name="";Xe.prototype.reason="";Xe.prototype.message="";Xe.prototype.stack="";Xe.prototype.column=void 0;Xe.prototype.line=void 0;Xe.prototype.ancestors=void 0;Xe.prototype.cause=void 0;Xe.prototype.fatal=void 0;Xe.prototype.place=void 0;Xe.prototype.ruleId=void 0;Xe.prototype.source=void 0;const st={basename:ap,dirname:sp,extname:lp,join:up,sep:"/"};function ap(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');bn(t);let n=0,r=-1,i=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let a=-1,s=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(t.codePointAt(i)===e.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=t.length),t.slice(n,r)}function sp(t){if(bn(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function lp(t){bn(t);let e=t.length,n=-1,r=0,i=-1,o=0,a;for(;e--;){const s=t.codePointAt(e);if(s===47){if(a){r=e+1;break}continue}n<0&&(a=!0,n=e+1),s===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function up(...t){let e=-1,n;for(;++e0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function fp(t,e){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=t.length;){if(a2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function bn(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const dp={cwd:pp};function pp(){return"/"}function Gr(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function hp(t){if(typeof t=="string")t=new URL(t);else if(!Gr(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return mp(t)}function mp(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n0){let[d,...y]=c;const x=r[p][1];$r(x)&&$r(d)&&(d=dr(!0,x,d)),r[p]=[u,d,...y]}}}}const bp=new wi().freeze();function gr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function yr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function xr(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function go(t){if(!$r(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function yo(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function In(t){return wp(t)?t:new gp(t)}function wp(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function kp(t){return typeof t=="string"||Tp(t)}function Tp(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}function ki(){const t=bp().use(id).use(tp).use(Zu);return{process:e=>t.processSync(e).toString()}}function Xa(t,e){const n=Yo(e??{},{...Li.getDefaultRealTimeVADOptions("v5"),preSpeechPadFrames:30,positiveSpeechThreshold:.5,negativeSpeechThreshold:.35,minSpeechFrames:30,auto:!0}),r=W(),i=ws("microphone");async function o(){if(r.value&&(r.value.destroy(),r.value=void 0,console.warn("existing MicVAD destroyed")),!i.value)return;const a=H(t);if(!a)return;const s=await navigator.mediaDevices.getUserMedia({audio:{deviceId:a}});r.value=await Li.MicVAD.new({...n,stream:s}),n.auto&&r.value.start()}return Be(i,o,{immediate:!0}),Be(ks(t),o,{immediate:!0}),Ts(o),Ot(()=>{r.value&&(r.value.destroy(),r.value=void 0)}),{destroy:()=>{r.value&&(r.value.destroy(),r.value=void 0)},start:()=>{r.value&&r.value.start()}}}function xo(t,e){if(e===_s)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===Nr||e===Ko){let n=t.getIndex();if(n===null){const a=[],s=t.getAttribute("position");if(s!==void 0){for(let l=0;l=2.0 are supported."));return}const u=new rh(o,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c=0&&s[f]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}u.setExtensions(a),u.setPlugins(s),u.parse(r,i)}parseAsync(e,n){const r=this;return new Promise(function(i,o){r.parse(e,n,i,o)})}}function Ep(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const de={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Mp{constructor(e){this.parser=e,this.name=de.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,o.source,a)}}class Up{constructor(e){this.parser=e,this.name=de.EXT_TEXTURE_WEBP}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const a=o.extensions[n],s=i.images[a.source];let l=r.textureLoader;if(s.uri){const u=r.options.manager.getHandler(s.uri);u!==null&&(l=u)}return r.loadTextureImage(e,a.source,l)}}class jp{constructor(e){this.parser=e,this.name=de.EXT_TEXTURE_AVIF}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const a=o.extensions[n],s=i.images[a.source];let l=r.textureLoader;if(s.uri){const u=r.options.manager.getHandler(s.uri);u!==null&&(l=u)}return r.loadTextureImage(e,a.source,l)}}class Vp{constructor(e){this.name=de.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],o=this.parser.getDependency("buffer",i.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(s){const l=i.byteOffset||0,u=i.byteLength||0,c=i.count,f=i.byteStride,p=new Uint8Array(s,l,u);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(c,f,p,i.mode,i.filter).then(function(d){return d.buffer}):a.ready.then(function(){const d=new ArrayBuffer(c*f);return a.decodeGltfBuffer(new Uint8Array(d),c,f,p,i.mode,i.filter),d})})}else return null}}class Hp{constructor(e){this.name=de.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const u of i.primitives)if(u.mode!==nt.TRIANGLES&&u.mode!==nt.TRIANGLE_STRIP&&u.mode!==nt.TRIANGLE_FAN&&u.mode!==void 0)return null;const a=r.extensions[this.name].attributes,s=[],l={};for(const u in a)s.push(this.parser.getDependency("accessor",a[u]).then(c=>(l[u]=c,l[u])));return s.length<1?null:(s.push(this.parser.createNodeMesh(e)),Promise.all(s).then(u=>{const c=u.pop(),f=c.isGroup?c.children:[c],p=u[0].count,d=[];for(const y of f){const x=new vt,w=new ae,k=new Bn,S=new ae(1,1,1),_=new Is(y.geometry,y.material,p);for(let R=0;R0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":t.search(/\.ktx2($|\?)/i)>0||t.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const nh=new vt;class rh{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new Ep,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,i=-1,o=!1,a=-1;if(typeof navigator<"u"){const s=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(s)===!0;const l=s.match(/Version\/(\d+)/);i=r&&l?parseInt(l[1],10):-1,o=s.indexOf("Firefox")>-1,a=o?s.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||r&&i<17||o&&a<98?this.textureLoader=new Cs(this.options.manager):this.textureLoader=new Ns(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new qo(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const r=this,i=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(a){return a._markDefs&&a._markDefs()}),Promise.all(this._invokeAll(function(a){return a.beforeRoot&&a.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(a){const s={scene:a[0][i.scene||0],scenes:a[0],animations:a[1],cameras:a[2],asset:i.asset,parser:r,userData:{}};return Rt(o,s,i),gt(s,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(s)})).then(function(){for(const l of s.scenes)l.updateMatrixWorld();e(s)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,o=n.length;i{const l=this.associations.get(a);l!=null&&this.associations.set(s,l);for(const[u,c]of a.children.entries())o(c,s.children[u])};return o(r,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&w.setY(g,h[I*l+1]),l>=3&&w.setZ(g,h[I*l+2]),l>=4&&w.setW(g,h[I*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}w.normalized=y}return w})}loadTexture(e){const n=this.json,r=this.options,o=n.textures[e].source,a=n.images[o];let s=this.textureLoader;if(a.uri){const l=r.manager.getHandler(a.uri);l!==null&&(s=l)}return this.loadTextureImage(e,o,s)}loadTextureImage(e,n,r){const i=this,o=this.json,a=o.textures[e],s=o.images[n],l=(s.uri||s.bufferView)+":"+a.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(n,r).then(function(c){c.flipY=!1,c.name=a.name||s.name||"",c.name===""&&typeof s.uri=="string"&&s.uri.startsWith("data:image/")===!1&&(c.name=s.uri);const p=(o.samplers||{})[a.sampler]||{};return c.magFilter=bo[p.magFilter]||zn,c.minFilter=bo[p.minFilter]||Jr,c.wrapS=wo[p.wrapS]||Un,c.wrapT=wo[p.wrapT]||Un,c.generateMipmaps=!c.isCompressedTexture&&c.minFilter!==Lt&&c.minFilter!==zn,i.associations.set(c,{textures:e}),c}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,n){const r=this,i=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(f=>f.clone());const a=i.images[e],s=self.URL||self.webkitURL;let l=a.uri||"",u=!1;if(a.bufferView!==void 0)l=r.getDependency("bufferView",a.bufferView).then(function(f){u=!0;const p=new Blob([f],{type:a.mimeType});return l=s.createObjectURL(p),l});else if(a.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(l).then(function(f){return new Promise(function(p,d){let y=p;n.isImageBitmapLoader===!0&&(y=function(x){const w=new jn(x);w.needsUpdate=!0,p(w)}),n.load(cn.resolveURL(f,o.path),y,void 0,d)})}).then(function(f){return u===!0&&s.revokeObjectURL(l),gt(f,a),f.userData.mimeType=a.mimeType||th(a.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[e]=c,c}assignTexture(e,n,r,i){const o=this;return this.getDependency("texture",r.index).then(function(a){if(!a)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(a=a.clone(),a.channel=r.texCoord),o.extensions[de.KHR_TEXTURE_TRANSFORM]){const s=r.extensions!==void 0?r.extensions[de.KHR_TEXTURE_TRANSFORM]:void 0;if(s){const l=o.associations.get(a);a=o.extensions[de.KHR_TEXTURE_TRANSFORM].extendTexture(a,s),o.associations.set(a,l)}}return i!==void 0&&(a.colorSpace=i),e[n]=a,a})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const i=n.attributes.tangent===void 0,o=n.attributes.color!==void 0,a=n.attributes.normal===void 0;if(e.isPoints){const s="PointsMaterial:"+r.uuid;let l=this.cache.get(s);l||(l=new Ls,tr.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(s,l)),r=l}else if(e.isLine){const s="LineBasicMaterial:"+r.uuid;let l=this.cache.get(s);l||(l=new Ps,tr.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(s,l)),r=l}if(i||o||a){let s="ClonedMaterial:"+r.uuid+":";i&&(s+="derivative-tangents:"),o&&(s+="vertex-colors:"),a&&(s+="flat-shading:");let l=this.cache.get(s);l||(l=r.clone(),o&&(l.vertexColors=!0),a&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(s,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return ea}loadMaterial(e){const n=this,r=this.json,i=this.extensions,o=r.materials[e];let a;const s={},l=o.extensions||{},u=[];if(l[de.KHR_MATERIALS_UNLIT]){const f=i[de.KHR_MATERIALS_UNLIT];a=f.getMaterialType(),u.push(f.extendParams(s,o,n))}else{const f=o.pbrMetallicRoughness||{};if(s.color=new ze(1,1,1),s.opacity=1,Array.isArray(f.baseColorFactor)){const p=f.baseColorFactor;s.color.setRGB(p[0],p[1],p[2],xt),s.opacity=p[3]}f.baseColorTexture!==void 0&&u.push(n.assignTexture(s,"map",f.baseColorTexture,pn)),s.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,s.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(s,"metalnessMap",f.metallicRoughnessTexture)),u.push(n.assignTexture(s,"roughnessMap",f.metallicRoughnessTexture))),a=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,s)})))}o.doubleSided===!0&&(s.side=qn);const c=o.alphaMode||br.OPAQUE;if(c===br.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,c===br.MASK&&(s.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&a!==Ht&&(u.push(n.assignTexture(s,"normalMap",o.normalTexture)),s.normalScale=new Pe(1,1),o.normalTexture.scale!==void 0)){const f=o.normalTexture.scale;s.normalScale.set(f,f)}if(o.occlusionTexture!==void 0&&a!==Ht&&(u.push(n.assignTexture(s,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&a!==Ht){const f=o.emissiveFactor;s.emissive=new ze().setRGB(f[0],f[1],f[2],xt)}return o.emissiveTexture!==void 0&&a!==Ht&&u.push(n.assignTexture(s,"emissiveMap",o.emissiveTexture,pn)),Promise.all(u).then(function(){const f=new a(s);return o.name&&(f.name=o.name),gt(f,o),n.associations.set(f,{materials:e}),o.extensions&&Rt(i,f,o),f})}createUniqueName(e){const n=hn.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,i=this.primitiveCache;function o(s){return r[de.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(s,n).then(function(l){return ko(l,s,n)})}const a=[];for(let s=0,l=e.length;s0&&Jp(k,o),k.name=n.createUniqueName(o.name||"mesh_"+e),gt(k,o),w.extensions&&Rt(i,k,w),n.assignFinalMaterial(k),f.push(k)}for(let d=0,y=f.length;d1?c=new nr:u.length===1?c=u[0]:c=new Qr,c!==u[0])for(let f=0,p=u.length;f1){const f=i.associations.get(c);i.associations.set(c,{...f})}return i.associations.get(c).nodes=e,c}),this.nodeCache[e]}loadScene(e){const n=this.extensions,r=this.json.scenes[e],i=this,o=new nr;r.name&&(o.name=i.createUniqueName(r.name)),gt(o,r),r.extensions&&Rt(n,o,r);const a=r.nodes||[],s=[];for(let l=0,u=a.length;l{const f=new Map;for(const[p,d]of i.associations)(p instanceof tr||p instanceof jn)&&f.set(p,d);return c.traverse(p=>{const d=i.associations.get(p);d!=null&&f.set(p,d)}),f};return i.associations=u(o),o})}_createAnimationTracks(e,n,r,i,o){const a=[],s=e.name?e.name:e.uuid,l=[];kt[o.path]===kt.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(s);let u;switch(kt[o.path]){case kt.weights:u=Si;break;case kt.rotation:u=Ii;break;case kt.translation:case kt.scale:u=Ai;break;default:switch(r.itemSize){case 1:u=Si;break;case 2:case 3:default:u=Ai;break}break}const c=i.interpolation!==void 0?Xp[i.interpolation]:ei,f=this._getArrayFromAccessor(r);for(let p=0,d=l.length;pnew kl(t)),Ct.register(t=>new Tl(t)),Ct)}async function oh(t){const r=(await Ja().loadAsync(t)).userData;if(!r.vrmAnimations){console.warn("No VRM animations found in the .vrma file");return}if(r.vrmAnimations.length===0){console.warn("No VRM animations found in the .vrma file");return}return r.vrmAnimations[0]}async function ah(t,e){if(!t){console.warn("No VRM found");return}if(e)return _l(e,t)}function sh(){const t=W(!1),e=W(0),n=W(0),r=.2,i=1,o=6,a=W(Math.random()*(o-i)+i);function s(l,u){if(l!=null&&l.expressionManager&&(n.value+=u,!t.value&&n.value>=a.value&&(t.value=!0,e.value=0),t.value)){e.value+=u/r;const c=Math.sin(Math.PI*e.value);l.expressionManager.setValue("blink",c),e.value>=1&&(t.value=!1,n.value=0,l.expressionManager.setValue("blink",0),a.value=Math.random()*(o-i)+i)}}return{update:s}}function lh(){let t=-1,e,n=0;function r(){e?e.set(on(-.25,.25),on(-.2,.15),-.65):e=new ae(on(-.25,.25),on(-.2,.15),-.65)}function i(o,a){var s;!(o!=null&&o.expressionManager)||!o.lookAt||(n>=t?(r(),n=0,t=El()/1e3):e||r(),o.lookAt.target||(o.lookAt.target=new Qr),o.lookAt.target.position.lerp(e,on(.2,.5)),(s=o.lookAt)==null||s.update(a),n+=a)}return{update:i}}async function uh(t,e){const i=(await Ja().loadAsync(t,a=>{var s;return(s=e==null?void 0:e.onProgress)==null?void 0:s.call(e,a)})).userData;if(!i.vrm)return;const o=i.vrm;if(Or.removeUnnecessaryVertices(o.scene),Or.combineSkeletons(o.scene),o.scene.traverse(a=>{a.frustumCulled=!1}),o.lookAt){const a=new Ml(o.lookAt);a.name="lookAtQuaternionProxy",o.scene.add(a)}return e!=null&&e.scene&&e.scene.add(o.scene),e!=null&&e.position&&o.scene.position.set(...e.position),o}function ch(t){const e=W(null),n=W(!1),r=W(0),i=W(new Map),o=W(new Map),a=W(),s=(k,S,_)=>k+(S-k)*_,l=k=>k<.5?4*k*k*k:1-(-2*k+2)**3/2,u=new Map([["happy",{expression:[{name:"happy",value:1,duration:.3},{name:"aa",value:.3}],blendDuration:.3}],["sad",{expression:[{name:"sad",value:1},{name:"oh",value:.2}],blendDuration:.3}],["angry",{expression:[{name:"angry",value:1},{name:"ee",value:.4}],blendDuration:.2}],["surprised",{expression:[{name:"Surprised",value:1},{name:"oh",value:.6}],blendDuration:.1}],["neutral",{expression:[{name:"neutral",value:1}],blendDuration:.5}]]),c=()=>{a.value&&(clearTimeout(a.value),a.value=void 0)},f=k=>{var _;if(c(),!u.has(k)){console.warn(`Emotion ${k} not found`);return}const S=u.get(k);if(e.value=k,n.value=!0,r.value=0,t.expressionManager){const R=Object.keys(t.expressionManager.expressionMap);for(const P of R)t.expressionManager.setValue(P,0)}i.value.clear(),o.value.clear();for(const R of S.expression||[]){const P=((_=t.expressionManager)==null?void 0:_.getValue(R.name))||0;i.value.set(R.name,P),o.value.set(R.name,R.value)}};return{currentEmotion:e,isTransitioning:n,setEmotion:f,setEmotionWithResetAfter:(k,S)=>{c(),f(k),a.value=setTimeout(()=>{f("neutral"),a.value=void 0},S)},update:k=>{var R;if(!n.value||!e.value)return;const _=u.get(e.value).blendDuration||.3;r.value+=k/_,r.value>=1&&(r.value=1,n.value=!1);for(const[P,h]of o.value){const I=i.value.get(P)||0,v=s(I,h,l(r.value));(R=t.expressionManager)==null||R.setValue(P,v)}},addEmotionState:(k,S)=>{u.set(k,S)},removeEmotionState:k=>{u.delete(k)},dispose:()=>{c()}}}function fh(t,e){const n=Yo(e,{onLoading:()=>{},onInitiate:()=>{},onProgress:()=>{},onDone:()=>{},onReady:()=>{},onStart:()=>{},onUpdate:()=>{},onComplete:()=>{}}),{post:r,data:i,terminate:o}=Gs(t,{type:"module"}),a=W(null),s=W(""),l=W([]),u=W(!1),c=W(0),f=W("");return Be(i,p=>{var d,y,x,w,k,S,_,R;switch(p.status){case"loading":a.value="loading",s.value=p.data,(d=n.onLoading)==null||d.call(n,p.data);break;case"initiate":l.value.push(p),(y=n.onInitiate)==null||y.call(n,p);break;case"progress":l.value=l.value.map(P=>P.file===p.file?{...P,...p}:P),(x=n.onProgress)==null||x.call(n,p);break;case"done":l.value=l.value.filter(P=>P.file!==p.file),(w=n.onDone)==null||w.call(n,p);break;case"ready":a.value="ready",(k=n.onReady)==null||k.call(n);break;case"start":u.value=!0,(S=n.onStart)==null||S.call(n);break;case"update":c.value=p.tps,(_=n.onUpdate)==null||_.call(n,p.tps);break;case"complete":u.value=!1,f.value=p.output[0]||"",console.debug("Whisper result:",f.value),(R=n.onComplete)==null||R.call(n,p.output[0]);break}}),Ot(()=>{o()}),{transcribe:p=>r(p),status:a,loadingMessage:s,loadingProgress:l,transcribing:u,tps:c,result:f,load:()=>r({type:"load"}),terminate:o}}const dh=Kn("llm",()=>{async function t(n,r,i,o){const a=o==null?void 0:o.headers;return await Ul({...r.chat(n),maxSteps:10,messages:i,headers:a,tools:[...await Rl(),...await Cl()],onEvent(s){var l,u;s.type==="tool-call"?(l=o==null?void 0:o.onToolCall)==null||l.call(o,s.toolCall):s.type==="tool-call-result"&&((u=o==null?void 0:o.onToolCallResult)==null||u.call(o,{id:s.id,result:s.result}))}})}async function e(n,r){if(n==="")return[];try{return await zl({baseURL:n.endsWith("/")?n:`${n}/`,apiKey:r})}catch(i){if(String(i).includes("Failed to construct 'URL': Invalid URL"))return[];throw i}}return{models:e,stream:t}}),St=Kn("chat",()=>{const{stream:t}=dh(),{systemPrompt:e}=Ke(jl()),n=W(!1),r=W([]),i=W([]),o=W([]),a=W([]),s=W([]),l=W([]),u=W([]),c=W([]);function f(h){r.value.push(h)}function p(h){i.value.push(h)}function d(h){o.value.push(h)}function y(h){a.value.push(h)}function x(h){s.value.push(h)}function w(h){l.value.push(h)}function k(h){u.value.push(h)}function S(h){c.value.push(h)}const _=W([{role:"system",content:e.value}]),R=W({role:"assistant",content:"",slices:[],tool_results:[]});async function P(h,I){var v;try{if(n.value=!0,!h)return;for(const D of r.value)await D(h);const g=Xl({onLiteral:async D=>{for(const X of s.value)await X(D);R.value.content+=D;const B=R.value.slices.at(-1);if((B==null?void 0:B.type)==="text"){B.text+=D;return}R.value.slices.push({type:"text",text:D})},onSpecial:async D=>{for(const B of l.value)await B(D)}}),m=Dn({handlers:[async D=>{if(D.data.type==="text"){await g.consume(D.data.text);return}if(D.data.type==="tool-call"){R.value.slices.push(D.data);return}D.data.type==="tool-call-result"&&R.value.tool_results.push(D.data)}]});R.value={role:"assistant",content:"",slices:[],tool_results:[]},_.value.push({role:"user",content:h}),_.value.push(R.value);const T=_.value.slice(0,_.value.length-1).map(D=>{if(D.role==="assistant"){const{slices:B,...X}=D;return X.tool_results=rr(X.tool_results),rr(X)}return rr(D)});for(const D of i.value)await D(h);for(const D of o.value)await D(h);const M=((v=I.providerConfig)==null?void 0:v.headers)||{},F=await t(I.model,I.chatProvider,T,{headers:M,onToolCall(D){m.add({type:"tool-call",toolCall:D})},onToolCallResult(D){m.add({type:"tool-call-result",id:D.id,result:D.result})}});for(const D of a.value)await D(h);let j="";for await(const D of Gl(F.textStream,async B=>B))m.add({type:"text",text:D}),j+=D;await g.end();for(const D of u.value)await D();for(const D of c.value)await D(j);console.debug("LLM output:",j)}catch(g){throw console.error("Error sending message:",g),g}finally{n.value=!1}}return{sending:n,messages:_,streamingMessage:R,send:P,onBeforeMessageComposed:f,onAfterMessageComposed:p,onBeforeSend:d,onAfterSend:y,onTokenLiteral:x,onTokenSpecial:w,onStreamEnd:k,onAssistantResponseEnd:S}}),es=Fe({__name:"Screen",setup(t){const e=W(),n=Ys(qs),{width:r,height:i}=Ks(),o=ri(e,{immediate:!0,windowResize:!0,reset:!0}),a=Ue(()=>n.between("sm","md").value||n.smaller("sm").value),s=Ue(()=>n.between("md","lg").value),l=Ue(()=>n.greaterOrEqual("lg").value),u=Ue(()=>l.value?o.width.value:a.value||s.value?r.value-16:o.width.value),c=W(0);return Be([r,i,e],()=>{var p,d;const f=(d=(p=e.value)==null?void 0:p.parentElement)==null?void 0:d.getBoundingClientRect();l.value||a.value||s.value?c.value=(f==null?void 0:f.height)||0:c.value=600}),Be([o.width,o.height],()=>{l.value||a.value||s.value?c.value=o.height.value:c.value=600}),mn(async()=>{e.value&&o.update()}),(f,p)=>(J(),ie("div",{ref_key:"containerRef",ref:e,"h-full":"","w-full":""},[gn(f.$slots,"default",{width:u.value,height:c.value})],512))}}),ph={absolute:"",bottom:"3",right:"3"},hh={flex:"~ row","cursor-pointer":""},mh=["checked","aria-checked"],gh={key:0,"min-w":"50vw",z:"(J(),Xt(es,{relative:""},{default:Ye(({width:a,height:s})=>[Te(Hl,{width:a,height:s},{default:Ye(({app:l})=>[Te(Vl,{app:l,"mouth-open-size":t.mouthOpenSize,width:a,height:s,paused:t.paused,"focus-at":t.focusAt},null,8,["app","mouth-open-size","width","height","paused","focus-at"])]),_:2},1032,["width","height"]),O("div",ph,[O("div",hh,[O("label",{class:lt([n.value?"bg-neutral-300 dark:bg-neutral-200":"bg-neutral-100 dark:bg-neutral-700"]),transition:"all ease-in-out duration-500",text:"lg neutral-500 dark:neutral-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[Et(O("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value=l),checked:n.value,"aria-checked":n.value,name:"showLive2DViewerInspector",type:"checkbox","appearance-none":"","outline-none":"",hidden:""},null,8,mh),[[ii,n.value]]),o[8]||(o[8]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),Te(H(ci),null,{default:Ye(()=>[n.value?(J(),ie("div",gh,[O("div",yh,[O("div",xh,[O("span",null,ve(H(e)("stage.viewers.debug-menu.emotions")),1)]),O("div",vh,[O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[1]||(o[1]=l=>r.value={group:"Surprise",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[2]||(o[2]=l=>r.value={group:"Sad",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[3]||(o[3]=l=>r.value={group:"Angry",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[4]||(o[4]=l=>r.value={group:"Happy",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.happy")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[5]||(o[5]=l=>r.value={group:"Awkward",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.awkward")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[6]||(o[6]=l=>r.value={group:"Question",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.question")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[7]||(o[7]=l=>r.value={group:"Think",index:0})},ve(H(e)("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):at("",!0)]),_:1})])]),_:1}))}});var wh=Object.defineProperty,kh=(t,e,n)=>e in t?wh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Th=(t,e,n)=>kh(t,e+"",n);function _h(t){return il()?(ol(t),!0):!1}function ts(t){return typeof t=="function"?t():H(t)}const Eh=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Mh=Object.prototype.toString,Ah=t=>Mh.call(t)==="[object Object]",Sh=()=>{},Ih=Eh?window:void 0;function Rh(t){var e;const n=ts(t);return(e=n==null?void 0:n.$el)!=null?e:n}function kr(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=Ih):[e,n,r,i]=t,!e)return Sh;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,f,p,d)=>(c.addEventListener(f,p,d),()=>c.removeEventListener(f,p,d)),l=Be(()=>[Rh(e),ts(i)],([c,f])=>{if(a(),!c)return;const p=Ah(f)?{...f}:f;o.push(...n.flatMap(d=>r.map(y=>s(c,d,y,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return _h(u),u}function ns(t,e,n,r){const i=class extends yn{constructor(o={}){const a=Object.entries(t);super({uniforms:a.reduce((s,[l,u])=>{const c=ai.clone({[l]:{value:u}});return{...s,...c}},{}),vertexShader:e,fragmentShader:n}),Th(this,"key",""),a.forEach(([s])=>Object.defineProperty(this,s,{get:()=>this.uniforms[s].value,set:l=>this.uniforms[s].value=l})),Object.assign(this,o)}};return i.key=Dt.generateUUID(),i}ns({color:new ze("white"),scale:new Pe(1,1),imageBounds:new Pe(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` varying vec2 vUv; varying vec2 vPos; void main() { @@ -73,7 +73,7 @@ import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sf #include #include } - `);const Ti=parseInt(al.replace(/\D+/g,""));var Rh=Object.defineProperty,Ch=(t,e,n)=>e in t?Rh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Nh=(t,e,n)=>(Ch(t,e+"",n),n);async function To(t){const e=await t.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(e)));return`data:${t.type||""};base64,${n}`}let Rn,Tr,zt,Cn;function _r(t,e=1/0,n=null){Tr||(Tr=new sa(2,2,1,1)),zt||(zt=new yn({uniforms:{blitTexture:new pl(t)},vertexShader:` + `);const Ti=parseInt(al.replace(/\D+/g,""));var Ch=Object.defineProperty,Nh=(t,e,n)=>e in t?Ch(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lh=(t,e,n)=>(Nh(t,e+"",n),n);async function To(t){const e=await t.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(e)));return`data:${t.type||""};base64,${n}`}let Rn,Tr,zt,Cn;function _r(t,e=1/0,n=null){Tr||(Tr=new sa(2,2,1,1)),zt||(zt=new yn({uniforms:{blitTexture:new pl(t)},vertexShader:` varying vec2 vUv; void main(){ vUv = uv; @@ -92,7 +92,7 @@ import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sf gl_FragColor = texture2D( blitTexture, vUv); #endif } - `})),zt.uniforms.blitTexture.value=t,zt.defines.IS_SRGB="colorSpace"in t?t.colorSpace==="srgb":t.encoding===3001,zt.needsUpdate=!0,Cn||(Cn=new Pt(Tr,zt),Cn.frustrumCulled=!1);const r=new Mt,i=new Pr;i.add(Cn),n||(n=Rn=new hl({antialias:!1})),n.setSize(Math.min(t.image.width,e),Math.min(t.image.height,e)),n.clear(),n.render(i,r);const o=new jn(n.domElement);return o.minFilter=t.minFilter,o.magFilter=t.magFilter,o.wrapS=t.wrapS,o.wrapT=t.wrapT,o.name=t.name,Rn&&(Rn.dispose(),Rn=null),o}const _o={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]};class rs{constructor(){this.pluginCallbacks=[],this.register(function(e){return new Vh(e)}),this.register(function(e){return new Hh(e)}),this.register(function(e){return new Yh(e)}),this.register(function(e){return new Kh(e)}),this.register(function(e){return new qh(e)}),this.register(function(e){return new Wh(e)}),this.register(function(e){return new $h(e)}),this.register(function(e){return new Gh(e)}),this.register(function(e){return new Xh(e)}),this.register(function(e){return new Zh(e)}),this.register(function(e){return new Qh(e)})}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,n,r,i){const o=new jh,a=[];for(let s=0,l=this.pluginCallbacks.length;st.times[t.times.length-1]){if(Math.abs(t.times[t.times.length-1]-e)<.001)return t.times.length-1;r[r.length-1]=e,r.set(t.times,0),i.set(t.values,0),i.set(o.evaluate(e),t.values.length),a=r.length-1}else for(let s=0;se){r.set(t.times.slice(0,s+1),0),r[s+1]=e,r.set(t.times.slice(s+1),s+2),i.set(t.values.slice(0,(s+1)*n),0),i.set(o.evaluate(e),(s+1)*n),i.set(t.values.slice((s+1)*n),(s+2)*n),a=s+1;break}}return t.times=r,t.values=i,a},mergeMorphTargetTracks:function(t,e){const n=[],r={},i=t.tracks;for(let o=0;o4?a=t.array[i*t.itemSize+o]:(o===0?a=t.getX(i):o===1?a=t.getY(i):o===2?a=t.getZ(i):o===3&&(a=t.getW(i)),t.normalized===!0&&(a=Dt.normalize(a,t.array))),r.min[o]=Math.min(r.min[o],a),r.max[o]=Math.max(r.max[o],a)}return r}function is(t){return Math.ceil(t/4)*4}function Mr(t,e=0){const n=is(t.byteLength);if(n!==t.byteLength){const r=new Uint8Array(n);if(r.set(new Uint8Array(t)),e!==0)for(let i=t.byteLength;i"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function Io(t,e){if(t.toBlob!==void 0)return new Promise(r=>t.toBlob(r,e));let n;return e==="image/jpeg"?n=.92:e==="image/webp"&&(n=.8),t.convertToBlob({type:e,quality:n})}class jh{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,n,r={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},r),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);const i=this,o=i.buffers,a=i.json;r=i.options;const s=i.extensionsUsed,l=i.extensionsRequired,u=new Blob(o,{type:"application/octet-stream"}),c=Object.keys(s),f=Object.keys(l);c.length>0&&(a.extensionsUsed=c),f.length>0&&(a.extensionsRequired=f),a.buffers&&a.buffers.length>0&&(a.buffers[0].byteLength=u.size),r.binary===!0?u.arrayBuffer().then(p=>{const d=Mr(p),y=new DataView(new ArrayBuffer(Ao));y.setUint32(0,d.byteLength,!0),y.setUint32(4,Fh,!0);const x=Mr(Bh(JSON.stringify(a)),32),w=new DataView(new ArrayBuffer(Ao));w.setUint32(0,x.byteLength,!0),w.setUint32(4,Oh,!0);const k=new ArrayBuffer(Mo),S=new DataView(k);S.setUint32(0,Ph,!0),S.setUint32(4,Dh,!0);const _=Mo+w.byteLength+x.byteLength+y.byteLength+d.byteLength;S.setUint32(8,_,!0),new Blob([k,w,x,y,d],{type:"application/octet-stream"}).arrayBuffer().then(n)}):a.buffers&&a.buffers.length>0?To(u).then(p=>{a.buffers[0].uri=p,n(a)}):n(a)}serializeUserData(e,n){if(Object.keys(e.userData).length===0)return;const r=this.options,i=this.extensionsUsed;try{const o=JSON.parse(JSON.stringify(e.userData));if(r.includeCustomExtensions&&o.gltfExtensions){n.extensions===void 0&&(n.extensions={});for(const a in o.gltfExtensions)n.extensions[a]=o.gltfExtensions[a],i[a]=!0;delete o.gltfExtensions}Object.keys(o).length>0&&(n.extras=o)}catch(o){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+o.message)}}getUID(e,n=!1){if(this.uids.has(e)===!1){const r=new Map;r.set(!0,this.uid++),r.set(!1,this.uid++),this.uids.set(e,r)}return this.uids.get(e).get(n)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;const n=new ae;for(let r=0,i=e.count;r5e-4)return!1;return!0}createNormalizedNormalAttribute(e){const n=this.cache;if(n.attributesNormalized.has(e))return n.attributesNormalized.get(e);const r=e.clone(),i=new ae;for(let o=0,a=r.count;o4?y=e.array[p*e.itemSize+d]:(d===0?y=e.getX(p):d===1?y=e.getY(p):d===2?y=e.getZ(p):d===3&&(y=e.getW(p)),e.normalized===!0&&(y=Dt.normalize(y,e.array))),n===pe.FLOAT?u.setFloat32(c,y,!0):n===pe.INT?u.setInt32(c,y,!0):n===pe.UNSIGNED_INT?u.setUint32(c,y,!0):n===pe.SHORT?u.setInt16(c,y,!0):n===pe.UNSIGNED_SHORT?u.setUint16(c,y,!0):n===pe.BYTE?u.setInt8(c,y):n===pe.UNSIGNED_BYTE&&u.setUint8(c,y),c+=s}const f={buffer:this.processBuffer(u.buffer),byteOffset:this.byteOffset,byteLength:l};return o!==void 0&&(f.target=o),o===pe.ARRAY_BUFFER&&(f.byteStride=e.itemSize*s),this.byteOffset+=l,a.bufferViews.push(f),{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){const n=this,r=n.json;return r.bufferViews||(r.bufferViews=[]),e.arrayBuffer().then(i=>{const o=Mr(i),a={buffer:n.processBuffer(o),byteOffset:n.byteOffset,byteLength:o.byteLength};return n.byteOffset+=o.byteLength,r.bufferViews.push(a)-1})}processAccessor(e,n,r,i){const o=this.json,a={1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"};let s;if(e.array.constructor===Float32Array)s=pe.FLOAT;else if(e.array.constructor===Int32Array)s=pe.INT;else if(e.array.constructor===Uint32Array)s=pe.UNSIGNED_INT;else if(e.array.constructor===Int16Array)s=pe.SHORT;else if(e.array.constructor===Uint16Array)s=pe.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)s=pe.BYTE;else if(e.array.constructor===Uint8Array)s=pe.UNSIGNED_BYTE;else throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+e.array.constructor.name);if(r===void 0&&(r=0),i===void 0&&(i=e.count),i===0)return null;const l=Uh(e,r,i);let u;n!==void 0&&(u=e===n.index?pe.ELEMENT_ARRAY_BUFFER:pe.ARRAY_BUFFER);const c=this.processBufferView(e,s,r,i,u),f={bufferView:c.id,byteOffset:c.byteOffset,componentType:s,count:i,max:l.max,min:l.min,type:a[e.itemSize]};return e.normalized===!0&&(f.normalized=!0),o.accessors||(o.accessors=[]),o.accessors.push(f)-1}processImage(e,n,r,i="image/png"){if(e!==null){const o=this,a=o.cache,s=o.json,l=o.options,u=o.pending;a.images.has(e)||a.images.set(e,{});const c=a.images.get(e),f=i+":flipY/"+r.toString();if(c[f]!==void 0)return c[f];s.images||(s.images=[]);const p={mimeType:i},d=So();d.width=Math.min(e.width,l.maxTextureSize),d.height=Math.min(e.height,l.maxTextureSize);const y=d.getContext("2d");if(r===!0&&(y.translate(0,d.height),y.scale(1,-1)),e.data!==void 0){n!==Lr&&console.error("GLTFExporter: Only RGBAFormat is supported.",n),(e.width>l.maxTextureSize||e.height>l.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);const w=new Uint8ClampedArray(e.height*e.width*4);for(let k=0;ko.processBufferViewImage(w)).then(w=>{p.bufferView=w})):d.toDataURL!==void 0?p.uri=d.toDataURL(i):u.push(Io(d,i).then(To).then(w=>{p.uri=w}));const x=s.images.push(p)-1;return c[f]=x,x}else throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){const n=this.json;n.samplers||(n.samplers=[]);const r={magFilter:et[e.magFilter],minFilter:et[e.minFilter],wrapS:et[e.wrapS],wrapT:et[e.wrapT]};return n.samplers.push(r)-1}processTexture(e){const n=this.options,r=this.cache,i=this.json;if(r.textures.has(e))return r.textures.get(e);i.textures||(i.textures=[]),e instanceof ir&&(e=_r(e,n.maxTextureSize));let o=e.userData.mimeType;o==="image/webp"&&(o="image/png");const a={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,o)};e.name&&(a.name=e.name),this._invokeAll(function(l){l.writeTexture&&l.writeTexture(e,a)});const s=i.textures.push(a)-1;return r.textures.set(e,s),s}processMaterial(e){const n=this.cache,r=this.json;if(n.materials.has(e))return n.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;r.materials||(r.materials=[]);const i={pbrMetallicRoughness:{}};e.isMeshStandardMaterial!==!0&&e.isMeshBasicMaterial!==!0&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const o=e.color.toArray().concat([e.opacity]);if(un(o,[1,1,1,1])||(i.pbrMetallicRoughness.baseColorFactor=o),e.isMeshStandardMaterial?(i.pbrMetallicRoughness.metallicFactor=e.metalness,i.pbrMetallicRoughness.roughnessFactor=e.roughness):(i.pbrMetallicRoughness.metallicFactor=.5,i.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){const s=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),l={index:this.processTexture(s),channel:s.channel};this.applyTextureTransform(l,s),i.pbrMetallicRoughness.metallicRoughnessTexture=l}if(e.map){const s={index:this.processTexture(e.map),texCoord:e.map.channel};this.applyTextureTransform(s,e.map),i.pbrMetallicRoughness.baseColorTexture=s}if(e.emissive){const s=e.emissive;if(Math.max(s.r,s.g,s.b)>0&&(i.emissiveFactor=e.emissive.toArray()),e.emissiveMap){const l={index:this.processTexture(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(l,e.emissiveMap),i.emissiveTexture=l}}if(e.normalMap){const s={index:this.processTexture(e.normalMap),texCoord:e.normalMap.channel};e.normalScale&&e.normalScale.x!==1&&(s.scale=e.normalScale.x),this.applyTextureTransform(s,e.normalMap),i.normalTexture=s}if(e.aoMap){const s={index:this.processTexture(e.aoMap),texCoord:e.aoMap.channel};e.aoMapIntensity!==1&&(s.strength=e.aoMapIntensity),this.applyTextureTransform(s,e.aoMap),i.occlusionTexture=s}e.transparent?i.alphaMode="BLEND":e.alphaTest>0&&(i.alphaMode="MASK",i.alphaCutoff=e.alphaTest),e.side===qn&&(i.doubleSided=!0),e.name!==""&&(i.name=e.name),this.serializeUserData(e,i),this._invokeAll(function(s){s.writeMaterial&&s.writeMaterial(e,i)});const a=r.materials.push(i)-1;return n.materials.set(e,a),a}processMesh(e){const n=this.cache,r=this.json,i=[e.geometry.uuid];if(Array.isArray(e.material))for(let _=0,R=e.material.length;_=152?{uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3"}:{uv:"TEXCOORD_0",uv2:"TEXCOORD_1"},color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},d=a.getAttribute("normal");d!==void 0&&!this.isNormalizedNormalAttribute(d)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),a.setAttribute("normal",this.createNormalizedNormalAttribute(d)));let y=null;for(let _ in a.attributes){if(_.slice(0,5)==="morph")continue;const R=a.attributes[_];if(_=p[_]||_.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(_)||(_="_"+_),n.attributes.has(this.getUID(R))){u[_]=n.attributes.get(this.getUID(R));continue}y=null;const P=R.array;_==="JOINTS_0"&&!(P instanceof Uint16Array)&&!(P instanceof Uint8Array)&&(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),y=new Nt(new Uint16Array(P),R.itemSize,R.normalized));const h=this.processAccessor(y||R,a);h!==null&&(_.startsWith("_")||this.detectMeshQuantization(_,R),u[_]=h,n.attributes.set(this.getUID(R),h))}if(d!==void 0&&a.setAttribute("normal",d),Object.keys(u).length===0)return null;if(e.morphTargetInfluences!==void 0&&e.morphTargetInfluences.length>0){const _=[],R=[],P={};if(e.morphTargetDictionary!==void 0)for(const h in e.morphTargetDictionary)P[e.morphTargetDictionary[h]]=h;for(let h=0;h0&&(l.extras={},l.extras.targetNames=R)}const x=Array.isArray(e.material);if(x&&a.groups.length===0)return null;const w=x?e.material:[e.material],k=x?a.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let _=0,R=k.length;_0&&(P.targets=f),a.index!==null){let I=this.getUID(a.index);(k[_].start!==void 0||k[_].count!==void 0)&&(I+=":"+k[_].start+":"+k[_].count),n.attributes.has(I)?P.indices=n.attributes.get(I):(P.indices=this.processAccessor(a.index,a,k[_].start,k[_].count),n.attributes.set(I,P.indices)),P.indices===null&&delete P.indices}const h=this.processMaterial(w[k[_].materialIndex]);h!==null&&(P.material=h),c.push(P)}l.primitives=c,r.meshes||(r.meshes=[]),this._invokeAll(function(_){_.writeMesh&&_.writeMesh(e,l)});const S=r.meshes.push(l)-1;return n.meshes.set(o,S),S}detectMeshQuantization(e,n){if(this.extensionsUsed[Er])return;let r;switch(n.array.constructor){case Int8Array:r="byte";break;case Uint8Array:r="unsigned byte";break;case Int16Array:r="short";break;case Uint16Array:r="unsigned short";break;default:return}n.normalized&&(r+=" normalized");const i=e.split("_",1)[0];_o[i]&&_o[i].includes(r)&&(this.extensionsUsed[Er]=!0,this.extensionsRequired[Er]=!0)}processCamera(e){const n=this.json;n.cameras||(n.cameras=[]);const r=e.isOrthographicCamera,i={type:r?"orthographic":"perspective"};return r?i.orthographic={xmag:e.right*2,ymag:e.top*2,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:i.perspective={aspectRatio:e.aspect,yfov:Dt.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},e.name!==""&&(i.name=e.type),n.cameras.push(i)-1}processAnimation(e,n){const r=this.json,i=this.nodeMap;r.animations||(r.animations=[]),e=rs.Utils.mergeMorphTargetTracks(e.clone(),n);const o=e.tracks,a=[],s=[];for(let l=0;l0){const s=[];for(let l=0,u=e.children.length;l0&&(o.children=s)}this._invokeAll(function(s){s.writeNode&&s.writeNode(e,o)});const a=n.nodes.push(o)-1;return i.set(e,a),a}processScene(e){const n=this.json,r=this.options;n.scenes||(n.scenes=[],n.scene=0);const i={};e.name!==""&&(i.name=e.name),n.scenes.push(i);const o=[];for(let a=0,s=e.children.length;a0&&(i.nodes=o),this.serializeUserData(e,i)}processObjects(e){const n=new Pr;n.name="AuxScene";for(let r=0;r0&&this.processObjects(r);for(let i=0;i0&&(a.range=e.distance)):e.isSpotLight&&(a.type="spot",e.distance>0&&(a.range=e.distance),a.spot={},a.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,a.spot.outerConeAngle=e.angle),e.decay!==void 0&&e.decay!==2&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),e.target&&(e.target.parent!==e||e.target.position.x!==0||e.target.position.y!==0||e.target.position.z!==-1)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),o[this.name]||(i.extensions=i.extensions||{},i.extensions[this.name]={lights:[]},o[this.name]=!0);const s=i.extensions[this.name].lights;s.push(a),n.extensions=n.extensions||{},n.extensions[this.name]={light:s.length-1}}}let Hh=class{constructor(t){this.writer=t,this.name="KHR_materials_unlit"}writeMaterial(t,e){if(!t.isMeshBasicMaterial)return;const n=this.writer.extensionsUsed;e.extensions=e.extensions||{},e.extensions[this.name]={},n[this.name]=!0,e.pbrMetallicRoughness.metallicFactor=0,e.pbrMetallicRoughness.roughnessFactor=.9}},$h=class{constructor(t){this.writer=t,this.name="KHR_materials_clearcoat"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.clearcoat===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.clearcoatFactor=t.clearcoat,t.clearcoatMap){const o={index:n.processTexture(t.clearcoatMap),texCoord:t.clearcoatMap.channel};n.applyTextureTransform(o,t.clearcoatMap),i.clearcoatTexture=o}if(i.clearcoatRoughnessFactor=t.clearcoatRoughness,t.clearcoatRoughnessMap){const o={index:n.processTexture(t.clearcoatRoughnessMap),texCoord:t.clearcoatRoughnessMap.channel};n.applyTextureTransform(o,t.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=o}if(t.clearcoatNormalMap){const o={index:n.processTexture(t.clearcoatNormalMap),texCoord:t.clearcoatNormalMap.channel};n.applyTextureTransform(o,t.clearcoatNormalMap),i.clearcoatNormalTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Gh=class{constructor(t){this.writer=t,this.name="KHR_materials_iridescence"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.iridescence===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.iridescenceFactor=t.iridescence,t.iridescenceMap){const o={index:n.processTexture(t.iridescenceMap),texCoord:t.iridescenceMap.channel};n.applyTextureTransform(o,t.iridescenceMap),i.iridescenceTexture=o}if(i.iridescenceIor=t.iridescenceIOR,i.iridescenceThicknessMinimum=t.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=t.iridescenceThicknessRange[1],t.iridescenceThicknessMap){const o={index:n.processTexture(t.iridescenceThicknessMap),texCoord:t.iridescenceThicknessMap.channel};n.applyTextureTransform(o,t.iridescenceThicknessMap),i.iridescenceThicknessTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Yh=class{constructor(t){this.writer=t,this.name="KHR_materials_transmission"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.transmissionFactor=t.transmission,t.transmissionMap){const o={index:n.processTexture(t.transmissionMap),texCoord:t.transmissionMap.channel};n.applyTextureTransform(o,t.transmissionMap),i.transmissionTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Kh=class{constructor(t){this.writer=t,this.name="KHR_materials_volume"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.thicknessFactor=t.thickness,t.thicknessMap){const o={index:n.processTexture(t.thicknessMap),texCoord:t.thicknessMap.channel};n.applyTextureTransform(o,t.thicknessMap),i.thicknessTexture=o}i.attenuationDistance=t.attenuationDistance,i.attenuationColor=t.attenuationColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},qh=class{constructor(t){this.writer=t,this.name="KHR_materials_ior"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.ior===1.5)return;const n=this.writer.extensionsUsed,r={};r.ior=t.ior,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}},Wh=class{constructor(t){this.writer=t,this.name="KHR_materials_specular"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.specularIntensity===1&&t.specularColor.equals(Lh)&&!t.specularIntensityMap&&!t.specularColorTexture)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.specularIntensityMap){const o={index:n.processTexture(t.specularIntensityMap),texCoord:t.specularIntensityMap.channel};n.applyTextureTransform(o,t.specularIntensityMap),i.specularTexture=o}if(t.specularColorMap){const o={index:n.processTexture(t.specularColorMap),texCoord:t.specularColorMap.channel};n.applyTextureTransform(o,t.specularColorMap),i.specularColorTexture=o}i.specularFactor=t.specularIntensity,i.specularColorFactor=t.specularColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Xh=class{constructor(t){this.writer=t,this.name="KHR_materials_sheen"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.sheen==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.sheenRoughnessMap){const o={index:n.processTexture(t.sheenRoughnessMap),texCoord:t.sheenRoughnessMap.channel};n.applyTextureTransform(o,t.sheenRoughnessMap),i.sheenRoughnessTexture=o}if(t.sheenColorMap){const o={index:n.processTexture(t.sheenColorMap),texCoord:t.sheenColorMap.channel};n.applyTextureTransform(o,t.sheenColorMap),i.sheenColorTexture=o}i.sheenRoughnessFactor=t.sheenRoughness,i.sheenColorFactor=t.sheenColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Zh=class{constructor(t){this.writer=t,this.name="KHR_materials_anisotropy"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.anisotropy==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.anisotropyMap){const o={index:n.processTexture(t.anisotropyMap)};n.applyTextureTransform(o,t.anisotropyMap),i.anisotropyTexture=o}i.anisotropyStrength=t.anisotropy,i.anisotropyRotation=t.anisotropyRotation,e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Qh=class{constructor(t){this.writer=t,this.name="KHR_materials_emissive_strength"}writeMaterial(t,e){if(!t.isMeshStandardMaterial||t.emissiveIntensity===1)return;const n=this.writer.extensionsUsed,r={};r.emissiveStrength=t.emissiveIntensity,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}};var wn=Uint8Array,os=Uint16Array,Jh=Uint32Array,em=new wn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),tm=new wn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),as=function(t,e){for(var n=new os(31),r=0;r<31;++r)n[r]=e+=1<>>1|(Ne&21845)<<1;Tt=(Tt&52428)>>>2|(Tt&13107)<<2,Tt=(Tt&61680)>>>4|(Tt&3855)<<4,im[Ne]=((Tt&65280)>>>8|(Tt&255)<<8)>>>1}var Jn=new wn(288);for(var Ne=0;Ne<144;++Ne)Jn[Ne]=8;for(var Ne=144;Ne<256;++Ne)Jn[Ne]=9;for(var Ne=256;Ne<280;++Ne)Jn[Ne]=7;for(var Ne=280;Ne<288;++Ne)Jn[Ne]=8;var om=new wn(32);for(var Ne=0;Ne<32;++Ne)om[Ne]=5;var am=new wn(0),sm=typeof TextDecoder<"u"&&new TextDecoder,lm=0;try{sm.decode(am,{stream:!0}),lm=1}catch{}var um=Object.defineProperty,cm=(t,e,n)=>e in t?um(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fm=(t,e,n)=>(cm(t,e+"",n),n);const ls=class extends Pt{constructor(t,e={}){super(t),this.isReflector=!0,this.type="Reflector",this.camera=new Mt;const n=this,r=e.color!==void 0?new ze(e.color):new ze(8355711),i=e.textureWidth||512,o=e.textureHeight||512,a=e.clipBias||0,s=e.shader||ls.ReflectorShader,l=e.multisample!==void 0?e.multisample:4,u=new oa,c=new ae,f=new ae,p=new ae,d=new vt,y=new ae(0,0,-1),x=new At,w=new ae,k=new ae,S=new At,_=new vt,R=this.camera,P=new ll(i,o,{samples:l,type:ul}),h=new yn({uniforms:ai.clone(s.uniforms),fragmentShader:s.fragmentShader,vertexShader:s.vertexShader});h.uniforms.tDiffuse.value=P.texture,h.uniforms.color.value=r,h.uniforms.textureMatrix.value=_,this.material=h,this.onBeforeRender=function(I,v,g){if(f.setFromMatrixPosition(n.matrixWorld),p.setFromMatrixPosition(g.matrixWorld),d.extractRotation(n.matrixWorld),c.set(0,0,1),c.applyMatrix4(d),w.subVectors(f,p),w.dot(c)>0)return;w.reflect(c).negate(),w.add(f),d.extractRotation(g.matrixWorld),y.set(0,0,-1),y.applyMatrix4(d),y.add(p),k.subVectors(f,y),k.reflect(c).negate(),k.add(f),R.position.copy(w),R.up.set(0,1,0),R.up.applyMatrix4(d),R.up.reflect(c),R.lookAt(k),R.far=g.far,R.updateMatrixWorld(),R.projectionMatrix.copy(g.projectionMatrix),_.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),_.multiply(R.projectionMatrix),_.multiply(R.matrixWorldInverse),_.multiply(n.matrixWorld),u.setFromNormalAndCoplanarPoint(c,f),u.applyMatrix4(R.matrixWorldInverse),x.set(u.normal.x,u.normal.y,u.normal.z,u.constant);const m=R.projectionMatrix;S.x=(Math.sign(x.x)+m.elements[8])/m.elements[0],S.y=(Math.sign(x.y)+m.elements[9])/m.elements[5],S.z=-1,S.w=(1+m.elements[10])/m.elements[14],x.multiplyScalar(2/x.dot(S)),m.elements[2]=x.x,m.elements[6]=x.y,m.elements[10]=x.z+1-a,m.elements[14]=x.w,n.visible=!1;const T=I.getRenderTarget(),M=I.xr.enabled,F=I.shadowMap.autoUpdate,j=I.toneMapping;let D=!1;"outputColorSpace"in I?D=I.outputColorSpace==="srgb":D=I.outputEncoding===3001,I.xr.enabled=!1,I.shadowMap.autoUpdate=!1,"outputColorSpace"in I?I.outputColorSpace="srgb-linear":I.outputEncoding=3e3,I.toneMapping=cl,I.setRenderTarget(P),I.state.buffers.depth.setMask(!0),I.autoClear===!1&&I.clear(),I.render(v,R),I.xr.enabled=M,I.shadowMap.autoUpdate=F,I.toneMapping=j,"outputColorSpace"in I?I.outputColorSpace=D?"srgb":"srgb-linear":I.outputEncoding=D?3001:3e3,I.setRenderTarget(T);const B=g.viewport;B!==void 0&&I.state.viewport(B),n.visible=!0},this.getRenderTarget=function(){return P},this.dispose=function(){P.dispose(),n.material.dispose()}}};let qr=ls;fm(qr,"ReflectorShader",{uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:` + `})),zt.uniforms.blitTexture.value=t,zt.defines.IS_SRGB="colorSpace"in t?t.colorSpace==="srgb":t.encoding===3001,zt.needsUpdate=!0,Cn||(Cn=new Pt(Tr,zt),Cn.frustrumCulled=!1);const r=new Mt,i=new Pr;i.add(Cn),n||(n=Rn=new hl({antialias:!1})),n.setSize(Math.min(t.image.width,e),Math.min(t.image.height,e)),n.clear(),n.render(i,r);const o=new jn(n.domElement);return o.minFilter=t.minFilter,o.magFilter=t.magFilter,o.wrapS=t.wrapS,o.wrapT=t.wrapT,o.name=t.name,Rn&&(Rn.dispose(),Rn=null),o}const _o={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]};class rs{constructor(){this.pluginCallbacks=[],this.register(function(e){return new Hh(e)}),this.register(function(e){return new $h(e)}),this.register(function(e){return new Kh(e)}),this.register(function(e){return new qh(e)}),this.register(function(e){return new Wh(e)}),this.register(function(e){return new Xh(e)}),this.register(function(e){return new Gh(e)}),this.register(function(e){return new Yh(e)}),this.register(function(e){return new Zh(e)}),this.register(function(e){return new Qh(e)}),this.register(function(e){return new Jh(e)})}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,n,r,i){const o=new Vh,a=[];for(let s=0,l=this.pluginCallbacks.length;st.times[t.times.length-1]){if(Math.abs(t.times[t.times.length-1]-e)<.001)return t.times.length-1;r[r.length-1]=e,r.set(t.times,0),i.set(t.values,0),i.set(o.evaluate(e),t.values.length),a=r.length-1}else for(let s=0;se){r.set(t.times.slice(0,s+1),0),r[s+1]=e,r.set(t.times.slice(s+1),s+2),i.set(t.values.slice(0,(s+1)*n),0),i.set(o.evaluate(e),(s+1)*n),i.set(t.values.slice((s+1)*n),(s+2)*n),a=s+1;break}}return t.times=r,t.values=i,a},mergeMorphTargetTracks:function(t,e){const n=[],r={},i=t.tracks;for(let o=0;o4?a=t.array[i*t.itemSize+o]:(o===0?a=t.getX(i):o===1?a=t.getY(i):o===2?a=t.getZ(i):o===3&&(a=t.getW(i)),t.normalized===!0&&(a=Dt.normalize(a,t.array))),r.min[o]=Math.min(r.min[o],a),r.max[o]=Math.max(r.max[o],a)}return r}function is(t){return Math.ceil(t/4)*4}function Mr(t,e=0){const n=is(t.byteLength);if(n!==t.byteLength){const r=new Uint8Array(n);if(r.set(new Uint8Array(t)),e!==0)for(let i=t.byteLength;i"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function Io(t,e){if(t.toBlob!==void 0)return new Promise(r=>t.toBlob(r,e));let n;return e==="image/jpeg"?n=.92:e==="image/webp"&&(n=.8),t.convertToBlob({type:e,quality:n})}class Vh{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,n,r={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},r),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);const i=this,o=i.buffers,a=i.json;r=i.options;const s=i.extensionsUsed,l=i.extensionsRequired,u=new Blob(o,{type:"application/octet-stream"}),c=Object.keys(s),f=Object.keys(l);c.length>0&&(a.extensionsUsed=c),f.length>0&&(a.extensionsRequired=f),a.buffers&&a.buffers.length>0&&(a.buffers[0].byteLength=u.size),r.binary===!0?u.arrayBuffer().then(p=>{const d=Mr(p),y=new DataView(new ArrayBuffer(Ao));y.setUint32(0,d.byteLength,!0),y.setUint32(4,Bh,!0);const x=Mr(zh(JSON.stringify(a)),32),w=new DataView(new ArrayBuffer(Ao));w.setUint32(0,x.byteLength,!0),w.setUint32(4,Fh,!0);const k=new ArrayBuffer(Mo),S=new DataView(k);S.setUint32(0,Dh,!0),S.setUint32(4,Oh,!0);const _=Mo+w.byteLength+x.byteLength+y.byteLength+d.byteLength;S.setUint32(8,_,!0),new Blob([k,w,x,y,d],{type:"application/octet-stream"}).arrayBuffer().then(n)}):a.buffers&&a.buffers.length>0?To(u).then(p=>{a.buffers[0].uri=p,n(a)}):n(a)}serializeUserData(e,n){if(Object.keys(e.userData).length===0)return;const r=this.options,i=this.extensionsUsed;try{const o=JSON.parse(JSON.stringify(e.userData));if(r.includeCustomExtensions&&o.gltfExtensions){n.extensions===void 0&&(n.extensions={});for(const a in o.gltfExtensions)n.extensions[a]=o.gltfExtensions[a],i[a]=!0;delete o.gltfExtensions}Object.keys(o).length>0&&(n.extras=o)}catch(o){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+o.message)}}getUID(e,n=!1){if(this.uids.has(e)===!1){const r=new Map;r.set(!0,this.uid++),r.set(!1,this.uid++),this.uids.set(e,r)}return this.uids.get(e).get(n)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;const n=new ae;for(let r=0,i=e.count;r5e-4)return!1;return!0}createNormalizedNormalAttribute(e){const n=this.cache;if(n.attributesNormalized.has(e))return n.attributesNormalized.get(e);const r=e.clone(),i=new ae;for(let o=0,a=r.count;o4?y=e.array[p*e.itemSize+d]:(d===0?y=e.getX(p):d===1?y=e.getY(p):d===2?y=e.getZ(p):d===3&&(y=e.getW(p)),e.normalized===!0&&(y=Dt.normalize(y,e.array))),n===pe.FLOAT?u.setFloat32(c,y,!0):n===pe.INT?u.setInt32(c,y,!0):n===pe.UNSIGNED_INT?u.setUint32(c,y,!0):n===pe.SHORT?u.setInt16(c,y,!0):n===pe.UNSIGNED_SHORT?u.setUint16(c,y,!0):n===pe.BYTE?u.setInt8(c,y):n===pe.UNSIGNED_BYTE&&u.setUint8(c,y),c+=s}const f={buffer:this.processBuffer(u.buffer),byteOffset:this.byteOffset,byteLength:l};return o!==void 0&&(f.target=o),o===pe.ARRAY_BUFFER&&(f.byteStride=e.itemSize*s),this.byteOffset+=l,a.bufferViews.push(f),{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){const n=this,r=n.json;return r.bufferViews||(r.bufferViews=[]),e.arrayBuffer().then(i=>{const o=Mr(i),a={buffer:n.processBuffer(o),byteOffset:n.byteOffset,byteLength:o.byteLength};return n.byteOffset+=o.byteLength,r.bufferViews.push(a)-1})}processAccessor(e,n,r,i){const o=this.json,a={1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"};let s;if(e.array.constructor===Float32Array)s=pe.FLOAT;else if(e.array.constructor===Int32Array)s=pe.INT;else if(e.array.constructor===Uint32Array)s=pe.UNSIGNED_INT;else if(e.array.constructor===Int16Array)s=pe.SHORT;else if(e.array.constructor===Uint16Array)s=pe.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)s=pe.BYTE;else if(e.array.constructor===Uint8Array)s=pe.UNSIGNED_BYTE;else throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+e.array.constructor.name);if(r===void 0&&(r=0),i===void 0&&(i=e.count),i===0)return null;const l=jh(e,r,i);let u;n!==void 0&&(u=e===n.index?pe.ELEMENT_ARRAY_BUFFER:pe.ARRAY_BUFFER);const c=this.processBufferView(e,s,r,i,u),f={bufferView:c.id,byteOffset:c.byteOffset,componentType:s,count:i,max:l.max,min:l.min,type:a[e.itemSize]};return e.normalized===!0&&(f.normalized=!0),o.accessors||(o.accessors=[]),o.accessors.push(f)-1}processImage(e,n,r,i="image/png"){if(e!==null){const o=this,a=o.cache,s=o.json,l=o.options,u=o.pending;a.images.has(e)||a.images.set(e,{});const c=a.images.get(e),f=i+":flipY/"+r.toString();if(c[f]!==void 0)return c[f];s.images||(s.images=[]);const p={mimeType:i},d=So();d.width=Math.min(e.width,l.maxTextureSize),d.height=Math.min(e.height,l.maxTextureSize);const y=d.getContext("2d");if(r===!0&&(y.translate(0,d.height),y.scale(1,-1)),e.data!==void 0){n!==Lr&&console.error("GLTFExporter: Only RGBAFormat is supported.",n),(e.width>l.maxTextureSize||e.height>l.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);const w=new Uint8ClampedArray(e.height*e.width*4);for(let k=0;ko.processBufferViewImage(w)).then(w=>{p.bufferView=w})):d.toDataURL!==void 0?p.uri=d.toDataURL(i):u.push(Io(d,i).then(To).then(w=>{p.uri=w}));const x=s.images.push(p)-1;return c[f]=x,x}else throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){const n=this.json;n.samplers||(n.samplers=[]);const r={magFilter:et[e.magFilter],minFilter:et[e.minFilter],wrapS:et[e.wrapS],wrapT:et[e.wrapT]};return n.samplers.push(r)-1}processTexture(e){const n=this.options,r=this.cache,i=this.json;if(r.textures.has(e))return r.textures.get(e);i.textures||(i.textures=[]),e instanceof ir&&(e=_r(e,n.maxTextureSize));let o=e.userData.mimeType;o==="image/webp"&&(o="image/png");const a={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,o)};e.name&&(a.name=e.name),this._invokeAll(function(l){l.writeTexture&&l.writeTexture(e,a)});const s=i.textures.push(a)-1;return r.textures.set(e,s),s}processMaterial(e){const n=this.cache,r=this.json;if(n.materials.has(e))return n.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;r.materials||(r.materials=[]);const i={pbrMetallicRoughness:{}};e.isMeshStandardMaterial!==!0&&e.isMeshBasicMaterial!==!0&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const o=e.color.toArray().concat([e.opacity]);if(un(o,[1,1,1,1])||(i.pbrMetallicRoughness.baseColorFactor=o),e.isMeshStandardMaterial?(i.pbrMetallicRoughness.metallicFactor=e.metalness,i.pbrMetallicRoughness.roughnessFactor=e.roughness):(i.pbrMetallicRoughness.metallicFactor=.5,i.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){const s=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),l={index:this.processTexture(s),channel:s.channel};this.applyTextureTransform(l,s),i.pbrMetallicRoughness.metallicRoughnessTexture=l}if(e.map){const s={index:this.processTexture(e.map),texCoord:e.map.channel};this.applyTextureTransform(s,e.map),i.pbrMetallicRoughness.baseColorTexture=s}if(e.emissive){const s=e.emissive;if(Math.max(s.r,s.g,s.b)>0&&(i.emissiveFactor=e.emissive.toArray()),e.emissiveMap){const l={index:this.processTexture(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(l,e.emissiveMap),i.emissiveTexture=l}}if(e.normalMap){const s={index:this.processTexture(e.normalMap),texCoord:e.normalMap.channel};e.normalScale&&e.normalScale.x!==1&&(s.scale=e.normalScale.x),this.applyTextureTransform(s,e.normalMap),i.normalTexture=s}if(e.aoMap){const s={index:this.processTexture(e.aoMap),texCoord:e.aoMap.channel};e.aoMapIntensity!==1&&(s.strength=e.aoMapIntensity),this.applyTextureTransform(s,e.aoMap),i.occlusionTexture=s}e.transparent?i.alphaMode="BLEND":e.alphaTest>0&&(i.alphaMode="MASK",i.alphaCutoff=e.alphaTest),e.side===qn&&(i.doubleSided=!0),e.name!==""&&(i.name=e.name),this.serializeUserData(e,i),this._invokeAll(function(s){s.writeMaterial&&s.writeMaterial(e,i)});const a=r.materials.push(i)-1;return n.materials.set(e,a),a}processMesh(e){const n=this.cache,r=this.json,i=[e.geometry.uuid];if(Array.isArray(e.material))for(let _=0,R=e.material.length;_=152?{uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3"}:{uv:"TEXCOORD_0",uv2:"TEXCOORD_1"},color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},d=a.getAttribute("normal");d!==void 0&&!this.isNormalizedNormalAttribute(d)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),a.setAttribute("normal",this.createNormalizedNormalAttribute(d)));let y=null;for(let _ in a.attributes){if(_.slice(0,5)==="morph")continue;const R=a.attributes[_];if(_=p[_]||_.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(_)||(_="_"+_),n.attributes.has(this.getUID(R))){u[_]=n.attributes.get(this.getUID(R));continue}y=null;const P=R.array;_==="JOINTS_0"&&!(P instanceof Uint16Array)&&!(P instanceof Uint8Array)&&(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),y=new Nt(new Uint16Array(P),R.itemSize,R.normalized));const h=this.processAccessor(y||R,a);h!==null&&(_.startsWith("_")||this.detectMeshQuantization(_,R),u[_]=h,n.attributes.set(this.getUID(R),h))}if(d!==void 0&&a.setAttribute("normal",d),Object.keys(u).length===0)return null;if(e.morphTargetInfluences!==void 0&&e.morphTargetInfluences.length>0){const _=[],R=[],P={};if(e.morphTargetDictionary!==void 0)for(const h in e.morphTargetDictionary)P[e.morphTargetDictionary[h]]=h;for(let h=0;h0&&(l.extras={},l.extras.targetNames=R)}const x=Array.isArray(e.material);if(x&&a.groups.length===0)return null;const w=x?e.material:[e.material],k=x?a.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let _=0,R=k.length;_0&&(P.targets=f),a.index!==null){let I=this.getUID(a.index);(k[_].start!==void 0||k[_].count!==void 0)&&(I+=":"+k[_].start+":"+k[_].count),n.attributes.has(I)?P.indices=n.attributes.get(I):(P.indices=this.processAccessor(a.index,a,k[_].start,k[_].count),n.attributes.set(I,P.indices)),P.indices===null&&delete P.indices}const h=this.processMaterial(w[k[_].materialIndex]);h!==null&&(P.material=h),c.push(P)}l.primitives=c,r.meshes||(r.meshes=[]),this._invokeAll(function(_){_.writeMesh&&_.writeMesh(e,l)});const S=r.meshes.push(l)-1;return n.meshes.set(o,S),S}detectMeshQuantization(e,n){if(this.extensionsUsed[Er])return;let r;switch(n.array.constructor){case Int8Array:r="byte";break;case Uint8Array:r="unsigned byte";break;case Int16Array:r="short";break;case Uint16Array:r="unsigned short";break;default:return}n.normalized&&(r+=" normalized");const i=e.split("_",1)[0];_o[i]&&_o[i].includes(r)&&(this.extensionsUsed[Er]=!0,this.extensionsRequired[Er]=!0)}processCamera(e){const n=this.json;n.cameras||(n.cameras=[]);const r=e.isOrthographicCamera,i={type:r?"orthographic":"perspective"};return r?i.orthographic={xmag:e.right*2,ymag:e.top*2,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:i.perspective={aspectRatio:e.aspect,yfov:Dt.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},e.name!==""&&(i.name=e.type),n.cameras.push(i)-1}processAnimation(e,n){const r=this.json,i=this.nodeMap;r.animations||(r.animations=[]),e=rs.Utils.mergeMorphTargetTracks(e.clone(),n);const o=e.tracks,a=[],s=[];for(let l=0;l0){const s=[];for(let l=0,u=e.children.length;l0&&(o.children=s)}this._invokeAll(function(s){s.writeNode&&s.writeNode(e,o)});const a=n.nodes.push(o)-1;return i.set(e,a),a}processScene(e){const n=this.json,r=this.options;n.scenes||(n.scenes=[],n.scene=0);const i={};e.name!==""&&(i.name=e.name),n.scenes.push(i);const o=[];for(let a=0,s=e.children.length;a0&&(i.nodes=o),this.serializeUserData(e,i)}processObjects(e){const n=new Pr;n.name="AuxScene";for(let r=0;r0&&this.processObjects(r);for(let i=0;i0&&(a.range=e.distance)):e.isSpotLight&&(a.type="spot",e.distance>0&&(a.range=e.distance),a.spot={},a.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,a.spot.outerConeAngle=e.angle),e.decay!==void 0&&e.decay!==2&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),e.target&&(e.target.parent!==e||e.target.position.x!==0||e.target.position.y!==0||e.target.position.z!==-1)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),o[this.name]||(i.extensions=i.extensions||{},i.extensions[this.name]={lights:[]},o[this.name]=!0);const s=i.extensions[this.name].lights;s.push(a),n.extensions=n.extensions||{},n.extensions[this.name]={light:s.length-1}}}let $h=class{constructor(t){this.writer=t,this.name="KHR_materials_unlit"}writeMaterial(t,e){if(!t.isMeshBasicMaterial)return;const n=this.writer.extensionsUsed;e.extensions=e.extensions||{},e.extensions[this.name]={},n[this.name]=!0,e.pbrMetallicRoughness.metallicFactor=0,e.pbrMetallicRoughness.roughnessFactor=.9}},Gh=class{constructor(t){this.writer=t,this.name="KHR_materials_clearcoat"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.clearcoat===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.clearcoatFactor=t.clearcoat,t.clearcoatMap){const o={index:n.processTexture(t.clearcoatMap),texCoord:t.clearcoatMap.channel};n.applyTextureTransform(o,t.clearcoatMap),i.clearcoatTexture=o}if(i.clearcoatRoughnessFactor=t.clearcoatRoughness,t.clearcoatRoughnessMap){const o={index:n.processTexture(t.clearcoatRoughnessMap),texCoord:t.clearcoatRoughnessMap.channel};n.applyTextureTransform(o,t.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=o}if(t.clearcoatNormalMap){const o={index:n.processTexture(t.clearcoatNormalMap),texCoord:t.clearcoatNormalMap.channel};n.applyTextureTransform(o,t.clearcoatNormalMap),i.clearcoatNormalTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Yh=class{constructor(t){this.writer=t,this.name="KHR_materials_iridescence"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.iridescence===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.iridescenceFactor=t.iridescence,t.iridescenceMap){const o={index:n.processTexture(t.iridescenceMap),texCoord:t.iridescenceMap.channel};n.applyTextureTransform(o,t.iridescenceMap),i.iridescenceTexture=o}if(i.iridescenceIor=t.iridescenceIOR,i.iridescenceThicknessMinimum=t.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=t.iridescenceThicknessRange[1],t.iridescenceThicknessMap){const o={index:n.processTexture(t.iridescenceThicknessMap),texCoord:t.iridescenceThicknessMap.channel};n.applyTextureTransform(o,t.iridescenceThicknessMap),i.iridescenceThicknessTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Kh=class{constructor(t){this.writer=t,this.name="KHR_materials_transmission"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.transmissionFactor=t.transmission,t.transmissionMap){const o={index:n.processTexture(t.transmissionMap),texCoord:t.transmissionMap.channel};n.applyTextureTransform(o,t.transmissionMap),i.transmissionTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},qh=class{constructor(t){this.writer=t,this.name="KHR_materials_volume"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.thicknessFactor=t.thickness,t.thicknessMap){const o={index:n.processTexture(t.thicknessMap),texCoord:t.thicknessMap.channel};n.applyTextureTransform(o,t.thicknessMap),i.thicknessTexture=o}i.attenuationDistance=t.attenuationDistance,i.attenuationColor=t.attenuationColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Wh=class{constructor(t){this.writer=t,this.name="KHR_materials_ior"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.ior===1.5)return;const n=this.writer.extensionsUsed,r={};r.ior=t.ior,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}},Xh=class{constructor(t){this.writer=t,this.name="KHR_materials_specular"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.specularIntensity===1&&t.specularColor.equals(Ph)&&!t.specularIntensityMap&&!t.specularColorTexture)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.specularIntensityMap){const o={index:n.processTexture(t.specularIntensityMap),texCoord:t.specularIntensityMap.channel};n.applyTextureTransform(o,t.specularIntensityMap),i.specularTexture=o}if(t.specularColorMap){const o={index:n.processTexture(t.specularColorMap),texCoord:t.specularColorMap.channel};n.applyTextureTransform(o,t.specularColorMap),i.specularColorTexture=o}i.specularFactor=t.specularIntensity,i.specularColorFactor=t.specularColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Zh=class{constructor(t){this.writer=t,this.name="KHR_materials_sheen"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.sheen==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.sheenRoughnessMap){const o={index:n.processTexture(t.sheenRoughnessMap),texCoord:t.sheenRoughnessMap.channel};n.applyTextureTransform(o,t.sheenRoughnessMap),i.sheenRoughnessTexture=o}if(t.sheenColorMap){const o={index:n.processTexture(t.sheenColorMap),texCoord:t.sheenColorMap.channel};n.applyTextureTransform(o,t.sheenColorMap),i.sheenColorTexture=o}i.sheenRoughnessFactor=t.sheenRoughness,i.sheenColorFactor=t.sheenColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Qh=class{constructor(t){this.writer=t,this.name="KHR_materials_anisotropy"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.anisotropy==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.anisotropyMap){const o={index:n.processTexture(t.anisotropyMap)};n.applyTextureTransform(o,t.anisotropyMap),i.anisotropyTexture=o}i.anisotropyStrength=t.anisotropy,i.anisotropyRotation=t.anisotropyRotation,e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Jh=class{constructor(t){this.writer=t,this.name="KHR_materials_emissive_strength"}writeMaterial(t,e){if(!t.isMeshStandardMaterial||t.emissiveIntensity===1)return;const n=this.writer.extensionsUsed,r={};r.emissiveStrength=t.emissiveIntensity,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}};var wn=Uint8Array,os=Uint16Array,em=Uint32Array,tm=new wn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),nm=new wn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),as=function(t,e){for(var n=new os(31),r=0;r<31;++r)n[r]=e+=1<>>1|(Ne&21845)<<1;Tt=(Tt&52428)>>>2|(Tt&13107)<<2,Tt=(Tt&61680)>>>4|(Tt&3855)<<4,om[Ne]=((Tt&65280)>>>8|(Tt&255)<<8)>>>1}var Jn=new wn(288);for(var Ne=0;Ne<144;++Ne)Jn[Ne]=8;for(var Ne=144;Ne<256;++Ne)Jn[Ne]=9;for(var Ne=256;Ne<280;++Ne)Jn[Ne]=7;for(var Ne=280;Ne<288;++Ne)Jn[Ne]=8;var am=new wn(32);for(var Ne=0;Ne<32;++Ne)am[Ne]=5;var sm=new wn(0),lm=typeof TextDecoder<"u"&&new TextDecoder,um=0;try{lm.decode(sm,{stream:!0}),um=1}catch{}var cm=Object.defineProperty,fm=(t,e,n)=>e in t?cm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dm=(t,e,n)=>(fm(t,e+"",n),n);const ls=class extends Pt{constructor(t,e={}){super(t),this.isReflector=!0,this.type="Reflector",this.camera=new Mt;const n=this,r=e.color!==void 0?new ze(e.color):new ze(8355711),i=e.textureWidth||512,o=e.textureHeight||512,a=e.clipBias||0,s=e.shader||ls.ReflectorShader,l=e.multisample!==void 0?e.multisample:4,u=new oa,c=new ae,f=new ae,p=new ae,d=new vt,y=new ae(0,0,-1),x=new At,w=new ae,k=new ae,S=new At,_=new vt,R=this.camera,P=new ll(i,o,{samples:l,type:ul}),h=new yn({uniforms:ai.clone(s.uniforms),fragmentShader:s.fragmentShader,vertexShader:s.vertexShader});h.uniforms.tDiffuse.value=P.texture,h.uniforms.color.value=r,h.uniforms.textureMatrix.value=_,this.material=h,this.onBeforeRender=function(I,v,g){if(f.setFromMatrixPosition(n.matrixWorld),p.setFromMatrixPosition(g.matrixWorld),d.extractRotation(n.matrixWorld),c.set(0,0,1),c.applyMatrix4(d),w.subVectors(f,p),w.dot(c)>0)return;w.reflect(c).negate(),w.add(f),d.extractRotation(g.matrixWorld),y.set(0,0,-1),y.applyMatrix4(d),y.add(p),k.subVectors(f,y),k.reflect(c).negate(),k.add(f),R.position.copy(w),R.up.set(0,1,0),R.up.applyMatrix4(d),R.up.reflect(c),R.lookAt(k),R.far=g.far,R.updateMatrixWorld(),R.projectionMatrix.copy(g.projectionMatrix),_.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),_.multiply(R.projectionMatrix),_.multiply(R.matrixWorldInverse),_.multiply(n.matrixWorld),u.setFromNormalAndCoplanarPoint(c,f),u.applyMatrix4(R.matrixWorldInverse),x.set(u.normal.x,u.normal.y,u.normal.z,u.constant);const m=R.projectionMatrix;S.x=(Math.sign(x.x)+m.elements[8])/m.elements[0],S.y=(Math.sign(x.y)+m.elements[9])/m.elements[5],S.z=-1,S.w=(1+m.elements[10])/m.elements[14],x.multiplyScalar(2/x.dot(S)),m.elements[2]=x.x,m.elements[6]=x.y,m.elements[10]=x.z+1-a,m.elements[14]=x.w,n.visible=!1;const T=I.getRenderTarget(),M=I.xr.enabled,F=I.shadowMap.autoUpdate,j=I.toneMapping;let D=!1;"outputColorSpace"in I?D=I.outputColorSpace==="srgb":D=I.outputEncoding===3001,I.xr.enabled=!1,I.shadowMap.autoUpdate=!1,"outputColorSpace"in I?I.outputColorSpace="srgb-linear":I.outputEncoding=3e3,I.toneMapping=cl,I.setRenderTarget(P),I.state.buffers.depth.setMask(!0),I.autoClear===!1&&I.clear(),I.render(v,R),I.xr.enabled=M,I.shadowMap.autoUpdate=F,I.toneMapping=j,"outputColorSpace"in I?I.outputColorSpace=D?"srgb":"srgb-linear":I.outputEncoding=D?3001:3e3,I.setRenderTarget(T);const B=g.viewport;B!==void 0&&I.state.viewport(B),n.visible=!0},this.getRenderTarget=function(){return P},this.dispose=function(){P.dispose(),n.material.dispose()}}};let qr=ls;dm(qr,"ReflectorShader",{uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:` uniform mat4 textureMatrix; varying vec4 vUv; @@ -136,7 +136,7 @@ import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sf #include #include <${Ti>=154?"colorspace_fragment":"encodings_fragment"}> - }`});var dm=Object.defineProperty,pm=(t,e,n)=>e in t?dm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,us=(t,e,n)=>(pm(t,typeof e!="symbol"?e+"":e,n),n);const er=new ta,hm=new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,1,1,0,1,1,-1,1,0,0,1]),cs=new Wo(hm,5);er.setIndex([0,1,2,0,2,3]);er.setAttribute("position",new ti(cs,3,0,!1));er.setAttribute("uv",new ti(cs,2,3,!1));const Wr=class extends Pt{constructor(){super(Wr.Geometry,new Ht({opacity:0,transparent:!0})),this.isLensflare=!0,this.type="Lensflare",this.frustumCulled=!1,this.renderOrder=1/0;const t=new ae,e=new ae,n=new Ni(new Uint8Array(16*16*3),16,16,Lr);n.minFilter=Lt,n.magFilter=Lt,n.wrapS=Vt,n.wrapT=Vt;const r=new Ni(new Uint8Array(16*16*3),16,16,Lr);r.minFilter=Lt,r.magFilter=Lt,r.wrapS=Vt,r.wrapT=Vt;const i=Wr.Geometry,o=new or({uniforms:{scale:{value:null},screenPosition:{value:null}},vertexShader:` + }`});var pm=Object.defineProperty,hm=(t,e,n)=>e in t?pm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,us=(t,e,n)=>(hm(t,typeof e!="symbol"?e+"":e,n),n);const er=new ta,mm=new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,1,1,0,1,1,-1,1,0,0,1]),cs=new Wo(mm,5);er.setIndex([0,1,2,0,2,3]);er.setAttribute("position",new ti(cs,3,0,!1));er.setAttribute("uv",new ti(cs,2,3,!1));const Wr=class extends Pt{constructor(){super(Wr.Geometry,new Ht({opacity:0,transparent:!0})),this.isLensflare=!0,this.type="Lensflare",this.frustumCulled=!1,this.renderOrder=1/0;const t=new ae,e=new ae,n=new Ni(new Uint8Array(16*16*3),16,16,Lr);n.minFilter=Lt,n.magFilter=Lt,n.wrapS=Vt,n.wrapT=Vt;const r=new Ni(new Uint8Array(16*16*3),16,16,Lr);r.minFilter=Lt,r.magFilter=Lt,r.wrapS=Vt,r.wrapT=Vt;const i=Wr.Geometry,o=new or({uniforms:{scale:{value:null},screenPosition:{value:null}},vertexShader:` precision highp float; @@ -187,7 +187,7 @@ import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sf gl_FragColor = texture2D( map, vUV ); - }`,depthTest:!1,depthWrite:!1,transparent:!1}),s=new Pt(i,o),l=[],u=fs.Shader,c=new or({uniforms:{map:{value:null},occlusionMap:{value:r},color:{value:new ze(16777215)},scale:{value:new Pe},screenPosition:{value:new ae}},vertexShader:u.vertexShader,fragmentShader:u.fragmentShader,blending:fl,transparent:!0,depthWrite:!1}),f=new Pt(i,c);this.addElement=function(w){l.push(w)};const p=new Pe,d=new Pe,y=new dl,x=new At;this.onBeforeRender=function(w,k,S){w.getCurrentViewport(x);const _=x.w/x.z,R=x.z/2,P=x.w/2;let h=16/x.w;if(p.set(h*_,h),y.min.set(x.x,x.y),y.max.set(x.x+(x.z-16),x.y+(x.w-16)),e.setFromMatrixPosition(this.matrixWorld),e.applyMatrix4(S.matrixWorldInverse),!(e.z>0)&&(t.copy(e).applyMatrix4(S.projectionMatrix),d.x=x.x+t.x*R+R-8,d.y=x.y+t.y*P+P-8,y.containsPoint(d))){w.copyFramebufferToTexture(d,n);let I=o.uniforms;I.scale.value=p,I.screenPosition.value=t,w.renderBufferDirect(S,null,i,o,s,null),w.copyFramebufferToTexture(d,r),I=a.uniforms,I.scale.value=p,I.screenPosition.value=t,w.renderBufferDirect(S,null,i,a,s,null);const v=-t.x*2,g=-t.y*2;for(let m=0,T=l.length;m0)&&(t.copy(e).applyMatrix4(S.projectionMatrix),d.x=x.x+t.x*R+R-8,d.y=x.y+t.y*P+P-8,y.containsPoint(d))){w.copyFramebufferToTexture(d,n);let I=o.uniforms;I.scale.value=p,I.screenPosition.value=t,w.renderBufferDirect(S,null,i,o,s,null),w.copyFramebufferToTexture(d,r),I=a.uniforms,I.scale.value=p,I.screenPosition.value=t,w.renderBufferDirect(S,null,i,a,s,null);const v=-t.x*2,g=-t.y*2;for(let m=0,T=l.length;me in t?gm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ds=(t,e,n)=>(ym(t,typeof e!="symbol"?e+"":e,n),n);const Fn={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new ae},up:{value:new ae(0,1,0)}},vertexShader:` + }`});var ym=Object.defineProperty,xm=(t,e,n)=>e in t?ym(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ds=(t,e,n)=>(xm(t,typeof e!="symbol"?e+"":e,n),n);const Fn={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new ae},up:{value:new ae(0,1,0)}},vertexShader:` uniform vec3 sunPosition; uniform float rayleigh; uniform float turbidity; @@ -398,8 +398,8 @@ import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sf #include <${Ti>=154?"colorspace_fragment":"encodings_fragment"}> } - `},ps=new yn({name:"SkyShader",fragmentShader:Fn.fragmentShader,vertexShader:Fn.vertexShader,uniforms:ai.clone(Fn.uniforms),side:Zs,depthWrite:!1});class hs extends Pt{constructor(){super(new sl(1,1,1),ps)}}ds(hs,"SkyShader",Fn);ds(hs,"material",ps);new Qs;new ae;new aa(0,0,0,"YXZ");new ae;var xm=Object.defineProperty,vm=(t,e,n)=>e in t?xm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,te=(t,e,n)=>(vm(t,typeof e!="symbol"?e+"":e,n),n);const Nn=new Xs,Ro=new oa,bm=Math.cos(70*(Math.PI/180)),Co=(t,e)=>(t%e+e)%e;class wm extends Ws{constructor(e,n){super(),te(this,"object"),te(this,"domElement"),te(this,"enabled",!0),te(this,"target",new ae),te(this,"minDistance",0),te(this,"maxDistance",1/0),te(this,"minZoom",0),te(this,"maxZoom",1/0),te(this,"minPolarAngle",0),te(this,"maxPolarAngle",Math.PI),te(this,"minAzimuthAngle",-1/0),te(this,"maxAzimuthAngle",1/0),te(this,"enableDamping",!1),te(this,"dampingFactor",.05),te(this,"enableZoom",!0),te(this,"zoomSpeed",1),te(this,"enableRotate",!0),te(this,"rotateSpeed",1),te(this,"enablePan",!0),te(this,"panSpeed",1),te(this,"screenSpacePanning",!0),te(this,"keyPanSpeed",7),te(this,"zoomToCursor",!1),te(this,"autoRotate",!1),te(this,"autoRotateSpeed",2),te(this,"reverseOrbit",!1),te(this,"reverseHorizontalOrbit",!1),te(this,"reverseVerticalOrbit",!1),te(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),te(this,"mouseButtons",{LEFT:yt.ROTATE,MIDDLE:yt.DOLLY,RIGHT:yt.PAN}),te(this,"touches",{ONE:_t.ROTATE,TWO:_t.DOLLY_PAN}),te(this,"target0"),te(this,"position0"),te(this,"zoom0"),te(this,"_domElementKeyEvents",null),te(this,"getPolarAngle"),te(this,"getAzimuthalAngle"),te(this,"setPolarAngle"),te(this,"setAzimuthalAngle"),te(this,"getDistance"),te(this,"getZoomScale"),te(this,"listenToKeyEvents"),te(this,"stopListenToKeyEvents"),te(this,"saveState"),te(this,"reset"),te(this,"update"),te(this,"connect"),te(this,"dispose"),te(this,"dollyIn"),te(this,"dollyOut"),te(this,"getScale"),te(this,"setScale"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=L=>{let Y=Co(L,2*Math.PI),Z=c.phi;Z<0&&(Z+=2*Math.PI),Y<0&&(Y+=2*Math.PI);let Ee=Math.abs(Y-Z);2*Math.PI-Ee{let Y=Co(L,2*Math.PI),Z=c.theta;Z<0&&(Z+=2*Math.PI),Y<0&&(Y+=2*Math.PI);let Ee=Math.abs(Y-Z);2*Math.PI-Eer.object.position.distanceTo(r.target),this.listenToKeyEvents=L=>{L.addEventListener("keydown",ne),this._domElementKeyEvents=L},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ne),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(i),r.update(),l=s.NONE},this.update=(()=>{const L=new ae,Y=new ae(0,1,0),Z=new Bn().setFromUnitVectors(e.up,Y),Ee=Z.clone().invert(),Ze=new ae,ot=new Bn,Tn=2*Math.PI;return function(){const Mi=r.object.position;Z.setFromUnitVectors(e.up,Y),Ee.copy(Z).invert(),L.copy(Mi).sub(r.target),L.applyQuaternion(Z),c.setFromVector3(L),r.autoRotate&&l===s.NONE&&j(M()),r.enableDamping?(c.theta+=f.theta*r.dampingFactor,c.phi+=f.phi*r.dampingFactor):(c.theta+=f.theta,c.phi+=f.phi);let ht=r.minAzimuthAngle,mt=r.maxAzimuthAngle;isFinite(ht)&&isFinite(mt)&&(ht<-Math.PI?ht+=Tn:ht>Math.PI&&(ht-=Tn),mt<-Math.PI?mt+=Tn:mt>Math.PI&&(mt-=Tn),ht<=mt?c.theta=Math.max(ht,Math.min(mt,c.theta)):c.theta=c.theta>(ht+mt)/2?Math.max(ht,c.theta):Math.min(mt,c.theta)),c.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,c.phi)),c.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(d,r.dampingFactor):r.target.add(d),r.zoomToCursor&&g||r.object.isOrthographicCamera?c.radius=C(c.radius):c.radius=C(c.radius*p),L.setFromSpherical(c),L.applyQuaternion(Ee),Mi.copy(r.target).add(L),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(f.theta*=1-r.dampingFactor,f.phi*=1-r.dampingFactor,d.multiplyScalar(1-r.dampingFactor)):(f.set(0,0,0),d.set(0,0,0));let tn=!1;if(r.zoomToCursor&&g){let nn=null;if(r.object instanceof Mt&&r.object.isPerspectiveCamera){const rn=L.length();nn=C(rn*p);const _n=rn-nn;r.object.position.addScaledVector(I,_n),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const rn=new ae(v.x,v.y,0);rn.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/p)),r.object.updateProjectionMatrix(),tn=!0;const _n=new ae(v.x,v.y,0);_n.unproject(r.object),r.object.position.sub(_n).add(rn),r.object.updateMatrixWorld(),nn=L.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;nn!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar(nn).add(r.object.position):(Nn.origin.copy(r.object.position),Nn.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(Nn.direction))u||8*(1-ot.dot(r.object.quaternion))>u?(r.dispatchEvent(i),Ze.copy(r.object.position),ot.copy(r.object.quaternion),tn=!1,!0):!1}})(),this.connect=L=>{r.domElement=L,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",Ve),r.domElement.addEventListener("pointerdown",Ae),r.domElement.addEventListener("pointercancel",tt),r.domElement.addEventListener("wheel",q)},this.dispose=()=>{var L,Y,Z,Ee,Ze,ot;r.domElement&&(r.domElement.style.touchAction="auto"),(L=r.domElement)==null||L.removeEventListener("contextmenu",Ve),(Y=r.domElement)==null||Y.removeEventListener("pointerdown",Ae),(Z=r.domElement)==null||Z.removeEventListener("pointercancel",tt),(Ee=r.domElement)==null||Ee.removeEventListener("wheel",q),(Ze=r.domElement)==null||Ze.ownerDocument.removeEventListener("pointermove",je),(ot=r.domElement)==null||ot.ownerDocument.removeEventListener("pointerup",tt),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",ne)};const r=this,i={type:"change"},o={type:"start"},a={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=s.NONE;const u=1e-6,c=new Ci,f=new Ci;let p=1;const d=new ae,y=new Pe,x=new Pe,w=new Pe,k=new Pe,S=new Pe,_=new Pe,R=new Pe,P=new Pe,h=new Pe,I=new ae,v=new Pe;let g=!1;const m=[],T={};function M(){return 2*Math.PI/60/60*r.autoRotateSpeed}function F(){return Math.pow(.95,r.zoomSpeed)}function j(L){r.reverseOrbit||r.reverseHorizontalOrbit?f.theta+=L:f.theta-=L}function D(L){r.reverseOrbit||r.reverseVerticalOrbit?f.phi+=L:f.phi-=L}const B=(()=>{const L=new ae;return function(Y,Z){L.setFromMatrixColumn(Z,0),L.multiplyScalar(-Y),d.add(L)}})(),X=(()=>{const L=new ae;return function(Y,Z){r.screenSpacePanning===!0?L.setFromMatrixColumn(Z,1):(L.setFromMatrixColumn(Z,0),L.crossVectors(r.object.up,L)),L.multiplyScalar(Y),d.add(L)}})(),re=(()=>{const L=new ae;return function(Y,Z){const Ee=r.domElement;if(Ee&&r.object instanceof Mt&&r.object.isPerspectiveCamera){const Ze=r.object.position;L.copy(Ze).sub(r.target);let ot=L.length();ot*=Math.tan(r.object.fov/2*Math.PI/180),B(2*Y*ot/Ee.clientHeight,r.object.matrix),X(2*Z*ot/Ee.clientHeight,r.object.matrix)}else Ee&&r.object instanceof $t&&r.object.isOrthographicCamera?(B(Y*(r.object.right-r.object.left)/r.object.zoom/Ee.clientWidth,r.object.matrix),X(Z*(r.object.top-r.object.bottom)/r.object.zoom/Ee.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function Q(L){r.object instanceof Mt&&r.object.isPerspectiveCamera||r.object instanceof $t&&r.object.isOrthographicCamera?p=L:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function E(L){Q(p/L)}function oe(L){Q(p*L)}function Me(L){if(!r.zoomToCursor||!r.domElement)return;g=!0;const Y=r.domElement.getBoundingClientRect(),Z=L.clientX-Y.left,Ee=L.clientY-Y.top,Ze=Y.width,ot=Y.height;v.x=Z/Ze*2-1,v.y=-(Ee/ot)*2+1,I.set(v.x,v.y,1).unproject(r.object).sub(r.object.position).normalize()}function C(L){return Math.max(r.minDistance,Math.min(r.maxDistance,L))}function he(L){y.set(L.clientX,L.clientY)}function we(L){Me(L),R.set(L.clientX,L.clientY)}function me(L){k.set(L.clientX,L.clientY)}function Oe(L){x.set(L.clientX,L.clientY),w.subVectors(x,y).multiplyScalar(r.rotateSpeed);const Y=r.domElement;Y&&(j(2*Math.PI*w.x/Y.clientHeight),D(2*Math.PI*w.y/Y.clientHeight)),y.copy(x),r.update()}function $(L){P.set(L.clientX,L.clientY),h.subVectors(P,R),h.y>0?E(F()):h.y<0&&oe(F()),R.copy(P),r.update()}function b(L){S.set(L.clientX,L.clientY),_.subVectors(S,k).multiplyScalar(r.panSpeed),re(_.x,_.y),k.copy(S),r.update()}function A(L){Me(L),L.deltaY<0?oe(F()):L.deltaY>0&&E(F()),r.update()}function N(L){let Y=!1;switch(L.code){case r.keys.UP:re(0,r.keyPanSpeed),Y=!0;break;case r.keys.BOTTOM:re(0,-r.keyPanSpeed),Y=!0;break;case r.keys.LEFT:re(r.keyPanSpeed,0),Y=!0;break;case r.keys.RIGHT:re(-r.keyPanSpeed,0),Y=!0;break}Y&&(L.preventDefault(),r.update())}function V(){if(m.length==1)y.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),Y=.5*(m[0].pageY+m[1].pageY);y.set(L,Y)}}function z(){if(m.length==1)k.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),Y=.5*(m[0].pageY+m[1].pageY);k.set(L,Y)}}function K(){const L=m[0].pageX-m[1].pageX,Y=m[0].pageY-m[1].pageY,Z=Math.sqrt(L*L+Y*Y);R.set(0,Z)}function ee(){r.enableZoom&&K(),r.enablePan&&z()}function ge(){r.enableZoom&&K(),r.enableRotate&&V()}function ke(L){if(m.length==1)x.set(L.pageX,L.pageY);else{const Z=pt(L),Ee=.5*(L.pageX+Z.x),Ze=.5*(L.pageY+Z.y);x.set(Ee,Ze)}w.subVectors(x,y).multiplyScalar(r.rotateSpeed);const Y=r.domElement;Y&&(j(2*Math.PI*w.x/Y.clientHeight),D(2*Math.PI*w.y/Y.clientHeight)),y.copy(x)}function fe(L){if(m.length==1)S.set(L.pageX,L.pageY);else{const Y=pt(L),Z=.5*(L.pageX+Y.x),Ee=.5*(L.pageY+Y.y);S.set(Z,Ee)}_.subVectors(S,k).multiplyScalar(r.panSpeed),re(_.x,_.y),k.copy(S)}function ye(L){const Y=pt(L),Z=L.pageX-Y.x,Ee=L.pageY-Y.y,Ze=Math.sqrt(Z*Z+Ee*Ee);P.set(0,Ze),h.set(0,Math.pow(P.y/R.y,r.zoomSpeed)),E(h.y),R.copy(P)}function Ie(L){r.enableZoom&&ye(L),r.enablePan&&fe(L)}function be(L){r.enableZoom&&ye(L),r.enableRotate&&ke(L)}function Ae(L){var Y,Z;r.enabled!==!1&&(m.length===0&&((Y=r.domElement)==null||Y.ownerDocument.addEventListener("pointermove",je),(Z=r.domElement)==null||Z.ownerDocument.addEventListener("pointerup",tt)),dt(L),L.pointerType==="touch"?ue(L):en(L))}function je(L){r.enabled!==!1&&(L.pointerType==="touch"?xe(L):U(L))}function tt(L){var Y,Z,Ee;it(L),m.length===0&&((Y=r.domElement)==null||Y.releasePointerCapture(L.pointerId),(Z=r.domElement)==null||Z.ownerDocument.removeEventListener("pointermove",je),(Ee=r.domElement)==null||Ee.ownerDocument.removeEventListener("pointerup",tt)),r.dispatchEvent(a),l=s.NONE}function en(L){let Y;switch(L.button){case 0:Y=r.mouseButtons.LEFT;break;case 1:Y=r.mouseButtons.MIDDLE;break;case 2:Y=r.mouseButtons.RIGHT;break;default:Y=-1}switch(Y){case yt.DOLLY:if(r.enableZoom===!1)return;we(L),l=s.DOLLY;break;case yt.ROTATE:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enablePan===!1)return;me(L),l=s.PAN}else{if(r.enableRotate===!1)return;he(L),l=s.ROTATE}break;case yt.PAN:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enableRotate===!1)return;he(L),l=s.ROTATE}else{if(r.enablePan===!1)return;me(L),l=s.PAN}break;default:l=s.NONE}l!==s.NONE&&r.dispatchEvent(o)}function U(L){if(r.enabled!==!1)switch(l){case s.ROTATE:if(r.enableRotate===!1)return;Oe(L);break;case s.DOLLY:if(r.enableZoom===!1)return;$(L);break;case s.PAN:if(r.enablePan===!1)return;b(L);break}}function q(L){r.enabled===!1||r.enableZoom===!1||l!==s.NONE&&l!==s.ROTATE||(L.preventDefault(),r.dispatchEvent(o),A(L),r.dispatchEvent(a))}function ne(L){r.enabled===!1||r.enablePan===!1||N(L)}function ue(L){switch(bt(L),m.length){case 1:switch(r.touches.ONE){case _t.ROTATE:if(r.enableRotate===!1)return;V(),l=s.TOUCH_ROTATE;break;case _t.PAN:if(r.enablePan===!1)return;z(),l=s.TOUCH_PAN;break;default:l=s.NONE}break;case 2:switch(r.touches.TWO){case _t.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;ee(),l=s.TOUCH_DOLLY_PAN;break;case _t.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;ge(),l=s.TOUCH_DOLLY_ROTATE;break;default:l=s.NONE}break;default:l=s.NONE}l!==s.NONE&&r.dispatchEvent(o)}function xe(L){switch(bt(L),l){case s.TOUCH_ROTATE:if(r.enableRotate===!1)return;ke(L),r.update();break;case s.TOUCH_PAN:if(r.enablePan===!1)return;fe(L),r.update();break;case s.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Ie(L),r.update();break;case s.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;be(L),r.update();break;default:l=s.NONE}}function Ve(L){r.enabled!==!1&&L.preventDefault()}function dt(L){m.push(L)}function it(L){delete T[L.pointerId];for(let Y=0;Y{oe(L),r.update()},this.dollyOut=(L=F())=>{E(L),r.update()},this.getScale=()=>p,this.setScale=L=>{Q(L),r.update()},this.getZoomScale=()=>F(),n!==void 0&&this.connect(n),this.update()}}new vt;new ae;new aa;new ae;var km=Object.defineProperty,Tm=(t,e,n)=>e in t?km(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_i=(t,e,n)=>(Tm(t,typeof e!="symbol"?e+"":e,n),n);class ms{constructor(e){_i(this,"data"),this.data=e}generateShapes(e,n=100,r){const i=[],o={letterSpacing:0,lineHeight:1,...r},a=_m(e,n,this.data,o);for(let s=0,l=a.length;s + `},ps=new yn({name:"SkyShader",fragmentShader:Fn.fragmentShader,vertexShader:Fn.vertexShader,uniforms:ai.clone(Fn.uniforms),side:Zs,depthWrite:!1});class hs extends Pt{constructor(){super(new sl(1,1,1),ps)}}ds(hs,"SkyShader",Fn);ds(hs,"material",ps);new Qs;new ae;new aa(0,0,0,"YXZ");new ae;var vm=Object.defineProperty,bm=(t,e,n)=>e in t?vm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,te=(t,e,n)=>(bm(t,typeof e!="symbol"?e+"":e,n),n);const Nn=new Xs,Ro=new oa,wm=Math.cos(70*(Math.PI/180)),Co=(t,e)=>(t%e+e)%e;class km extends Ws{constructor(e,n){super(),te(this,"object"),te(this,"domElement"),te(this,"enabled",!0),te(this,"target",new ae),te(this,"minDistance",0),te(this,"maxDistance",1/0),te(this,"minZoom",0),te(this,"maxZoom",1/0),te(this,"minPolarAngle",0),te(this,"maxPolarAngle",Math.PI),te(this,"minAzimuthAngle",-1/0),te(this,"maxAzimuthAngle",1/0),te(this,"enableDamping",!1),te(this,"dampingFactor",.05),te(this,"enableZoom",!0),te(this,"zoomSpeed",1),te(this,"enableRotate",!0),te(this,"rotateSpeed",1),te(this,"enablePan",!0),te(this,"panSpeed",1),te(this,"screenSpacePanning",!0),te(this,"keyPanSpeed",7),te(this,"zoomToCursor",!1),te(this,"autoRotate",!1),te(this,"autoRotateSpeed",2),te(this,"reverseOrbit",!1),te(this,"reverseHorizontalOrbit",!1),te(this,"reverseVerticalOrbit",!1),te(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),te(this,"mouseButtons",{LEFT:yt.ROTATE,MIDDLE:yt.DOLLY,RIGHT:yt.PAN}),te(this,"touches",{ONE:_t.ROTATE,TWO:_t.DOLLY_PAN}),te(this,"target0"),te(this,"position0"),te(this,"zoom0"),te(this,"_domElementKeyEvents",null),te(this,"getPolarAngle"),te(this,"getAzimuthalAngle"),te(this,"setPolarAngle"),te(this,"setAzimuthalAngle"),te(this,"getDistance"),te(this,"getZoomScale"),te(this,"listenToKeyEvents"),te(this,"stopListenToKeyEvents"),te(this,"saveState"),te(this,"reset"),te(this,"update"),te(this,"connect"),te(this,"dispose"),te(this,"dollyIn"),te(this,"dollyOut"),te(this,"getScale"),te(this,"setScale"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=L=>{let Y=Co(L,2*Math.PI),Z=c.phi;Z<0&&(Z+=2*Math.PI),Y<0&&(Y+=2*Math.PI);let Ee=Math.abs(Y-Z);2*Math.PI-Ee{let Y=Co(L,2*Math.PI),Z=c.theta;Z<0&&(Z+=2*Math.PI),Y<0&&(Y+=2*Math.PI);let Ee=Math.abs(Y-Z);2*Math.PI-Eer.object.position.distanceTo(r.target),this.listenToKeyEvents=L=>{L.addEventListener("keydown",ne),this._domElementKeyEvents=L},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ne),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(i),r.update(),l=s.NONE},this.update=(()=>{const L=new ae,Y=new ae(0,1,0),Z=new Bn().setFromUnitVectors(e.up,Y),Ee=Z.clone().invert(),Ze=new ae,ot=new Bn,Tn=2*Math.PI;return function(){const Mi=r.object.position;Z.setFromUnitVectors(e.up,Y),Ee.copy(Z).invert(),L.copy(Mi).sub(r.target),L.applyQuaternion(Z),c.setFromVector3(L),r.autoRotate&&l===s.NONE&&j(M()),r.enableDamping?(c.theta+=f.theta*r.dampingFactor,c.phi+=f.phi*r.dampingFactor):(c.theta+=f.theta,c.phi+=f.phi);let ht=r.minAzimuthAngle,mt=r.maxAzimuthAngle;isFinite(ht)&&isFinite(mt)&&(ht<-Math.PI?ht+=Tn:ht>Math.PI&&(ht-=Tn),mt<-Math.PI?mt+=Tn:mt>Math.PI&&(mt-=Tn),ht<=mt?c.theta=Math.max(ht,Math.min(mt,c.theta)):c.theta=c.theta>(ht+mt)/2?Math.max(ht,c.theta):Math.min(mt,c.theta)),c.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,c.phi)),c.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(d,r.dampingFactor):r.target.add(d),r.zoomToCursor&&g||r.object.isOrthographicCamera?c.radius=C(c.radius):c.radius=C(c.radius*p),L.setFromSpherical(c),L.applyQuaternion(Ee),Mi.copy(r.target).add(L),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(f.theta*=1-r.dampingFactor,f.phi*=1-r.dampingFactor,d.multiplyScalar(1-r.dampingFactor)):(f.set(0,0,0),d.set(0,0,0));let tn=!1;if(r.zoomToCursor&&g){let nn=null;if(r.object instanceof Mt&&r.object.isPerspectiveCamera){const rn=L.length();nn=C(rn*p);const _n=rn-nn;r.object.position.addScaledVector(I,_n),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const rn=new ae(v.x,v.y,0);rn.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/p)),r.object.updateProjectionMatrix(),tn=!0;const _n=new ae(v.x,v.y,0);_n.unproject(r.object),r.object.position.sub(_n).add(rn),r.object.updateMatrixWorld(),nn=L.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;nn!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar(nn).add(r.object.position):(Nn.origin.copy(r.object.position),Nn.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(Nn.direction))u||8*(1-ot.dot(r.object.quaternion))>u?(r.dispatchEvent(i),Ze.copy(r.object.position),ot.copy(r.object.quaternion),tn=!1,!0):!1}})(),this.connect=L=>{r.domElement=L,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",Ve),r.domElement.addEventListener("pointerdown",Ae),r.domElement.addEventListener("pointercancel",tt),r.domElement.addEventListener("wheel",q)},this.dispose=()=>{var L,Y,Z,Ee,Ze,ot;r.domElement&&(r.domElement.style.touchAction="auto"),(L=r.domElement)==null||L.removeEventListener("contextmenu",Ve),(Y=r.domElement)==null||Y.removeEventListener("pointerdown",Ae),(Z=r.domElement)==null||Z.removeEventListener("pointercancel",tt),(Ee=r.domElement)==null||Ee.removeEventListener("wheel",q),(Ze=r.domElement)==null||Ze.ownerDocument.removeEventListener("pointermove",je),(ot=r.domElement)==null||ot.ownerDocument.removeEventListener("pointerup",tt),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",ne)};const r=this,i={type:"change"},o={type:"start"},a={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=s.NONE;const u=1e-6,c=new Ci,f=new Ci;let p=1;const d=new ae,y=new Pe,x=new Pe,w=new Pe,k=new Pe,S=new Pe,_=new Pe,R=new Pe,P=new Pe,h=new Pe,I=new ae,v=new Pe;let g=!1;const m=[],T={};function M(){return 2*Math.PI/60/60*r.autoRotateSpeed}function F(){return Math.pow(.95,r.zoomSpeed)}function j(L){r.reverseOrbit||r.reverseHorizontalOrbit?f.theta+=L:f.theta-=L}function D(L){r.reverseOrbit||r.reverseVerticalOrbit?f.phi+=L:f.phi-=L}const B=(()=>{const L=new ae;return function(Y,Z){L.setFromMatrixColumn(Z,0),L.multiplyScalar(-Y),d.add(L)}})(),X=(()=>{const L=new ae;return function(Y,Z){r.screenSpacePanning===!0?L.setFromMatrixColumn(Z,1):(L.setFromMatrixColumn(Z,0),L.crossVectors(r.object.up,L)),L.multiplyScalar(Y),d.add(L)}})(),re=(()=>{const L=new ae;return function(Y,Z){const Ee=r.domElement;if(Ee&&r.object instanceof Mt&&r.object.isPerspectiveCamera){const Ze=r.object.position;L.copy(Ze).sub(r.target);let ot=L.length();ot*=Math.tan(r.object.fov/2*Math.PI/180),B(2*Y*ot/Ee.clientHeight,r.object.matrix),X(2*Z*ot/Ee.clientHeight,r.object.matrix)}else Ee&&r.object instanceof $t&&r.object.isOrthographicCamera?(B(Y*(r.object.right-r.object.left)/r.object.zoom/Ee.clientWidth,r.object.matrix),X(Z*(r.object.top-r.object.bottom)/r.object.zoom/Ee.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function Q(L){r.object instanceof Mt&&r.object.isPerspectiveCamera||r.object instanceof $t&&r.object.isOrthographicCamera?p=L:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function E(L){Q(p/L)}function oe(L){Q(p*L)}function Me(L){if(!r.zoomToCursor||!r.domElement)return;g=!0;const Y=r.domElement.getBoundingClientRect(),Z=L.clientX-Y.left,Ee=L.clientY-Y.top,Ze=Y.width,ot=Y.height;v.x=Z/Ze*2-1,v.y=-(Ee/ot)*2+1,I.set(v.x,v.y,1).unproject(r.object).sub(r.object.position).normalize()}function C(L){return Math.max(r.minDistance,Math.min(r.maxDistance,L))}function he(L){y.set(L.clientX,L.clientY)}function we(L){Me(L),R.set(L.clientX,L.clientY)}function me(L){k.set(L.clientX,L.clientY)}function Oe(L){x.set(L.clientX,L.clientY),w.subVectors(x,y).multiplyScalar(r.rotateSpeed);const Y=r.domElement;Y&&(j(2*Math.PI*w.x/Y.clientHeight),D(2*Math.PI*w.y/Y.clientHeight)),y.copy(x),r.update()}function $(L){P.set(L.clientX,L.clientY),h.subVectors(P,R),h.y>0?E(F()):h.y<0&&oe(F()),R.copy(P),r.update()}function b(L){S.set(L.clientX,L.clientY),_.subVectors(S,k).multiplyScalar(r.panSpeed),re(_.x,_.y),k.copy(S),r.update()}function A(L){Me(L),L.deltaY<0?oe(F()):L.deltaY>0&&E(F()),r.update()}function N(L){let Y=!1;switch(L.code){case r.keys.UP:re(0,r.keyPanSpeed),Y=!0;break;case r.keys.BOTTOM:re(0,-r.keyPanSpeed),Y=!0;break;case r.keys.LEFT:re(r.keyPanSpeed,0),Y=!0;break;case r.keys.RIGHT:re(-r.keyPanSpeed,0),Y=!0;break}Y&&(L.preventDefault(),r.update())}function V(){if(m.length==1)y.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),Y=.5*(m[0].pageY+m[1].pageY);y.set(L,Y)}}function z(){if(m.length==1)k.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),Y=.5*(m[0].pageY+m[1].pageY);k.set(L,Y)}}function K(){const L=m[0].pageX-m[1].pageX,Y=m[0].pageY-m[1].pageY,Z=Math.sqrt(L*L+Y*Y);R.set(0,Z)}function ee(){r.enableZoom&&K(),r.enablePan&&z()}function ge(){r.enableZoom&&K(),r.enableRotate&&V()}function ke(L){if(m.length==1)x.set(L.pageX,L.pageY);else{const Z=pt(L),Ee=.5*(L.pageX+Z.x),Ze=.5*(L.pageY+Z.y);x.set(Ee,Ze)}w.subVectors(x,y).multiplyScalar(r.rotateSpeed);const Y=r.domElement;Y&&(j(2*Math.PI*w.x/Y.clientHeight),D(2*Math.PI*w.y/Y.clientHeight)),y.copy(x)}function fe(L){if(m.length==1)S.set(L.pageX,L.pageY);else{const Y=pt(L),Z=.5*(L.pageX+Y.x),Ee=.5*(L.pageY+Y.y);S.set(Z,Ee)}_.subVectors(S,k).multiplyScalar(r.panSpeed),re(_.x,_.y),k.copy(S)}function ye(L){const Y=pt(L),Z=L.pageX-Y.x,Ee=L.pageY-Y.y,Ze=Math.sqrt(Z*Z+Ee*Ee);P.set(0,Ze),h.set(0,Math.pow(P.y/R.y,r.zoomSpeed)),E(h.y),R.copy(P)}function Ie(L){r.enableZoom&&ye(L),r.enablePan&&fe(L)}function be(L){r.enableZoom&&ye(L),r.enableRotate&&ke(L)}function Ae(L){var Y,Z;r.enabled!==!1&&(m.length===0&&((Y=r.domElement)==null||Y.ownerDocument.addEventListener("pointermove",je),(Z=r.domElement)==null||Z.ownerDocument.addEventListener("pointerup",tt)),dt(L),L.pointerType==="touch"?ue(L):en(L))}function je(L){r.enabled!==!1&&(L.pointerType==="touch"?xe(L):U(L))}function tt(L){var Y,Z,Ee;it(L),m.length===0&&((Y=r.domElement)==null||Y.releasePointerCapture(L.pointerId),(Z=r.domElement)==null||Z.ownerDocument.removeEventListener("pointermove",je),(Ee=r.domElement)==null||Ee.ownerDocument.removeEventListener("pointerup",tt)),r.dispatchEvent(a),l=s.NONE}function en(L){let Y;switch(L.button){case 0:Y=r.mouseButtons.LEFT;break;case 1:Y=r.mouseButtons.MIDDLE;break;case 2:Y=r.mouseButtons.RIGHT;break;default:Y=-1}switch(Y){case yt.DOLLY:if(r.enableZoom===!1)return;we(L),l=s.DOLLY;break;case yt.ROTATE:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enablePan===!1)return;me(L),l=s.PAN}else{if(r.enableRotate===!1)return;he(L),l=s.ROTATE}break;case yt.PAN:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enableRotate===!1)return;he(L),l=s.ROTATE}else{if(r.enablePan===!1)return;me(L),l=s.PAN}break;default:l=s.NONE}l!==s.NONE&&r.dispatchEvent(o)}function U(L){if(r.enabled!==!1)switch(l){case s.ROTATE:if(r.enableRotate===!1)return;Oe(L);break;case s.DOLLY:if(r.enableZoom===!1)return;$(L);break;case s.PAN:if(r.enablePan===!1)return;b(L);break}}function q(L){r.enabled===!1||r.enableZoom===!1||l!==s.NONE&&l!==s.ROTATE||(L.preventDefault(),r.dispatchEvent(o),A(L),r.dispatchEvent(a))}function ne(L){r.enabled===!1||r.enablePan===!1||N(L)}function ue(L){switch(bt(L),m.length){case 1:switch(r.touches.ONE){case _t.ROTATE:if(r.enableRotate===!1)return;V(),l=s.TOUCH_ROTATE;break;case _t.PAN:if(r.enablePan===!1)return;z(),l=s.TOUCH_PAN;break;default:l=s.NONE}break;case 2:switch(r.touches.TWO){case _t.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;ee(),l=s.TOUCH_DOLLY_PAN;break;case _t.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;ge(),l=s.TOUCH_DOLLY_ROTATE;break;default:l=s.NONE}break;default:l=s.NONE}l!==s.NONE&&r.dispatchEvent(o)}function xe(L){switch(bt(L),l){case s.TOUCH_ROTATE:if(r.enableRotate===!1)return;ke(L),r.update();break;case s.TOUCH_PAN:if(r.enablePan===!1)return;fe(L),r.update();break;case s.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Ie(L),r.update();break;case s.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;be(L),r.update();break;default:l=s.NONE}}function Ve(L){r.enabled!==!1&&L.preventDefault()}function dt(L){m.push(L)}function it(L){delete T[L.pointerId];for(let Y=0;Y{oe(L),r.update()},this.dollyOut=(L=F())=>{E(L),r.update()},this.getScale=()=>p,this.setScale=L=>{Q(L),r.update()},this.getZoomScale=()=>F(),n!==void 0&&this.connect(n),this.update()}}new vt;new ae;new aa;new ae;var Tm=Object.defineProperty,_m=(t,e,n)=>e in t?Tm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_i=(t,e,n)=>(_m(t,typeof e!="symbol"?e+"":e,n),n);class ms{constructor(e){_i(this,"data"),this.data=e}generateShapes(e,n=100,r){const i=[],o={letterSpacing:0,lineHeight:1,...r},a=Em(e,n,this.data,o);for(let s=0,l=a.length;s #include #include uniform float thickness; @@ -439,15 +439,15 @@ import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sf gl_FragColor = vec4(color, opacity); #include #include - }`);const Mm=["args","material-uniforms-color-value"];qr.ReflectorShader;new ae;new ae;new ae;var Ar;/Mac/.test((Ar=globalThis==null?void 0:globalThis.navigator)===null||Ar===void 0?void 0:Ar.platform);const Am=["target","auto-rotate","auto-rotate-speed","enable-damping","damping-factor","enable-pan","key-pan-speed","keys","max-azimuth-angle","min-azimuth-angle","max-polar-angle","min-polar-angle","min-distance","max-distance","min-zoom","max-zoom","touches","enable-zoom","zoom-speed","enable-rotate","rotate-speed","mouse-buttons","args"],Sm=Fe({__name:"OrbitControls",props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},target:{default:()=>[0,0,0]},enableDamping:{type:Boolean,default:!0},dampingFactor:{default:.05},autoRotate:{type:Boolean,default:!1},autoRotateSpeed:{default:2},enablePan:{type:Boolean,default:!0},keyPanSpeed:{default:7},keys:{},maxAzimuthAngle:{default:Number.POSITIVE_INFINITY},minAzimuthAngle:{default:Number.NEGATIVE_INFINITY},maxPolarAngle:{default:Math.PI},minPolarAngle:{default:0},minDistance:{default:0},maxDistance:{default:Number.POSITIVE_INFINITY},minZoom:{default:0},maxZoom:{default:Number.POSITIVE_INFINITY},touches:{default:()=>({ONE:_t.ROTATE,TWO:_t.DOLLY_PAN})},enableZoom:{type:Boolean,default:!0},zoomSpeed:{default:1},enableRotate:{type:Boolean,default:!0},rotateSpeed:{default:1},mouseButtons:{default:()=>({LEFT:yt.ROTATE,MIDDLE:yt.DOLLY,RIGHT:yt.PAN})}},emits:["change","start","end"],setup(t,{expose:e,emit:n}){const r=t,i=n,{makeDefault:o,autoRotate:a,autoRotateSpeed:s,enableDamping:l,dampingFactor:u,enablePan:c,keyPanSpeed:f,maxAzimuthAngle:p,minAzimuthAngle:d,maxPolarAngle:y,minPolarAngle:x,minDistance:w,maxDistance:k,minZoom:S,maxZoom:_,enableZoom:R,zoomSpeed:P,enableRotate:h,touches:I,rotateSpeed:v,target:g,mouseButtons:m}=oi(r),{camera:T,renderer:M,extend:F,controls:j,invalidate:D}=Wn(),B=ia(null);F({OrbitControls:wm}),Be(B,Q=>{X(),Q&&o.value?j.value=Q:j.value=null});function X(){kr(B.value,"change",()=>{i("change",B.value),D()}),kr(B.value,"start",()=>i("start",B.value)),kr(B.value,"end",()=>i("end",B.value))}const{onBeforeRender:re}=Vn();return re(({invalidate:Q})=>{B.value&&(l.value||a.value)&&(B.value.update(),a.value&&Q())}),Ot(()=>{B.value&&B.value.dispose()}),e({instance:B}),(Q,E)=>(Q.camera||H(T))&&(Q.domElement||H(M))?(J(),ie("TresOrbitControls",{key:0,ref_key:"controlsRef",ref:B,target:H(g),"auto-rotate":H(a),"auto-rotate-speed":H(s),"enable-damping":H(l),"damping-factor":H(u),"enable-pan":H(c),"key-pan-speed":H(f),keys:Q.keys,"max-azimuth-angle":H(p),"min-azimuth-angle":H(d),"max-polar-angle":H(y),"min-polar-angle":H(x),"min-distance":H(w),"max-distance":H(k),"min-zoom":H(S),"max-zoom":H(_),touches:H(I),"enable-zoom":H(R),"zoom-speed":H(P),"enable-rotate":H(h),"rotate-speed":H(v),"mouse-buttons":H(m),args:[Q.camera||H(T),Q.domElement||H(M).domElement]},null,8,Am)):at("",!0)}});function Ln(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var No={exports:{}},Lo;function Im(){return Lo||(Lo=1,function(t,e){(function(n){t.exports=n()})(function(){return function n(r,i,o){function a(u,c){if(!i[u]){if(!r[u]){var f=typeof Ln=="function"&&Ln;if(!c&&f)return f(u,!0);if(s)return s(u,!0);throw new Error("Cannot find module '"+u+"'")}c=i[u]={exports:{}},r[u][0].call(c.exports,function(p){var d=r[u][1][p];return a(d||p)},c,c.exports,n,r,i,o)}return i[u].exports}for(var s=typeof Ln=="function"&&Ln,l=0;l[0,0,0]},enableDamping:{type:Boolean,default:!0},dampingFactor:{default:.05},autoRotate:{type:Boolean,default:!1},autoRotateSpeed:{default:2},enablePan:{type:Boolean,default:!0},keyPanSpeed:{default:7},keys:{},maxAzimuthAngle:{default:Number.POSITIVE_INFINITY},minAzimuthAngle:{default:Number.NEGATIVE_INFINITY},maxPolarAngle:{default:Math.PI},minPolarAngle:{default:0},minDistance:{default:0},maxDistance:{default:Number.POSITIVE_INFINITY},minZoom:{default:0},maxZoom:{default:Number.POSITIVE_INFINITY},touches:{default:()=>({ONE:_t.ROTATE,TWO:_t.DOLLY_PAN})},enableZoom:{type:Boolean,default:!0},zoomSpeed:{default:1},enableRotate:{type:Boolean,default:!0},rotateSpeed:{default:1},mouseButtons:{default:()=>({LEFT:yt.ROTATE,MIDDLE:yt.DOLLY,RIGHT:yt.PAN})}},emits:["change","start","end"],setup(t,{expose:e,emit:n}){const r=t,i=n,{makeDefault:o,autoRotate:a,autoRotateSpeed:s,enableDamping:l,dampingFactor:u,enablePan:c,keyPanSpeed:f,maxAzimuthAngle:p,minAzimuthAngle:d,maxPolarAngle:y,minPolarAngle:x,minDistance:w,maxDistance:k,minZoom:S,maxZoom:_,enableZoom:R,zoomSpeed:P,enableRotate:h,touches:I,rotateSpeed:v,target:g,mouseButtons:m}=oi(r),{camera:T,renderer:M,extend:F,controls:j,invalidate:D}=Wn(),B=ia(null);F({OrbitControls:km}),Be(B,Q=>{X(),Q&&o.value?j.value=Q:j.value=null});function X(){kr(B.value,"change",()=>{i("change",B.value),D()}),kr(B.value,"start",()=>i("start",B.value)),kr(B.value,"end",()=>i("end",B.value))}const{onBeforeRender:re}=Vn();return re(({invalidate:Q})=>{B.value&&(l.value||a.value)&&(B.value.update(),a.value&&Q())}),Ot(()=>{B.value&&B.value.dispose()}),e({instance:B}),(Q,E)=>(Q.camera||H(T))&&(Q.domElement||H(M))?(J(),ie("TresOrbitControls",{key:0,ref_key:"controlsRef",ref:B,target:H(g),"auto-rotate":H(a),"auto-rotate-speed":H(s),"enable-damping":H(l),"damping-factor":H(u),"enable-pan":H(c),"key-pan-speed":H(f),keys:Q.keys,"max-azimuth-angle":H(p),"min-azimuth-angle":H(d),"max-polar-angle":H(y),"min-polar-angle":H(x),"min-distance":H(w),"max-distance":H(k),"min-zoom":H(S),"max-zoom":H(_),touches:H(I),"enable-zoom":H(R),"zoom-speed":H(P),"enable-rotate":H(h),"rotate-speed":H(v),"mouse-buttons":H(m),args:[Q.camera||H(T),Q.domElement||H(M).domElement]},null,8,Sm)):at("",!0)}});function Ln(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var No={exports:{}},Lo;function Rm(){return Lo||(Lo=1,function(t,e){(function(n){t.exports=n()})(function(){return function n(r,i,o){function a(u,c){if(!i[u]){if(!r[u]){var f=typeof Ln=="function"&&Ln;if(!c&&f)return f(u,!0);if(s)return s(u,!0);throw new Error("Cannot find module '"+u+"'")}c=i[u]={exports:{}},r[u][0].call(c.exports,function(p){var d=r[u][1][p];return a(d||p)},c,c.exports,n,r,i,o)}return i[u].exports}for(var s=typeof Ln=="function"&&Ln,l=0;l>16),D((65280&m)>>8),D(255&m);return T==2?D(255&(m=I(v.charAt(g))<<2|I(v.charAt(g+1))>>4)):T==1&&(D((m=I(v.charAt(g))<<10|I(v.charAt(g+1))<<4|I(v.charAt(g+2))>>2)>>8&255),D(255&m)),M},y.fromByteArray=function(v){var g,m,T,M,F=v.length%3,j="";function D(B){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(B)}for(g=0,T=v.length-F;g>18&63)+D(M>>12&63)+D(M>>6&63)+D(63&M);switch(F){case 1:j=(j+=D((m=v[v.length-1])>>2))+D(m<<4&63)+"==";break;case 2:j=(j=(j+=D((m=(v[v.length-2]<<8)+v[v.length-1])>>10))+D(m>>4&63))+D(m<<2&63)+"="}return j}})(i===void 0?this.base64js={}:i)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,i){(function(o,a,w,l,u,c,f,p,d){var y=n("base64-js"),x=n("ieee754");function w(b,A,N){if(!(this instanceof w))return new w(b,A,N);var V,z,K,ee,ge=typeof b;if(A==="base64"&&ge=="string")for(b=(ee=b).trim?ee.trim():ee.replace(/^\s+|\s+$/g,"");b.length%4!=0;)b+="=";if(ge=="number")V=re(b);else if(ge=="string")V=w.byteLength(b,A);else{if(ge!="object")throw new Error("First argument needs to be a number, array or string.");V=re(b.length)}if(w._useTypedArrays?z=w._augment(new Uint8Array(V)):((z=this).length=V,z._isBuffer=!0),w._useTypedArrays&&typeof b.byteLength=="number")z._set(b);else if(Q(ee=b)||w.isBuffer(ee)||ee&&typeof ee=="object"&&typeof ee.length=="number")for(K=0;K>8,ee=ee%256,ge.push(ee),ge.push(K);return ge}(A),b,N,V)}function _(b,A,N){var V="";N=Math.min(b.length,N);for(var z=A;z>>0)):(A+1>>0),z}function h(b,A,N,V){if(V||($(typeof N=="boolean","missing or invalid endian"),$(A!=null,"missing offset"),$(A+1>>8*(V?K:1-K)}function T(b,A,N,V,z){if(z||($(A!=null,"missing value"),$(typeof V=="boolean","missing or invalid endian"),$(N!=null,"missing offset"),$(N+3>>8*(V?K:3-K)&255}function M(b,A,N,V,z){z||($(A!=null,"missing value"),$(typeof V=="boolean","missing or invalid endian"),$(N!=null,"missing offset"),$(N+1this.length&&(V=this.length);var z=(V=b.length-A=this.length))return this[b]},w.prototype.readUInt16LE=function(b,A){return R(this,b,!0,A)},w.prototype.readUInt16BE=function(b,A){return R(this,b,!1,A)},w.prototype.readUInt32LE=function(b,A){return P(this,b,!0,A)},w.prototype.readUInt32BE=function(b,A){return P(this,b,!1,A)},w.prototype.readInt8=function(b,A){if(A||($(b!=null,"missing offset"),$(b=this.length))return 128&this[b]?-1*(255-this[b]+1):this[b]},w.prototype.readInt16LE=function(b,A){return h(this,b,!0,A)},w.prototype.readInt16BE=function(b,A){return h(this,b,!1,A)},w.prototype.readInt32LE=function(b,A){return I(this,b,!0,A)},w.prototype.readInt32BE=function(b,A){return I(this,b,!1,A)},w.prototype.readFloatLE=function(b,A){return v(this,b,!0,A)},w.prototype.readFloatBE=function(b,A){return v(this,b,!1,A)},w.prototype.readDoubleLE=function(b,A){return g(this,b,!0,A)},w.prototype.readDoubleBE=function(b,A){return g(this,b,!1,A)},w.prototype.writeUInt8=function(b,A,N){N||($(b!=null,"missing value"),$(A!=null,"missing offset"),$(A=this.length||(this[A]=b)},w.prototype.writeUInt16LE=function(b,A,N){m(this,b,A,!0,N)},w.prototype.writeUInt16BE=function(b,A,N){m(this,b,A,!1,N)},w.prototype.writeUInt32LE=function(b,A,N){T(this,b,A,!0,N)},w.prototype.writeUInt32BE=function(b,A,N){T(this,b,A,!1,N)},w.prototype.writeInt8=function(b,A,N){N||($(b!=null,"missing value"),$(A!=null,"missing offset"),$(A=this.length||(0<=b?this.writeUInt8(b,A,N):this.writeUInt8(255+b+1,A,N))},w.prototype.writeInt16LE=function(b,A,N){M(this,b,A,!0,N)},w.prototype.writeInt16BE=function(b,A,N){M(this,b,A,!1,N)},w.prototype.writeInt32LE=function(b,A,N){F(this,b,A,!0,N)},w.prototype.writeInt32BE=function(b,A,N){F(this,b,A,!1,N)},w.prototype.writeFloatLE=function(b,A,N){j(this,b,A,!0,N)},w.prototype.writeFloatBE=function(b,A,N){j(this,b,A,!1,N)},w.prototype.writeDoubleLE=function(b,A,N){D(this,b,A,!0,N)},w.prototype.writeDoubleBE=function(b,A,N){D(this,b,A,!1,N)},w.prototype.fill=function(b,A,N){if(A=A||0,N=N||this.length,$(typeof(b=typeof(b=b||0)=="string"?b.charCodeAt(0):b)=="number"&&!isNaN(b),"value is not a number"),$(A<=N,"end < start"),N!==A&&this.length!==0){$(0<=A&&A"},w.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(w._useTypedArrays)return new w(this).buffer;for(var b=new Uint8Array(this.length),A=0,N=b.length;A=A.length||z>=b.length);z++)A[z+N]=b[z];return z}function he(b){try{return decodeURIComponent(b)}catch{return"�"}}function we(b,A){$(typeof b=="number","cannot write a non-number as a number"),$(0<=b,"specified a negative value for writing an unsigned value"),$(b<=A,"value is larger than maximum value for type"),$(Math.floor(b)===b,"value has a fractional component")}function me(b,A,N){$(typeof b=="number","cannot write a non-number as a number"),$(b<=A,"value larger than maximum allowed value"),$(N<=b,"value smaller than minimum allowed value"),$(Math.floor(b)===b,"value has a fractional component")}function Oe(b,A,N){$(typeof b=="number","cannot write a non-number as a number"),$(b<=A,"value larger than maximum allowed value"),$(N<=b,"value smaller than minimum allowed value")}function $(b,A){if(!b)throw new Error(A||"Failed assertion")}w._augment=function(b){return b._isBuffer=!0,b._get=b.get,b._set=b.set,b.get=B.get,b.set=B.set,b.write=B.write,b.toString=B.toString,b.toLocaleString=B.toString,b.toJSON=B.toJSON,b.copy=B.copy,b.slice=B.slice,b.readUInt8=B.readUInt8,b.readUInt16LE=B.readUInt16LE,b.readUInt16BE=B.readUInt16BE,b.readUInt32LE=B.readUInt32LE,b.readUInt32BE=B.readUInt32BE,b.readInt8=B.readInt8,b.readInt16LE=B.readInt16LE,b.readInt16BE=B.readInt16BE,b.readInt32LE=B.readInt32LE,b.readInt32BE=B.readInt32BE,b.readFloatLE=B.readFloatLE,b.readFloatBE=B.readFloatBE,b.readDoubleLE=B.readDoubleLE,b.readDoubleBE=B.readDoubleBE,b.writeUInt8=B.writeUInt8,b.writeUInt16LE=B.writeUInt16LE,b.writeUInt16BE=B.writeUInt16BE,b.writeUInt32LE=B.writeUInt32LE,b.writeUInt32BE=B.writeUInt32BE,b.writeInt8=B.writeInt8,b.writeInt16LE=B.writeInt16LE,b.writeInt16BE=B.writeInt16BE,b.writeInt32LE=B.writeInt32LE,b.writeInt32BE=B.writeInt32BE,b.writeFloatLE=B.writeFloatLE,b.writeFloatBE=B.writeFloatBE,b.writeDoubleLE=B.writeDoubleLE,b.writeDoubleBE=B.writeDoubleBE,b.fill=B.fill,b.inspect=B.inspect,b.toArrayBuffer=B.toArrayBuffer,b}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,r,i){(function(o,a,y,l,u,c,f,p,d){var y=n("buffer").Buffer,x=4,w=new y(x);w.fill(0),r.exports={hash:function(k,S,_,R){for(var P=S(function(m,T){m.length%x!=0&&(M=m.length+(x-m.length%x),m=y.concat([m,w],M));for(var M,F=[],j=T?m.readInt32BE:m.readInt32LE,D=0;D_?X=B(X):X.length<_&&(X=y.concat([X,R],_));for(var Q=new y(_),E=new y(_),oe=0;oe<_;oe++)Q[oe]=54^X[oe],E[oe]=92^X[oe];return re=B(y.concat([Q,re])),B(y.concat([E,re]))}(M,T,D):M(D);return F=null,j?D.toString(j):D}}}function h(){var m=[].slice.call(arguments).join(" ");throw new Error([m,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(` -`))}R.fill(0),i.createHash=function(m){return P(m)},i.createHmac=P,i.randomBytes=function(m,T){if(!T||!T.call)return new y(k(m));try{T.call(this,void 0,new y(k(m)))}catch(M){T(M)}};var I,v=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],g=function(m){i[m]=function(){h("sorry,",m,"is not implemented yet")}};for(I in v)g(v[I])}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){var y=n("./helpers");function x(h,I){h[I>>5]|=128<>>9<<4)]=I;for(var v=1732584193,g=-271733879,m=-1732584194,T=271733878,M=0;M>>32-m,v)}function k(h,I,v,g,m,T,M){return w(I&v|~I&g,h,I,m,T,M)}function S(h,I,v,g,m,T,M){return w(I&g|v&~g,h,I,m,T,M)}function _(h,I,v,g,m,T,M){return w(I^v^g,h,I,m,T,M)}function R(h,I,v,g,m,T,M){return w(v^(I|~g),h,I,m,T,M)}function P(h,I){var v=(65535&h)+(65535&I);return(h>>16)+(I>>16)+(v>>16)<<16|65535&v}r.exports=function(h){return y.hash(h,x,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){r.exports=function(y){for(var x,w=new Array(y),k=0;k>>((3&k)<<3)&255;return w}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){var y=n("./helpers");function x(S,_){S[_>>5]|=128<<24-_%32,S[15+(_+64>>9<<4)]=_;for(var R,P,h,I=Array(80),v=1732584193,g=-271733879,m=-1732584194,T=271733878,M=-1009589776,F=0;F>16)+(_>>16)+(R>>16)<<16|65535&R}function k(S,_){return S<<_|S>>>32-_}r.exports=function(S){return y.hash(S,x,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){function y(_,R){var P=(65535&_)+(65535&R);return(_>>16)+(R>>16)+(P>>16)<<16|65535&P}function x(_,R){var P,h=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),I=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),v=new Array(64);_[R>>5]|=128<<24-R%32,_[15+(R+64>>9<<4)]=R;for(var g,m,T=0;T<_.length;T+=16){for(var M=I[0],F=I[1],j=I[2],D=I[3],B=I[4],X=I[5],re=I[6],Q=I[7],E=0;E<64;E++)v[E]=E<16?_[E+T]:y(y(y((m=v[E-2],k(m,17)^k(m,19)^S(m,10)),v[E-7]),(m=v[E-15],k(m,7)^k(m,18)^S(m,3))),v[E-16]),P=y(y(y(y(Q,k(m=B,6)^k(m,11)^k(m,25)),B&X^~B&re),h[E]),v[E]),g=y(k(g=M,2)^k(g,13)^k(g,22),M&F^M&j^F&j),Q=re,re=X,X=B,B=y(D,P),D=j,j=F,F=M,M=y(P,g);I[0]=y(M,I[0]),I[1]=y(F,I[1]),I[2]=y(j,I[2]),I[3]=y(D,I[3]),I[4]=y(B,I[4]),I[5]=y(X,I[5]),I[6]=y(re,I[6]),I[7]=y(Q,I[7])}return I}var w=n("./helpers"),k=function(_,R){return _>>>R|_<<32-R},S=function(_,R){return _>>>R};r.exports=function(_){return w.hash(_,x,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){i.read=function(y,x,w,k,T){var _,R,P=8*T-k-1,h=(1<>1,v=-7,g=w?T-1:0,m=w?-1:1,T=y[x+g];for(g+=m,_=T&(1<<-v)-1,T>>=-v,v+=P;0>=-v,v+=k;0>1,g=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=k?0:M-1,T=k?1:-1,M=x<0||x===0&&1/x<0?1:0;for(x=Math.abs(x),isNaN(x)||x===1/0?(P=isNaN(x)?1:0,R=I):(R=Math.floor(Math.log(x)/Math.LN2),x*(k=Math.pow(2,-R))<1&&(R--,k*=2),2<=(x+=1<=R+v?g/k:g*Math.pow(2,1-v))*k&&(R++,k/=2),I<=R+v?(P=0,R=I):1<=R+v?(P=(x*k-1)*Math.pow(2,S),R+=v):(P=x*Math.pow(2,v-1)*Math.pow(2,S),R=0));8<=S;y[w+m]=255&P,m+=T,P/=256,S-=8);for(R=R<>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]),Oo}var Bo,zo;function ys(){return zo||(zo=1,Bo=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]),Bo}var Sr,Uo;function Cm(){if(Uo)return Sr;Uo=1;var t=gs();return Sr=t.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"]),Sr}var Ir,jo;function Nm(){if(jo)return Ir;jo=1;var t=ys();return t=t.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)}),Ir=t.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"]),Ir}var Rr,Vo;function Lm(){if(Vo)return Rr;Vo=1,Rr=R;var t=gs(),e=Rm(),n=ys(),r=Cm(),i=Nm(),o=999,a=9999,s=0,l=1,u=2,c=3,f=4,p=5,d=6,y=7,x=8,w=9,k=10,S=11,_=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function R(P){var h=0,I=0,v=o,g,m,T=[],M=[],F=1,j=0,D=0,B=!1,X=!1,re="",Q;P=P||{};var E=n,oe=t;P.version==="300 es"&&(E=i,oe=r);for(var Me={},C={},h=0;h>5]|=128<>>9<<4)]=I;for(var v=1732584193,g=-271733879,m=-1732584194,T=271733878,M=0;M>>32-m,v)}function k(h,I,v,g,m,T,M){return w(I&v|~I&g,h,I,m,T,M)}function S(h,I,v,g,m,T,M){return w(I&g|v&~g,h,I,m,T,M)}function _(h,I,v,g,m,T,M){return w(I^v^g,h,I,m,T,M)}function R(h,I,v,g,m,T,M){return w(v^(I|~g),h,I,m,T,M)}function P(h,I){var v=(65535&h)+(65535&I);return(h>>16)+(I>>16)+(v>>16)<<16|65535&v}r.exports=function(h){return y.hash(h,x,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){r.exports=function(y){for(var x,w=new Array(y),k=0;k>>((3&k)<<3)&255;return w}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){var y=n("./helpers");function x(S,_){S[_>>5]|=128<<24-_%32,S[15+(_+64>>9<<4)]=_;for(var R,P,h,I=Array(80),v=1732584193,g=-271733879,m=-1732584194,T=271733878,M=-1009589776,F=0;F>16)+(_>>16)+(R>>16)<<16|65535&R}function k(S,_){return S<<_|S>>>32-_}r.exports=function(S){return y.hash(S,x,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){function y(_,R){var P=(65535&_)+(65535&R);return(_>>16)+(R>>16)+(P>>16)<<16|65535&P}function x(_,R){var P,h=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),I=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),v=new Array(64);_[R>>5]|=128<<24-R%32,_[15+(R+64>>9<<4)]=R;for(var g,m,T=0;T<_.length;T+=16){for(var M=I[0],F=I[1],j=I[2],D=I[3],B=I[4],X=I[5],re=I[6],Q=I[7],E=0;E<64;E++)v[E]=E<16?_[E+T]:y(y(y((m=v[E-2],k(m,17)^k(m,19)^S(m,10)),v[E-7]),(m=v[E-15],k(m,7)^k(m,18)^S(m,3))),v[E-16]),P=y(y(y(y(Q,k(m=B,6)^k(m,11)^k(m,25)),B&X^~B&re),h[E]),v[E]),g=y(k(g=M,2)^k(g,13)^k(g,22),M&F^M&j^F&j),Q=re,re=X,X=B,B=y(D,P),D=j,j=F,F=M,M=y(P,g);I[0]=y(M,I[0]),I[1]=y(F,I[1]),I[2]=y(j,I[2]),I[3]=y(D,I[3]),I[4]=y(B,I[4]),I[5]=y(X,I[5]),I[6]=y(re,I[6]),I[7]=y(Q,I[7])}return I}var w=n("./helpers"),k=function(_,R){return _>>>R|_<<32-R},S=function(_,R){return _>>>R};r.exports=function(_){return w.hash(_,x,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){i.read=function(y,x,w,k,T){var _,R,P=8*T-k-1,h=(1<>1,v=-7,g=w?T-1:0,m=w?-1:1,T=y[x+g];for(g+=m,_=T&(1<<-v)-1,T>>=-v,v+=P;0>=-v,v+=k;0>1,g=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=k?0:M-1,T=k?1:-1,M=x<0||x===0&&1/x<0?1:0;for(x=Math.abs(x),isNaN(x)||x===1/0?(P=isNaN(x)?1:0,R=I):(R=Math.floor(Math.log(x)/Math.LN2),x*(k=Math.pow(2,-R))<1&&(R--,k*=2),2<=(x+=1<=R+v?g/k:g*Math.pow(2,1-v))*k&&(R++,k/=2),I<=R+v?(P=0,R=I):1<=R+v?(P=(x*k-1)*Math.pow(2,S),R+=v):(P=x*Math.pow(2,v-1)*Math.pow(2,S),R=0));8<=S;y[w+m]=255&P,m+=T,P/=256,S-=8);for(R=R<>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]),Oo}var Bo,zo;function ys(){return zo||(zo=1,Bo=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]),Bo}var Sr,Uo;function Nm(){if(Uo)return Sr;Uo=1;var t=gs();return Sr=t.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"]),Sr}var Ir,jo;function Lm(){if(jo)return Ir;jo=1;var t=ys();return t=t.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)}),Ir=t.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"]),Ir}var Rr,Vo;function Pm(){if(Vo)return Rr;Vo=1,Rr=R;var t=gs(),e=Cm(),n=ys(),r=Nm(),i=Lm(),o=999,a=9999,s=0,l=1,u=2,c=3,f=4,p=5,d=6,y=7,x=8,w=9,k=10,S=11,_=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function R(P){var h=0,I=0,v=o,g,m,T=[],M=[],F=1,j=0,D=0,B=!1,X=!1,re="",Q;P=P||{};var E=n,oe=t;P.version==="300 es"&&(E=i,oe=r);for(var Me={},C={},h=0;h0)continue;be=fe.slice(0,1).join("")}return he(be),D+=be.length,T=T.slice(be.length),T.length}while(!0)}function K(){return/[^a-fA-F0-9]/.test(g)?(he(T.join("")),v=o,h):(T.push(g),m=g,h+1)}function ee(){return g==="."||/[eE]/.test(g)?(T.push(g),v=p,m=g,h+1):g==="x"&&T.length===1&&T[0]==="0"?(v=S,T.push(g),m=g,h+1):/[^\d]/.test(g)?(he(T.join("")),v=o,h):(T.push(g),m=g,h+1)}function ge(){return g==="f"&&(T.push(g),m=g,h+=1),/[eE]/.test(g)||(g==="-"||g==="+")&&/[eE]/.test(m)?(T.push(g),m=g,h+1):/[^\d]/.test(g)?(he(T.join("")),v=o,h):(T.push(g),m=g,h+1)}function ke(){if(/[^\d\w_]/.test(g)){var fe=T.join("");return C[fe]?v=x:Me[fe]?v=y:v=d,he(T.join("")),v=o,h}return T.push(g),m=g,h+1}}return Rr}var Cr,Ho;function Pm(){if(Ho)return Cr;Ho=1;var t=Lm();Cr=e;function e(n,r){var i=t(r),o=[];return o=o.concat(i(n)),o=o.concat(i(null)),o}return Cr}Pm();function Dm(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Om(t){var e=Dm(t,"string");return typeof e=="symbol"?e:String(e)}function Se(t,e,n){return e=Om(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var le={position:"csm_Position",positionRaw:"csm_PositionRaw",pointSize:"csm_PointSize",fragColor:"csm_FragColor",diffuseColor:"csm_DiffuseColor",normal:"csm_Normal",roughness:"csm_Roughness",metalness:"csm_Metalness",emissive:"csm_Emissive",ao:"csm_AO",bump:"csm_Bump",depthAlpha:"csm_DepthAlpha"},He,Ut;He={},Se(He,"".concat(le.normal),{"#include ":` +`)&&m!=="\\"?(he(T.join("")),v=o,h):(T.push(g),m=g,h+1)}function A(){return b()}function N(){return g==="/"&&m==="*"?(T.push(g),he(T.join("")),v=o,h+1):(T.push(g),m=g,h+1)}function V(){if(m==="."&&/\d/.test(g))return v=p,h;if(m==="/"&&g==="*")return v=s,h;if(m==="/"&&g==="/")return v=l,h;if(g==="."&&T.length){for(;z(T););return v=p,h}if(g===";"||g===")"||g==="("){if(T.length)for(;z(T););return he(g),v=o,h+1}var fe=T.length===2&&g!=="=";if(/[\w_\d\s]/.test(g)||fe){for(;z(T););return v=o,h}return T.push(g),m=g,h+1}function z(fe){var ye=0,Ie,be;do{if(Ie=e.indexOf(fe.slice(0,fe.length+ye).join("")),be=e[Ie],Ie===-1){if(ye--+fe.length>0)continue;be=fe.slice(0,1).join("")}return he(be),D+=be.length,T=T.slice(be.length),T.length}while(!0)}function K(){return/[^a-fA-F0-9]/.test(g)?(he(T.join("")),v=o,h):(T.push(g),m=g,h+1)}function ee(){return g==="."||/[eE]/.test(g)?(T.push(g),v=p,m=g,h+1):g==="x"&&T.length===1&&T[0]==="0"?(v=S,T.push(g),m=g,h+1):/[^\d]/.test(g)?(he(T.join("")),v=o,h):(T.push(g),m=g,h+1)}function ge(){return g==="f"&&(T.push(g),m=g,h+=1),/[eE]/.test(g)||(g==="-"||g==="+")&&/[eE]/.test(m)?(T.push(g),m=g,h+1):/[^\d]/.test(g)?(he(T.join("")),v=o,h):(T.push(g),m=g,h+1)}function ke(){if(/[^\d\w_]/.test(g)){var fe=T.join("");return C[fe]?v=x:Me[fe]?v=y:v=d,he(T.join("")),v=o,h}return T.push(g),m=g,h+1}}return Rr}var Cr,Ho;function Dm(){if(Ho)return Cr;Ho=1;var t=Pm();Cr=e;function e(n,r){var i=t(r),o=[];return o=o.concat(i(n)),o=o.concat(i(null)),o}return Cr}Dm();function Om(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Fm(t){var e=Om(t,"string");return typeof e=="symbol"?e:String(e)}function Se(t,e,n){return e=Fm(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var le={position:"csm_Position",positionRaw:"csm_PositionRaw",pointSize:"csm_PointSize",fragColor:"csm_FragColor",diffuseColor:"csm_DiffuseColor",normal:"csm_Normal",roughness:"csm_Roughness",metalness:"csm_Metalness",emissive:"csm_Emissive",ao:"csm_AO",bump:"csm_Bump",depthAlpha:"csm_DepthAlpha"},He,Ut;He={},Se(He,"".concat(le.normal),{"#include ":` vec3 objectNormal = `.concat(le.normal,`; #ifdef USE_TANGENT vec3 objectTangent = vec3( tangent.xyz ); @@ -500,9 +500,9 @@ list should be an Array.`),b.length===0)return new w(0);if(b.length===1)return b gl_FragColor = `.concat(le.diffuseColor,`; `)}),Se(Ut,"".concat(le.fragColor),{"gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );":` gl_FragColor = `.concat(le.fragColor,`; - `)});var $e;$e={},Se($e,"".concat(le.position),"*"),Se($e,"".concat(le.positionRaw),"*"),Se($e,"".concat(le.normal),"*"),Se($e,"".concat(le.pointSize),["PointsMaterial"]),Se($e,"".concat(le.diffuseColor),"*"),Se($e,"".concat(le.fragColor),"*"),Se($e,"".concat(le.emissive),["MeshStandardMaterial","MeshPhysicalMaterial"]),Se($e,"".concat(le.roughness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Se($e,"".concat(le.metalness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Se($e,"".concat(le.ao),["MeshStandardMaterial","MeshPhysicalMaterial","MeshBasicMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial"]),Se($e,"".concat(le.bump),["MeshLambertMaterial","MeshMatcapMaterial","MeshNormalMaterial","MeshPhongMaterial","MeshPhysicalMaterial","MeshStandardMaterial","MeshToonMaterial","ShadowMaterial"]),Se($e,"".concat(le.depthAlpha),"*");var Fm=`void main() { + `)});var $e;$e={},Se($e,"".concat(le.position),"*"),Se($e,"".concat(le.positionRaw),"*"),Se($e,"".concat(le.normal),"*"),Se($e,"".concat(le.pointSize),["PointsMaterial"]),Se($e,"".concat(le.diffuseColor),"*"),Se($e,"".concat(le.fragColor),"*"),Se($e,"".concat(le.emissive),["MeshStandardMaterial","MeshPhysicalMaterial"]),Se($e,"".concat(le.roughness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Se($e,"".concat(le.metalness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Se($e,"".concat(le.ao),["MeshStandardMaterial","MeshPhysicalMaterial","MeshBasicMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial"]),Se($e,"".concat(le.bump),["MeshLambertMaterial","MeshMatcapMaterial","MeshNormalMaterial","MeshPhongMaterial","MeshPhysicalMaterial","MeshStandardMaterial","MeshToonMaterial","ShadowMaterial"]),Se($e,"".concat(le.depthAlpha),"*");var Bm=`void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); -}`,Bm=`#include +}`,zm=`#include void main() { vec2 center = vec2(0., 1.); @@ -527,6 +527,6 @@ void main() { mvPosition.xy += rotatedPosition; gl_Position = projectionMatrix * mvPosition; -}`;const kn=new ae(0,0,0),Ei=new ae(0,0,0),zm=new ae(0,0,0);function $o(t,e,n){const r=kn.setFromMatrixPosition(t.matrixWorld);r.project(e);const i=n.width/2,o=n.height/2;return[(Number.isNaN(r.x)?0:r.x)*i+i,-(r.y*o)+o,r.z]}function Um(t,e){const n=kn.setFromMatrixPosition(t.matrixWorld),r=Ei.setFromMatrixPosition(e.matrixWorld),i=n.sub(r),o=e.getWorldDirection(zm);return i.angleTo(o)>Math.PI/2}function jm(t,e,n,r){const i=kn.setFromMatrixPosition(t.matrixWorld),o=i.clone();o.project(e),n.setFromCamera(new Pe(o.x,o.y),e);const a=n.intersectObjects(r,!0);if(a.length>0){const s=a[0].distance;return i.distanceTo(n.ray.origin)Math.abs(t)<1e-10?0:t;function xs(t,e,n=""){let r="matrix3d(";for(let i=0;i!==16;i++)r+=Xr(e[i]*t.elements[i])+(i!==15?",":")");return n+r}const $m=(t=>e=>xs(e,t))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),Gm=(t=>(e,n)=>xs(e,t(n),"translate(-50%,-50%)"))(t=>[1/t,1/t,1/t,1,-1/t,-1/t,-1/t,-1,1/t,1/t,1/t,1,1,1,1,1]),Ym=["geometry","material"];new sa;var Zr={exports:{}},Km=Zr.exports,Go;function qm(){return Go||(Go=1,function(t,e){(function(n,r){t.exports=r()})(Km,function(){var n=function(){function r(d){return a.appendChild(d.dom),d}function i(d){for(var y=0;yl+1e3&&(c.update(1e3*u/(d-l),100),l=d,u=0,p)){var y=performance.memory;p.update(y.usedJSHeapSize/1048576,y.jsHeapSizeLimit/1048576)}return d},update:function(){s=this.end()},domElement:a,setMode:i}};return n.Panel=function(r,i,o){var a=1/0,s=0,l=Math.round,u=l(window.devicePixelRatio||1),c=80*u,f=48*u,p=3*u,d=2*u,y=3*u,x=15*u,w=74*u,k=30*u,S=document.createElement("canvas");S.width=c,S.height=f,S.style.cssText="width:80px;height:48px";var _=S.getContext("2d");return _.font="bold "+9*u+"px Helvetica,Arial,sans-serif",_.textBaseline="top",_.fillStyle=o,_.fillRect(0,0,c,f),_.fillStyle=i,_.fillText(r,p,d),_.fillRect(y,x,w,k),_.fillStyle=o,_.globalAlpha=.9,_.fillRect(y,x,w,k),{dom:S,update:function(R,P){a=Math.min(a,R),s=Math.max(s,R),_.fillStyle=o,_.globalAlpha=1,_.fillRect(0,0,c,x),_.fillStyle=i,_.fillText(l(R)+" "+r+" ("+l(a)+"-"+l(s)+")",p,d),_.drawImage(S,y+u,x,w-u,k,y,x,w-u,k),_.fillRect(y+w-u,x,u,k),_.fillStyle=o,_.globalAlpha=.9,_.fillRect(y+w-u,x,u,l((1-R/P)*k))}}},n})}(Zr)),Zr.exports}qm();const Wm={key:0,args:[0,1,64]},Xm={key:1,args:[.5,1,64]},Zm={key:2},Qm=["tone-mapped","map","side","color"];new ze(16777215);const jt=Fe({__name:"Range",props:{modelValue:null,min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","mousedown"],setup(t,{emit:e}){const n=t,r=e,i=W(null);function o(y,x,w){return Math.min(Math.max(y,x),w)}function a(y){const x=y.toString();return x.includes("e-")?Number.parseInt(x.split("e-")[1],10):x.includes(".")?x.split(".")[1].length:0}function s(y,x){const w=a(x),k=10**(w+3);return Number.parseFloat((y*k/k).toFixed(w))}const l=Ue(()=>s(o(n.modelValue,n.min,n.max),n.step)),u=Ue(()=>{const y=(l.value-n.min)/(n.max-n.min)*100;return{width:`${y}%`,backgroundSize:`${y}% 100%`}});function c(y){if(!i.value)return l.value;const x=i.value.getBoundingClientRect(),k=(y.clientX-x.left)/x.width,S=n.max-n.min,_=n.min+S*k,R=Math.round(_/n.step)*n.step;return Math.min(Math.max(R,n.min),n.max)}function f(y){if(n.disabled)return;const x=c(y);r("update:modelValue",x)}function p(y){if(n.disabled)return;y.preventDefault();const x=c(y);r("update:modelValue",x),window.addEventListener("mousemove",f),window.addEventListener("mouseup",d)}function d(y){window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}return Ot(()=>{window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}),(y,x)=>(J(),ie("span",{ref_key:"sliderRef",ref:i,class:lt(["range-slider disabled:pointer-events-none disabled:cursor-default disabled:opacity-50",{disabled:t.disabled}]),bg:"[#e6e1fc] dark:[#676085]","touch-action-none":"",relative:"","inline-block":"","w-full":"","cursor-ew-resize":"","rounded-sm":"",onMousedown:p},[O("span",{style:Dr(u.value),bg:"[#cabeff] dark:[#4e34b9]",relative:"",block:"","rounded-sm":"",h:"[14px]"},null,4),O("span",{role:"slider",class:"slider-thumb",style:Dr({left:`${(l.value-t.min)/(t.max-t.min)*100}%`}),absolute:"","rounded-sm":"",w:"[1px]",h:"[14px]",bg:"neutral-100 dark:neutral-400",top:"50%",transform:"translate-x-[50%] translate-y-[-50%]"},null,4)],34))}}),Jm=Fe({__name:"Model",props:{model:null,idleAnimation:null,loadAnimations:null,position:null,paused:{type:Boolean}},emits:["loadModelProgress","error"],setup(t,{expose:e,emit:n}){const r=t,i=n;let o;const a=W(),s=W(),{scene:l}=Wn(),{onBeforeRender:u}=Vn(),c=ah(),f=sh(),p=W();Be(()=>r.position,([x,w,k])=>{a.value&&a.value.scene.position.set(x,w,k)}),mn(async()=>{if(l.value)try{const x=await lh(r.model,{scene:l.value,lookAt:!0,position:r.position,onProgress:S=>i("loadModelProgress",Number.parseFloat((100*(S.loaded/S.total)).toFixed(2)))});if(!x){console.warn("No VRM model loaded");return}const w=await ih(r.idleAnimation),k=await oh(x,w);if(!k){console.warn("No VRM animation loaded");return}s.value=new gl(x.scene),s.value.clipAction(k).play(),p.value=uh(x),a.value=x,o=u(({delta:S})=>{var _,R,P;(_=s.value)==null||_.update(S),(R=a.value)==null||R.update(S),c.update(a.value,S),f.update(a.value,S),(P=p.value)==null||P.update(S)}).off}catch(x){i("error",x)}}),Ot(()=>{o==null||o(),a.value&&(a.value.scene.removeFromParent(),Or.deepDispose(a.value.scene))}),e({setExpression(x){var w;(w=p.value)==null||w.setEmotionWithResetAfter(x,1e3)}});const{pause:d,resume:y}=Vn();return Be(()=>r.paused,x=>{x?d():y()}),(x,w)=>gn(x.$slots,"default")}}),eg=["position"],tg={absolute:"",bottom:"3",right:"3"},ng={flex:"~ row","cursor-pointer":""},rg=["checked","aria-checked"],ig={key:0,"min-w":"50vw",z:"{var x;(x=p.value)==null||x.setExpression(y)}}),(y,x)=>(J(),Xt(es,{relative:""},{default:Ye(({height:w,width:k})=>[Te(H(yl),{alpha:!0,antialias:!0,width:k,height:w},{default:Ye(()=>[Te(H(Sm)),O("TresPerspectiveCamera",{position:[a.value,s.value,l.value]},null,8,eg),x[14]||(x[14]=O("TresDirectionalLight",{color:16777215,intensity:1.2,position:[1,1,1]},null,-1)),x[15]||(x[15]=O("TresAmbientLight",{color:16777215,intensity:1.5},null,-1)),Te(Jm,{ref_key:"modelRef",ref:p,model:r.model,"idle-animation":r.idleAnimation,position:[u.value,c.value,f.value],paused:r.paused,onLoadModelProgress:x[0]||(x[0]=S=>i("loadModelProgress",S)),onError:x[1]||(x[1]=S=>i("error",S))},null,8,["model","idle-animation","position","paused"])]),_:2,__:[14,15]},1032,["width","height"]),O("div",tg,[O("div",ng,[O("label",{class:lt([o.value?"bg-neutral-300 dark:bg-neutral-200":"bg-neutral-100 dark:bg-neutral-700"]),transition:"all ease-in-out duration-500",text:"lg neutral-500 dark:neutral-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[Et(O("input",{"onUpdate:modelValue":x[2]||(x[2]=S=>o.value=S),checked:o.value,"aria-checked":o.value,name:"showLive2DViewerInspector",type:"checkbox","appearance-none":"","outline-none":"",hidden:""},null,8,rg),[[ii,o.value]]),x[16]||(x[16]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),Te(H(ci),null,{default:Ye(()=>[o.value?(J(),ie("div",ig,[O("div",og,[O("div",ag,[O("span",null,ve(H(d)("stage.viewers.debug-menu.vrm.model.title")),1)]),Te(Di,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:Ye(()=>[O("span",sg,ve(H(d)("stage.viewers.debug-menu.vrm.camera")),1)]),default:Ye(()=>[O("div",lg,[x[17]||(x[17]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"X")],-1)),O("label",ug,[Te(jt,{modelValue:a.value,"onUpdate:modelValue":x[3]||(x[3]=S=>a.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",cg,[O("span",null,ve(a.value),1)]),x[18]||(x[18]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Y")],-1)),O("label",fg,[Te(jt,{modelValue:s.value,"onUpdate:modelValue":x[4]||(x[4]=S=>s.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",dg,[O("span",null,ve(s.value),1)]),x[19]||(x[19]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Z")],-1)),O("label",pg,[Te(jt,{modelValue:l.value,"onUpdate:modelValue":x[5]||(x[5]=S=>l.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",hg,[O("span",null,ve(l.value),1)])])]),_:1}),Te(Di,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:Ye(()=>[O("span",mg,ve(H(d)("stage.viewers.debug-menu.vrm.model.title")),1)]),default:Ye(()=>[O("div",gg,[x[20]||(x[20]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"X")],-1)),O("label",yg,[Te(jt,{modelValue:u.value,"onUpdate:modelValue":x[6]||(x[6]=S=>u.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",xg,[O("span",null,ve(u.value),1)]),x[21]||(x[21]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Y")],-1)),O("label",vg,[Te(jt,{modelValue:c.value,"onUpdate:modelValue":x[7]||(x[7]=S=>c.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",bg,[O("span",null,ve(c.value),1)]),x[22]||(x[22]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Z")],-1)),O("label",wg,[Te(jt,{modelValue:f.value,"onUpdate:modelValue":x[8]||(x[8]=S=>f.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",kg,[O("span",null,ve(f.value),1)])])]),_:1}),O("div",Tg,[O("span",null,ve(H(d)("stage.viewers.debug-menu.emotions")),1)]),O("div",_g,[O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[9]||(x[9]=S=>{var _;return(_=p.value)==null?void 0:_.setExpression("neutral")})},ve(H(d)("stage.viewers.debug-menu.emotions-btn.neutral")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[10]||(x[10]=S=>{var _;return(_=p.value)==null?void 0:_.setExpression("surprised")})},ve(H(d)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[11]||(x[11]=S=>{var _;return(_=p.value)==null?void 0:_.setExpression("sad")})},ve(H(d)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[12]||(x[12]=S=>{var _;return(_=p.value)==null?void 0:_.setExpression("angry")})},ve(H(d)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[13]||(x[13]=S=>{var _;return(_=p.value)==null?void 0:_.setExpression("happy")})},ve(H(d)("stage.viewers.debug-menu.emotions-btn.happy")),1)])])])):at("",!0)]),_:1})])]),_:1}))}}),Mg={relative:""},Ag={"h-full":"","w-full":""},Sg={key:0,class:"animate-stripe",absolute:"",left:"1/2",bottom:"20%",z:"20","rounded-2xl":"",text:"primary-600","px-2":"","py-2":"",transform:"translate-x--1/2"},Ig={bg:"primary-50","rounded-xl":"","px-10":"","py-6":""},Rg=["innerHTML"],Cg=Fe({__name:"Stage",props:{paused:{type:Boolean,default:!1}},setup(t){const e=W(),n=W(),{stageView:r}=Ke(Wt()),{mouthOpenSize:i}=Ke(ql()),{audioContext:o,calculateVolume:a}=pa(),{onBeforeMessageComposed:s,onBeforeSend:l,onTokenLiteral:u,onTokenSpecial:c,onStreamEnd:f,streamingMessage:p,onAssistantResponseEnd:d}=St(),{process:y}=ki(),x=ui(),w=W(),k=W(!1),S=W(!1),_=Dn({handlers:[E=>new Promise(oe=>{const Me=o.createBufferSource();Me.buffer=E.data.audioBuffer,Me.connect(o.destination),Me.connect(w.value),k.value=!0,Me.start(0),Me.onended=()=>{k.value=!1,oe()}})]}),R=Nl(),{ssmlEnabled:P,activeSpeechProvider:h,activeSpeechModel:I,activeSpeechVoice:v,pitch:g}=Ke(R);async function m(E){try{if(!h.value){console.warn("No active speech provider configured");return}if(!v.value){console.warn("No active speech voice configured");return}const oe=x.getProviderInstance(h.value);if(!oe){console.error("Failed to initialize speech provider");return}const Me=x.getProviderConfig(h.value),C=P.value?R.generateSSML(E.data,v.value,{...Me,pitch:g.value}):E.data,he=await Ll({...oe.speech(I.value,Me),input:C,voice:v.value.id}),we=await o.decodeAudioData(he);await _.add({audioBuffer:we,text:E.data})}catch(oe){console.error("Speech generation failed:",oe)}}const T=Dn({handlers:[m]});T.on("add",E=>{console.debug("ttsQueue added",E)});const M=Pl(T),{live2dCurrentMotion:F}=Ke(Wt()),j=Dn({handlers:[async E=>{if(r.value==="3d"){const oe=Al[E.data];if(!oe)return;await n.value.setExpression(oe)}else r.value==="2d"&&(F.value={group:Sl[E.data]})}]}),D=Dl(j);D.onHandlerEvent("emotion",E=>{console.debug("emotion detected",E)});const B=Ol();B.onHandlerEvent("delay",E=>{console.debug("delay detected",E)});function X(){requestAnimationFrame(X),k.value&&(i.value=a(w.value,"linear"))}function re(){S.value||(X(),o.resume(),S.value=!0)}function Q(){w.value||(w.value=o.createAnalyser())}return s(async()=>{Q(),re()}),l(async()=>{F.value={group:Ml}}),u(async E=>{await M.add(E)}),c(async E=>{await B.add(E),await D.add(E)}),f(async()=>{await B.add(Fl)}),d(async E=>{}),Ot(()=>{S.value=!1}),mn(async()=>{e.value=vs({connection:{bundles:Cl()}}),await e.value.execute("CREATE TABLE memory_test (vec FLOAT[768]);")}),(E,oe)=>(J(),ie("div",Mg,[O("div",Ag,[H(r)==="2d"?(J(),Xt(vh,{key:0,"mouth-open-size":H(i),"min-w":"50% (J(),ie("header",Fg,[O("div",Bg,[Te(Hl)]),Te(H(xl),{class:"m-1 block max-h-[10lh] min-h-[1lh] rounded-lg bg-neutral-100 p-2 text-lg text-neutral-500 outline-none dark:bg-neutral-800 dark:text-neutral-400",to:"/settings"},{default:Ye(()=>n[0]||(n[0]=[O("div",{"i-solar:settings-minimalistic-bold-duotone":""},null,-1)])),_:1,__:[0]})]))}}),Ug="/assets/worker-BwSRVkNn.js";async function jg(t,e){const n=new ArrayBuffer(44+t.length*2),r=new DataView(n);Pn(r,0,"RIFF"),r.setUint32(4,36+t.length*2,!0),Pn(r,8,"WAVE"),Pn(r,12,"fmt "),r.setUint32(16,16,!0),r.setUint16(20,1,!0),r.setUint16(22,1,!0),r.setUint32(24,e,!0),r.setUint32(28,e*2,!0),r.setUint16(32,2,!0),r.setUint16(34,16,!0),Pn(r,36,"data"),r.setUint32(40,t.length*2,!0),Vg(r,44,t);const i=new Blob([r],{type:"audio/wav"});return new Promise((o,a)=>{const s=new FileReader;s.onload=()=>{const l=s.result.split(",")[1];o(l)},s.onerror=a,s.readAsDataURL(i)})}function Pn(t,e,n){for(let r=0;r{Hn().then(()=>{i.update(),o.value=i.height.value})}),u(async()=>{Hn().then(()=>{i.update(),o.value=i.height.value})}),(c,f)=>{const p=ca("auto-animate");return J(),ie("div",Hg,[f[2]||(f[2]=O("div",{"flex-1":""},null,-1)),Et((J(),ie("div",{ref_key:"chatHistoryRef",ref:e,"h-full":"","w-full":"",flex:"~ col","overflow-scroll":""},[f[1]||(f[1]=O("div",{"flex-1":""},null,-1)),(J(!0),ie(si,null,li(H(n),(d,y)=>(J(),ie("div",{key:y,"mb-2":""},[d.role==="error"?(J(),ie("div",$g,[O("div",Gg,[O("div",Yg,[O("div",Kg,[O("span",qg,ve(H(a)("stage.chat.message.character-name.core-system")),1)]),f[0]||(f[0]=O("div",{"i-solar:danger-triangle-bold-duotone":"","text-violet-500":""},null,-1))]),H(r)&&y===H(n).length-1?(J(),ie("div",Wg)):(J(),ie("div",{key:1,class:"markdown-content break-words text-violet-500",text:"base {if(!T||!T.trim())return;const M=a.getProviderConfig(s.value);await x(T,{chatProvider:a.getProviderInstance(s.value),model:l.value,providerConfig:M})}});async function h(){if(!(!e.value.trim()||o.value))try{const T=a.getProviderConfig(s.value);await x(e.value,{chatProvider:a.getProviderInstance(s.value),model:l.value,providerConfig:T})}catch(T){k.value.pop(),k.value.push({role:"error",content:T.message})}}const{destroy:I,start:v}=Xa(y,{onSpeechStart:()=>{n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:T=>{n.value=!1,g(T)},auto:!1});async function g(T){await S.resume();const M=await jg(T,S.sampleRate);R({type:"generate",data:{audio:M,language:"en"}})}async function m(T){const M=T.target,F=c.value.find(j=>j.deviceId===M.value);if(!F){p.value=void 0;return}p.value=F}return Be(d,async T=>{T==="false"&&(I(),P())}),Be(i,async T=>{T&&await f()}),mn(()=>{v()}),w(async()=>{e.value=""}),(T,M)=>(J(),ie("div",ly,[O("fieldset",uy,[O("label",{class:lt([r.value==="chat"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="chat"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":H(u)}]),flex:"~ row",checked:r.value==="chat","aria-checked":r.value==="chat",border:"solid l-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-l-lg":"","px-2":""},[Et(O("input",{"onUpdate:modelValue":M[0]||(M[0]=F=>r.value=F),type:"radio",name:"tab",value:"chat",hidden:""},null,512),[[ar,r.value]]),M[7]||(M[7]=O("div",{"i-solar:dialog-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",fy,[O("span",dy,ve(H(_)("stage.chat.tabs.chat")),1)])],10,cy),O("label",{class:lt([r.value==="custom"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="custom"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":H(u)}]),flex:"~ row",checked:r.value==="custom","aria-checked":r.value==="custom",border:"solid t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","px-2":""},[Et(O("input",{"onUpdate:modelValue":M[1]||(M[1]=F=>r.value=F),type:"radio",name:"tab",value:"custom",hidden:""},null,512),[[ar,r.value]]),M[8]||(M[8]=O("div",{"i-solar:star-fall-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",hy,[O("span",null,ve(H(_)("stage.chat.tabs.custom")),1)])],10,py),O("label",{class:lt([r.value==="clothes"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="clothes"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":H(u)}]),flex:"~ row",checked:r.value==="clothes","aria-checked":r.value==="clothes",border:"solid r-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-r-lg":"","px-2":""},[Et(O("input",{"onUpdate:modelValue":M[2]||(M[2]=F=>r.value=F),type:"radio",name:"tab",value:"clothes",hidden:""},null,512),[[ar,r.value]]),M[9]||(M[9]=O("div",{"i-solar:magic-stick-3-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",gy,[O("span",null,ve(H(_)("stage.chat.tabs.clothes")),1)])],10,my)]),O("div",yy,[O("div",xy,[Te(sy,{"h-full":"","flex-1":"","p-4":"",w:"full","max-h":"e.value=F),placeholder:H(_)("stage.message"),text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500",bg:"primary-100 dark:primary-400/20","min-h":"[100px]","max-h":"[300px]","w-full":"","rounded-t-xl":"","p-4":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",class:lt({"transition-colors-none placeholder:transition-colors-none":H(u)}),onSubmit:h,onCompositionstart:M[4]||(M[4]=F=>o.value=!0),onCompositionend:M[5]||(M[5]=F=>o.value=!1)},null,8,["modelValue","placeholder","class"])])])]),O("div",by,[O("div",wy,[Te(H(ci),null,{default:Ye(()=>[i.value?(J(),ie("fieldset",ky,[(J(!0),ie(si,null,li(H(c),(F,j)=>(J(),ie("label",{key:j,class:"[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900"},[O("input",{type:"radio",name:"audioInput",value:F.deviceId,hidden:"",onChange:m},null,40,Ty),O("div",_y,[O("div",Ey,[F.deviceId===H(y)?(J(),ie("div",My)):at("",!0)]),O("span",{"inline-block":"",class:lt([F.deviceId===H(y)?"cyan-400 dark:text-white":"cyan-400/50 dark:text-white/50"]),transition:"all duration-250 ease-in-out"},ve(F.label),3)])]))),128))])):at("",!0)]),_:1}),O("label",{bg:"complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700",transition:"all duration-250 ease-in-out",class:lt({"transition-colors-none":H(u)}),text:"complementary-400","h-fit":"",flex:"","cursor-pointer":"","items-center":"","justify-center":"","gap-2":"","rounded-full":"","px-4":"","py-2":""},[Et(O("input",{"onUpdate:modelValue":M[6]||(M[6]=F=>i.value=F),type:"checkbox",hidden:""},null,512),[[ii,i.value]]),M[10]||(M[10]=O("div",{"i-solar:microphone-2-bold-duotone":""},null,-1)),O("div",null,[n.value?(J(),ie("span",Sy,"Listening...")):(J(),ie("span",Ay,ve(H(_)("settings.microphone")),1))])],2)])])]))}}),Ry=xn(Iy,[["__scopeId","data-v-5b585ca8"]]),Cy={py:"1",flex:"~ col",rounded:"lg","overflow-hidden":""},Ny={key:0,flex:"",mr:"12"},Ly={flex:"~ col",border:"4 solid primary-200/50 dark:primary-500/50",shadow:"md primary-200/50 dark:none","min-w-20":"","rounded-lg":"","px-2":"","py-1":"","backdrop-blur-sm":"",h:"unset {Hn().then(()=>{i.update(),o.value=i.height.value})}),l(async()=>{Hn().then(()=>{i.update(),o.value=i.height.value})}),(u,c)=>{const f=ca("auto-animate");return J(),ie("div",Cy,[c[1]||(c[1]=O("div",{"flex-1":""},null,-1)),Et((J(),ie("div",{ref_key:"chatHistoryRef",ref:e,"h-full":"","w-full":"","max-h":"30vh",flex:"~ col","overflow-scroll":"",class:"chat-history"},[c[0]||(c[0]=O("div",{"flex-1":""},null,-1)),(J(!0),ie(si,null,li(H(r),(p,d)=>(J(),ie("div",{key:d,"mb-2":""},[p.role==="assistant"?(J(),ie("div",Ny,[O("div",Ly,[O("div",null,[O("span",Py,ve(H(n)("stage.chat.message.character-name.airi")),1)]),p.content?(J(),ie("div",{key:0,class:"markdown-content",text:"base {n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:k=>{n.value=!1,w()},auto:!1});function w(k){alert("Transcription is not implemented yet")}return Be(s,async k=>{k==="false"&&y()}),f(async()=>{e.value=""}),mn(()=>{x()}),(k,S)=>(J(),ie("div",null,[O("div",$y,[Te(Hy,{absolute:"","left-0":"","top-0":"",transform:"translate-y-[-100%]","w-full":""}),O("div",Gy,[Te(H(da),{modelValue:e.value,"onUpdate:modelValue":S[0]||(S[0]=_=>e.value=_),placeholder:H(p)("stage.message"),border:"solid 2 primary-100 dark:primary-400/20",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500",bg:"primary-100 dark:primary-400/20","max-h":"[10lh]","min-h":"[1lh]","w-full":"","resize-none":"","overflow-y-scroll":"","rounded-xl":"","p-2":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",class:lt({"transition-colors-none placeholder:transition-colors-none":H(u)}),onSubmit:d,onCompositionstart:S[1]||(S[1]=_=>r.value=!0),onCompositionend:S[2]||(S[2]=_=>r.value=!1)},null,8,["modelValue","placeholder","class"])])])]))}}),Ky={class:"relative"},qy={absolute:"","left-0":"","right-0":"","top-0":"","w-full":"","overflow-hidden":""},Wy=Fe({__name:"AnimatedWave",props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:"oklch(95% 0.10 var(--theme-colors-hue))"},direction:{default:"down"},movementDirection:{default:"left"},animationSpeed:{default:50}},setup(t){const e=t,n=W(e.height),r=W(e.amplitude),i=W(e.waveLength),o=W(e.fillColor),a=W(e.direction),s=W(e.movementDirection);function l(f,p,d,y,x){const w=[],S=Math.ceil(f/y)*y,_=1,R=x==="up"?d:p-d;w.push(`M 0 ${R}`);const P=Math.PI*2/y;for(let I=0;I<=S;I+=_){const v=d*Math.sin(P*I),g=x==="up"?R-v:R+v;w.push(`L ${I} ${g}`)}const h=x==="up"?p:0;return w.push(`L ${S} ${h}`),w.push(`L 0 ${h} Z`),w.join(" ")}const u=Ue(()=>n.value+r.value*2),c=Ue(()=>{const f=` +}`;const kn=new ae(0,0,0),Ei=new ae(0,0,0),Um=new ae(0,0,0);function $o(t,e,n){const r=kn.setFromMatrixPosition(t.matrixWorld);r.project(e);const i=n.width/2,o=n.height/2;return[(Number.isNaN(r.x)?0:r.x)*i+i,-(r.y*o)+o,r.z]}function jm(t,e){const n=kn.setFromMatrixPosition(t.matrixWorld),r=Ei.setFromMatrixPosition(e.matrixWorld),i=n.sub(r),o=e.getWorldDirection(Um);return i.angleTo(o)>Math.PI/2}function Vm(t,e,n,r){const i=kn.setFromMatrixPosition(t.matrixWorld),o=i.clone();o.project(e),n.setFromCamera(new Pe(o.x,o.y),e);const a=n.intersectObjects(r,!0);if(a.length>0){const s=a[0].distance;return i.distanceTo(n.ray.origin)Math.abs(t)<1e-10?0:t;function xs(t,e,n=""){let r="matrix3d(";for(let i=0;i!==16;i++)r+=Xr(e[i]*t.elements[i])+(i!==15?",":")");return n+r}const Gm=(t=>e=>xs(e,t))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),Ym=(t=>(e,n)=>xs(e,t(n),"translate(-50%,-50%)"))(t=>[1/t,1/t,1/t,1,-1/t,-1/t,-1/t,-1,1/t,1/t,1/t,1,1,1,1,1]),Km=["geometry","material"];new sa;var Zr={exports:{}},qm=Zr.exports,Go;function Wm(){return Go||(Go=1,function(t,e){(function(n,r){t.exports=r()})(qm,function(){var n=function(){function r(d){return a.appendChild(d.dom),d}function i(d){for(var y=0;yl+1e3&&(c.update(1e3*u/(d-l),100),l=d,u=0,p)){var y=performance.memory;p.update(y.usedJSHeapSize/1048576,y.jsHeapSizeLimit/1048576)}return d},update:function(){s=this.end()},domElement:a,setMode:i}};return n.Panel=function(r,i,o){var a=1/0,s=0,l=Math.round,u=l(window.devicePixelRatio||1),c=80*u,f=48*u,p=3*u,d=2*u,y=3*u,x=15*u,w=74*u,k=30*u,S=document.createElement("canvas");S.width=c,S.height=f,S.style.cssText="width:80px;height:48px";var _=S.getContext("2d");return _.font="bold "+9*u+"px Helvetica,Arial,sans-serif",_.textBaseline="top",_.fillStyle=o,_.fillRect(0,0,c,f),_.fillStyle=i,_.fillText(r,p,d),_.fillRect(y,x,w,k),_.fillStyle=o,_.globalAlpha=.9,_.fillRect(y,x,w,k),{dom:S,update:function(R,P){a=Math.min(a,R),s=Math.max(s,R),_.fillStyle=o,_.globalAlpha=1,_.fillRect(0,0,c,x),_.fillStyle=i,_.fillText(l(R)+" "+r+" ("+l(a)+"-"+l(s)+")",p,d),_.drawImage(S,y+u,x,w-u,k,y,x,w-u,k),_.fillRect(y+w-u,x,u,k),_.fillStyle=o,_.globalAlpha=.9,_.fillRect(y+w-u,x,u,l((1-R/P)*k))}}},n})}(Zr)),Zr.exports}Wm();const Xm={key:0,args:[0,1,64]},Zm={key:1,args:[.5,1,64]},Qm={key:2},Jm=["tone-mapped","map","side","color"];new ze(16777215);const jt=Fe({__name:"Range",props:{modelValue:null,min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","mousedown"],setup(t,{emit:e}){const n=t,r=e,i=W(null);function o(y,x,w){return Math.min(Math.max(y,x),w)}function a(y){const x=y.toString();return x.includes("e-")?Number.parseInt(x.split("e-")[1],10):x.includes(".")?x.split(".")[1].length:0}function s(y,x){const w=a(x),k=10**(w+3);return Number.parseFloat((y*k/k).toFixed(w))}const l=Ue(()=>s(o(n.modelValue,n.min,n.max),n.step)),u=Ue(()=>{const y=(l.value-n.min)/(n.max-n.min)*100;return{width:`${y}%`,backgroundSize:`${y}% 100%`}});function c(y){if(!i.value)return l.value;const x=i.value.getBoundingClientRect(),k=(y.clientX-x.left)/x.width,S=n.max-n.min,_=n.min+S*k,R=Math.round(_/n.step)*n.step;return Math.min(Math.max(R,n.min),n.max)}function f(y){if(n.disabled)return;const x=c(y);r("update:modelValue",x)}function p(y){if(n.disabled)return;y.preventDefault();const x=c(y);r("update:modelValue",x),window.addEventListener("mousemove",f),window.addEventListener("mouseup",d)}function d(y){window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}return Ot(()=>{window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}),(y,x)=>(J(),ie("span",{ref_key:"sliderRef",ref:i,class:lt(["range-slider disabled:pointer-events-none disabled:cursor-default disabled:opacity-50",{disabled:t.disabled}]),bg:"[#e6e1fc] dark:[#676085]","touch-action-none":"",relative:"","inline-block":"","w-full":"","cursor-ew-resize":"","rounded-sm":"",onMousedown:p},[O("span",{style:Dr(u.value),bg:"[#cabeff] dark:[#4e34b9]",relative:"",block:"","rounded-sm":"",h:"[14px]"},null,4),O("span",{role:"slider",class:"slider-thumb",style:Dr({left:`${(l.value-t.min)/(t.max-t.min)*100}%`}),absolute:"","rounded-sm":"",w:"[1px]",h:"[14px]",bg:"neutral-100 dark:neutral-400",top:"50%",transform:"translate-x-[50%] translate-y-[-50%]"},null,4)],34))}}),eg=Fe({__name:"Model",props:{model:null,idleAnimation:null,loadAnimations:null,position:null,paused:{type:Boolean}},emits:["loadModelProgress","error"],setup(t,{expose:e,emit:n}){const r=t,i=n;let o;const a=W(),s=W(),{scene:l}=Wn(),{onBeforeRender:u}=Vn(),c=sh(),f=lh(),p=W();Be(()=>r.position,([x,w,k])=>{a.value&&a.value.scene.position.set(x,w,k)}),mn(async()=>{if(l.value)try{const x=await uh(r.model,{scene:l.value,lookAt:!0,position:r.position,onProgress:S=>i("loadModelProgress",Number.parseFloat((100*(S.loaded/S.total)).toFixed(2)))});if(!x){console.warn("No VRM model loaded");return}const w=await oh(r.idleAnimation),k=await ah(x,w);if(!k){console.warn("No VRM animation loaded");return}s.value=new gl(x.scene),s.value.clipAction(k).play(),p.value=ch(x),a.value=x,o=u(({delta:S})=>{var _,R,P;(_=s.value)==null||_.update(S),(R=a.value)==null||R.update(S),c.update(a.value,S),f.update(a.value,S),(P=p.value)==null||P.update(S)}).off}catch(x){i("error",x)}}),Ot(()=>{o==null||o(),a.value&&(a.value.scene.removeFromParent(),Or.deepDispose(a.value.scene))}),e({setExpression(x){var w;(w=p.value)==null||w.setEmotionWithResetAfter(x,1e3)}});const{pause:d,resume:y}=Vn();return Be(()=>r.paused,x=>{x?d():y()}),(x,w)=>gn(x.$slots,"default")}}),tg=["position"],ng={absolute:"",bottom:"3",right:"3"},rg={flex:"~ row","cursor-pointer":""},ig=["checked","aria-checked"],og={key:0,"min-w":"50vw",z:"{var x;(x=p.value)==null||x.setExpression(y)}}),(y,x)=>(J(),Xt(es,{relative:""},{default:Ye(({height:w,width:k})=>[Te(H(yl),{alpha:!0,antialias:!0,width:k,height:w},{default:Ye(()=>[Te(H(Im)),O("TresPerspectiveCamera",{position:[a.value,s.value,l.value]},null,8,tg),x[14]||(x[14]=O("TresDirectionalLight",{color:16777215,intensity:1.2,position:[1,1,1]},null,-1)),x[15]||(x[15]=O("TresAmbientLight",{color:16777215,intensity:1.5},null,-1)),Te(eg,{ref_key:"modelRef",ref:p,model:r.model,"idle-animation":r.idleAnimation,position:[u.value,c.value,f.value],paused:r.paused,onLoadModelProgress:x[0]||(x[0]=S=>i("loadModelProgress",S)),onError:x[1]||(x[1]=S=>i("error",S))},null,8,["model","idle-animation","position","paused"])]),_:2,__:[14,15]},1032,["width","height"]),O("div",ng,[O("div",rg,[O("label",{class:lt([o.value?"bg-neutral-300 dark:bg-neutral-200":"bg-neutral-100 dark:bg-neutral-700"]),transition:"all ease-in-out duration-500",text:"lg neutral-500 dark:neutral-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[Et(O("input",{"onUpdate:modelValue":x[2]||(x[2]=S=>o.value=S),checked:o.value,"aria-checked":o.value,name:"showLive2DViewerInspector",type:"checkbox","appearance-none":"","outline-none":"",hidden:""},null,8,ig),[[ii,o.value]]),x[16]||(x[16]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),Te(H(ci),null,{default:Ye(()=>[o.value?(J(),ie("div",og,[O("div",ag,[O("div",sg,[O("span",null,ve(H(d)("stage.viewers.debug-menu.vrm.model.title")),1)]),Te(Di,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:Ye(()=>[O("span",lg,ve(H(d)("stage.viewers.debug-menu.vrm.camera")),1)]),default:Ye(()=>[O("div",ug,[x[17]||(x[17]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"X")],-1)),O("label",cg,[Te(jt,{modelValue:a.value,"onUpdate:modelValue":x[3]||(x[3]=S=>a.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",fg,[O("span",null,ve(a.value),1)]),x[18]||(x[18]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Y")],-1)),O("label",dg,[Te(jt,{modelValue:s.value,"onUpdate:modelValue":x[4]||(x[4]=S=>s.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",pg,[O("span",null,ve(s.value),1)]),x[19]||(x[19]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Z")],-1)),O("label",hg,[Te(jt,{modelValue:l.value,"onUpdate:modelValue":x[5]||(x[5]=S=>l.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",mg,[O("span",null,ve(l.value),1)])])]),_:1}),Te(Di,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:Ye(()=>[O("span",gg,ve(H(d)("stage.viewers.debug-menu.vrm.model.title")),1)]),default:Ye(()=>[O("div",yg,[x[20]||(x[20]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"X")],-1)),O("label",xg,[Te(jt,{modelValue:u.value,"onUpdate:modelValue":x[6]||(x[6]=S=>u.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",vg,[O("span",null,ve(u.value),1)]),x[21]||(x[21]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Y")],-1)),O("label",bg,[Te(jt,{modelValue:c.value,"onUpdate:modelValue":x[7]||(x[7]=S=>c.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",wg,[O("span",null,ve(c.value),1)]),x[22]||(x[22]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Z")],-1)),O("label",kg,[Te(jt,{modelValue:f.value,"onUpdate:modelValue":x[8]||(x[8]=S=>f.value=S),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Tg,[O("span",null,ve(f.value),1)])])]),_:1}),O("div",_g,[O("span",null,ve(H(d)("stage.viewers.debug-menu.emotions")),1)]),O("div",Eg,[O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[9]||(x[9]=S=>{var _;return(_=p.value)==null?void 0:_.setExpression("neutral")})},ve(H(d)("stage.viewers.debug-menu.emotions-btn.neutral")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[10]||(x[10]=S=>{var _;return(_=p.value)==null?void 0:_.setExpression("surprised")})},ve(H(d)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[11]||(x[11]=S=>{var _;return(_=p.value)==null?void 0:_.setExpression("sad")})},ve(H(d)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[12]||(x[12]=S=>{var _;return(_=p.value)==null?void 0:_.setExpression("angry")})},ve(H(d)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[13]||(x[13]=S=>{var _;return(_=p.value)==null?void 0:_.setExpression("happy")})},ve(H(d)("stage.viewers.debug-menu.emotions-btn.happy")),1)])])])):at("",!0)]),_:1})])]),_:1}))}}),Ag={relative:""},Sg={"h-full":"","w-full":""},Ig={key:0,class:"animate-stripe",absolute:"",left:"1/2",bottom:"20%",z:"20","rounded-2xl":"",text:"primary-600","px-2":"","py-2":"",transform:"translate-x--1/2"},Rg={bg:"primary-50","rounded-xl":"","px-10":"","py-6":""},Cg=["innerHTML"],Ng=Fe({__name:"Stage",props:{paused:{type:Boolean,default:!1},focusAt:null},setup(t){const e=W(),n=W(),{stageView:r}=Ke(Wt()),{mouthOpenSize:i}=Ke(Wl()),{audioContext:o,calculateVolume:a}=pa(),{onBeforeMessageComposed:s,onBeforeSend:l,onTokenLiteral:u,onTokenSpecial:c,onStreamEnd:f,streamingMessage:p,onAssistantResponseEnd:d}=St(),{process:y}=ki(),x=ui(),w=W(),k=W(!1),S=W(!1),_=Dn({handlers:[E=>new Promise(oe=>{const Me=o.createBufferSource();Me.buffer=E.data.audioBuffer,Me.connect(o.destination),Me.connect(w.value),k.value=!0,Me.start(0),Me.onended=()=>{k.value=!1,oe()}})]}),R=Ll(),{ssmlEnabled:P,activeSpeechProvider:h,activeSpeechModel:I,activeSpeechVoice:v,pitch:g}=Ke(R);async function m(E){try{if(!h.value){console.warn("No active speech provider configured");return}if(!v.value){console.warn("No active speech voice configured");return}const oe=x.getProviderInstance(h.value);if(!oe){console.error("Failed to initialize speech provider");return}const Me=x.getProviderConfig(h.value),C=P.value?R.generateSSML(E.data,v.value,{...Me,pitch:g.value}):E.data,he=await Pl({...oe.speech(I.value,Me),input:C,voice:v.value.id}),we=await o.decodeAudioData(he);await _.add({audioBuffer:we,text:E.data})}catch(oe){console.error("Speech generation failed:",oe)}}const T=Dn({handlers:[m]});T.on("add",E=>{console.debug("ttsQueue added",E)});const M=Dl(T),{live2dCurrentMotion:F}=Ke(Wt()),j=Dn({handlers:[async E=>{if(r.value==="3d"){const oe=Sl[E.data];if(!oe)return;await n.value.setExpression(oe)}else r.value==="2d"&&(F.value={group:Il[E.data]})}]}),D=Ol(j);D.onHandlerEvent("emotion",E=>{console.debug("emotion detected",E)});const B=Fl();B.onHandlerEvent("delay",E=>{console.debug("delay detected",E)});function X(){requestAnimationFrame(X),k.value&&(i.value=a(w.value,"linear"))}function re(){S.value||(X(),o.resume(),S.value=!0)}function Q(){w.value||(w.value=o.createAnalyser())}return s(async()=>{Q(),re()}),l(async()=>{F.value={group:Al}}),u(async E=>{await M.add(E)}),c(async E=>{await B.add(E),await D.add(E)}),f(async()=>{await B.add(Bl)}),d(async E=>{}),Ot(()=>{S.value=!1}),mn(async()=>{e.value=vs({connection:{bundles:Nl()}}),await e.value.execute("CREATE TABLE memory_test (vec FLOAT[768]);")}),(E,oe)=>(J(),ie("div",Ag,[O("div",Sg,[H(r)==="2d"?(J(),Xt(bh,{key:0,"focus-at":t.focusAt,"mouth-open-size":H(i),"min-w":"50% (J(),ie("header",Bg,[O("div",zg,[Te($l)]),Te(H(xl),{class:"m-1 block max-h-[10lh] min-h-[1lh] rounded-lg bg-neutral-100 p-2 text-lg text-neutral-500 outline-none dark:bg-neutral-800 dark:text-neutral-400",to:"/settings"},{default:Ye(()=>n[0]||(n[0]=[O("div",{"i-solar:settings-minimalistic-bold-duotone":""},null,-1)])),_:1,__:[0]})]))}}),jg="/assets/worker-BwSRVkNn.js";async function Vg(t,e){const n=new ArrayBuffer(44+t.length*2),r=new DataView(n);Pn(r,0,"RIFF"),r.setUint32(4,36+t.length*2,!0),Pn(r,8,"WAVE"),Pn(r,12,"fmt "),r.setUint32(16,16,!0),r.setUint16(20,1,!0),r.setUint16(22,1,!0),r.setUint32(24,e,!0),r.setUint32(28,e*2,!0),r.setUint16(32,2,!0),r.setUint16(34,16,!0),Pn(r,36,"data"),r.setUint32(40,t.length*2,!0),Hg(r,44,t);const i=new Blob([r],{type:"audio/wav"});return new Promise((o,a)=>{const s=new FileReader;s.onload=()=>{const l=s.result.split(",")[1];o(l)},s.onerror=a,s.readAsDataURL(i)})}function Pn(t,e,n){for(let r=0;r{Hn().then(()=>{i.update(),o.value=i.height.value})}),u(async()=>{Hn().then(()=>{i.update(),o.value=i.height.value})}),(c,f)=>{const p=ca("auto-animate");return J(),ie("div",$g,[f[2]||(f[2]=O("div",{"flex-1":""},null,-1)),Et((J(),ie("div",{ref_key:"chatHistoryRef",ref:e,"h-full":"","w-full":"",flex:"~ col","overflow-scroll":""},[f[1]||(f[1]=O("div",{"flex-1":""},null,-1)),(J(!0),ie(si,null,li(H(n),(d,y)=>(J(),ie("div",{key:y,"mb-2":""},[d.role==="error"?(J(),ie("div",Gg,[O("div",Yg,[O("div",Kg,[O("div",qg,[O("span",Wg,ve(H(a)("stage.chat.message.character-name.core-system")),1)]),f[0]||(f[0]=O("div",{"i-solar:danger-triangle-bold-duotone":"","text-violet-500":""},null,-1))]),H(r)&&y===H(n).length-1?(J(),ie("div",Xg)):(J(),ie("div",{key:1,class:"markdown-content break-words text-violet-500",text:"base {if(!T||!T.trim())return;const M=a.getProviderConfig(s.value);await x(T,{chatProvider:a.getProviderInstance(s.value),model:l.value,providerConfig:M})}});async function h(){if(!(!e.value.trim()||o.value))try{const T=a.getProviderConfig(s.value);await x(e.value,{chatProvider:a.getProviderInstance(s.value),model:l.value,providerConfig:T})}catch(T){k.value.pop(),k.value.push({role:"error",content:T.message})}}const{destroy:I,start:v}=Xa(y,{onSpeechStart:()=>{n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:T=>{n.value=!1,g(T)},auto:!1});async function g(T){await S.resume();const M=await Vg(T,S.sampleRate);R({type:"generate",data:{audio:M,language:"en"}})}async function m(T){const M=T.target,F=c.value.find(j=>j.deviceId===M.value);if(!F){p.value=void 0;return}p.value=F}return Be(d,async T=>{T==="false"&&(I(),P())}),Be(i,async T=>{T&&await f()}),mn(()=>{v()}),w(async()=>{e.value=""}),(T,M)=>(J(),ie("div",uy,[O("fieldset",cy,[O("label",{class:lt([r.value==="chat"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="chat"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":H(u)}]),flex:"~ row",checked:r.value==="chat","aria-checked":r.value==="chat",border:"solid l-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-l-lg":"","px-2":""},[Et(O("input",{"onUpdate:modelValue":M[0]||(M[0]=F=>r.value=F),type:"radio",name:"tab",value:"chat",hidden:""},null,512),[[ar,r.value]]),M[7]||(M[7]=O("div",{"i-solar:dialog-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",dy,[O("span",py,ve(H(_)("stage.chat.tabs.chat")),1)])],10,fy),O("label",{class:lt([r.value==="custom"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="custom"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":H(u)}]),flex:"~ row",checked:r.value==="custom","aria-checked":r.value==="custom",border:"solid t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","px-2":""},[Et(O("input",{"onUpdate:modelValue":M[1]||(M[1]=F=>r.value=F),type:"radio",name:"tab",value:"custom",hidden:""},null,512),[[ar,r.value]]),M[8]||(M[8]=O("div",{"i-solar:star-fall-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",my,[O("span",null,ve(H(_)("stage.chat.tabs.custom")),1)])],10,hy),O("label",{class:lt([r.value==="clothes"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="clothes"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":H(u)}]),flex:"~ row",checked:r.value==="clothes","aria-checked":r.value==="clothes",border:"solid r-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-r-lg":"","px-2":""},[Et(O("input",{"onUpdate:modelValue":M[2]||(M[2]=F=>r.value=F),type:"radio",name:"tab",value:"clothes",hidden:""},null,512),[[ar,r.value]]),M[9]||(M[9]=O("div",{"i-solar:magic-stick-3-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",yy,[O("span",null,ve(H(_)("stage.chat.tabs.clothes")),1)])],10,gy)]),O("div",xy,[O("div",vy,[Te(ly,{"h-full":"","flex-1":"","p-4":"",w:"full","max-h":"e.value=F),placeholder:H(_)("stage.message"),text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500",bg:"primary-100 dark:primary-400/20","min-h":"[100px]","max-h":"[300px]","w-full":"","rounded-t-xl":"","p-4":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",class:lt({"transition-colors-none placeholder:transition-colors-none":H(u)}),onSubmit:h,onCompositionstart:M[4]||(M[4]=F=>o.value=!0),onCompositionend:M[5]||(M[5]=F=>o.value=!1)},null,8,["modelValue","placeholder","class"])])])]),O("div",wy,[O("div",ky,[Te(H(ci),null,{default:Ye(()=>[i.value?(J(),ie("fieldset",Ty,[(J(!0),ie(si,null,li(H(c),(F,j)=>(J(),ie("label",{key:j,class:"[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900"},[O("input",{type:"radio",name:"audioInput",value:F.deviceId,hidden:"",onChange:m},null,40,_y),O("div",Ey,[O("div",My,[F.deviceId===H(y)?(J(),ie("div",Ay)):at("",!0)]),O("span",{"inline-block":"",class:lt([F.deviceId===H(y)?"cyan-400 dark:text-white":"cyan-400/50 dark:text-white/50"]),transition:"all duration-250 ease-in-out"},ve(F.label),3)])]))),128))])):at("",!0)]),_:1}),O("label",{bg:"complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700",transition:"all duration-250 ease-in-out",class:lt({"transition-colors-none":H(u)}),text:"complementary-400","h-fit":"",flex:"","cursor-pointer":"","items-center":"","justify-center":"","gap-2":"","rounded-full":"","px-4":"","py-2":""},[Et(O("input",{"onUpdate:modelValue":M[6]||(M[6]=F=>i.value=F),type:"checkbox",hidden:""},null,512),[[ii,i.value]]),M[10]||(M[10]=O("div",{"i-solar:microphone-2-bold-duotone":""},null,-1)),O("div",null,[n.value?(J(),ie("span",Iy,"Listening...")):(J(),ie("span",Sy,ve(H(_)("settings.microphone")),1))])],2)])])]))}}),Cy=xn(Ry,[["__scopeId","data-v-5b585ca8"]]),Ny={py:"1",flex:"~ col",rounded:"lg","overflow-hidden":""},Ly={key:0,flex:"",mr:"12"},Py={flex:"~ col",border:"4 solid primary-200/50 dark:primary-500/50",shadow:"md primary-200/50 dark:none","min-w-20":"","rounded-lg":"","px-2":"","py-1":"","backdrop-blur-sm":"",h:"unset {Hn().then(()=>{i.update(),o.value=i.height.value})}),l(async()=>{Hn().then(()=>{i.update(),o.value=i.height.value})}),(u,c)=>{const f=ca("auto-animate");return J(),ie("div",Ny,[c[1]||(c[1]=O("div",{"flex-1":""},null,-1)),Et((J(),ie("div",{ref_key:"chatHistoryRef",ref:e,"h-full":"","w-full":"","max-h":"30vh",flex:"~ col","overflow-scroll":"",class:"chat-history"},[c[0]||(c[0]=O("div",{"flex-1":""},null,-1)),(J(!0),ie(si,null,li(H(r),(p,d)=>(J(),ie("div",{key:d,"mb-2":""},[p.role==="assistant"?(J(),ie("div",Ly,[O("div",Py,[O("div",null,[O("span",Dy,ve(H(n)("stage.chat.message.character-name.airi")),1)]),p.content?(J(),ie("div",{key:0,class:"markdown-content",text:"base {n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:k=>{n.value=!1,w()},auto:!1});function w(k){alert("Transcription is not implemented yet")}return Be(s,async k=>{k==="false"&&y()}),f(async()=>{e.value=""}),mn(()=>{x()}),(k,S)=>(J(),ie("div",null,[O("div",Gy,[Te($y,{absolute:"","left-0":"","top-0":"",transform:"translate-y-[-100%]","w-full":""}),O("div",Yy,[Te(H(da),{modelValue:e.value,"onUpdate:modelValue":S[0]||(S[0]=_=>e.value=_),placeholder:H(p)("stage.message"),border:"solid 2 primary-100 dark:primary-400/20",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500",bg:"primary-100 dark:primary-400/20","max-h":"[10lh]","min-h":"[1lh]","w-full":"","resize-none":"","overflow-y-scroll":"","rounded-xl":"","p-2":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",class:lt({"transition-colors-none placeholder:transition-colors-none":H(u)}),onSubmit:d,onCompositionstart:S[1]||(S[1]=_=>r.value=!0),onCompositionend:S[2]||(S[2]=_=>r.value=!1)},null,8,["modelValue","placeholder","class"])])])]))}}),qy={class:"relative"},Wy={absolute:"","left-0":"","right-0":"","top-0":"","w-full":"","overflow-hidden":""},Xy=Fe({__name:"AnimatedWave",props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:"oklch(95% 0.10 var(--theme-colors-hue))"},direction:{default:"down"},movementDirection:{default:"left"},animationSpeed:{default:50}},setup(t){const e=t,n=W(e.height),r=W(e.amplitude),i=W(e.waveLength),o=W(e.fillColor),a=W(e.direction),s=W(e.movementDirection);function l(f,p,d,y,x){const w=[],S=Math.ceil(f/y)*y,_=1,R=x==="up"?d:p-d;w.push(`M 0 ${R}`);const P=Math.PI*2/y;for(let I=0;I<=S;I+=_){const v=d*Math.sin(P*I),g=x==="up"?R-v:R+v;w.push(`L ${I} ${g}`)}const h=x==="up"?p:0;return w.push(`L ${S} ${h}`),w.push(`L 0 ${h} Z`),w.join(" ")}const u=Ue(()=>n.value+r.value*2),c=Ue(()=>{const f=` - `;return`url(data:image/svg+xml;base64,${btoa(f)})`});return Be(()=>[e.height,e.amplitude,e.waveLength,e.fillColor,e.direction,e.movementDirection],()=>{n.value=e.height,r.value=e.amplitude,i.value=e.waveLength,o.value=e.fillColor,a.value=e.direction,s.value=e.movementDirection},{immediate:!0}),(f,p)=>(J(),ie("div",Ky,[gn(f.$slots,"default",{},void 0,!0),O("div",qy,[O("div",{class:"wave",style:Dr({background:o.value,height:`${u.value}px`,maskImage:c.value,WebkitMaskImage:c.value,"--wave-translate":`${-i.value}px`,"--animation-duration":`${i.value/t.animationSpeed}s`,"animation-direction":s.value==="left"?"normal":"reverse"})},null,4)])]))}}),Xy=xn(Wy,[["__scopeId","data-v-d4cf94d8"]]),Zy={relative:"",flex:"~ col","z-2":"","h-100dvh":"","w-100vw":"","of-hidden":""},Qy={relative:"",flex:"~ 1 row gap-y-0 gap-x-2 (J(),Xt(Og,null,{default:Ye(()=>[Te(Xy,{"fill-color":H(e)?"oklch(35% calc(var(--theme-colors-chroma) * 0.6) var(--theme-colors-hue))":"color-mix(in srgb, oklch(95% calc(var(--theme-colors-chroma-50) * 0.5) var(--theme-colors-hue)) 80%, oklch(100% 0 360))"},{default:Ye(()=>[O("div",Zy,[O("div",null,[Te(zg,{class:"flex",p2:""})]),O("div",Qy,[Te(H(Ng),{"flex-1":"","min-w":"1/2",paused:n.value},null,8,["paused"]),Te(Ry,{class:"flex `;return`url(data:image/svg+xml;base64,${btoa(f)})`});return Be(()=>[e.height,e.amplitude,e.waveLength,e.fillColor,e.direction,e.movementDirection],()=>{n.value=e.height,r.value=e.amplitude,i.value=e.waveLength,o.value=e.fillColor,a.value=e.direction,s.value=e.movementDirection},{immediate:!0}),(f,p)=>(J(),ie("div",qy,[gn(f.$slots,"default",{},void 0,!0),O("div",Wy,[O("div",{class:"wave",style:Dr({background:o.value,height:`${u.value}px`,maskImage:c.value,WebkitMaskImage:c.value,"--wave-translate":`${-i.value}px`,"--animation-duration":`${i.value/t.animationSpeed}s`,"animation-direction":s.value==="left"?"normal":"reverse"})},null,4)])]))}}),Zy=xn(Xy,[["__scopeId","data-v-d4cf94d8"]]),Qy={relative:"",flex:"~ col","z-2":"","h-100dvh":"","w-100vw":"","of-hidden":""},Jy={relative:"",flex:"~ 1 row gap-y-0 gap-x-2 (J(),Xt(Fg,null,{default:Ye(()=>[Te(Zy,{"fill-color":H(e)?"oklch(35% calc(var(--theme-colors-chroma) * 0.6) var(--theme-colors-hue))":"color-mix(in srgb, oklch(95% calc(var(--theme-colors-chroma-50) * 0.5) var(--theme-colors-hue)) 80%, oklch(100% 0 360))"},{default:Ye(()=>[O("div",Qy,[O("div",null,[Te(Ug,{class:"flex",p2:""})]),O("div",Jy,[Te(H(Lg),{"flex-1":"","min-w":"1/2",paused:n.value,"focus-at":{x:H(i).x.value,y:H(i).y.value}},null,8,["paused","focus-at"]),Te(Cy,{class:"flex {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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as re}from"./airi-card-DyPOejN4.js";import{k as se}from"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as oe}from"./InputFile.vue_vue_type_script_setup_true_lang-DwkwVH8j.js";import{_ as ne}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-C9PVsW9y.js";import{_ as ie}from"./CardListItem.vue_vue_type_script_setup_true_lang-CXLs8j9C.js";import{_ as de}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-Dd8N9atm.js";import{b as U}from"./route-block-B_A1xBdJ.js";import"./consciousness-CmIiKxQ0.js";import"./providers-Bnxi0hpg.js";import"./index-LHmcipjy.js";import"./speech-BGwkIM3M.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import"./index-MbWgqiI-.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}; diff --git a/assets/index-BgI42RYO.js b/assets/index-E9C4_JmR.js similarity index 85% rename from assets/index-BgI42RYO.js rename to assets/index-E9C4_JmR.js index 56e2192dfec1d4170f3e768ff99d49f1a3db94ab..1f988f846561610071624e873231d3935a95a2b3 100644 --- a/assets/index-BgI42RYO.js +++ b/assets/index-E9C4_JmR.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{I as x}from"./IconStatusItem-DVX2kjJz.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as I}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Bk0lr96q.js";import{u as z}from"./useIconAnimation-C4twnWcL.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{I as x}from"./IconStatusItem-BcJ0TKRl.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as I}from"./IconAnimation.vue_vue_type_script_setup_true_lang-D4aBVanH.js";import{u as z}from"./useIconAnimation-RPlHEpRk.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-TcFPSyt2.js b/assets/index-KSDXhdaQ.js similarity index 79% rename from assets/index-TcFPSyt2.js rename to assets/index-KSDXhdaQ.js index 31901bf6756f867801c2a4bc717e40673adc7539..8b19d6f28ab5241761b1401d70e9b8db676dc90f 100644 --- a/assets/index-TcFPSyt2.js +++ b/assets/index-KSDXhdaQ.js @@ -1 +1 @@ -import{u as d}from"./useIconAnimation-C4twnWcL.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-DP0FGIAR.js";import{b as r}from"./route-block-B_A1xBdJ.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.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-RPlHEpRk.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-D14Zran9.js";import{b as r}from"./route-block-B_A1xBdJ.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.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/index-BEkOKozM.js b/assets/index-MbWgqiI-.js similarity index 93% rename from assets/index-BEkOKozM.js rename to assets/index-MbWgqiI-.js index 680bca03838158d250ffccb5e9d15c270ed12904..ef4c2431141aff09054b8956fa0d171490f0796c 100644 --- a/assets/index-BEkOKozM.js +++ b/assets/index-MbWgqiI-.js @@ -1,3 +1,3 @@ -import{f as w,e as C,bs as ht,w as F,bL as mt,bM as yt,cs as ie,u as f,d as O,bk as D,o as _,bl as x,bh as E,ct as G,cu as J,ch as P,cj as ke,_ as ne,T as fe,bq as Ue,W as gt,b as ee,cv as Qt,cw as oe,cx as Zt,cy as wt,cz as en,cA as Be,cB as tn,cC as nn,a8 as on,U as bt,c6 as rn,cD as xt,cE as ln,cF as Ct,cG as lt,bK as M,bG as an,cg as sn,Y as un,c as Ot,a3 as Ye,cH as Et,cI as dn,r as _t,cJ as cn,cK as fn,a as pn,cL as vn,cM as hn}from"./index-DP0FGIAR.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 N(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 N(e).Node:!1}function I(e){return Pe()?e instanceof Element||e instanceof N(e).Element:!1}function K(e){return Pe()?e instanceof HTMLElement||e instanceof N(e).HTMLElement:!1}function it(e){return!Pe()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof N(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 N(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=N(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=N(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!==N(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=N(i),v=o&&I(o)?N(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=N(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=N(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 Sn(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 Nn(e){let{element:n,boundary:t,rootBoundary:o,strategy:r}=e;const l=[...t==="clippingAncestors"?$e(n)?[]:Sn(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 Ne(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=N(e);if($e(e))return t;if(!K(e)){let r=q(e);for(;r&&!ce(r);){if(I(r)&&!Ne(r))return r;r=q(r)}return t}let o=st(e,n);for(;o&&En(o)&&Ne(o);)o=st(o,n);return o&&ce(o)&&Ne(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:Nn,getOffsetParent:Rt,getElementRects:Mn,getClientRects:Tn,getDimensions:Fn,getScale:de,isElement:I,isRTL:In};function St(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&&!St(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&&!St(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 Nt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dt(e,n){const t=Nt(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)",...Nt(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 So(e){let n;F(()=>me(e),t=>{t?n=Ro(t):n&&n()}),bt(()=>{n&&n()})}let No=0;function Ve(e,n="radix"){const t=It({useId:void 0});return lt?`${n}-${lt()}`:t.useId?`${n}-${t.useId()}`:`${n}-${++No}`}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-D14Zran9.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 So(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"),Sr=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))}}),Nr=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:S,rects:rt,availableWidth:we,availableHeight:be})=>{const{width:xe,height:Jt}=rt.reference,Ce=S.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:(...S)=>Hn(...S,{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 S;return((S=b.value.arrow)==null?void 0:S.centerOffset)!==0}),T=C("");M(()=>{l.value&&(T.value=window.getComputedStyle(l.value).zIndex)});const H=w(()=>{var S;return((S=b.value.arrow)==null?void 0:S.x)??0}),ge=w(()=>{var S;return((S=b.value.arrow)==null?void 0:S.y)??0});return mr({placedSide:$,onArrowChange:S=>c.value=S,arrowX:H,arrowY:ge,shouldHideArrow:L}),(S,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)},S.$attrs,{"as-child":t.asChild,as:S.as,"data-side":$.value,"data-align":R.value,style:{animation:f(B)?void 0:"none"}}),{default:x(()=>[E(S.$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")}}),[Se,_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=Se(),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=Se(),{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}=Se(),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=Se(),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,Sr as O,nr as P,$r as T,jr as U,Lr as V,Wr as W,Hr as j,Nr as k,Wo as n,Vr as q}; +`))}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-DKRC_s79.js b/assets/index-hW1I5rqG.js similarity index 99% rename from assets/index-DKRC_s79.js rename to assets/index-hW1I5rqG.js index 2aff0d5c05b68861f20e95287727b1ea99c914c6..a465c0faea3003f5a91438c7472f4baa30ef0c51 100644 --- a/assets/index-DKRC_s79.js +++ b/assets/index-hW1I5rqG.js @@ -1,4 +1,4 @@ -import{Z as s,b as x}from"./mcp-H-_JN8ee.js";import"./index-DP0FGIAR.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.map(i=>d[i]); -import{cO as L}from"./index-DP0FGIAR.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-aSvRF1oh.js"),__vite__mapDeps([0,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"sury":return L(()=>import("./sury-DmrZ3_Oj-CjrFpVkP.js"),__vite__mapDeps([3,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"valibot":return L(()=>import("./valibot-CQk-M5rL-CV87sxw7.js"),__vite__mapDeps([4,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"zod":return L(()=>import("./zod-Db63SLXj-CadWEJhq.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-Co61xpr-.js","assets/index-D14Zran9.js","assets/index-BNiX87JN.css","assets/sury-DmrZ3_Oj-CP24MTtD.js","assets/valibot-CQk-M5rL-CqkiJ_5y.js","assets/zod-Db63SLXj-Cpel8AB9.js"])))=>i.map(i=>d[i]); +import{cP as L}from"./index-D14Zran9.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-Co61xpr-.js"),__vite__mapDeps([0,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"sury":return L(()=>import("./sury-DmrZ3_Oj-CP24MTtD.js"),__vite__mapDeps([3,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"valibot":return L(()=>import("./valibot-CQk-M5rL-CqkiJ_5y.js"),__vite__mapDeps([4,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"zod":return L(()=>import("./zod-Db63SLXj-Cpel8AB9.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-DxUYdEDS.js b/assets/memory-long-term-BYp5gzbN.js similarity index 71% rename from assets/memory-long-term-DxUYdEDS.js rename to assets/memory-long-term-BYp5gzbN.js index 737c3715bcffef9907f03848561d727df63a8be7..825a6fc03066f95b52dcd5ce0834545dc60e4b44 100644 --- a/assets/memory-long-term-DxUYdEDS.js +++ b/assets/memory-long-term-BYp5gzbN.js @@ -1 +1 @@ -import{d as o,c as t,o as n}from"./index-DP0FGIAR.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-D14Zran9.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-BfhGoDof.js b/assets/memory-short-term-BrCCCvqI.js similarity index 71% rename from assets/memory-short-term-BfhGoDof.js rename to assets/memory-short-term-BrCCCvqI.js index 09ec652581957e71e8e8d0adb1e9fcc6fccabdf5..aa907ec43920c78423fe437b12bfdec0ebad801c 100644 --- a/assets/memory-short-term-BfhGoDof.js +++ b/assets/memory-short-term-BrCCCvqI.js @@ -1 +1 @@ -import{d as o,c as t,o as r}from"./index-DP0FGIAR.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-D14Zran9.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-D-pels38.js b/assets/messages-DycnhubE.js similarity index 68% rename from assets/messages-D-pels38.js rename to assets/messages-DycnhubE.js index 556a95afafbe6437a6a75627e1a5882bd2a7789b..e5bb61f6e5362e9fa8d2e70faebd479fa0686802 100644 --- a/assets/messages-D-pels38.js +++ b/assets/messages-DycnhubE.js @@ -1 +1 @@ -import{u as f}from"./queue-66hlaQTM.js";import{u as g,l as _}from"./queues-KTxrGl8o.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as v}from"./Textarea.vue_vue_type_script_setup_true_lang-CSSBrXdz.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-DP0FGIAR.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Badg0BE8.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-CHtEOdh3.js";import{u as g,l as _}from"./queues-DtduOmVA.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as v}from"./Textarea.vue_vue_type_script_setup_true_lang-BCWeHGz1.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-D14Zran9.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-DAk2Pfwq.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-hZbAAf4A.js b/assets/microsoft-speech-BztvXPSP.js similarity index 71% rename from assets/microsoft-speech-hZbAAf4A.js rename to assets/microsoft-speech-BztvXPSP.js index c992b859ab4acc1f4183a7d5a9b7ca23ee1c614b..d69fab8a6a280174ac0ff0ba454c32fb4e80ffab 100644 --- a/assets/microsoft-speech-hZbAAf4A.js +++ b/assets/microsoft-speech-BztvXPSP.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as E}from"./providers-CCXVXsM2.js";import{u as G}from"./speech-RC4pJLrT.js";import{_ as H}from"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import{_ as h}from"./FieldRange.vue_vue_type_script_setup_true_lang-7V-hK3UG.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as R,a as j}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Er5TxWy_.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as E}from"./providers-Bnxi0hpg.js";import{u as G}from"./speech-BGwkIM3M.js";import{_ as H}from"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import{_ as h}from"./FieldRange.vue_vue_type_script_setup_true_lang-B7PpkYTo.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as R,a as j}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DKByP4k1.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.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-D1fqDC-m.js b/assets/mistral-ai-DQVUyxbn.js similarity index 64% rename from assets/mistral-ai-D1fqDC-m.js rename to assets/mistral-ai-DQVUyxbn.js index 462ab57dcc20945559552644ea81d835a94c3fbc..768a24bb2fd34dd100ea042008fcf336641b0b0c 100644 --- a/assets/mistral-ai-D1fqDC-m.js +++ b/assets/mistral-ai-DQVUyxbn.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as z}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as z}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-BIzTGNXq.js b/assets/moonshot-ai-e8eEMU8s.js similarity index 64% rename from assets/moonshot-ai-BIzTGNXq.js rename to assets/moonshot-ai-e8eEMU8s.js index 4dd445df329e0830a4e1301fd422447ac2514765..5142cd0fbcb6c56ae137696f3d04c4194e2f8615 100644 --- a/assets/moonshot-ai-BIzTGNXq.js +++ b/assets/moonshot-ai-e8eEMU8s.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as z}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as z}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-DRwPtDAn.js b/assets/novita-ai-5caxkANW.js similarity index 64% rename from assets/novita-ai-DRwPtDAn.js rename to assets/novita-ai-5caxkANW.js index e7498033aae8a22a5749b9e642bbd5771a91e82e..d69a200e5afc790c281be296b96c4e7ce8ce01fd 100644 --- a/assets/novita-ai-DRwPtDAn.js +++ b/assets/novita-ai-5caxkANW.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as z}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as z}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-D3Njx7yd.js b/assets/ollama-CLDB6qQc.js similarity index 72% rename from assets/ollama-D3Njx7yd.js rename to assets/ollama-CLDB6qQc.js index 0599d98fa43e03b8fcfa429fa52305ada7ff056f..c08e3ed54a3450ecbb74bedea8a5edf010d9205f 100644 --- a/assets/ollama-D3Njx7yd.js +++ b/assets/ollama-CLDB6qQc.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import{d as K,ce as x,cf as U,c as g,o as f,b as m,e as $,w as B,c5 as O,a as _,bm as R,cg 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,r as L,bk as W,bl as h,u as o}from"./index-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as Y}from"./providers-CCXVXsM2.js";import{_ as q}from"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{a as j,_ as G}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as H,a as J}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as Q}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";const X={flex:"~ gap-2"},Z=K({__name:"InputKeyValue",props:x({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:["update:propertyKey","update:propertyValue"],setup(v){const a=v,s=U(v,"propertyKey"),u=U(v,"propertyValue");return(r,t)=>(f(),g("div",X,[m(q,{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=i=>s.value=i),placeholder:a.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:a.valuePlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"])]))}}),ee={"max-w-full":""},le={flex:"~ col gap-2"},te={class:"flex items-center gap-1 text-sm font-medium"},oe={key:0,class:"text-red-500"},ae={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},re={flex:"~ col gap-2"},se=["onClick"],ie=K({__name:"FieldKeyValues",props:x({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:x(["remove","add"],["update:modelValue"]),setup(v,{emit:a}){const s=v,u=a,r=U(v,"modelValue"),t=$(""),i=$("");return B([t,i],()=>{u("add",t.value,i.value)}),(P,p)=>{const b=O("auto-animate");return f(),g("div",ee,[_("label",le,[_("div",null,[_("div",te,[S(w(s.label)+" ",1),s.required!==!1?(f(),g("span",oe,"*")):z("",!0)]),_("div",ae,w(s.description),1)]),R((f(),g("div",re,[(f(!0),g(D,null,I(r.value,(y,l)=>(f(),g("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(Z,{"property-key":y.key,"onUpdate:propertyKey":e=>y.key=e,"property-value":y.value,"onUpdate:propertyValue":e=>y.value=e,"key-placeholder":s.keyPlaceholder,"value-placeholder":s.valuePlaceholder,"w-full":""},null,8,["property-key","onUpdate:propertyKey","property-value","onUpdate:propertyValue","key-placeholder","value-placeholder"]),_("button",{onClick:e=>u("remove",l)},p[0]||(p[0]=[_("div",{"i-solar:minus-circle-line-duotone":"",size:"6"},null,-1)]),8,se)]))),128))])),[[b]])])])}}}),d="ollama",ne=K({__name:"ollama",setup(v){const{t:a}=T(),s=F(),u=Y(),{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,k;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)||"",(k=r.value[d])!=null&&k.headers||(r.value[d].headers={})});function P(){var l;r.value[d]={...(l=t.value)==null?void 0:l.defaultOptions}}const p=L([{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,k;return f(),W(o(Q),{"provider-name":(n=t.value)==null?void 0:n.localizedName,"provider-icon":(k=t.value)==null?void 0:k.icon,"on-back":()=>o(s).back()},{default:h(()=>[m(o(H),null,{default:h(()=>[m(o(J),{title:o(a)("settings.pages.providers.common.section.basic.title"),description:o(a)("settings.pages.providers.common.section.basic.description"),"on-reset":P},{default:h(()=>{var c,V;return[m(o(j),{modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=N=>i.value=N),placeholder:((V=(c=t.value)==null?void 0:c.defaultOptions)==null?void 0:V.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title","description"]),m(o(G),{title:o(a)("settings.pages.providers.common.section.advanced.title")},{default:h(()=>[m(o(ie),{modelValue:p,"onUpdate:modelValue":e[1]||(e[1]=c=>p=c),label:o(a)("settings.pages.providers.common.section.advanced.fields.field.headers.label"),description:o(a)("settings.pages.providers.common.section.advanced.fields.field.headers.description"),"key-placeholder":o(a)("settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder"),"value-placeholder":o(a)("settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder"),onAdd:e[2]||(e[2]=(c,V)=>b(p,c,V)),onRemove:e[3]||(e[3]=c=>y(c,p))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof C=="function"&&C(ne);export{ne as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import{d as K,cf as x,cg as U,c as g,o as f,b as m,e as $,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,r as L,bk as W,bl as V,u as o}from"./index-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as Y}from"./providers-Bnxi0hpg.js";import{_ as q}from"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{a as j,_ as G}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as H,a as J}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as Q}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";const X={flex:"~ gap-2"},Z=K({__name:"InputKeyValue",props:x({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:["update:propertyKey","update:propertyValue"],setup(v){const a=v,s=U(v,"propertyKey"),u=U(v,"propertyValue");return(r,t)=>(f(),g("div",X,[m(q,{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=i=>s.value=i),placeholder:a.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:a.valuePlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"])]))}}),ee={"max-w-full":""},le={flex:"~ col gap-2"},te={class:"flex items-center gap-1 text-sm font-medium"},oe={key:0,class:"text-red-500"},ae={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},re={flex:"~ col gap-2"},se=["onClick"],ie=K({__name:"FieldKeyValues",props:x({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:x(["remove","add"],["update:modelValue"]),setup(v,{emit:a}){const s=v,u=a,r=U(v,"modelValue"),t=$(""),i=$("");return B([t,i],()=>{u("add",t.value,i.value)}),(P,p)=>{const b=O("auto-animate");return f(),g("div",ee,[_("label",le,[_("div",null,[_("div",te,[S(w(s.label)+" ",1),s.required!==!1?(f(),g("span",oe,"*")):z("",!0)]),_("div",ae,w(s.description),1)]),R((f(),g("div",re,[(f(!0),g(D,null,I(r.value,(y,l)=>(f(),g("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(Z,{"property-key":y.key,"onUpdate:propertyKey":e=>y.key=e,"property-value":y.value,"onUpdate:propertyValue":e=>y.value=e,"key-placeholder":s.keyPlaceholder,"value-placeholder":s.valuePlaceholder,"w-full":""},null,8,["property-key","onUpdate:propertyKey","property-value","onUpdate:propertyValue","key-placeholder","value-placeholder"]),_("button",{onClick:e=>u("remove",l)},p[0]||(p[0]=[_("div",{"i-solar:minus-circle-line-duotone":"",size:"6"},null,-1)]),8,se)]))),128))])),[[b]])])])}}}),d="ollama",ne=K({__name:"ollama",setup(v){const{t:a}=T(),s=F(),u=Y(),{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 P(){var l;r.value[d]={...(l=t.value)==null?void 0:l.defaultOptions}}const p=L([{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(),W(o(Q),{"provider-name":(n=t.value)==null?void 0:n.localizedName,"provider-icon":(h=t.value)==null?void 0:h.icon,"on-back":()=>o(s).back()},{default:V(()=>[m(o(H),null,{default:V(()=>[m(o(J),{title:o(a)("settings.pages.providers.common.section.basic.title"),description:o(a)("settings.pages.providers.common.section.basic.description"),"on-reset":P},{default:V(()=>{var c,k;return[m(o(j),{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(o(G),{title:o(a)("settings.pages.providers.common.section.advanced.title")},{default:V(()=>[m(o(ie),{modelValue:p,"onUpdate:modelValue":e[1]||(e[1]=c=>p=c),label:o(a)("settings.pages.providers.common.section.advanced.fields.field.headers.label"),description:o(a)("settings.pages.providers.common.section.advanced.fields.field.headers.description"),"key-placeholder":o(a)("settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder"),"value-placeholder":o(a)("settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder"),onAdd:e[2]||(e[2]=(c,k)=>b(p,c,k)),onRemove:e[3]||(e[3]=c=>y(c,p))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof C=="function"&&C(ne);export{ne as default}; diff --git a/assets/openai-DL7DVZ_f.js b/assets/openai-BR-iPfOR.js similarity index 63% rename from assets/openai-DL7DVZ_f.js rename to assets/openai-BR-iPfOR.js index 01b1cc63f0ffd3f9cd2cfc814acc1dfde3ac37d5..5b60b39fee95b062f93c43288cea499bf5e94deb 100644 --- a/assets/openai-DL7DVZ_f.js +++ b/assets/openai-BR-iPfOR.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as x}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as R}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as S,a as z}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as A}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as x}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as R}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as S,a as z}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as A}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-BwGXDu-Y.js b/assets/openrouter-ai-AaPaLp8U.js similarity index 65% rename from assets/openrouter-ai-BwGXDu-Y.js rename to assets/openrouter-ai-AaPaLp8U.js index f818cfe64228d64cbe3b46e5f1407fbecc2724f3..e6fbcb9a52b963d7c6b465713a096caaa57e0ec8 100644 --- a/assets/openrouter-ai-BwGXDu-Y.js +++ b/assets/openrouter-ai-AaPaLp8U.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as z}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as z}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-CCXVXsM2.js b/assets/providers-Bnxi0hpg.js similarity index 99% rename from assets/providers-CCXVXsM2.js rename to assets/providers-Bnxi0hpg.js index 9eea4fb582d13d7059354e6a293e9b6e679b0f5e..01a120926f296d7215fc6f87103e006b1595a06c 100644 --- a/assets/providers-CCXVXsM2.js +++ b/assets/providers-Bnxi0hpg.js @@ -1 +1 @@ -var le=Object.defineProperty;var de=(a,i,n)=>i in a?le(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n;var G=(a,i,n)=>de(a,typeof i!="symbol"?i+"":i,n);import{a4 as ce,cb as pe,$ as ue,e as U,w as ge,f as k}from"./index-DP0FGIAR.js";import{r as me,a as ve,e as _e,o as N}from"./index-LHmcipjy.js";const b=async a=>(a.fetch??globalThis.fetch)(me("models",a.baseURL),{headers:ve(a.headers,a.apiKey),signal:a.abortSignal}).then(_e).then(({data:i})=>i),_=a=>({chat:i=>Object.assign(a,{model:i})}),w=a=>({embed:i=>Object.assign(a,{model:i})}),he=a=>({image:i=>Object.assign(a,{model:i})}),f=a=>({model:()=>a}),fe=a=>({speech:i=>Object.assign(a,{model:i})}),be=a=>({transcription:i=>Object.assign(a,{model:i})}),g=(a,i)=>({metadata:{id:a,...i}}),m=(...a)=>Object.assign(a[0],...a.slice(1)),ye=(a,i="https://api.anthropic.com/v1/")=>m(g("anthropic"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),D=(a,i="https://api.deepseek.com/")=>m(g("deepseek"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),V=(a,i="https://api.fireworks.ai/inference/v1/")=>m(g("fireworks"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),W=(a,i="https://generativelanguage.googleapis.com/v1beta/openai/")=>m(g("google-generative-ai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),H=(a,i="https://api.mistral.ai/v1/")=>m(g("mistral"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),J=(a,i="https://api.moonshot.cn/v1/")=>m(g("moonshot"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),X=(a,i="https://api.novita.ai/v3/openai/")=>m(g("novita"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),E=(a,i="https://api.openai.com/v1/")=>m(g("openai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),he({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i}),fe({apiKey:a,baseURL:i}),be({apiKey:a,baseURL:i})),xe=(a,i="")=>m(g("openrouter"),{chat:(n,l)=>{const h={apiKey:a,baseURL:i,model:n};return{...l?(({extraHeaders:s,models:v,provider:u})=>{s!=null&&(h.headers??(h.headers={}),Object.assign(h.headers,s));let c;return u!=null&&(c=N(u)),N({models:v,provider:c})})(l):{},...h}}},f({apiKey:a,baseURL:i})),Pe=(a,i="https://api.perplexity.ai/")=>m(g("perplexity"),_({apiKey:a,baseURL:i})),Z=(a,i="https://api.together.xyz/v1/")=>m(g("together-ai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i,fetch:async(...n)=>globalThis.fetch(...n).then(async l=>l.json()).then(l=>Response.json({data:l,object:"list"}))})),ke=(a,i)=>{const n=`https://api.cloudflare.com/client/v4/accounts/${i}/ai/v1/`;return m(g("workers-ai"),_({apiKey:a,baseURL:n}),w({apiKey:a,baseURL:n}))},Q=(a,i="https://api.x.ai/v1/")=>m(g("xai"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),j=(a="http://localhost:11434/v1/")=>m(g("ollama"),_({baseURL:a}),w({baseURL:a}),f({baseURL:a})),A=(...a)=>Object.assign(a[0],...a.slice(1));class T extends Error{constructor(n,l){super(n);G(this,"response");this.name="XSAIError",this.response=l}}const we=a=>a.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`),K=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 T(`Remote sent ${a.status} response: ${await a.text()}`,a);if(!a.body)throw new T("Response body is empty from remote server",a);if(!(a.body instanceof ReadableStream))throw new T(`Expected Response body to be a ReadableStream, but got ${String(a.body)}; Content Type is ${a.headers.get("Content-Type")}`,a);return a},Se=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 Y=(a,i="http://localhost:5933/v1/")=>{const n=({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x,seed:M,voiceSettings:C})=>({extraBody:K({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x?x.map(B=>K(B)):void 0,seed:M,voiceSettings:K(C??{similarityBoost:.75,stability:.5})})});return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`elevenlabs/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=elevenlabs",...t?n(t):{},apiKey:a,baseURL:i})})},R=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{deploymentId:s,region:v,sampleRate:u}=t,c={deploymentId:s,region:v,sampleRate:u};return"disableSsml"in t?c.disableSsml=t.disableSsml:"lang"in t&&(c.lang=t.lang,c.gender=t.gender,c.voice=t.voice),{extraBody:K(c)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`microsoft/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:`region=${t==null?void 0:t.region}&provider=microsoft`,...t?n(t):{},apiKey:a,baseURL:i})})},ee=(a,i="http://localhost:5933/v1/")=>{const n=t=>{var v,u;const s={app:{appid:(v=t.app)==null?void 0:v.appId,token:a}};return typeof t.app<"u"&&(s.app={...t.app,appid:(u=t.app)==null?void 0:u.appId,token:a}),typeof t.user<"u"&&(s.user=t.user),typeof t.audio<"u"&&(s.audio=t.audio),{extraBody:K(s)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`volcengine/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=volcengine",...t?n(t):{},apiKey:a,baseURL:i})})},ae=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{sampleRate:s,volume:v,rate:u,pitch:c}=t,y={sampleRate:s,volume:v,rate:u,pitch:c};return Object.keys(y).forEach(x=>y[x]===void 0&&delete y[x]),{extraBody:K(y)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`alibaba/${t}`})},{voice:t=>{let s=i;return s.endsWith("v1/")?s=s.slice(0,-3):s.endsWith("v1")&&(s=s.slice(0,-2)),{query:"provider=alibaba",...t?n(t):{},apiKey:a,baseURL:s}}})},q=async a=>(a.fetch??globalThis.fetch)(Ce(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:Me({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(Se).then(({voices:i})=>i);const Ue=[{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",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",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=>j(e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...j(e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},vllm:{id:"vllm",nameKey:"settings.pages.providers.provider.vllm.title",name:"vLLM",descriptionKey:"settings.pages.providers.provider.vllm.description",description:"vllm.ai",iconColor:"i-lobe-icons:vllm",createProvider:e=>j(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"llama-2-7b",name:"Llama 2 (7B)",provider:"vllm",description:"Meta's Llama 2 7B parameter model",contextLength:4096},{id:"llama-2-13b",name:"Llama 2 (13B)",provider:"vllm",description:"Meta's Llama 2 13B parameter model",contextLength:4096},{id:"llama-2-70b",name:"Llama 2 (70B)",provider:"vllm",description:"Meta's Llama 2 70B parameter model",contextLength:4096},{id:"mistral-7b",name:"Mistral (7B)",provider:"vllm",description:"Mistral AI's 7B parameter model",contextLength:8192},{id:"mixtral-8x7b",name:"Mixtral (8x7B)",provider:"vllm",description:"Mistral AI's Mixtral 8x7B MoE model",contextLength:32768},{id:"custom",name:"Custom Model",provider:"vllm",description:"Specify a custom model name",contextLength:0}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},openai:{id:"openai",nameKey:"settings.pages.providers.provider.openai.title",name:"OpenAI",descriptionKey:"settings.pages.providers.provider.openai.description",description:"openai.com",icon:"i-lobe-icons:openai",defaultOptions:{baseUrl:"https://api.openai.com/v1/"},createProvider:e=>E(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...E(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"openai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},anthropic:{id:"anthropic",nameKey:"settings.pages.providers.provider.anthropic.title",name:"Anthropic",descriptionKey:"settings.pages.providers.provider.anthropic.description",description:"anthropic.com",icon:"i-lobe-icons:anthropic",defaultOptions:{baseUrl:"https://api.anthropic.com/v1/"},createProvider:e=>ye(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"claude-3-7-sonnet-20250219",name:"Claude 3.7 Sonnet",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet (New)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-haiku-20241022",name:"Claude 3.5 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20240620",name:"Claude 3.5 Sonnet (Old)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-haiku-20240307",name:"Claude 3 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-opus-20240229",name:"Claude 3 Opus",provider:"anthropic",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"google-generative-ai":{id:"google-generative-ai",nameKey:"settings.pages.providers.provider.google-generative-ai.title",name:"Google Gemini",descriptionKey:"settings.pages.providers.provider.google-generative-ai.description",description:"ai.google.dev",icon:"i-lobe-icons:gemini",defaultOptions:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"},createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"google-generative-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},xai:{id:"xai",nameKey:"settings.pages.providers.provider.xai.title",name:"xAI",descriptionKey:"settings.pages.providers.provider.xai.description",description:"x.ai",icon:"i-lobe-icons:xai",createProvider:e=>Q(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...Q(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"xai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},deepseek:{id:"deepseek",nameKey:"settings.pages.providers.provider.deepseek.title",name:"DeepSeek",descriptionKey:"settings.pages.providers.provider.deepseek.description",description:"deepseek.com",iconColor:"i-lobe-icons:deepseek",createProvider:e=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...D(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"deepseek",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},elevenlabs:{id:"elevenlabs",nameKey:"settings.pages.providers.provider.elevenlabs.title",name:"ElevenLabs",descriptionKey:"settings.pages.providers.provider.elevenlabs.description",description:"elevenlabs.io",icon:"i-simple-icons:elevenlabs",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/",voiceSettings:{similarityBoost:.75,stability:.5}},createProvider:e=>Y(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>Ue.map(e=>({id:e.model_id,name:e.name,provider:"elevenlabs",description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{const r=Y(e.apiKey.trim(),e.baseUrl.trim()),d=await q({...r.voice()}),o=d.findIndex(P=>P.name.includes("Aria")),p=d.findIndex(P=>P.name.includes("Bill")),I=o!==-1?o:0,F=p!==-1?p:d.length-1,z=Math.min(I,F),L=Math.max(I,F);return[...d.slice(0,z),...d.slice(L+1),...d.slice(z,L+1)].map(P=>({id:P.id,name:P.name,provider:"elevenlabs",previewURL:P.preview_audio_url,languages:P.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:"microsoft-speech",nameKey:"settings.pages.providers.provider.microsoft-speech.title",name:"Microsoft / Azure Speech",descriptionKey:"settings.pages.providers.provider.microsoft-speech.description",description:"speech.microsoft.com",iconColor:"i-lobe-icons:microsoft",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>R(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"v1",name:"v1",provider:"microsoft-speech",description:"",contextLength:0,deprecated:!1}],listVoices:async e=>{const r=R(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice({region:e.region})})).map(o=>{var p;return{id:o.id,name:o.name,provider:"microsoft-speech",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:"alibaba-cloud-model-studio",nameKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.title",name:"Alibaba Cloud Model Studio",descriptionKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.description",description:"bailian.console.aliyun.com",iconColor:"i-lobe-icons:alibabacloud",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>ae(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=ae(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"alibaba-cloud-model-studio",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})},listModels:async()=>[{id:"cozyvoice-v1",name:"CozyVoice",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1},{id:"cozyvoice-v2",name:"CozyVoice (New)",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},volcengine:{id:"volcengine",nameKey:"settings.pages.providers.provider.volcengine.title",name:"settings.pages.providers.provider.volcengine.title",descriptionKey:"settings.pages.providers.provider.volcengine.description",description:"volcengine.com",iconColor:"i-lobe-icons:volcengine",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>ee(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=ee(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"volcano-engine",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})},listModels:async()=>[{id:"v1",name:"v1",provider:"volcano-engine",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl&&!!e.app&&!!e.app.appId}},"together-ai":{id:"together-ai",nameKey:"settings.pages.providers.provider.together.title",name:"Together.ai",descriptionKey:"settings.pages.providers.provider.together.description",description:"together.ai",iconColor:"i-lobe-icons:together",createProvider:e=>Z(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...Z(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"together-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"novita-ai":{id:"novita-ai",nameKey:"settings.pages.providers.provider.novita.title",name:"Novita",descriptionKey:"settings.pages.providers.provider.novita.description",description:"novita.ai",iconColor:"i-lobe-icons:novita",createProvider:e=>X(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...X(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"novita-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"fireworks-ai":{id:"fireworks-ai",nameKey:"settings.pages.providers.provider.fireworks.title",name:"Fireworks.ai",descriptionKey:"settings.pages.providers.provider.fireworks.description",description:"fireworks.ai",icon:"i-lobe-icons:fireworks",createProvider:e=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...V(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"fireworks-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"featherless-ai":{id:"featherless-ai",nameKey:"settings.pages.providers.provider.featherless.title",name:"Featherless.ai",descriptionKey:"settings.pages.providers.provider.featherless.description",description:"featherless.ai",icon:"i-lobe-icons:featherless-ai",defaultOptions:{baseUrl:"https://api.featherless.ai/v1/"},createProvider:e=>E(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...E(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"featherless-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"cloudflare-workers-ai":{id:"cloudflare-workers-ai",nameKey:"settings.pages.providers.provider.cloudflare-workers-ai.title",name:"Cloudflare Workers AI",descriptionKey:"settings.pages.providers.provider.cloudflare-workers-ai.description",description:"cloudflare.com",iconColor:"i-lobe-icons:cloudflare",createProvider:e=>ke(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"perplexity-ai":{id:"perplexity-ai",nameKey:"settings.pages.providers.provider.perplexity.title",name:"Perplexity",descriptionKey:"settings.pages.providers.provider.perplexity.description",description:"perplexity.ai",icon:"i-lobe-icons:perplexity",defaultOptions:{baseUrl:"https://api.perplexity.ai"},createProvider:e=>Pe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"sonar-small-online",name:"Sonar Small (Online)",provider:"perplexity-ai",description:"Efficient model with online search capabilities",contextLength:12e3},{id:"sonar-medium-online",name:"Sonar Medium (Online)",provider:"perplexity-ai",description:"Balanced model with online search capabilities",contextLength:12e3},{id:"sonar-large-online",name:"Sonar Large (Online)",provider:"perplexity-ai",description:"Powerful model with online search capabilities",contextLength:12e3},{id:"codey-small",name:"Codey Small",provider:"perplexity-ai",description:"Specialized for code generation and understanding",contextLength:12e3},{id:"codey-large",name:"Codey Large",provider:"perplexity-ai",description:"Advanced code generation and understanding",contextLength:12e3}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"mistral-ai":{id:"mistral-ai",nameKey:"settings.pages.providers.provider.mistral.title",name:"Mistral",descriptionKey:"settings.pages.providers.provider.mistral.description",description:"mistral.ai",iconColor:"i-lobe-icons:mistral",createProvider:e=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...H(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"mistral-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"moonshot-ai":{id:"moonshot-ai",nameKey:"settings.pages.providers.provider.moonshot.title",name:"Moonshot AI",descriptionKey:"settings.pages.providers.provider.moonshot.description",description:"moonshot.ai",icon:"i-lobe-icons:moonshot",createProvider:e=>J(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...J(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"moonshot-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}}};async function h(e){const r=a.value[e];if(!r)return!1;const d=l[e];return d?await d.validators.validateProviderConfig(r):!1}const t=U({});function s(e){var r;if(!a.value[e]){const d=l[e];a.value[e]={baseUrl:((r=d.defaultOptions)==null?void 0:r.baseUrl)||""}}}Object.keys(l).forEach(s);async function v(){await Promise.all(Object.keys(l).map(async e=>{t.value[e]=await h(e)}))}v(),ge(a,v,{deep:!0});const u=k(()=>Object.keys(l).filter(e=>t.value[e])),c=U({}),y=U({}),x=U({});async function M(e){const r=a.value[e];if(!r)return[];const d=l[e];if(!d)return[];y.value[e]=!0,x.value[e]=null;try{const o=d.capabilities.listModels?await d.capabilities.listModels(r):[];return c.value[e]=o.map(p=>({id:p.id,name:p.name,description:p.description,contextLength:p.contextLength,deprecated:p.deprecated,provider:e})),c.value[e]}catch(o){return console.error(`Error fetching models for ${e}:`,o),x.value[e]=o instanceof Error?o.message:"Unknown error",[]}finally{y.value[e]=!1}}function C(e){return c.value[e]||[]}const B=k(()=>{const e=[];for(const r of u.value)e.push(...c.value[r]||[]);return e});async function ie(){for(const e of u.value)l[e].capabilities.listModels&&await M(e)}function $(e){const r=l[e];if(!r)throw new Error(`Provider metadata for ${e} not found`);return{...r,localizedName:i(r.nameKey,r.name),localizedDescription:i(r.descriptionKey,r.description)}}const re=k(()=>Object.values(l).map(e=>({...e,localizedName:i(e.nameKey,e.name),localizedDescription:i(e.descriptionKey,e.description),configured:t.value[e.id]||!1})));function O(e){const r=a.value[e];if(!r)throw new Error(`Provider credentials for ${e} not found`);const d=l[e];if(!d)throw new Error(`Provider metadata for ${e} not found`);try{return d.createProvider(r)}catch(o){throw console.error(`Error creating provider instance for ${e}:`,o),o}}const S=k(()=>u.value.map(e=>$(e))),te=k(()=>S.value.filter(e=>{const r=O(e.id);return"chat"in r&&typeof r.chat=="function"})),ne=k(()=>S.value.filter(e=>{const r=O(e.id);return"transcription"in r&&typeof r.transcription=="function"})),se=k(()=>S.value.filter(e=>{const r=O(e.id);return"speech"in r&&typeof r.speech=="function"}));function oe(e){return a.value[e]}return{providers:a,getProviderConfig:oe,availableProviders:u,configuredProviders:t,providerMetadata:l,getProviderMetadata:$,allProvidersMetadata:re,initializeProvider:s,validateProvider:h,availableModels:c,isLoadingModels:y,modelLoadError:x,fetchModelsForProvider:M,getModelsForProvider:C,allAvailableModels:B,loadModelsForConfiguredProviders:ie,getProviderInstance:O,availableProvidersMetadata:S,availableTextGenerationsProvidersMetadata:te,availableAudioSpeechProvidersMetadata:se,availableAudioTranscriptionProvidersMetadata:ne}});export{b as l,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 G=(a,i,n)=>de(a,typeof i!="symbol"?i+"":i,n);import{a4 as ce,cc as pe,$ as ue,e as U,w as ge,f as k}from"./index-D14Zran9.js";import{r as me,a as ve,e as _e,o as N}from"./index-LHmcipjy.js";const b=async a=>(a.fetch??globalThis.fetch)(me("models",a.baseURL),{headers:ve(a.headers,a.apiKey),signal:a.abortSignal}).then(_e).then(({data:i})=>i),_=a=>({chat:i=>Object.assign(a,{model:i})}),w=a=>({embed:i=>Object.assign(a,{model:i})}),he=a=>({image:i=>Object.assign(a,{model:i})}),f=a=>({model:()=>a}),fe=a=>({speech:i=>Object.assign(a,{model:i})}),be=a=>({transcription:i=>Object.assign(a,{model:i})}),g=(a,i)=>({metadata:{id:a,...i}}),m=(...a)=>Object.assign(a[0],...a.slice(1)),ye=(a,i="https://api.anthropic.com/v1/")=>m(g("anthropic"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),D=(a,i="https://api.deepseek.com/")=>m(g("deepseek"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),V=(a,i="https://api.fireworks.ai/inference/v1/")=>m(g("fireworks"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),W=(a,i="https://generativelanguage.googleapis.com/v1beta/openai/")=>m(g("google-generative-ai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),H=(a,i="https://api.mistral.ai/v1/")=>m(g("mistral"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),J=(a,i="https://api.moonshot.cn/v1/")=>m(g("moonshot"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),X=(a,i="https://api.novita.ai/v3/openai/")=>m(g("novita"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),E=(a,i="https://api.openai.com/v1/")=>m(g("openai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),he({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i}),fe({apiKey:a,baseURL:i}),be({apiKey:a,baseURL:i})),xe=(a,i="")=>m(g("openrouter"),{chat:(n,l)=>{const h={apiKey:a,baseURL:i,model:n};return{...l?(({extraHeaders:s,models:v,provider:u})=>{s!=null&&(h.headers??(h.headers={}),Object.assign(h.headers,s));let c;return u!=null&&(c=N(u)),N({models:v,provider:c})})(l):{},...h}}},f({apiKey:a,baseURL:i})),Pe=(a,i="https://api.perplexity.ai/")=>m(g("perplexity"),_({apiKey:a,baseURL:i})),Z=(a,i="https://api.together.xyz/v1/")=>m(g("together-ai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i,fetch:async(...n)=>globalThis.fetch(...n).then(async l=>l.json()).then(l=>Response.json({data:l,object:"list"}))})),ke=(a,i)=>{const n=`https://api.cloudflare.com/client/v4/accounts/${i}/ai/v1/`;return m(g("workers-ai"),_({apiKey:a,baseURL:n}),w({apiKey:a,baseURL:n}))},Q=(a,i="https://api.x.ai/v1/")=>m(g("xai"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),j=(a="http://localhost:11434/v1/")=>m(g("ollama"),_({baseURL:a}),w({baseURL:a}),f({baseURL:a})),A=(...a)=>Object.assign(a[0],...a.slice(1));class T extends Error{constructor(n,l){super(n);G(this,"response");this.name="XSAIError",this.response=l}}const we=a=>a.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`),K=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 T(`Remote sent ${a.status} response: ${await a.text()}`,a);if(!a.body)throw new T("Response body is empty from remote server",a);if(!(a.body instanceof ReadableStream))throw new T(`Expected Response body to be a ReadableStream, but got ${String(a.body)}; Content Type is ${a.headers.get("Content-Type")}`,a);return a},Se=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 Y=(a,i="http://localhost:5933/v1/")=>{const n=({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x,seed:M,voiceSettings:C})=>({extraBody:K({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x?x.map(B=>K(B)):void 0,seed:M,voiceSettings:K(C??{similarityBoost:.75,stability:.5})})});return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`elevenlabs/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=elevenlabs",...t?n(t):{},apiKey:a,baseURL:i})})},R=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{deploymentId:s,region:v,sampleRate:u}=t,c={deploymentId:s,region:v,sampleRate:u};return"disableSsml"in t?c.disableSsml=t.disableSsml:"lang"in t&&(c.lang=t.lang,c.gender=t.gender,c.voice=t.voice),{extraBody:K(c)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`microsoft/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:`region=${t==null?void 0:t.region}&provider=microsoft`,...t?n(t):{},apiKey:a,baseURL:i})})},ee=(a,i="http://localhost:5933/v1/")=>{const n=t=>{var v,u;const s={app:{appid:(v=t.app)==null?void 0:v.appId,token:a}};return typeof t.app<"u"&&(s.app={...t.app,appid:(u=t.app)==null?void 0:u.appId,token:a}),typeof t.user<"u"&&(s.user=t.user),typeof t.audio<"u"&&(s.audio=t.audio),{extraBody:K(s)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`volcengine/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=volcengine",...t?n(t):{},apiKey:a,baseURL:i})})},ae=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{sampleRate:s,volume:v,rate:u,pitch:c}=t,y={sampleRate:s,volume:v,rate:u,pitch:c};return Object.keys(y).forEach(x=>y[x]===void 0&&delete y[x]),{extraBody:K(y)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`alibaba/${t}`})},{voice:t=>{let s=i;return s.endsWith("v1/")?s=s.slice(0,-3):s.endsWith("v1")&&(s=s.slice(0,-2)),{query:"provider=alibaba",...t?n(t):{},apiKey:a,baseURL:s}}})},q=async a=>(a.fetch??globalThis.fetch)(Ce(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:Me({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(Se).then(({voices:i})=>i);const Ue=[{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",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",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=>j(e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...j(e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},vllm:{id:"vllm",nameKey:"settings.pages.providers.provider.vllm.title",name:"vLLM",descriptionKey:"settings.pages.providers.provider.vllm.description",description:"vllm.ai",iconColor:"i-lobe-icons:vllm",createProvider:e=>j(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"llama-2-7b",name:"Llama 2 (7B)",provider:"vllm",description:"Meta's Llama 2 7B parameter model",contextLength:4096},{id:"llama-2-13b",name:"Llama 2 (13B)",provider:"vllm",description:"Meta's Llama 2 13B parameter model",contextLength:4096},{id:"llama-2-70b",name:"Llama 2 (70B)",provider:"vllm",description:"Meta's Llama 2 70B parameter model",contextLength:4096},{id:"mistral-7b",name:"Mistral (7B)",provider:"vllm",description:"Mistral AI's 7B parameter model",contextLength:8192},{id:"mixtral-8x7b",name:"Mixtral (8x7B)",provider:"vllm",description:"Mistral AI's Mixtral 8x7B MoE model",contextLength:32768},{id:"custom",name:"Custom Model",provider:"vllm",description:"Specify a custom model name",contextLength:0}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},openai:{id:"openai",nameKey:"settings.pages.providers.provider.openai.title",name:"OpenAI",descriptionKey:"settings.pages.providers.provider.openai.description",description:"openai.com",icon:"i-lobe-icons:openai",defaultOptions:{baseUrl:"https://api.openai.com/v1/"},createProvider:e=>E(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...E(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"openai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},anthropic:{id:"anthropic",nameKey:"settings.pages.providers.provider.anthropic.title",name:"Anthropic",descriptionKey:"settings.pages.providers.provider.anthropic.description",description:"anthropic.com",icon:"i-lobe-icons:anthropic",defaultOptions:{baseUrl:"https://api.anthropic.com/v1/"},createProvider:e=>ye(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"claude-3-7-sonnet-20250219",name:"Claude 3.7 Sonnet",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet (New)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-haiku-20241022",name:"Claude 3.5 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20240620",name:"Claude 3.5 Sonnet (Old)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-haiku-20240307",name:"Claude 3 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-opus-20240229",name:"Claude 3 Opus",provider:"anthropic",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"google-generative-ai":{id:"google-generative-ai",nameKey:"settings.pages.providers.provider.google-generative-ai.title",name:"Google Gemini",descriptionKey:"settings.pages.providers.provider.google-generative-ai.description",description:"ai.google.dev",icon:"i-lobe-icons:gemini",defaultOptions:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"},createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"google-generative-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},xai:{id:"xai",nameKey:"settings.pages.providers.provider.xai.title",name:"xAI",descriptionKey:"settings.pages.providers.provider.xai.description",description:"x.ai",icon:"i-lobe-icons:xai",createProvider:e=>Q(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...Q(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"xai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},deepseek:{id:"deepseek",nameKey:"settings.pages.providers.provider.deepseek.title",name:"DeepSeek",descriptionKey:"settings.pages.providers.provider.deepseek.description",description:"deepseek.com",iconColor:"i-lobe-icons:deepseek",createProvider:e=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...D(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"deepseek",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},elevenlabs:{id:"elevenlabs",nameKey:"settings.pages.providers.provider.elevenlabs.title",name:"ElevenLabs",descriptionKey:"settings.pages.providers.provider.elevenlabs.description",description:"elevenlabs.io",icon:"i-simple-icons:elevenlabs",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/",voiceSettings:{similarityBoost:.75,stability:.5}},createProvider:e=>Y(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>Ue.map(e=>({id:e.model_id,name:e.name,provider:"elevenlabs",description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{const r=Y(e.apiKey.trim(),e.baseUrl.trim()),d=await q({...r.voice()}),o=d.findIndex(P=>P.name.includes("Aria")),p=d.findIndex(P=>P.name.includes("Bill")),I=o!==-1?o:0,F=p!==-1?p:d.length-1,z=Math.min(I,F),L=Math.max(I,F);return[...d.slice(0,z),...d.slice(L+1),...d.slice(z,L+1)].map(P=>({id:P.id,name:P.name,provider:"elevenlabs",previewURL:P.preview_audio_url,languages:P.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:"microsoft-speech",nameKey:"settings.pages.providers.provider.microsoft-speech.title",name:"Microsoft / Azure Speech",descriptionKey:"settings.pages.providers.provider.microsoft-speech.description",description:"speech.microsoft.com",iconColor:"i-lobe-icons:microsoft",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>R(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"v1",name:"v1",provider:"microsoft-speech",description:"",contextLength:0,deprecated:!1}],listVoices:async e=>{const r=R(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice({region:e.region})})).map(o=>{var p;return{id:o.id,name:o.name,provider:"microsoft-speech",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:"alibaba-cloud-model-studio",nameKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.title",name:"Alibaba Cloud Model Studio",descriptionKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.description",description:"bailian.console.aliyun.com",iconColor:"i-lobe-icons:alibabacloud",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>ae(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=ae(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"alibaba-cloud-model-studio",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})},listModels:async()=>[{id:"cozyvoice-v1",name:"CozyVoice",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1},{id:"cozyvoice-v2",name:"CozyVoice (New)",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},volcengine:{id:"volcengine",nameKey:"settings.pages.providers.provider.volcengine.title",name:"settings.pages.providers.provider.volcengine.title",descriptionKey:"settings.pages.providers.provider.volcengine.description",description:"volcengine.com",iconColor:"i-lobe-icons:volcengine",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>ee(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=ee(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"volcano-engine",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})},listModels:async()=>[{id:"v1",name:"v1",provider:"volcano-engine",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl&&!!e.app&&!!e.app.appId}},"together-ai":{id:"together-ai",nameKey:"settings.pages.providers.provider.together.title",name:"Together.ai",descriptionKey:"settings.pages.providers.provider.together.description",description:"together.ai",iconColor:"i-lobe-icons:together",createProvider:e=>Z(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...Z(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"together-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"novita-ai":{id:"novita-ai",nameKey:"settings.pages.providers.provider.novita.title",name:"Novita",descriptionKey:"settings.pages.providers.provider.novita.description",description:"novita.ai",iconColor:"i-lobe-icons:novita",createProvider:e=>X(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...X(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"novita-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"fireworks-ai":{id:"fireworks-ai",nameKey:"settings.pages.providers.provider.fireworks.title",name:"Fireworks.ai",descriptionKey:"settings.pages.providers.provider.fireworks.description",description:"fireworks.ai",icon:"i-lobe-icons:fireworks",createProvider:e=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...V(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"fireworks-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"featherless-ai":{id:"featherless-ai",nameKey:"settings.pages.providers.provider.featherless.title",name:"Featherless.ai",descriptionKey:"settings.pages.providers.provider.featherless.description",description:"featherless.ai",icon:"i-lobe-icons:featherless-ai",defaultOptions:{baseUrl:"https://api.featherless.ai/v1/"},createProvider:e=>E(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...E(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"featherless-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"cloudflare-workers-ai":{id:"cloudflare-workers-ai",nameKey:"settings.pages.providers.provider.cloudflare-workers-ai.title",name:"Cloudflare Workers AI",descriptionKey:"settings.pages.providers.provider.cloudflare-workers-ai.description",description:"cloudflare.com",iconColor:"i-lobe-icons:cloudflare",createProvider:e=>ke(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"perplexity-ai":{id:"perplexity-ai",nameKey:"settings.pages.providers.provider.perplexity.title",name:"Perplexity",descriptionKey:"settings.pages.providers.provider.perplexity.description",description:"perplexity.ai",icon:"i-lobe-icons:perplexity",defaultOptions:{baseUrl:"https://api.perplexity.ai"},createProvider:e=>Pe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"sonar-small-online",name:"Sonar Small (Online)",provider:"perplexity-ai",description:"Efficient model with online search capabilities",contextLength:12e3},{id:"sonar-medium-online",name:"Sonar Medium (Online)",provider:"perplexity-ai",description:"Balanced model with online search capabilities",contextLength:12e3},{id:"sonar-large-online",name:"Sonar Large (Online)",provider:"perplexity-ai",description:"Powerful model with online search capabilities",contextLength:12e3},{id:"codey-small",name:"Codey Small",provider:"perplexity-ai",description:"Specialized for code generation and understanding",contextLength:12e3},{id:"codey-large",name:"Codey Large",provider:"perplexity-ai",description:"Advanced code generation and understanding",contextLength:12e3}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"mistral-ai":{id:"mistral-ai",nameKey:"settings.pages.providers.provider.mistral.title",name:"Mistral",descriptionKey:"settings.pages.providers.provider.mistral.description",description:"mistral.ai",iconColor:"i-lobe-icons:mistral",createProvider:e=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...H(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"mistral-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"moonshot-ai":{id:"moonshot-ai",nameKey:"settings.pages.providers.provider.moonshot.title",name:"Moonshot AI",descriptionKey:"settings.pages.providers.provider.moonshot.description",description:"moonshot.ai",icon:"i-lobe-icons:moonshot",createProvider:e=>J(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...J(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"moonshot-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}}};async function h(e){const r=a.value[e];if(!r)return!1;const d=l[e];return d?await d.validators.validateProviderConfig(r):!1}const t=U({});function s(e){var r;if(!a.value[e]){const d=l[e];a.value[e]={baseUrl:((r=d.defaultOptions)==null?void 0:r.baseUrl)||""}}}Object.keys(l).forEach(s);async function v(){await Promise.all(Object.keys(l).map(async e=>{t.value[e]=await h(e)}))}v(),ge(a,v,{deep:!0});const u=k(()=>Object.keys(l).filter(e=>t.value[e])),c=U({}),y=U({}),x=U({});async function M(e){const r=a.value[e];if(!r)return[];const d=l[e];if(!d)return[];y.value[e]=!0,x.value[e]=null;try{const o=d.capabilities.listModels?await d.capabilities.listModels(r):[];return c.value[e]=o.map(p=>({id:p.id,name:p.name,description:p.description,contextLength:p.contextLength,deprecated:p.deprecated,provider:e})),c.value[e]}catch(o){return console.error(`Error fetching models for ${e}:`,o),x.value[e]=o instanceof Error?o.message:"Unknown error",[]}finally{y.value[e]=!1}}function C(e){return c.value[e]||[]}const B=k(()=>{const e=[];for(const r of u.value)e.push(...c.value[r]||[]);return e});async function ie(){for(const e of u.value)l[e].capabilities.listModels&&await M(e)}function $(e){const r=l[e];if(!r)throw new Error(`Provider metadata for ${e} not found`);return{...r,localizedName:i(r.nameKey,r.name),localizedDescription:i(r.descriptionKey,r.description)}}const re=k(()=>Object.values(l).map(e=>({...e,localizedName:i(e.nameKey,e.name),localizedDescription:i(e.descriptionKey,e.description),configured:t.value[e.id]||!1})));function O(e){const r=a.value[e];if(!r)throw new Error(`Provider credentials for ${e} not found`);const d=l[e];if(!d)throw new Error(`Provider metadata for ${e} not found`);try{return d.createProvider(r)}catch(o){throw console.error(`Error creating provider instance for ${e}:`,o),o}}const S=k(()=>u.value.map(e=>$(e))),te=k(()=>S.value.filter(e=>{const r=O(e.id);return"chat"in r&&typeof r.chat=="function"})),ne=k(()=>S.value.filter(e=>{const r=O(e.id);return"transcription"in r&&typeof r.transcription=="function"})),se=k(()=>S.value.filter(e=>{const r=O(e.id);return"speech"in r&&typeof r.speech=="function"}));function oe(e){return a.value[e]}return{providers:a,getProviderConfig:oe,availableProviders:u,configuredProviders:t,providerMetadata:l,getProviderMetadata:$,allProvidersMetadata:re,initializeProvider:s,validateProvider:h,availableModels:c,isLoadingModels:y,modelLoadError:x,fetchModelsForProvider:M,getModelsForProvider:C,allAvailableModels:B,loadModelsForConfiguredProviders:ie,getProviderInstance:O,availableProvidersMetadata:S,availableTextGenerationsProvidersMetadata:te,availableAudioSpeechProvidersMetadata:se,availableAudioTranscriptionProvidersMetadata:ne}});export{b as l,je as u}; diff --git a/assets/queue-C1jw5F5A.js b/assets/queue-Bw5vKhjp.js similarity index 90% rename from assets/queue-C1jw5F5A.js rename to assets/queue-Bw5vKhjp.js index 92f34c6696e85ce8fc2aeb0b2ab097c46eadecf4..30308ecdcc91b5f26ea1118b878e7543a0b30d78 100644 --- a/assets/queue-C1jw5F5A.js +++ b/assets/queue-Bw5vKhjp.js @@ -1 +1 @@ -import{u as o}from"./queue-66hlaQTM.js";import{d as v,e as h,T as k,c as w,o as g,a as I}from"./index-DP0FGIAR.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-CHtEOdh3.js";import{d as v,e as h,T as k,c as w,o as g,a as I}from"./index-D14Zran9.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-66hlaQTM.js b/assets/queue-CHtEOdh3.js similarity index 91% rename from assets/queue-66hlaQTM.js rename to assets/queue-CHtEOdh3.js index 388b66d28711c0ef5381ce8a4038dc6b0c6e3eac..85b41efcc18223ef502ae58622af75af73197def 100644 --- a/assets/queue-66hlaQTM.js +++ b/assets/queue-CHtEOdh3.js @@ -1 +1 @@ -import{e as l}from"./index-DP0FGIAR.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-D14Zran9.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-KTxrGl8o.js b/assets/queues-DtduOmVA.js similarity index 94% rename from assets/queues-KTxrGl8o.js rename to assets/queues-DtduOmVA.js index bf2e910e36ba767117e650d97442b702ee909fff..7922e2aa6ff78ce3bbfe8260e2b3f61f47ec52ee 100644 --- a/assets/queues-KTxrGl8o.js +++ b/assets/queues-DtduOmVA.js @@ -1 +1 @@ -import{c as i}from"./emotions-DWNSb738.js";import{u as s}from"./queue-66hlaQTM.js";import{e as d}from"./index-DP0FGIAR.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-CHtEOdh3.js";import{e as d}from"./index-D14Zran9.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-Dv1TTR1J.js b/assets/settings-D8xREh35.js similarity index 97% rename from assets/settings-Dv1TTR1J.js rename to assets/settings-D8xREh35.js index a709eff79c82e3ac66ae5c1032fd0f11c2e11f02..24cd37f2d03ef257a790386598dc533e894253c1 100644 --- a/assets/settings-Dv1TTR1J.js +++ b/assets/settings-D8xREh35.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_b4de1d75_lang-D2sfWM0m.js";import{r as D,w as y,u as A,e as g,f as B,i as at,g as ut,h as b,j as J,n as lt,k as V,l as M,p as u,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 yt,F as bt,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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as Lt}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{H as Ft}from"./HeaderLink-BXBXXYzg.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={...lt,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:u,borderTopWidth:u,borderRightWidth:u,borderBottomWidth:u,borderLeftWidth:u,borderRadius:u,radius:u,borderTopLeftRadius:u,borderTopRightRadius:u,borderBottomRightRadius:u,borderBottomLeftRadius:u,width:u,maxWidth:u,height:u,maxHeight:u,size:u,top:u,right:u,bottom:u,left:u,padding:u,paddingTop:u,paddingRight:u,paddingBottom:u,paddingLeft:u,margin:u,marginTop:u,marginRight:u,marginBottom:u,marginLeft:u,rotate:O,rotateX:O,rotateY:O,rotateZ:O,scale:S,scaleX:S,scaleY:S,scaleZ:S,skew:O,skewX:O,skewY:O,distance:u,translateX:u,translateY:u,translateZ:u,x:u,y:u,z:u,perspective:u,transformPerspective:u,opacity:V,originX:$,originY:$,originZ:u,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:bt,bounceIn:yt,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 l(f){return s.set(e),i&&i(),f&&f(),{stop:()=>{}}}return!c||!a||r.type===!1?l: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],l=e(i,p,o);if(a&&a.immediate){l.set(r);return}const f=se(i,l,r,a,c);l.start(f)}}}function ne(t,s={},{motionValues:e,push:n,stop:i}=ie()){const r=A(s),o=g(!1);y(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 ue({target:t,state:s,variants:e,apply:n}){const i=A(e),r=g(!1),o=g(!1),a=g(!1),c=B(()=>{let l=[...Object.keys(s.value||{})];return i&&(i.hovered&&(l=[...l,...Object.keys(i.hovered)]),i.tapped&&(l=[...l,...Object.keys(i.tapped)]),i.focused&&(l=[...l,...Object.keys(i.focused)])),l}),p=B(()=>{const l={};Object.assign(l,s.value),r.value&&i.hovered&&Object.assign(l,i.hovered),o.value&&i.tapped&&Object.assign(l,i.tapped),a.value&&i.focused&&Object.assign(l,i.focused);for(const f in l)c.value.includes(f)||delete l[f];return l});i.hovered&&(b(t,"mouseenter",()=>r.value=!0),b(t,"mouseleave",()=>{r.value=!1,o.value=!1})),i.tapped&&(ae()&&(b(t,"mousedown",()=>o.value=!0),b(t,"mouseup",()=>o.value=!1)),re()&&(b(t,"pointerdown",()=>o.value=!0),b(t,"pointerup",()=>o.value=!1)),oe()&&(b(t,"touchstart",()=>o.value=!0),b(t,"touchend",()=>o.value=!1))),i.focused&&(b(t,"focus",()=>a.value=!0),b(t,"blur",()=>a.value=!1)),y([r,o,a],()=>{n(p.value)})}function le({set:t,target:s,variants:e,variant:n}){const i=A(e);y(()=>s,()=>{i&&(i.initial&&(t("initial"),n.value="initial"),i.enter&&(n.value="enter"))},{immediate:!0,flush:"pre"})}function ce({state:t,apply:s}){y(t,e=>{e&&s(e)},{immediate:!0})}function fe({target:t,variants:s,variant:e}){const n=A(s);n&&(n.visible||n.visibleOnce)&&ut(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&&le(t),s.syncVariants&&ce(t),s.visibilityHooks&&fe(t),s.eventListeners&&ue(t)}function de(t={}){const s=D({...t}),e=g({});return y(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){y(()=>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 y(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,u)).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),l=z(c,p);r+=`${me[a]||a}(${l}) `}s&&!o&&(r+="translateZ(0px) "),n.value=r.trim()},{immediate:!0,deep:!0}),{state:e,transform:n}}const he=["","X","Y","Z"],ye=["perspective","translate","scale","rotate","skew"],st=["transformPerspective","x","y","z"];ye.forEach(t=>{he.forEach(s=>{const e=t+s;st.push(e)})});const be=new Set(st);function it(t){return be.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)}),y(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(l=>e(l.endsWith(")")?l.replace(")",""):l.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)}),y(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 y(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}),y([()=>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,l)=>(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:l[0]||(l[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/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,l;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:(l=o.value)==null?void 0:l.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-B-Ahwwhs.js";import{r as D,w as y,u as A,e as g,f as B,i as at,g as ut,h as b,j as J,n as lt,k as V,l as M,p as u,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 yt,F as bt,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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as Lt}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{H as Ft}from"./HeaderLink-BlO6oj_N.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={...lt,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:u,borderTopWidth:u,borderRightWidth:u,borderBottomWidth:u,borderLeftWidth:u,borderRadius:u,radius:u,borderTopLeftRadius:u,borderTopRightRadius:u,borderBottomRightRadius:u,borderBottomLeftRadius:u,width:u,maxWidth:u,height:u,maxHeight:u,size:u,top:u,right:u,bottom:u,left:u,padding:u,paddingTop:u,paddingRight:u,paddingBottom:u,paddingLeft:u,margin:u,marginTop:u,marginRight:u,marginBottom:u,marginLeft:u,rotate:O,rotateX:O,rotateY:O,rotateZ:O,scale:S,scaleX:S,scaleY:S,scaleZ:S,skew:O,skewX:O,skewY:O,distance:u,translateX:u,translateY:u,translateZ:u,x:u,y:u,z:u,perspective:u,transformPerspective:u,opacity:V,originX:$,originY:$,originZ:u,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:bt,bounceIn:yt,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 l(f){return s.set(e),i&&i(),f&&f(),{stop:()=>{}}}return!c||!a||r.type===!1?l: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],l=e(i,p,o);if(a&&a.immediate){l.set(r);return}const f=se(i,l,r,a,c);l.start(f)}}}function ne(t,s={},{motionValues:e,push:n,stop:i}=ie()){const r=A(s),o=g(!1);y(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 ue({target:t,state:s,variants:e,apply:n}){const i=A(e),r=g(!1),o=g(!1),a=g(!1),c=B(()=>{let l=[...Object.keys(s.value||{})];return i&&(i.hovered&&(l=[...l,...Object.keys(i.hovered)]),i.tapped&&(l=[...l,...Object.keys(i.tapped)]),i.focused&&(l=[...l,...Object.keys(i.focused)])),l}),p=B(()=>{const l={};Object.assign(l,s.value),r.value&&i.hovered&&Object.assign(l,i.hovered),o.value&&i.tapped&&Object.assign(l,i.tapped),a.value&&i.focused&&Object.assign(l,i.focused);for(const f in l)c.value.includes(f)||delete l[f];return l});i.hovered&&(b(t,"mouseenter",()=>r.value=!0),b(t,"mouseleave",()=>{r.value=!1,o.value=!1})),i.tapped&&(ae()&&(b(t,"mousedown",()=>o.value=!0),b(t,"mouseup",()=>o.value=!1)),re()&&(b(t,"pointerdown",()=>o.value=!0),b(t,"pointerup",()=>o.value=!1)),oe()&&(b(t,"touchstart",()=>o.value=!0),b(t,"touchend",()=>o.value=!1))),i.focused&&(b(t,"focus",()=>a.value=!0),b(t,"blur",()=>a.value=!1)),y([r,o,a],()=>{n(p.value)})}function le({set:t,target:s,variants:e,variant:n}){const i=A(e);y(()=>s,()=>{i&&(i.initial&&(t("initial"),n.value="initial"),i.enter&&(n.value="enter"))},{immediate:!0,flush:"pre"})}function ce({state:t,apply:s}){y(t,e=>{e&&s(e)},{immediate:!0})}function fe({target:t,variants:s,variant:e}){const n=A(s);n&&(n.visible||n.visibleOnce)&&ut(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&&le(t),s.syncVariants&&ce(t),s.visibilityHooks&&fe(t),s.eventListeners&&ue(t)}function de(t={}){const s=D({...t}),e=g({});return y(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){y(()=>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 y(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,u)).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),l=z(c,p);r+=`${me[a]||a}(${l}) `}s&&!o&&(r+="translateZ(0px) "),n.value=r.trim()},{immediate:!0,deep:!0}),{state:e,transform:n}}const he=["","X","Y","Z"],ye=["perspective","translate","scale","rotate","skew"],st=["transformPerspective","x","y","z"];ye.forEach(t=>{he.forEach(s=>{const e=t+s;st.push(e)})});const be=new Set(st);function it(t){return be.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)}),y(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(l=>e(l.endsWith(")")?l.replace(")",""):l.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)}),y(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 y(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}),y([()=>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,l)=>(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:l[0]||(l[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/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,l;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:(l=o.value)==null?void 0:l.subtitle},null,8,["title","subtitle"]),C(A(Dt))])])}}});export{Ke as default}; diff --git a/assets/speech-RC4pJLrT.js b/assets/speech-BGwkIM3M.js similarity index 98% rename from assets/speech-RC4pJLrT.js rename to assets/speech-BGwkIM3M.js index 5be09a40fb751c3e4a30e10696d89bca9d540582..71cd7d24a174134857534011183f40803fb53743 100644 --- a/assets/speech-RC4pJLrT.js +++ b/assets/speech-BGwkIM3M.js @@ -1,2 +1,2 @@ -import{a4 as te,cb as g,e as b,f as p,w as P,T as re}from"./index-DP0FGIAR.js";import{r as ne,a as ae,b as oe,d as se}from"./index-LHmcipjy.js";import{u as ce}from"./providers-CCXVXsM2.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""+y(e.value,Te,Ce)+""}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-D14Zran9.js";import{r as ne,a as ae,b as oe,d as se}from"./index-LHmcipjy.js";import{u as ce}from"./providers-Bnxi0hpg.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""+y(e.value,Te,Ce)+""}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/speech-BgcS9-0U.js b/assets/speech-zNK1lovq.js similarity index 86% rename from assets/speech-BgcS9-0U.js rename to assets/speech-zNK1lovq.js index 8258aa8a1d4f96bd8207f6b69e80b9a7598ebd60..744add9c4256a783afeadfd5b2f0eaeb4742cea8 100644 --- a/assets/speech-BgcS9-0U.js +++ b/assets/speech-zNK1lovq.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 $,ce as X,cf as J,bm as Q,c9 as me,W as U,Y as y,b as S,u as t,bl as F,c2 as Z,f as pe,cI as fe,cc as ne,bk as G,$ as ge,a0 as te,U as xe,c5 as he,c3 as be,bI as I,cl as ye}from"./index-DP0FGIAR.js";import{_ as se,a as le,b as ke}from"./FieldRange.vue_vue_type_script_setup_true_lang-7V-hK3UG.js";import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as we}from"./providers-CCXVXsM2.js";import{u as _e,g as Se}from"./speech-RC4pJLrT.js";import{_ as Ve}from"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as Me}from"./Textarea.vue_vue_type_script_setup_true_lang-CSSBrXdz.js";import{R as Ce,a as $e}from"./RadioCardSimple-NVMpaHqJ.js";import{_ as Ue}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import{_ as Pe}from"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-Badg0BE8.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"},Ie={key:0,class:"i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Fe={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:""},Ye={key:0,class:"h-16 px-3 pb-2"},Ge=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=J(l,"voice-id"),f=J(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",Ie)):(i(),u("div",Fe))],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:F(()=>[l.showVisualizer&&l.currentlyPlayingId===l.voice.id&&l.audioStream?(i(),u("div",Ye,[S(t(Le),{stream:l.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:F(({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))}}),Je=Z(Ge,[["__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=J(l,"search-query"),k=J(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(),G(Je,{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"},It={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"},Ft={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":""},Yt={class:"inline-flex items-center gap-4"},Gt={flex:"~ col gap-4"},Jt={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,availableAudioSpeechProvidersMetadata: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}),Y=await Se({...A.speech(h.value,s),input:N,voice:M.value.id});C.value=URL.createObjectURL(new Blob([Y])),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 Y;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(),G(t($e),{id:d.id,key:d.id,modelValue:t(v),"onUpdate:modelValue":s[0]||(s[0]=ce=>I(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:F(()=>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(),G(t(Ce),{key:3,modelValue:t(h),"onUpdate:modelValue":s[1]||(s[1]=d=>I(h)?h.value=d:null),"search-query":t(R),"onUpdate:searchQuery":s[2]||(s[2]=d=>I(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:F(()=>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:F(()=>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:F(()=>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:F(()=>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:F(()=>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=>I(b)?b.value=d:null),voices:(Y=t(a)[t(v)])==null?void 0:Y.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",It,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",Ft,[S(t(se),{modelValue:t(p),"onUpdate:modelValue":s[5]||(s[5]=d=>I(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=>I(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=>I(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=>I(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=>I(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",Yt,[S(t(ke)),e("div",null,y(t(o)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",Gt,[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(),G(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",Jt,[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,cm as ye}from"./index-D14Zran9.js";import{_ as se,a as le,b as ke}from"./FieldRange.vue_vue_type_script_setup_true_lang-B7PpkYTo.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-B-Ahwwhs.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as we}from"./providers-Bnxi0hpg.js";import{u as _e,g as Se}from"./speech-BGwkIM3M.js";import{_ as Ve}from"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as Me}from"./Textarea.vue_vue_type_script_setup_true_lang-BCWeHGz1.js";import{R as Ce,a as $e}from"./RadioCardSimple-tg_w8gEX.js";import{_ as Ue}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import{_ as Pe}from"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-DAk2Pfwq.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,availableAudioSpeechProvidersMetadata: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/stage-DjpiDloJ.js b/assets/stage-B1664kmG.js similarity index 85% rename from assets/stage-DjpiDloJ.js rename to assets/stage-B1664kmG.js index f4cc4ef2b49c7273f456dd9e13c6a34921e488ba..e1fe7f81afc98440c4c59e829267feed1b122363 100644 --- a/assets/stage-DjpiDloJ.js +++ b/assets/stage-B1664kmG.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-DP0FGIAR.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-D14Zran9.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-CjrFpVkP.js b/assets/sury-DmrZ3_Oj-CP24MTtD.js similarity index 50% rename from assets/sury-DmrZ3_Oj-CjrFpVkP.js rename to assets/sury-DmrZ3_Oj-CP24MTtD.js index 552db827c9dccaf2204c533b6e335453ef759e0a..8fb64c4b06b2fc3a970e9b92ad8669b45c82e299 100644 --- a/assets/sury-DmrZ3_Oj-CjrFpVkP.js +++ b/assets/sury-DmrZ3_Oj-CP24MTtD.js @@ -1 +1 @@ -import{cO as r}from"./index-DP0FGIAR.js";import{t as a}from"./mcp-H-_JN8ee.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-D14Zran9.js";import{t as a}from"./mcp-B_OVeJTA.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-Bp24ut4Q.js b/assets/three-vrm.module-D-bSbrVn.js similarity index 99% rename from assets/three-vrm.module-Bp24ut4Q.js rename to assets/three-vrm.module-D-bSbrVn.js index 254e6684eba78d4ff11ab81d291e51ddc1689140..47bc1ec9494545e57a886c952b4c5dcf01404093 100644 --- a/assets/three-vrm.module-Bp24ut4Q.js +++ b/assets/three-vrm.module-D-bSbrVn.js @@ -1,4 +1,4 @@ -import{cP 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,cQ 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,cR as ImageLoader,by as ShaderMaterial,cS as TangentSpaceNormalMap,bA as UniformsUtils,cT as UniformsLib,aw as BufferAttribute,cU as DynamicDrawUsage,aO as BufferGeometry,aS as Line,aP as SkinnedMesh,cV as GLBufferAttribute,aZ as Skeleton,cW as AxesHelper,bN as REVISION}from"./index-DP0FGIAR.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-D14Zran9.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-dCAiNsZI.js b/assets/together-ai-CqmqxxJV.js similarity index 64% rename from assets/together-ai-dCAiNsZI.js rename to assets/together-ai-CqmqxxJV.js index 5987a40a71be189c95e4950347eae126233dcf93..53f8e639e66f263d54c7077231e9c8317f96607b 100644 --- a/assets/together-ai-dCAiNsZI.js +++ b/assets/together-ai-CqmqxxJV.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as w}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as w}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-C4twnWcL.js b/assets/useIconAnimation-RPlHEpRk.js similarity index 58% rename from assets/useIconAnimation-C4twnWcL.js rename to assets/useIconAnimation-RPlHEpRk.js index 5a1decf61a88ad598c9a59f577e4ae48e5dbd391..2a417ab1e4098ee1b68ba2e617c365f47c439b40 100644 --- a/assets/useIconAnimation-C4twnWcL.js +++ b/assets/useIconAnimation-RPlHEpRk.js @@ -1 +1 @@ -import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{e as t,bj as r,f as u,T as m,U as c}from"./index-DP0FGIAR.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-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{e as t,bj as r,f as u,T as m,U as c}from"./index-D14Zran9.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-CV87sxw7.js b/assets/valibot-CQk-M5rL-CV87sxw7.js deleted file mode 100644 index b9fb43b2284eed873492ad615e6e6fdbea75e581..0000000000000000000000000000000000000000 --- a/assets/valibot-CQk-M5rL-CV87sxw7.js +++ /dev/null @@ -1 +0,0 @@ -import{cO as r}from"./index-DP0FGIAR.js";import{t as a}from"./mcp-H-_JN8ee.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-CqkiJ_5y.js b/assets/valibot-CQk-M5rL-CqkiJ_5y.js new file mode 100644 index 0000000000000000000000000000000000000000..33065c1ea43e7a68b281aca7ba7b7126177a8280 --- /dev/null +++ b/assets/valibot-CQk-M5rL-CqkiJ_5y.js @@ -0,0 +1 @@ +import{cP as r}from"./index-D14Zran9.js";import{t as a}from"./mcp-B_OVeJTA.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-Dqom7fOB.js b/assets/vibrant-58lOJFKP.js similarity index 88% rename from assets/vibrant-Dqom7fOB.js rename to assets/vibrant-58lOJFKP.js index 0c74df8ad0247c4ca638466da4e9c5b8015b8858..c91028b667a79e62fba2e80be373922c30fe8741 100644 --- a/assets/vibrant-Dqom7fOB.js +++ b/assets/vibrant-58lOJFKP.js @@ -1 +1 @@ -import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as p}from"./InputFile.vue_vue_type_script_setup_true_lang-BxywhVG8.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-DP0FGIAR.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-ji6OjjEm.js";import{_ as p}from"./InputFile.vue_vue_type_script_setup_true_lang-DwkwVH8j.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-D14Zran9.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-CRxgozat.js b/assets/volcengine-BgIoHidq.js similarity index 68% rename from assets/volcengine-CRxgozat.js rename to assets/volcengine-BgIoHidq.js index 41671323ed6bb3cdc6893ccdef992dd2ffca6ca6..d4b70044d82186d1e1304137b7d4167a0bd5c1cf 100644 --- a/assets/volcengine-CRxgozat.js +++ b/assets/volcengine-BgIoHidq.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as $}from"./providers-CCXVXsM2.js";import{u as B}from"./speech-RC4pJLrT.js";import{_ as R}from"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import{_ as T}from"./FieldRange.vue_vue_type_script_setup_true_lang-7V-hK3UG.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as E,a as K}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Er5TxWy_.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as $}from"./providers-Bnxi0hpg.js";import{u as B}from"./speech-BGwkIM3M.js";import{_ as R}from"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import{_ as T}from"./FieldRange.vue_vue_type_script_setup_true_lang-B7PpkYTo.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as E,a as K}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DKByP4k1.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.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-P5ub0MXi.js b/assets/xai-DD8al7gb.js similarity index 64% rename from assets/xai-P5ub0MXi.js rename to assets/xai-DD8al7gb.js index 75253083cdedf78f2a70973626dd049978e4a394..6429826c3008a97bf1f0918962bdf2f345aa4f46 100644 --- a/assets/xai-P5ub0MXi.js +++ b/assets/xai-DD8al7gb.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_b4de1d75_lang-D2sfWM0m.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-DP0FGIAR.js";import"./three-vrm.module-Bp24ut4Q.js";import"./emotions-DWNSb738.js";import"./mcp-H-_JN8ee.js";import{u as z}from"./providers-CCXVXsM2.js";import"./Select.vue_vue_type_style_index_0_lang-Bnz-rUl0.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-DvCdsRql.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BKdqzfcT.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-B7h72Jpi.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTBC5zp8.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-OugwX-Nv.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Dq6t2KM2.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Cqut3r8Y.js";import"./Input.vue_vue_type_script_setup_true_lang-BK6T0eKF.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-B-Ahwwhs.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-D14Zran9.js";import"./three-vrm.module-D-bSbrVn.js";import"./emotions-DWNSb738.js";import"./mcp-B_OVeJTA.js";import{u as z}from"./providers-Bnxi0hpg.js";import"./Select.vue_vue_type_style_index_0_lang-ji6OjjEm.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BnX1KDA5.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BMuwro68.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CZGR2fgo.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-B7uFQ0OL.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-CarTVdmi.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-yludE2Yh.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DM62_dRf.js";import"./Input.vue_vue_type_script_setup_true_lang-BVqHkvwn.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-CadWEJhq.js b/assets/zod-Db63SLXj-Cpel8AB9.js similarity index 66% rename from assets/zod-Db63SLXj-CadWEJhq.js rename to assets/zod-Db63SLXj-Cpel8AB9.js index 3662298e519beae2f1c725599a84118205183171..f8413163fde66c6248d8281af6d1804c1d805524 100644 --- a/assets/zod-Db63SLXj-CadWEJhq.js +++ b/assets/zod-Db63SLXj-Cpel8AB9.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DKRC_s79.js","assets/mcp-H-_JN8ee.js","assets/index-DP0FGIAR.js","assets/index-BNiX87JN.css"])))=>i.map(i=>d[i]); -import{cO as n}from"./index-DP0FGIAR.js";import{a as t}from"./mcp-H-_JN8ee.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-DKRC_s79.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-hW1I5rqG.js","assets/mcp-B_OVeJTA.js","assets/index-D14Zran9.js","assets/index-BNiX87JN.css"])))=>i.map(i=>d[i]); +import{cP as n}from"./index-D14Zran9.js";import{a as t}from"./mcp-B_OVeJTA.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-hW1I5rqG.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 784f8c53b5761562e3f654989e2502f1ddec9ff3..f769af7ba1e8d0a6d1040096f34437ca1fa0ec75 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@ src="/remote-assets/page-external-data/js/script.js" > - +