diff --git a/assets/AnimatedWave-BwQ8RHQR.js b/assets/AnimatedWave-DqKMnZAQ.js similarity index 97% rename from assets/AnimatedWave-BwQ8RHQR.js rename to assets/AnimatedWave-DqKMnZAQ.js index 5f382566bc417416653f6c3258094699220a6cc5..056573a4185c46602104ee1ee4ea953096fb944a 100644 --- a/assets/AnimatedWave-BwQ8RHQR.js +++ b/assets/AnimatedWave-DqKMnZAQ.js @@ -1,3 +1,3 @@ -import{Fragment as e,RouterLink as t,__plugin_vue_export_helper_default as n,computed as r,createBaseVNode as i,createCommentVNode as a,createElementBlock as o,createVNode as s,defineComponent as c,nextTick as l,normalizeClass as u,normalizeStyle as d,onMounted as f,openBlock as p,ref as m,renderList as h,renderSlot as g,resolveDirective as _,storeToRefs as v,toDisplayString as y,unref as b,useDevicesList as x,useElementBounding as S,useI18n as C,useScroll as w,useSettings as T,vModelCheckbox as E,vModelRadio as D,watch as O,withCtx as k,withDirectives as A}from"./index-Dor8PgzM.js";import{useAudioContext as ee,useChatStore as j,useConsciousnessStore as M,useProvidersStore as N}from"./stores-BVVBBF04.js";import{HeaderLink_default as P}from"./HeaderLink-BN-EJFUu.js";import{TransitionVertical_default as te}from"./Button-C9y21VLy.js";import{Basic_default as F}from"./Basic-CbvQnFR9.js";import{useMarkdown as I,useMicVAD as L,useWhisper as ne}from"./composables-BOdj-CMj.js";const R={},z={class:`cross-background-container`};function B(e,t){return p(),o(`div`,z,[g(e.$slots,`default`,{},void 0,!0)])}var V=n(R,[[`render`,B],[`__scopeId`,`data-v-455eb62c`]]);const H={"mb-1":``,"w-full":``,"gap-2":``},U={"w-full":``};var W=c({__name:`Header`,setup(e){return(e,n)=>(p(),o(`header`,H,[i(`div`,U,[s(P)]),s(b(t),{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:k(()=>n[0]||=[i(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),G=W,re=`/assets/worker-eKZGDR4a.js`;const K=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),q=e=>{var t;let n=typeof e;return n===`object`?e===null?`null`:(e==null||(t=e.constructor)==null?void 0:t.name)??`object`:n},J=e=>{if(typeof e==`string`)return new TextEncoder().encode(e);if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);throw TypeError(`The input must be a Uint8Array, a string, or an ArrayBuffer. Received a value of the type ${q(e)}.`)},Y=e=>{let t=J(e),n=``,r,i=t.length;for(r=2;r>2],n+=K[(t[r-2]&3)<<4|t[r-1]>>4],n+=K[(t[r-1]&15)<<2|t[r]>>6],n+=K[t[r]&63];return r===i+1&&(n+=K[t[r-2]>>2],n+=K[(t[r-2]&3)<<4],n+=`==`),r===i&&(n+=K[t[r-2]>>2],n+=K[(t[r-2]&3)<<4|t[r-1]>>4],n+=K[(t[r-1]&15)<<2],n+=`=`),n};function X(e,t,n){for(let r=0;r{l().then(()=>{c.update(),u.value=c.height.value})}),x(async()=>{l().then(()=>{c.update(),u.value=c.height.value})}),(t,c)=>{let l=_(`auto-animate`);return p(),o(`div`,Q,[c[2]||=i(`div`,{"flex-1":``},null,-1),A((p(),o(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[c[1]||=i(`div`,{"flex-1":``},null,-1),(p(!0),o(e,null,h(b(r),(e,t)=>(p(),o(`div`,{key:t,"mb-2":``},[e.role===`error`?(p(),o(`div`,ae,[i(`div`,oe,[i(`div`,se,[i(`div`,ce,[i(`span`,le,y(b(d)(`stage.chat.message.character-name.core-system`)),1)]),c[0]||=i(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),b(s)&&t===b(r).length-1?(p(),o(`div`,ue)):(p(),o(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base {if(!e||!e.trim())return;let t=g.getProviderConfig(_.value);await V(e,{chatProvider:g.getProviderInstance(_.value),model:S.value,providerConfig:t})}});async function J(){if(!(!n.value.trim()||d.value))try{let e=g.getProviderConfig(_.value);await V(n.value,{chatProvider:g.getProviderInstance(_.value),model:S.value,providerConfig:e})}catch(e){U.value.pop(),U.value.push({role:`error`,content:e.message})}}let{destroy:Y,start:X}=L(B,{onSpeechStart:()=>{r.value=!0},onVADMisfire:()=>{r.value=!1},onSpeechEnd:e=>{r.value=!1,Z(e.buffer)},auto:!1});async function Z(e){await W.resume();let t=await ie(e,W.sampleRate);K({type:`generate`,data:{audio:t,language:`en`}})}async function Q(e){let t=e.target,n=P.value.find(e=>e.deviceId===t.value);if(!n){R.value=void 0;return}R.value=n}return O(z,async e=>{e===`false`&&(Y(),q())}),O(l,async e=>{e&&await I()}),f(()=>{X()}),H(async()=>{n.value=``}),(t,f)=>(p(),o(`div`,we,[i(`fieldset`,Te,[i(`label`,{class:u([c.value===`chat`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`chat`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`chat`,"aria-checked":c.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":``},[A(i(`input`,{"onUpdate:modelValue":f[0]||=e=>c.value=e,type:`radio`,name:`tab`,value:`chat`,hidden:``},null,512),[[D,c.value]]),f[7]||=i(`div`,{"i-solar:dialog-2-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,De,[i(`span`,Oe,y(b(G)(`stage.chat.tabs.chat`)),1)])],10,Ee),i(`label`,{class:u([c.value===`custom`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`custom`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`custom`,"aria-checked":c.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":``},[A(i(`input`,{"onUpdate:modelValue":f[1]||=e=>c.value=e,type:`radio`,name:`tab`,value:`custom`,hidden:``},null,512),[[D,c.value]]),f[8]||=i(`div`,{"i-solar:star-fall-2-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,Ae,[i(`span`,null,y(b(G)(`stage.chat.tabs.custom`)),1)])],10,ke),i(`label`,{class:u([c.value===`clothes`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`clothes`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`clothes`,"aria-checked":c.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":``},[A(i(`input`,{"onUpdate:modelValue":f[2]||=e=>c.value=e,type:`radio`,name:`tab`,value:`clothes`,hidden:``},null,512),[[D,c.value]]),f[9]||=i(`div`,{"i-solar:magic-stick-3-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,Me,[i(`span`,null,y(b(G)(`stage.chat.tabs.clothes`)),1)])],10,je)]),i(`div`,Ne,[i(`div`,Pe,[s(Ce,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`n.value=e,placeholder:b(G)(`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:u({"transition-colors-none placeholder:transition-colors-none":b(w)}),onSubmit:J,onCompositionstart:f[4]||=e=>d.value=!0,onCompositionend:f[5]||=e=>d.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])]),i(`div`,Ie,[i(`div`,Le,[s(b(te),null,{default:k(()=>[l.value?(p(),o(`fieldset`,Re,[(p(!0),o(e,null,h(b(P),(e,t)=>(p(),o(`label`,{key:t,class:`[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900`},[i(`input`,{type:`radio`,name:`audioInput`,value:e.deviceId,hidden:``,onChange:Q},null,40,ze),i(`div`,Be,[i(`div`,Ve,[e.deviceId===b(B)?(p(),o(`div`,He)):a(``,!0)]),i(`span`,{"inline-block":``,class:u([e.deviceId===b(B)?`cyan-400 dark:text-white`:`cyan-400/50 dark:text-white/50`]),transition:`all duration-250 ease-in-out`},y(e.label),3)])]))),128))])):a(``,!0)]),_:1}),i(`label`,{bg:`complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700`,transition:`all duration-250 ease-in-out`,class:u({"transition-colors-none":b(w)}),text:`complementary-400`,"h-fit":``,flex:``,"cursor-pointer":``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-full":``,"px-4":``,"py-2":``},[A(i(`input`,{"onUpdate:modelValue":f[6]||=e=>l.value=e,type:`checkbox`,hidden:``},null,512),[[E,l.value]]),f[10]||=i(`div`,{"i-solar:microphone-2-bold-duotone":``},null,-1),i(`div`,null,[r.value?(p(),o(`span`,We,`Listening...`)):(p(),o(`span`,Ue,y(b(G)(`settings.microphone`)),1))])],2)])])]))}}),Ke=n(Ge,[[`__scopeId`,`data-v-258a0513`]]);const qe={py:`1`,flex:`~ col`,rounded:`lg`,"overflow-hidden":``},Je={key:0,flex:``,mr:`12`},Ye={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 {l().then(()=>{c.update(),u.value=c.height.value})}),g(async()=>{l().then(()=>{c.update(),u.value=c.height.value})}),(t,c)=>{let l=_(`auto-animate`);return p(),o(`div`,qe,[c[1]||=i(`div`,{"flex-1":``},null,-1),A((p(),o(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,"max-h":`30vh`,flex:`~ col`,"overflow-scroll":``,class:`chat-history`},[c[0]||=i(`div`,{"flex-1":``},null,-1),(p(!0),o(e,null,h(b(s),(e,t)=>(p(),o(`div`,{key:t,"mb-2":``},[e.role===`assistant`?(p(),o(`div`,Je,[i(`div`,Ye,[i(`div`,null,[i(`span`,Xe,y(b(r)(`stage.chat.message.character-name.airi`)),1)]),e.content?(p(),o(`div`,{key:0,class:`markdown-content`,text:`base {n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:e=>{n.value=!1,D(e)},auto:!1});function D(e){alert(`Transcription is not implemented yet`)}return O(d,async e=>{e===`false`&&w()}),y(async()=>{t.value=``}),f(()=>{E()}),(e,n)=>(p(),o(`div`,null,[i(`div`,at,[s(it,{absolute:``,"left-0":``,"top-0":``,transform:`translate-y-[-100%]`,"w-full":``}),i(`div`,ot,[s(b(F),{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,placeholder:b(x)(`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:u({"transition-colors-none placeholder:transition-colors-none":b(g)}),onSubmit:S,onCompositionstart:n[1]||=e=>r.value=!0,onCompositionend:n[2]||=e=>r.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])]))}}),ct=st;const lt={class:`relative`},ut={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var dt=c({__name:`AnimatedWave`,props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:`oklch(95% 0.10 var(--chromatic-hue))`},direction:{default:`down`},movementDirection:{default:`left`},animationSpeed:{default:50}},setup(e){let t=e,n=m(t.height),a=m(t.amplitude),s=m(t.waveLength),c=m(t.fillColor),l=m(t.direction),u=m(t.movementDirection);function f(e,t,n,r,i){let a=[],o=Math.ceil(e/r),s=o*r,c=1,l=i===`up`?n:t-n;a.push(`M 0 ${l}`);let u=Math.PI*2/r;for(let e=0;e<=s;e+=c){let t=n*Math.sin(u*e),r=i===`up`?l-t:l+t;a.push(`L ${e} ${r}`)}let d=i===`up`?t:0;return a.push(`L ${s} ${d}`),a.push(`L 0 ${d} Z`),a.join(` `)}let h=r(()=>n.value+a.value*2),_=r(()=>{let e=` +import{Fragment as e,RouterLink as t,__plugin_vue_export_helper_default as n,computed as r,createBaseVNode as i,createCommentVNode as a,createElementBlock as o,createVNode as s,defineComponent as c,nextTick as l,normalizeClass as u,normalizeStyle as d,onMounted as f,openBlock as p,ref as m,renderList as h,renderSlot as g,resolveDirective as _,storeToRefs as v,toDisplayString as y,unref as b,useDevicesList as x,useElementBounding as S,useI18n as C,useScroll as w,useSettings as T,vModelCheckbox as E,vModelRadio as D,watch as O,withCtx as k,withDirectives as A}from"./index-C-t5bjx6.js";import{useAudioContext as ee,useChatStore as j,useConsciousnessStore as M,useProvidersStore as N}from"./stores-BW_6w_OI.js";import{HeaderLink_default as P}from"./HeaderLink-CyWWkOPU.js";import{TransitionVertical_default as te}from"./Button-DE0e46lv.js";import{Basic_default as F}from"./Basic-DnBqne8U.js";import{useMarkdown as I,useMicVAD as L,useWhisper as ne}from"./composables-CEnUnIM2.js";const R={},z={class:`cross-background-container`};function B(e,t){return p(),o(`div`,z,[g(e.$slots,`default`,{},void 0,!0)])}var V=n(R,[[`render`,B],[`__scopeId`,`data-v-455eb62c`]]);const H={"mb-1":``,"w-full":``,"gap-2":``},U={"w-full":``};var W=c({__name:`Header`,setup(e){return(e,n)=>(p(),o(`header`,H,[i(`div`,U,[s(P)]),s(b(t),{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:k(()=>n[0]||=[i(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),G=W,re=`/assets/worker-eKZGDR4a.js`;const K=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),q=e=>{var t;let n=typeof e;return n===`object`?e===null?`null`:(e==null||(t=e.constructor)==null?void 0:t.name)??`object`:n},J=e=>{if(typeof e==`string`)return new TextEncoder().encode(e);if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);throw TypeError(`The input must be a Uint8Array, a string, or an ArrayBuffer. Received a value of the type ${q(e)}.`)},Y=e=>{let t=J(e),n=``,r,i=t.length;for(r=2;r>2],n+=K[(t[r-2]&3)<<4|t[r-1]>>4],n+=K[(t[r-1]&15)<<2|t[r]>>6],n+=K[t[r]&63];return r===i+1&&(n+=K[t[r-2]>>2],n+=K[(t[r-2]&3)<<4],n+=`==`),r===i&&(n+=K[t[r-2]>>2],n+=K[(t[r-2]&3)<<4|t[r-1]>>4],n+=K[(t[r-1]&15)<<2],n+=`=`),n};function X(e,t,n){for(let r=0;r{l().then(()=>{c.update(),u.value=c.height.value})}),x(async()=>{l().then(()=>{c.update(),u.value=c.height.value})}),(t,c)=>{let l=_(`auto-animate`);return p(),o(`div`,Q,[c[2]||=i(`div`,{"flex-1":``},null,-1),A((p(),o(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[c[1]||=i(`div`,{"flex-1":``},null,-1),(p(!0),o(e,null,h(b(r),(e,t)=>(p(),o(`div`,{key:t,"mb-2":``},[e.role===`error`?(p(),o(`div`,ae,[i(`div`,oe,[i(`div`,se,[i(`div`,ce,[i(`span`,le,y(b(d)(`stage.chat.message.character-name.core-system`)),1)]),c[0]||=i(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),b(s)&&t===b(r).length-1?(p(),o(`div`,ue)):(p(),o(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base {if(!e||!e.trim())return;let t=g.getProviderConfig(_.value);await V(e,{chatProvider:g.getProviderInstance(_.value),model:S.value,providerConfig:t})}});async function J(){if(!(!n.value.trim()||d.value))try{let e=g.getProviderConfig(_.value);await V(n.value,{chatProvider:g.getProviderInstance(_.value),model:S.value,providerConfig:e})}catch(e){U.value.pop(),U.value.push({role:`error`,content:e.message})}}let{destroy:Y,start:X}=L(B,{onSpeechStart:()=>{r.value=!0},onVADMisfire:()=>{r.value=!1},onSpeechEnd:e=>{r.value=!1,Z(e.buffer)},auto:!1});async function Z(e){await W.resume();let t=await ie(e,W.sampleRate);K({type:`generate`,data:{audio:t,language:`en`}})}async function Q(e){let t=e.target,n=P.value.find(e=>e.deviceId===t.value);if(!n){R.value=void 0;return}R.value=n}return O(z,async e=>{e===`false`&&(Y(),q())}),O(l,async e=>{e&&await I()}),f(()=>{X()}),H(async()=>{n.value=``}),(t,f)=>(p(),o(`div`,we,[i(`fieldset`,Te,[i(`label`,{class:u([c.value===`chat`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`chat`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`chat`,"aria-checked":c.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":``},[A(i(`input`,{"onUpdate:modelValue":f[0]||=e=>c.value=e,type:`radio`,name:`tab`,value:`chat`,hidden:``},null,512),[[D,c.value]]),f[7]||=i(`div`,{"i-solar:dialog-2-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,De,[i(`span`,Oe,y(b(G)(`stage.chat.tabs.chat`)),1)])],10,Ee),i(`label`,{class:u([c.value===`custom`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`custom`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`custom`,"aria-checked":c.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":``},[A(i(`input`,{"onUpdate:modelValue":f[1]||=e=>c.value=e,type:`radio`,name:`tab`,value:`custom`,hidden:``},null,512),[[D,c.value]]),f[8]||=i(`div`,{"i-solar:star-fall-2-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,Ae,[i(`span`,null,y(b(G)(`stage.chat.tabs.custom`)),1)])],10,ke),i(`label`,{class:u([c.value===`clothes`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`clothes`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`clothes`,"aria-checked":c.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":``},[A(i(`input`,{"onUpdate:modelValue":f[2]||=e=>c.value=e,type:`radio`,name:`tab`,value:`clothes`,hidden:``},null,512),[[D,c.value]]),f[9]||=i(`div`,{"i-solar:magic-stick-3-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,Me,[i(`span`,null,y(b(G)(`stage.chat.tabs.clothes`)),1)])],10,je)]),i(`div`,Ne,[i(`div`,Pe,[s(Ce,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`n.value=e,placeholder:b(G)(`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:u({"transition-colors-none placeholder:transition-colors-none":b(w)}),onSubmit:J,onCompositionstart:f[4]||=e=>d.value=!0,onCompositionend:f[5]||=e=>d.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])]),i(`div`,Ie,[i(`div`,Le,[s(b(te),null,{default:k(()=>[l.value?(p(),o(`fieldset`,Re,[(p(!0),o(e,null,h(b(P),(e,t)=>(p(),o(`label`,{key:t,class:`[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900`},[i(`input`,{type:`radio`,name:`audioInput`,value:e.deviceId,hidden:``,onChange:Q},null,40,ze),i(`div`,Be,[i(`div`,Ve,[e.deviceId===b(B)?(p(),o(`div`,He)):a(``,!0)]),i(`span`,{"inline-block":``,class:u([e.deviceId===b(B)?`cyan-400 dark:text-white`:`cyan-400/50 dark:text-white/50`]),transition:`all duration-250 ease-in-out`},y(e.label),3)])]))),128))])):a(``,!0)]),_:1}),i(`label`,{bg:`complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700`,transition:`all duration-250 ease-in-out`,class:u({"transition-colors-none":b(w)}),text:`complementary-400`,"h-fit":``,flex:``,"cursor-pointer":``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-full":``,"px-4":``,"py-2":``},[A(i(`input`,{"onUpdate:modelValue":f[6]||=e=>l.value=e,type:`checkbox`,hidden:``},null,512),[[E,l.value]]),f[10]||=i(`div`,{"i-solar:microphone-2-bold-duotone":``},null,-1),i(`div`,null,[r.value?(p(),o(`span`,We,`Listening...`)):(p(),o(`span`,Ue,y(b(G)(`settings.microphone`)),1))])],2)])])]))}}),Ke=n(Ge,[[`__scopeId`,`data-v-258a0513`]]);const qe={py:`1`,flex:`~ col`,rounded:`lg`,"overflow-hidden":``},Je={key:0,flex:``,mr:`12`},Ye={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 {l().then(()=>{c.update(),u.value=c.height.value})}),g(async()=>{l().then(()=>{c.update(),u.value=c.height.value})}),(t,c)=>{let l=_(`auto-animate`);return p(),o(`div`,qe,[c[1]||=i(`div`,{"flex-1":``},null,-1),A((p(),o(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,"max-h":`30vh`,flex:`~ col`,"overflow-scroll":``,class:`chat-history`},[c[0]||=i(`div`,{"flex-1":``},null,-1),(p(!0),o(e,null,h(b(s),(e,t)=>(p(),o(`div`,{key:t,"mb-2":``},[e.role===`assistant`?(p(),o(`div`,Je,[i(`div`,Ye,[i(`div`,null,[i(`span`,Xe,y(b(r)(`stage.chat.message.character-name.airi`)),1)]),e.content?(p(),o(`div`,{key:0,class:`markdown-content`,text:`base {n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:e=>{n.value=!1,D(e)},auto:!1});function D(e){alert(`Transcription is not implemented yet`)}return O(d,async e=>{e===`false`&&w()}),y(async()=>{t.value=``}),f(()=>{E()}),(e,n)=>(p(),o(`div`,null,[i(`div`,at,[s(it,{absolute:``,"left-0":``,"top-0":``,transform:`translate-y-[-100%]`,"w-full":``}),i(`div`,ot,[s(b(F),{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,placeholder:b(x)(`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:u({"transition-colors-none placeholder:transition-colors-none":b(g)}),onSubmit:S,onCompositionstart:n[1]||=e=>r.value=!0,onCompositionend:n[2]||=e=>r.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])]))}}),ct=st;const lt={class:`relative`},ut={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var dt=c({__name:`AnimatedWave`,props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:`oklch(95% 0.10 var(--chromatic-hue))`},direction:{default:`down`},movementDirection:{default:`left`},animationSpeed:{default:50}},setup(e){let t=e,n=m(t.height),a=m(t.amplitude),s=m(t.waveLength),c=m(t.fillColor),l=m(t.direction),u=m(t.movementDirection);function f(e,t,n,r,i){let a=[],o=Math.ceil(e/r),s=o*r,c=1,l=i===`up`?n:t-n;a.push(`M 0 ${l}`);let u=Math.PI*2/r;for(let e=0;e<=s;e+=c){let t=n*Math.sin(u*e),r=i===`up`?l-t:l+t;a.push(`L ${e} ${r}`)}let d=i===`up`?t:0;return a.push(`L ${s} ${d}`),a.push(`L 0 ${d} Z`),a.join(` `)}let h=r(()=>n.value+a.value*2),_=r(()=>{let e=` `;return`url(data:image/svg+xml;base64,${btoa(e)})`});return O(()=>[t.height,t.amplitude,t.waveLength,t.fillColor,t.direction,t.movementDirection],()=>{n.value=t.height,a.value=t.amplitude,s.value=t.waveLength,c.value=t.fillColor,l.value=t.direction,u.value=t.movementDirection},{immediate:!0}),(t,n)=>(p(),o(`div`,lt,[g(t.$slots,`default`,{},void 0,!0),i(`div`,ut,[i(`div`,{class:`wave`,style:d({background:c.value,height:`${h.value}px`,maskImage:_.value,WebkitMaskImage:_.value,"--wave-translate":`${-s.value}px`,"--animation-duration":`${s.value/e.animationSpeed}s`,"animation-direction":u.value===`left`?`normal`:`reverse`})},null,4)])]))}}),ft=n(dt,[[`__scopeId`,`data-v-f58b462e`]]);export{ft as AnimatedWave_default,V as Cross_default,G as Header_default,Ke as InteractiveArea_default,ct as MobileInteractiveArea_default}; \ No newline at end of file diff --git a/assets/Basic-CbvQnFR9.js b/assets/Basic-DnBqne8U.js similarity index 83% rename from assets/Basic-CbvQnFR9.js rename to assets/Basic-DnBqne8U.js index 1d4a263530918c0475433421456c8a08f59d5b6e..e735bef0302a32a128a56bd0b9f2d72c4a883c41 100644 --- a/assets/Basic-CbvQnFR9.js +++ b/assets/Basic-DnBqne8U.js @@ -1 +1 @@ -import{createElementBlock as e,defineComponent as t,mergeModels as n,normalizeStyle as r,openBlock as i,ref as a,useModel as o,vModelText as s,watch as c,withDirectives as l}from"./index-Dor8PgzM.js";var u=t({__name:`Basic`,props:{modelValue:{default:``},modelModifiers:{}},emits:n([`submit`],[`update:modelValue`]),setup(t,{emit:n}){let u=n,d=o(t,`modelValue`),f=a(),p=a(`auto`);function m(e){e.code===`Enter`&&!e.shiftKey&&(e.preventDefault(),u(`submit`,d.value))}return c(d,()=>{p.value=`auto`,requestAnimationFrame(()=>{f.value&&(p.value=`${f.value.scrollHeight}px`)})},{immediate:!0}),(t,n)=>l((i(),e(`textarea`,{ref_key:`textareaRef`,ref:f,"onUpdate:modelValue":n[0]||=e=>d.value=e,style:r({height:p.value}),onKeydown:m},null,36)),[[s,d.value]])}}),d=u;export{d as Basic_default}; \ No newline at end of file +import{createElementBlock as e,defineComponent as t,mergeModels as n,normalizeStyle as r,openBlock as i,ref as a,useModel as o,vModelText as s,watch as c,withDirectives as l}from"./index-C-t5bjx6.js";var u=t({__name:`Basic`,props:{modelValue:{default:``},modelModifiers:{}},emits:n([`submit`],[`update:modelValue`]),setup(t,{emit:n}){let u=n,d=o(t,`modelValue`),f=a(),p=a(`auto`);function m(e){e.code===`Enter`&&!e.shiftKey&&(e.preventDefault(),u(`submit`,d.value))}return c(d,()=>{p.value=`auto`,requestAnimationFrame(()=>{f.value&&(p.value=`${f.value.scrollHeight}px`)})},{immediate:!0}),(t,n)=>l((i(),e(`textarea`,{ref_key:`textareaRef`,ref:f,"onUpdate:modelValue":n[0]||=e=>d.value=e,style:r({height:p.value}),onKeydown:m},null,36)),[[s,d.value]])}}),d=u;export{d as Basic_default}; \ No newline at end of file diff --git a/assets/Button-8uEw5Afs.css b/assets/Button-8uEw5Afs.css new file mode 100644 index 0000000000000000000000000000000000000000..070f743b7e3ce59c19637f1fd551306fa1509f36 --- /dev/null +++ b/assets/Button-8uEw5Afs.css @@ -0,0 +1 @@ +.skeleton[data-v-bbefb607]{transition:all .2s ease-in-out;position:relative}.skeleton-pulse[data-v-bbefb607]{animation:2s ease-in-out .5s infinite skeleton-pulse-bbefb607}@keyframes skeleton-pulse-bbefb607{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.skeleton-wave[data-v-bbefb607]:after{content:"";border-radius:inherit;background:linear-gradient(90deg,#0000,#fff3,#0000);animation:2s ease-in-out infinite skeleton-wave-bbefb607;position:absolute;top:0;bottom:0;left:0;right:0;transform:translate(-100%)}.dark .skeleton-wave[data-v-bbefb607]:after{background:linear-gradient(90deg,#0000,#ffffff1a,#0000)}@keyframes skeleton-wave-bbefb607{0%{opacity:0;transform:translate(-100%)}60%{opacity:1;transform:translate(100%)}to{opacity:0;transform:translate(100%)}} diff --git a/assets/Button-D6PjaMaR.css b/assets/Button-D6PjaMaR.css deleted file mode 100644 index 256bdd3af122da28d88b335c363f378b1f3d0f28..0000000000000000000000000000000000000000 --- a/assets/Button-D6PjaMaR.css +++ /dev/null @@ -1 +0,0 @@ -.skeleton[data-v-f404da2a]{transition:all .2s ease-in-out;position:relative}.skeleton-pulse[data-v-f404da2a]{animation:1.5s ease-in-out .5s infinite skeleton-pulse-f404da2a}@keyframes skeleton-pulse-f404da2a{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.skeleton-wave[data-v-f404da2a]:after{content:"";border-radius:inherit;background:linear-gradient(90deg,#0000,#fff3,#0000);animation:1.5s infinite skeleton-wave-f404da2a;position:absolute;top:0;bottom:0;left:0;right:0;transform:translate(-100%)}.dark .skeleton-wave[data-v-f404da2a]:after{background:linear-gradient(90deg,#0000,#ffffff1a,#0000)}@keyframes skeleton-wave-f404da2a{0%{transform:translate(-100%)}60%{transform:translate(100%)}to{transform:translate(100%)}} diff --git a/assets/Button-C9y21VLy.js b/assets/Button-DE0e46lv.js similarity index 97% rename from assets/Button-C9y21VLy.js rename to assets/Button-DE0e46lv.js index 8abdee6a082f0bab5e32d1049308b9d477f9542f..a27267bd4eea0a885a2f39993466c6b28d76d7b3 100644 --- a/assets/Button-C9y21VLy.js +++ b/assets/Button-DE0e46lv.js @@ -1 +1 @@ -import{Transition as e,__plugin_vue_export_helper_default as t,computed as n,createBaseVNode as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeModels as d,mergeProps as f,normalizeClass as p,normalizeProps as m,openBlock as h,renderSlot as g,toDisplayString as _,unref as v,useModel as y,watchEffect as b,withCtx as x}from"./index-Dor8PgzM.js";var S=l({__name:`BidirectionalTransition`,props:{fromClass:null,activeClass:null,toClass:null},setup(t){return(n,r)=>(h(),i(e,{"enter-from-class":t.fromClass,"enter-active-class":t.activeClass,"enter-to-class":t.toClass,"leave-from-class":t.toClass,"leave-active-class":t.activeClass,"leave-to-class":t.fromClass},{default:x(()=>[g(n.$slots,`default`)]),_:3},8,[`enter-from-class`,`enter-active-class`,`enter-to-class`,`leave-from-class`,`leave-active-class`,`leave-to-class`]))}}),C=S;const w=`0px`;var T=l({__name:`TransitionVertical`,props:{duration:{default:250},easingEnter:{default:`ease-in-out`},easingLeave:{default:`ease-in-out`},opacityClosed:{default:0},opacityOpened:{default:1}},setup(t){let n=t;function r(e){return{height:e.style.height,width:e.style.width,position:e.style.position,visibility:e.style.visibility,overflow:e.style.overflow,paddingTop:e.style.paddingTop,paddingBottom:e.style.paddingBottom,borderTopWidth:e.style.borderTopWidth,borderBottomWidth:e.style.borderBottomWidth,marginTop:e.style.marginTop,marginBottom:e.style.marginBottom}}function a(e,t){let{width:n}=getComputedStyle(e);e.style.width=n,e.style.position=`absolute`,e.style.visibility=`hidden`,e.style.height=``;let{height:r}=getComputedStyle(e);return e.style.width=t.width,e.style.position=t.position,e.style.visibility=t.visibility,e.style.height=w,e.style.overflow=`hidden`,t.height&&t.height!==w?t.height:r}function o(e,t,n,r,i){let a=e.animate(r,i);e.style.height=t.height,a.onfinish=()=>{e.style.overflow=t.overflow,n()}}function s(e,t){return[{height:w,opacity:n.opacityClosed,paddingTop:w,paddingBottom:w,borderTopWidth:w,borderBottomWidth:w,marginTop:w,marginBottom:w},{height:e,opacity:n.opacityOpened,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,borderTopWidth:t.borderTopWidth,borderBottomWidth:t.borderBottomWidth,marginTop:t.marginTop,marginBottom:t.marginBottom}]}function c(e,t){let i=e,c=r(i),l=a(i,c),u=s(l,c),d={duration:n.duration,easing:n.easingEnter};o(i,c,t,u,d)}function l(e,t){let i=e,a=r(i),{height:c}=getComputedStyle(i);i.style.height=c,i.style.overflow=`hidden`;let l=s(c,a).reverse(),u={duration:n.duration,easing:n.easingLeave};o(i,a,t,l,u)}return(t,n)=>(h(),i(e,{css:!1,onEnter:c,onLeave:l},{default:x(()=>[g(t.$slots,`default`)]),_:3}))}}),E=T;const D={op50:``};var O=l({__name:`Collapsable`,props:d({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=y(e,`modelValue`);b(()=>{t.default!=null&&(n.value=!!t.default)});function i(e){return n.value=e,e}return(e,l)=>(h(),o(`div`,null,[g(e.$slots,`trigger`,m(u({visible:n.value,setVisible:i})),()=>[r(`button`,{sticky:``,"top-0":``,"z-10":``,flex:``,"items-center":``,"justify-between":``,px2:``,py1:``,"text-sm":``,"backdrop-blur-xl":``,onClick:l[0]||=e=>n.value=!n.value},[r(`span`,null,_(t.label??`Collapsable`),1),l[1]||=s(),r(`span`,D,_(n.value?`▲`:`▼`),1)])]),c(v(E),null,{default:x(()=>[n.value?g(e.$slots,`default`,m(f({key:0},{visible:n.value,setVisible:i}))):a(``,!0)]),_:3})]))}}),k=O,A=l({__name:`Skeleton`,props:{animation:{default:`pulse`}},setup(e){let t=e;return(e,n)=>(h(),o(`div`,{class:p([`skeleton`,t.animation===`none`?``:`skeleton-${t.animation}`]),bg:`neutral-200 dark:neutral-800`,overflow:`hidden`},[g(e.$slots,`default`,{},void 0,!0)],2))}}),j=t(A,[[`__scopeId`,`data-v-f404da2a`]]);const M=[`disabled`],N={class:`flex flex-row items-center justify-center`},P={key:0,class:`mr-2 w-4`},F={key:0,class:`i-svg-spinners:ring-resize h-4 w-4`},I={key:0};var L=l({__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(e){let t=e,i=n(()=>t.disabled||t.loading),s={primary:`bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 focus:ring-primary-500/50 dark:focus:ring-primary-400/50 text-white`,secondary:`bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 focus:ring-neutral-300/50 dark:focus:ring-neutral-600/50 text-neutral-900 dark:text-neutral-100`,danger:`bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 focus:ring-red-600/50 dark:focus:ring-red-500/50 text-white`},l={sm:`px-3 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`},u=n(()=>[`rounded-lg font-medium outline-none transition-all duration-200 ease-in-out`,`disabled:cursor-not-allowed disabled:opacity-50`,t.block?`w-full`:``,l[t.size],s[t.variant],{"opacity-50 cursor-not-allowed":i.value},`focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900`]);return(t,n)=>(h(),o(`button`,{disabled:i.value,class:p(u.value)},[r(`div`,N,[c(v(C),{"from-class":`opacity-0 mr-0! w-0!`,"active-class":`transition-[width,margin] ease-in-out overflow-hidden`},{default:x(()=>[e.loading||e.icon?(h(),o(`div`,P,[e.loading?(h(),o(`div`,F)):e.icon?(h(),o(`div`,{key:1,class:p([`h-4 w-4`,e.icon])},null,2)):a(``,!0)])):a(``,!0)]),_:1}),e.label?(h(),o(`span`,I,_(e.label),1)):g(t.$slots,`default`,{key:1})])],10,M))}}),R=L;export{R as Button_default,k as Collapsable_default,j as Skeleton_default,E as TransitionVertical_default}; \ No newline at end of file +import{Transition as e,__plugin_vue_export_helper_default as t,computed as n,createBaseVNode as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeModels as d,mergeProps as f,normalizeClass as p,normalizeProps as m,openBlock as h,renderSlot as g,toDisplayString as _,unref as v,useModel as y,watchEffect as b,withCtx as x}from"./index-C-t5bjx6.js";var S=l({__name:`BidirectionalTransition`,props:{fromClass:null,activeClass:null,toClass:null},setup(t){return(n,r)=>(h(),i(e,{"enter-from-class":t.fromClass,"enter-active-class":t.activeClass,"enter-to-class":t.toClass,"leave-from-class":t.toClass,"leave-active-class":t.activeClass,"leave-to-class":t.fromClass},{default:x(()=>[g(n.$slots,`default`)]),_:3},8,[`enter-from-class`,`enter-active-class`,`enter-to-class`,`leave-from-class`,`leave-active-class`,`leave-to-class`]))}}),C=S;const w=`0px`;var T=l({__name:`TransitionVertical`,props:{duration:{default:250},easingEnter:{default:`ease-in-out`},easingLeave:{default:`ease-in-out`},opacityClosed:{default:0},opacityOpened:{default:1}},setup(t){let n=t;function r(e){return{height:e.style.height,width:e.style.width,position:e.style.position,visibility:e.style.visibility,overflow:e.style.overflow,paddingTop:e.style.paddingTop,paddingBottom:e.style.paddingBottom,borderTopWidth:e.style.borderTopWidth,borderBottomWidth:e.style.borderBottomWidth,marginTop:e.style.marginTop,marginBottom:e.style.marginBottom}}function a(e,t){let{width:n}=getComputedStyle(e);e.style.width=n,e.style.position=`absolute`,e.style.visibility=`hidden`,e.style.height=``;let{height:r}=getComputedStyle(e);return e.style.width=t.width,e.style.position=t.position,e.style.visibility=t.visibility,e.style.height=w,e.style.overflow=`hidden`,t.height&&t.height!==w?t.height:r}function o(e,t,n,r,i){let a=e.animate(r,i);e.style.height=t.height,a.onfinish=()=>{e.style.overflow=t.overflow,n()}}function s(e,t){return[{height:w,opacity:n.opacityClosed,paddingTop:w,paddingBottom:w,borderTopWidth:w,borderBottomWidth:w,marginTop:w,marginBottom:w},{height:e,opacity:n.opacityOpened,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,borderTopWidth:t.borderTopWidth,borderBottomWidth:t.borderBottomWidth,marginTop:t.marginTop,marginBottom:t.marginBottom}]}function c(e,t){let i=e,c=r(i),l=a(i,c),u=s(l,c),d={duration:n.duration,easing:n.easingEnter};o(i,c,t,u,d)}function l(e,t){let i=e,a=r(i),{height:c}=getComputedStyle(i);i.style.height=c,i.style.overflow=`hidden`;let l=s(c,a).reverse(),u={duration:n.duration,easing:n.easingLeave};o(i,a,t,l,u)}return(t,n)=>(h(),i(e,{css:!1,onEnter:c,onLeave:l},{default:x(()=>[g(t.$slots,`default`)]),_:3}))}}),E=T;const D={op50:``};var O=l({__name:`Collapsable`,props:d({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=y(e,`modelValue`);b(()=>{t.default!=null&&(n.value=!!t.default)});function i(e){return n.value=e,e}return(e,l)=>(h(),o(`div`,null,[g(e.$slots,`trigger`,m(u({visible:n.value,setVisible:i})),()=>[r(`button`,{sticky:``,"top-0":``,"z-10":``,flex:``,"items-center":``,"justify-between":``,px2:``,py1:``,"text-sm":``,"backdrop-blur-xl":``,onClick:l[0]||=e=>n.value=!n.value},[r(`span`,null,_(t.label??`Collapsable`),1),l[1]||=s(),r(`span`,D,_(n.value?`▲`:`▼`),1)])]),c(v(E),null,{default:x(()=>[n.value?g(e.$slots,`default`,m(f({key:0},{visible:n.value,setVisible:i}))):a(``,!0)]),_:3})]))}}),k=O,A=l({__name:`Skeleton`,props:{animation:{default:`pulse`}},setup(e){let t=e;return(e,n)=>(h(),o(`div`,{class:p([`skeleton`,t.animation===`none`?``:`skeleton-${t.animation}`]),bg:`neutral-200 dark:neutral-800`,overflow:`hidden`},[g(e.$slots,`default`,{},void 0,!0)],2))}}),j=t(A,[[`__scopeId`,`data-v-bbefb607`]]);const M=[`disabled`],N={class:`flex flex-row items-center justify-center`},P={key:0,class:`mr-2 w-4`},F={key:0,class:`i-svg-spinners:ring-resize h-4 w-4`},I={key:0};var L=l({__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(e){let t=e,i=n(()=>t.disabled||t.loading),s={primary:`bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 focus:ring-primary-500/50 dark:focus:ring-primary-400/50 text-white`,secondary:`bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 focus:ring-neutral-300/50 dark:focus:ring-neutral-600/50 text-neutral-900 dark:text-neutral-100`,danger:`bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 focus:ring-red-600/50 dark:focus:ring-red-500/50 text-white`},l={sm:`px-3 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`},u=n(()=>[`rounded-lg font-medium outline-none transition-all duration-200 ease-in-out`,`disabled:cursor-not-allowed disabled:opacity-50`,t.block?`w-full`:``,l[t.size],s[t.variant],{"opacity-50 cursor-not-allowed":i.value},`focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900`]);return(t,n)=>(h(),o(`button`,{disabled:i.value,class:p(u.value)},[r(`div`,N,[c(v(C),{"from-class":`opacity-0 mr-0! w-0!`,"active-class":`transition-[width,margin] ease-in-out overflow-hidden`},{default:x(()=>[e.loading||e.icon?(h(),o(`div`,P,[e.loading?(h(),o(`div`,F)):e.icon?(h(),o(`div`,{key:1,class:p([`h-4 w-4`,e.icon])},null,2)):a(``,!0)])):a(``,!0)]),_:1}),e.label?(h(),o(`span`,I,_(e.label),1)):g(t.$slots,`default`,{key:1})])],10,M))}}),R=L;export{R as Button_default,k as Collapsable_default,j as Skeleton_default,E as TransitionVertical_default}; \ No newline at end of file diff --git a/assets/CardCreate-C0oil_xo.js b/assets/CardCreate-B09nhkcM.js similarity index 93% rename from assets/CardCreate-C0oil_xo.js rename to assets/CardCreate-B09nhkcM.js index 38d054e9f9c568b1170058d0cd7bc8ed0a76dcde..8a6066f59a5ab66b875faac1f8cc07303dd9fe0f 100644 --- a/assets/CardCreate-C0oil_xo.js +++ b/assets/CardCreate-B09nhkcM.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,toDisplayString as i,unref as a,useI18n as o}from"./index-Dor8PgzM.js";const s={relative:``,class:`min-h-[120px] flex flex-col cursor-pointer items-center justify-center border-neutral-200 rounded-xl bg-white/60 p-6 dark:border-neutral-700 hover:border-primary-300 dark:bg-black/30 hover:bg-white/80 dark:hover:border-primary-700 dark:hover:bg-black/40`,border:`solid 2`,transition:`all duration-300`,"cursor-pointer":``,"opacity-95":``,hover:`scale-100 opacity-100 shadow-md dark:shadow-lg`},c={"font-medium":``,text:`neutral-600 dark:neutral-300`};var l=n({__name:`CardCreate`,setup(n){let{t:l}=o();return(n,o)=>(r(),t(`div`,s,[o[0]||=e(`div`,{"i-solar:add-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),e(`p`,c,i(a(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as CardCreate_default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,toDisplayString as i,unref as a,useI18n as o}from"./index-C-t5bjx6.js";const s={relative:``,class:`min-h-[120px] flex flex-col cursor-pointer items-center justify-center border-neutral-200 rounded-xl bg-white/60 p-6 dark:border-neutral-700 hover:border-primary-300 dark:bg-black/30 hover:bg-white/80 dark:hover:border-primary-700 dark:hover:bg-black/40`,border:`solid 2`,transition:`all duration-300`,"cursor-pointer":``,"opacity-95":``,hover:`scale-100 opacity-100 shadow-md dark:shadow-lg`},c={"font-medium":``,text:`neutral-600 dark:neutral-300`};var l=n({__name:`CardCreate`,setup(n){let{t:l}=o();return(n,o)=>(r(),t(`div`,s,[o[0]||=e(`div`,{"i-solar:add-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),e(`p`,c,i(a(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as CardCreate_default}; \ No newline at end of file diff --git a/assets/CardCreate-BXajcpvK.js b/assets/CardCreate-BXajcpvK.js new file mode 100644 index 0000000000000000000000000000000000000000..422118e523accfc4a12ef2f4184f303ad908ecc4 --- /dev/null +++ b/assets/CardCreate-BXajcpvK.js @@ -0,0 +1 @@ +import{CardCreate_default as e}from"./CardCreate-B09nhkcM.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreate-Cs19blbA.js b/assets/CardCreate-Cs19blbA.js deleted file mode 100644 index 76e9eec6db54784a597d595c0c9b275eee0087d8..0000000000000000000000000000000000000000 --- a/assets/CardCreate-Cs19blbA.js +++ /dev/null @@ -1 +0,0 @@ -import{CardCreate_default as e}from"./CardCreate-C0oil_xo.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-CYjvvafK.js b/assets/CardCreationDialog-B1i7X0kT.js similarity index 96% rename from assets/CardCreationDialog-CYjvvafK.js rename to assets/CardCreationDialog-B1i7X0kT.js index c2a1bc8a233f012a644bb0a449bbf25c5b550d2b..dea036151f89ef86bf85ecdf33bd81d23867c597 100644 --- a/assets/CardCreationDialog-CYjvvafK.js +++ b/assets/CardCreationDialog-B1i7X0kT.js @@ -1,3 +1,3 @@ -import{Fragment as e,__commonJSMin as t,__plugin_vue_export_helper_default as n,__toESM as r,computed as i,createBaseVNode as a,createBlock as o,createCommentVNode as s,createElementBlock as c,createTextVNode as l,createVNode as u,defineComponent as d,isRef as f,mergeModels as p,normalizeClass as m,openBlock as h,ref as g,renderList as ee,toDisplayString as _,toRaw as te,unref as v,useI18n as y,useModel as b,withCtx as x}from"./index-Dor8PgzM.js";import{useAiriCardStore as ne}from"./stores-BVVBBF04.js";import{Button_default as S}from"./Button-C9y21VLy.js";import{FieldInput_default as C,FieldValues_default as re}from"./src-BnFQ5wFr.js";import{$u as w,Bu as T,Iv as ie,Pu as ae,nu as oe}from"./dist-B8MUgAeh.js";var E=t((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n}),D=t((exports,t)=>{var n=E();t.exports=n}),O=t((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n}),k=t((exports,t)=>{var n=O();t.exports=n}),A=t((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n}),j=t((exports,t)=>{var n=String.prototype.trim;t.exports=n}),M=t((exports,t)=>{var n=j(),r=` +import{Fragment as e,__commonJSMin as t,__plugin_vue_export_helper_default as n,__toESM as r,computed as i,createBaseVNode as a,createBlock as o,createCommentVNode as s,createElementBlock as c,createTextVNode as l,createVNode as u,defineComponent as d,isRef as f,mergeModels as p,normalizeClass as m,openBlock as h,ref as g,renderList as ee,toDisplayString as _,toRaw as te,unref as v,useI18n as y,useModel as b,withCtx as x}from"./index-C-t5bjx6.js";import{useAiriCardStore as ne}from"./stores-BW_6w_OI.js";import{Button_default as S}from"./Button-DE0e46lv.js";import{FieldInput_default as C,FieldValues_default as re}from"./src-B9Iy8991.js";import{$u as w,Bu as T,Iv as ie,Pu as ae,nu as oe}from"./dist-BeDGrW0v.js";var E=t((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n}),D=t((exports,t)=>{var n=E();t.exports=n}),O=t((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n}),k=t((exports,t)=>{var n=O();t.exports=n}),A=t((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n}),j=t((exports,t)=>{var n=String.prototype.trim;t.exports=n}),M=t((exports,t)=>{var n=j(),r=` \r \f\v            \u2028\u2029   `,i=`᠎`;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a}),N=t((exports,t)=>{var n=k(),r=/^[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*([\S\s]*?)[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*$/;function i(e){return n(e,r,`$1`)}t.exports=i}),P=t((exports,t)=>{var n=j();function r(e){return n.call(e)}t.exports=r}),F=t((exports,t)=>{var n=A(),r=M(),i=N(),a=P(),o;o=n&&r()?a:i,t.exports=o}),I=t((exports,t)=>{var n=D(),r=k(),i=F(),a=/\s+/g,o=/[!"'(),–.:;<>?`{}|~\/\\\[\]_#$*&^@%]+/g,s=/([a-z0-9])([A-Z])/g;function c(e){return e=r(e,o,` `),e=r(e,s,`$1 $2`),e=i(e),e=r(e,a,`-`),n(e)}t.exports=c}),L=t((exports,t)=>{var n=I();t.exports=n}),R=r(L());const z={class:`w-full flex flex-col gap-5`},B={class:`mt-4`},V={class:`border-b border-neutral-200 dark:border-neutral-700`},H={class:`flex justify-center -mb-px sm:justify-start space-x-1`},U=[`onClick`],W={class:`flex items-center gap-1`},G={key:0,class:`w-full rounded-xl bg-red900`},K={class:`w-full p-4`},se={key:1,class:`tab-content ml-auto mr-auto w-95%`},ce={class:`mb-3`},le={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},ue={key:2,class:`tab-content ml-auto mr-auto w-95%`},de={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},fe={key:3,class:`tab-content ml-auto mr-auto w-95%`},pe={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},me={class:`ml-auto mr-1 flex flex-row gap-2`};var q=d({__name:`CardCreationDialog`,props:p({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:p([`update:modelValue`],[`update:modelValue`]),setup(t,{emit:n}){let r=n,d=b(t,`modelValue`),{t:p}=y(),E=ne(),D=g(``),O=[{id:`identity`,label:p(`settings.pages.card.creation.identity`),icon:`i-solar:emoji-funny-square-bold-duotone`},{id:`behavior`,label:p(`settings.pages.card.creation.behavior`),icon:`i-solar:chat-round-line-bold-duotone`},{id:`settings`,label:p(`settings.pages.card.creation.settings`),icon:`i-solar:settings-bold-duotone`}],k=i({get:()=>{var e;return O.find(e=>e.id===D.value)?D.value:(e=O[0])?.id||``},set:e=>{D.value=e}}),A=g(!1),j=g(``);function M(e){let t=te(e);if(t.name.length>0)if(/^(?:\d+\.)+\d+$/.test(t.version))if(t.description.length>0)if(t.personality.length>0)if(t.scenario.length>0)if(t.systemPrompt.length>0){if(!(t.postHistoryInstructions.length>0))return A.value=!0,j.value=p(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.systemprompt`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.scenario`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.personality`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.description`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.version`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.name`),!1;return A.value=!1,E.addCard(t),d.value=!1,!0}let N=g({name:p(`settings.pages.card.creation.defaults.name`),nickname:void 0,version:`1.0`,description:``,notes:void 0,personality:p(`settings.pages.card.creation.defaults.personality`),scenario:p(`settings.pages.card.creation.defaults.scenario`),systemPrompt:p(`settings.pages.card.creation.defaults.systemprompt`),postHistoryInstructions:p(`settings.pages.card.creation.defaults.posthistoryinstructions`),greetings:[],messageExample:[]});function P(e,t){return i({get:()=>N.value[e]??``,set:n=>{let r=n.trim();N.value[e]=r.length>0?t?t(r):r:``}})}let F=P(`name`,e=>(0,R.default)(e)),I=P(`nickname`),L=P(`description`),q=P(`notes`),J=P(`personality`),Y=P(`scenario`),X=i({get:()=>N.value.greetings??[],set:e=>{N.value.greetings=e||[]}}),Z=P(`version`),Q=P(`systemPrompt`),$=P(`postHistoryInstructions`);return(t,n)=>(h(),o(v(oe),{open:d.value,"onUpdate:open":n[12]||=e=>r(`update:modelValue`,e)},{default:x(()=>[u(v(ie),null,{default:x(()=>[u(v(w),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),u(v(ae),{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:x(()=>[a(`div`,z,[u(v(T),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:x(()=>[l(_(v(p)(`settings.pages.card.create_card`)),1)]),_:1}),a(`div`,B,[a(`div`,V,[a(`div`,H,[(h(),c(e,null,ee(O,e=>a(`button`,{key:e.id,class:m([`px-4 py-2 text-sm font-medium`,[k.value===e.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:t=>k.value=e.id},[a(`div`,W,[a(`div`,{class:m(e.icon)},null,2),l(` `+_(e.label),1)])],10,U)),64))])])]),A.value?(h(),c(`div`,G,[a(`p`,K,_(j.value),1)])):s(``,!0),k.value===`identity`?(h(),c(`div`,se,[a(`p`,ce,_(v(p)(`settings.pages.card.creation.fields_info.subtitle`)),1),a(`div`,le,[u(v(C),{modelValue:v(F),"onUpdate:modelValue":n[0]||=e=>f(F)?F.value=e:null,label:v(p)(`settings.pages.card.creation.name`),description:v(p)(`settings.pages.card.creation.fields_info.name`),required:!0},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(I),"onUpdate:modelValue":n[1]||=e=>f(I)?I.value=e:null,label:v(p)(`settings.pages.card.creation.nickname`),description:v(p)(`settings.pages.card.creation.fields_info.nickname`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(L),"onUpdate:modelValue":n[2]||=e=>f(L)?L.value=e:null,label:v(p)(`settings.pages.card.creation.description`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.description`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(q),"onUpdate:modelValue":n[3]||=e=>f(q)?q.value=e:null,label:v(p)(`settings.pages.card.creator_notes`),"single-line":!1,description:v(p)(`settings.pages.card.creation.fields_info.notes`)},null,8,[`modelValue`,`label`,`description`])])])):k.value===`behavior`?(h(),c(`div`,ue,[a(`div`,de,[u(v(C),{modelValue:v(J),"onUpdate:modelValue":n[4]||=e=>f(J)?J.value=e:null,label:v(p)(`settings.pages.card.personality`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.personality`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(Y),"onUpdate:modelValue":n[5]||=e=>f(Y)?Y.value=e:null,label:v(p)(`settings.pages.card.scenario`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.scenario`)},null,8,[`modelValue`,`label`,`description`]),u(v(re),{modelValue:X.value,"onUpdate:modelValue":n[6]||=e=>X.value=e,label:v(p)(`settings.pages.card.creation.greetings`),description:v(p)(`settings.pages.card.creation.fields_info.greetings`)},null,8,[`modelValue`,`label`,`description`])])])):k.value===`settings`?(h(),c(`div`,fe,[a(`div`,pe,[u(v(C),{modelValue:v(Q),"onUpdate:modelValue":n[7]||=e=>f(Q)?Q.value=e:null,label:v(p)(`settings.pages.card.systemprompt`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.systemprompt`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v($),"onUpdate:modelValue":n[8]||=e=>f($)?$.value=e:null,label:v(p)(`settings.pages.card.posthistoryinstructions`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.posthistoryinstructions`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(Z),"onUpdate:modelValue":n[9]||=e=>f(Z)?Z.value=e:null,label:v(p)(`settings.pages.card.creation.version`),required:!0,description:v(p)(`settings.pages.card.creation.fields_info.version`)},null,8,[`modelValue`,`label`,`description`])])])):s(``,!0),a(`div`,me,[u(v(S),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:v(p)(`settings.pages.card.cancel`),disabled:!1,onClick:n[10]||=e=>d.value=!1},null,8,[`label`]),u(v(S),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:v(p)(`settings.pages.card.creation.create`),disabled:!1,onClick:n[11]||=e=>M(N.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),J=n(q,[[`__scopeId`,`data-v-ba1c2b81`]]);export{J as CardCreationDialog_default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-C6JidgYK.js b/assets/CardCreationDialog-C6JidgYK.js deleted file mode 100644 index a2e33190fb80b7c50ef71a7fd03148a098a9e1a5..0000000000000000000000000000000000000000 --- a/assets/CardCreationDialog-C6JidgYK.js +++ /dev/null @@ -1 +0,0 @@ -import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import"./dist-B8MUgAeh.js";import"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{CardCreationDialog_default as e}from"./CardCreationDialog-CYjvvafK.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-ohI_4kmP.js b/assets/CardCreationDialog-ohI_4kmP.js new file mode 100644 index 0000000000000000000000000000000000000000..e137b47ccba5869af8b13828de57cc7b017aa165 --- /dev/null +++ b/assets/CardCreationDialog-ohI_4kmP.js @@ -0,0 +1 @@ +import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import"./dist-BeDGrW0v.js";import"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{CardCreationDialog_default as e}from"./CardCreationDialog-B1i7X0kT.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardDetailDialog-BW_jiSws.js b/assets/CardDetailDialog-BW_jiSws.js deleted file mode 100644 index 7b47f8f6c726bab4c3d97f468f84afa9b5652772..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-BW_jiSws.js +++ /dev/null @@ -1 +0,0 @@ -import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import"./dist-B8MUgAeh.js";import"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import"./DeleteCardDialog-C72b0_i8.js";import{CardDetailDialog_default as e}from"./CardDetailDialog-C5WGcTv5.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardDetailDialog-C5WGcTv5.js b/assets/CardDetailDialog-RKuCdXg0.js similarity index 95% rename from assets/CardDetailDialog-C5WGcTv5.js rename to assets/CardDetailDialog-RKuCdXg0.js index a2d3ee797543f93a5f1b8cddc445428f125c77b1..38bf56d891cbaea65df43aeb3a3a16bf50f9d125 100644 --- a/assets/CardDetailDialog-C5WGcTv5.js +++ b/assets/CardDetailDialog-RKuCdXg0.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,normalizeClass as c,openBlock as l,ref as u,renderList as d,storeToRefs as f,toDisplayString as p,unref as m,useI18n as ee,withCtx as h}from"./index-Dor8PgzM.js";import{useAiriCardStore as te}from"./stores-BVVBBF04.js";import{Button_default as ne}from"./Button-C9y21VLy.js";import{$u as g,Bu as _,Iv as re,Pu as ie,nu as ae}from"./dist-B8MUgAeh.js";import{DeleteCardDialog_default as oe}from"./DeleteCardDialog-C72b0_i8.js";const se={key:0,class:`w-full flex flex-col gap-5`},ce={flex:`~ col`,"gap-3":``},le={flex:`~ row`,"items-center":``,"justify-between":``},ue={flex:`~ row`,"items-center":``,"gap-2":``},de={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`},fe={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},pe={"font-medium":``},me={flex:`~ row`,"gap-2":``},he={class:`mt-4`},v={class:`border-b border-neutral-200 dark:border-neutral-700`},y={class:`flex justify-center -mb-px sm:justify-start space-x-1`},b=[`onClick`],x={class:`flex items-center gap-1`},S={key:0},C=[`innerHTML`],w={key:1},T=[`innerHTML`],E={key:2},D={flex:`~ col`,"max-h-60":``,"gap-4":``,"overflow-auto":``,"pr-1":``,"sm:max-h-80":``},O={key:0,flex:`~ col`,"gap-2":``},k={"text-lg":``,"text-neutral-500":``,"font-medium":``,"dark:text-neutral-400":``},A=[`innerHTML`],j={key:3},M={grid:`~ cols-1 sm:cols-3`,"gap-4":``},N={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`},P={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},F={truncate:``,"font-medium":``},I={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`},ge={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},L={truncate:``,"font-medium":``},_e={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`},ve={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},ye={truncate:``,"font-medium":``},be={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`};var R=s({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:null},emits:[`update:modelValue`],setup(s,{emit:R}){let z=s,B=R,{t:V}=ee(),H=te(),{removeCard:xe}=H,{activeCardId:U}=f(H),W=t(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=t(()=>{var e,t,n,r;if(!W.value||!(!((e=W.value.extensions)==null||(e=e.airi)==null)&&e.modules))return{consciousness:``,speech:``,voice:``};let i=W.value.extensions.airi.modules;return{consciousness:(t=i.consciousness)?.model||``,speech:(n=i.speech)?.model||``,voice:(r=i.speech)?.voice_id||``}}),K=t(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=t(()=>z.cardId===U.value),J=u(!1);function Se(){J.value=!0,setTimeout(()=>{U.value=z.cardId,J.value=!1},300)}function Y(e){return e?.replace(/\{\{(.*?)\}\}/g,`{{ $1 }}`).trim()}let X=u(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=u(``),Q=t(()=>{var e,t;let n=[];return(e=W.value)?.description&&n.push({id:`description`,label:V(`settings.pages.card.description_label`),icon:`i-solar:document-text-linear`}),(t=W.value)?.notes&&n.push({id:`notes`,label:V(`settings.pages.card.creator_notes`),icon:`i-solar:notes-linear`}),Object.values(K.value).some(e=>!!e)&&n.push({id:`character`,label:V(`settings.pages.card.character`),icon:`i-solar:user-rounded-linear`}),n.push({id:`modules`,label:V(`settings.pages.card.modules`),icon:`i-solar:tuning-square-linear`}),n}),$=t({get:()=>{var e;return Q.value.find(e=>e.id===Z.value)?Z.value:(e=Q.value[0])?.id||``},set:e=>{Z.value=e}});return(t,u)=>{var f;return l(),i(e,null,[o(m(ae),{open:s.modelValue,"onUpdate:open":u[0]||=e=>B(`update:modelValue`,e)},{default:h(()=>[o(m(re),null,{default:h(()=>[o(m(g),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),o(m(ie),{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:h(()=>[W.value?(l(),i(`div`,se,[n(`div`,ce,[n(`div`,le,[n(`div`,null,[n(`div`,ue,[o(m(_),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:h(()=>[a(p(W.value.name),1)]),_:1}),q.value?(l(),i(`div`,de,[u[3]||=n(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),a(` `+p(m(V)(`settings.pages.card.active_badge`)),1)])):r(``,!0)]),n(`div`,fe,[a(` v`+p(W.value.version)+` `,1),W.value.creator?(l(),i(e,{key:0},[a(` · `+p(m(V)(`settings.pages.card.created_by`))+` `,1),n(`span`,pe,p(W.value.creator),1)],64)):r(``,!0)])]),n(`div`,me,[o(m(ne),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?m(V)(`settings.pages.card.active`):m(V)(`settings.pages.card.activate`),disabled:q.value,class:c({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),n(`div`,he,[n(`div`,v,[n(`div`,y,[(l(!0),i(e,null,d(Q.value,e=>(l(),i(`button`,{key:e.id,class:c([`px-4 py-2 text-sm font-medium`,[$.value===e.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:t=>$.value=e.id},[n(`div`,x,[n(`div`,{class:c(e.icon)},null,2),a(` `+p(e.label),1)])],10,b))),128))])])]),$.value===`notes`&&W.value.notes?(l(),i(`div`,S,[n(`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:Y(W.value.notes)},null,8,C)])):r(``,!0),$.value===`description`&&W.value.description?(l(),i(`div`,w,[n(`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:Y(W.value.description)},null,8,T)])):r(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(l(),i(`div`,E,[n(`div`,D,[(l(!0),i(e,null,d(K.value,(t,a)=>(l(),i(e,{key:a},[t?(l(),i(`div`,O,[n(`h2`,k,p(m(V)(`settings.pages.card.${a.toLowerCase()}`)),1),n(`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:Y(t)},null,8,A)])):r(``,!0)],64))),128))])])):r(``,!0),$.value===`modules`?(l(),i(`div`,j,[n(`div`,M,[n(`div`,N,[n(`span`,P,[u[4]||=n(`div`,{"i-lucide:ghost":``},null,-1),a(` `+p(m(V)(`settings.pages.card.consciousness.model`)),1)]),n(`div`,F,p(G.value.consciousness??`default`),1)]),n(`div`,I,[n(`span`,ge,[u[5]||=n(`div`,{"i-lucide:mic":``},null,-1),a(` `+p(m(V)(`settings.pages.card.speech.model`)),1)]),n(`div`,L,p(G.value.speech??`default`),1)]),n(`div`,_e,[n(`span`,ve,[u[6]||=n(`div`,{"i-lucide:music":``},null,-1),a(` `+p(m(V)(`settings.pages.card.speech.voice`)),1)]),n(`div`,ye,p(G.value.voice??`default`),1)])])])):r(``,!0)])])):(l(),i(`div`,be,[u[7]||=n(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),a(` `+p(m(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),o(oe,{modelValue:X.value,"onUpdate:modelValue":u[1]||=e=>X.value=e,"card-name":(f=W.value)?.name,onConfirm:Ce,onCancel:u[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64)}}}),z=R;export{z as CardDetailDialog_default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,normalizeClass as c,openBlock as l,ref as u,renderList as d,storeToRefs as f,toDisplayString as p,unref as m,useI18n as ee,withCtx as h}from"./index-C-t5bjx6.js";import{useAiriCardStore as te}from"./stores-BW_6w_OI.js";import{Button_default as ne}from"./Button-DE0e46lv.js";import{$u as g,Bu as _,Iv as re,Pu as ie,nu as ae}from"./dist-BeDGrW0v.js";import{DeleteCardDialog_default as oe}from"./DeleteCardDialog-BIO7MxkY.js";const se={key:0,class:`w-full flex flex-col gap-5`},ce={flex:`~ col`,"gap-3":``},le={flex:`~ row`,"items-center":``,"justify-between":``},ue={flex:`~ row`,"items-center":``,"gap-2":``},de={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`},fe={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},pe={"font-medium":``},me={flex:`~ row`,"gap-2":``},he={class:`mt-4`},v={class:`border-b border-neutral-200 dark:border-neutral-700`},y={class:`flex justify-center -mb-px sm:justify-start space-x-1`},b=[`onClick`],x={class:`flex items-center gap-1`},S={key:0},C=[`innerHTML`],w={key:1},T=[`innerHTML`],E={key:2},D={flex:`~ col`,"max-h-60":``,"gap-4":``,"overflow-auto":``,"pr-1":``,"sm:max-h-80":``},O={key:0,flex:`~ col`,"gap-2":``},k={"text-lg":``,"text-neutral-500":``,"font-medium":``,"dark:text-neutral-400":``},A=[`innerHTML`],j={key:3},M={grid:`~ cols-1 sm:cols-3`,"gap-4":``},N={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`},P={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},F={truncate:``,"font-medium":``},I={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`},ge={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},L={truncate:``,"font-medium":``},_e={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`},ve={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},ye={truncate:``,"font-medium":``},be={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`};var R=s({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:null},emits:[`update:modelValue`],setup(s,{emit:R}){let z=s,B=R,{t:V}=ee(),H=te(),{removeCard:xe}=H,{activeCardId:U}=f(H),W=t(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=t(()=>{var e,t,n,r;if(!W.value||!(!((e=W.value.extensions)==null||(e=e.airi)==null)&&e.modules))return{consciousness:``,speech:``,voice:``};let i=W.value.extensions.airi.modules;return{consciousness:(t=i.consciousness)?.model||``,speech:(n=i.speech)?.model||``,voice:(r=i.speech)?.voice_id||``}}),K=t(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=t(()=>z.cardId===U.value),J=u(!1);function Se(){J.value=!0,setTimeout(()=>{U.value=z.cardId,J.value=!1},300)}function Y(e){return e?.replace(/\{\{(.*?)\}\}/g,`{{ $1 }}`).trim()}let X=u(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=u(``),Q=t(()=>{var e,t;let n=[];return(e=W.value)?.description&&n.push({id:`description`,label:V(`settings.pages.card.description_label`),icon:`i-solar:document-text-linear`}),(t=W.value)?.notes&&n.push({id:`notes`,label:V(`settings.pages.card.creator_notes`),icon:`i-solar:notes-linear`}),Object.values(K.value).some(e=>!!e)&&n.push({id:`character`,label:V(`settings.pages.card.character`),icon:`i-solar:user-rounded-linear`}),n.push({id:`modules`,label:V(`settings.pages.card.modules`),icon:`i-solar:tuning-square-linear`}),n}),$=t({get:()=>{var e;return Q.value.find(e=>e.id===Z.value)?Z.value:(e=Q.value[0])?.id||``},set:e=>{Z.value=e}});return(t,u)=>{var f;return l(),i(e,null,[o(m(ae),{open:s.modelValue,"onUpdate:open":u[0]||=e=>B(`update:modelValue`,e)},{default:h(()=>[o(m(re),null,{default:h(()=>[o(m(g),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),o(m(ie),{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:h(()=>[W.value?(l(),i(`div`,se,[n(`div`,ce,[n(`div`,le,[n(`div`,null,[n(`div`,ue,[o(m(_),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:h(()=>[a(p(W.value.name),1)]),_:1}),q.value?(l(),i(`div`,de,[u[3]||=n(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),a(` `+p(m(V)(`settings.pages.card.active_badge`)),1)])):r(``,!0)]),n(`div`,fe,[a(` v`+p(W.value.version)+` `,1),W.value.creator?(l(),i(e,{key:0},[a(` · `+p(m(V)(`settings.pages.card.created_by`))+` `,1),n(`span`,pe,p(W.value.creator),1)],64)):r(``,!0)])]),n(`div`,me,[o(m(ne),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?m(V)(`settings.pages.card.active`):m(V)(`settings.pages.card.activate`),disabled:q.value,class:c({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),n(`div`,he,[n(`div`,v,[n(`div`,y,[(l(!0),i(e,null,d(Q.value,e=>(l(),i(`button`,{key:e.id,class:c([`px-4 py-2 text-sm font-medium`,[$.value===e.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:t=>$.value=e.id},[n(`div`,x,[n(`div`,{class:c(e.icon)},null,2),a(` `+p(e.label),1)])],10,b))),128))])])]),$.value===`notes`&&W.value.notes?(l(),i(`div`,S,[n(`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:Y(W.value.notes)},null,8,C)])):r(``,!0),$.value===`description`&&W.value.description?(l(),i(`div`,w,[n(`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:Y(W.value.description)},null,8,T)])):r(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(l(),i(`div`,E,[n(`div`,D,[(l(!0),i(e,null,d(K.value,(t,a)=>(l(),i(e,{key:a},[t?(l(),i(`div`,O,[n(`h2`,k,p(m(V)(`settings.pages.card.${a.toLowerCase()}`)),1),n(`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:Y(t)},null,8,A)])):r(``,!0)],64))),128))])])):r(``,!0),$.value===`modules`?(l(),i(`div`,j,[n(`div`,M,[n(`div`,N,[n(`span`,P,[u[4]||=n(`div`,{"i-lucide:ghost":``},null,-1),a(` `+p(m(V)(`settings.pages.card.consciousness.model`)),1)]),n(`div`,F,p(G.value.consciousness??`default`),1)]),n(`div`,I,[n(`span`,ge,[u[5]||=n(`div`,{"i-lucide:mic":``},null,-1),a(` `+p(m(V)(`settings.pages.card.speech.model`)),1)]),n(`div`,L,p(G.value.speech??`default`),1)]),n(`div`,_e,[n(`span`,ve,[u[6]||=n(`div`,{"i-lucide:music":``},null,-1),a(` `+p(m(V)(`settings.pages.card.speech.voice`)),1)]),n(`div`,ye,p(G.value.voice??`default`),1)])])])):r(``,!0)])])):(l(),i(`div`,be,[u[7]||=n(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),a(` `+p(m(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),o(oe,{modelValue:X.value,"onUpdate:modelValue":u[1]||=e=>X.value=e,"card-name":(f=W.value)?.name,onConfirm:Ce,onCancel:u[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64)}}}),z=R;export{z as CardDetailDialog_default}; \ No newline at end of file diff --git a/assets/CardDetailDialog-pJ19LoWD.js b/assets/CardDetailDialog-pJ19LoWD.js new file mode 100644 index 0000000000000000000000000000000000000000..72c7d1336260d082adc5987b2bf0801b781a332c --- /dev/null +++ b/assets/CardDetailDialog-pJ19LoWD.js @@ -0,0 +1 @@ +import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import"./dist-BeDGrW0v.js";import"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import"./DeleteCardDialog-BIO7MxkY.js";import{CardDetailDialog_default as e}from"./CardDetailDialog-RKuCdXg0.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardListItem-BXlJ2a3I.js b/assets/CardListItem-BXlJ2a3I.js new file mode 100644 index 0000000000000000000000000000000000000000..2dea18b5febab5056b5056803b7c55b36b2fc4eb --- /dev/null +++ b/assets/CardListItem-BXlJ2a3I.js @@ -0,0 +1 @@ +import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{CardListItem_default as e}from"./CardListItem-C5UadVtf.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardListItem-DRyTsPsI.js b/assets/CardListItem-C5UadVtf.js similarity index 96% rename from assets/CardListItem-DRyTsPsI.js rename to assets/CardListItem-C5UadVtf.js index 70c332b82795f22564c9feebe0feea9687d6b78f..648a3b2a8d2cda6631f8973b9a5fa3d288bed7a8 100644 --- a/assets/CardListItem-DRyTsPsI.js +++ b/assets/CardListItem-C5UadVtf.js @@ -1 +1 @@ -import{createBaseVNode as e,createBlock as t,createCommentVNode as n,createElementBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,toDisplayString as s,unref as c,withCtx as l,withModifiers as u}from"./index-Dor8PgzM.js";import{CursorFloating_default as d}from"./components-1m8YjNRO.js";const f={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`},p={"z-1":``,flex:``,"items-start":``,"justify-between":``,"gap-2":``},m={"flex-1":``,truncate:``,"text-lg":``,"font-normal":``},h={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`},_={"z-1":``,flex:``,"items-center":``,"justify-between":``,"text-xs":``,text:`neutral-500 dark:neutral-400`},v={flex:``,"items-center":``,"gap-1.5":``},y={flex:``,"items-center":``,"gap-0.5":``},b={flex:``,"items-center":``,"gap-0.5":``},x={flex:``,"items-center":``,"justify-end":``,"px-2":``,"py-1.5":``},S=[`disabled`];var C=i({__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(i,{emit:C}){let w=C;return(C,T)=>(o(),t(c(d),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:a([i.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:T[2]||=e=>w(`select`)},{default:l(()=>[e(`div`,f,[e(`div`,p,[e(`h3`,m,s(i.name),1),i.isActive?(o(),r(`div`,h,T[3]||=[e(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)])):n(``,!0)]),i.description?(o(),r(`p`,g,s(i.description),1)):n(``,!0),e(`div`,_,[e(`div`,null,`v`+s(i.version),1),e(`div`,v,[e(`div`,y,[T[4]||=e(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),e(`span`,null,s(i.consciousnessModel),1)]),e(`div`,b,[T[5]||=e(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),e(`span`,null,s(i.voiceModel),1)])])])]),e(`div`,x,[e(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:i.isActive,onClick:T[0]||=u(e=>w(`activate`),[`stop`])},[e(`div`,{class:a([i.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,S),i.id===`default`?n(``,!0):(o(),r(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:T[1]||=u(e=>w(`delete`),[`stop`])},T[6]||=[e(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]))])]),_:1},8,[`class`]))}}),w=C;export{w as CardListItem_default}; \ No newline at end of file +import{createBaseVNode as e,createBlock as t,createCommentVNode as n,createElementBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,toDisplayString as s,unref as c,withCtx as l,withModifiers as u}from"./index-C-t5bjx6.js";import{CursorFloating_default as d}from"./components-DaLVZOhF.js";const f={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`},p={"z-1":``,flex:``,"items-start":``,"justify-between":``,"gap-2":``},m={"flex-1":``,truncate:``,"text-lg":``,"font-normal":``},h={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`},_={"z-1":``,flex:``,"items-center":``,"justify-between":``,"text-xs":``,text:`neutral-500 dark:neutral-400`},v={flex:``,"items-center":``,"gap-1.5":``},y={flex:``,"items-center":``,"gap-0.5":``},b={flex:``,"items-center":``,"gap-0.5":``},x={flex:``,"items-center":``,"justify-end":``,"px-2":``,"py-1.5":``},S=[`disabled`];var C=i({__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(i,{emit:C}){let w=C;return(C,T)=>(o(),t(c(d),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:a([i.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:T[2]||=e=>w(`select`)},{default:l(()=>[e(`div`,f,[e(`div`,p,[e(`h3`,m,s(i.name),1),i.isActive?(o(),r(`div`,h,T[3]||=[e(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)])):n(``,!0)]),i.description?(o(),r(`p`,g,s(i.description),1)):n(``,!0),e(`div`,_,[e(`div`,null,`v`+s(i.version),1),e(`div`,v,[e(`div`,y,[T[4]||=e(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),e(`span`,null,s(i.consciousnessModel),1)]),e(`div`,b,[T[5]||=e(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),e(`span`,null,s(i.voiceModel),1)])])])]),e(`div`,x,[e(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:i.isActive,onClick:T[0]||=u(e=>w(`activate`),[`stop`])},[e(`div`,{class:a([i.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,S),i.id===`default`?n(``,!0):(o(),r(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:T[1]||=u(e=>w(`delete`),[`stop`])},T[6]||=[e(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]))])]),_:1},8,[`class`]))}}),w=C;export{w as CardListItem_default}; \ No newline at end of file diff --git a/assets/CardListItem-DalWAjah.js b/assets/CardListItem-DalWAjah.js deleted file mode 100644 index 2983599c3b3d482c979f245ec891a2e47b17c892..0000000000000000000000000000000000000000 --- a/assets/CardListItem-DalWAjah.js +++ /dev/null @@ -1 +0,0 @@ -import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{CardListItem_default as e}from"./CardListItem-DRyTsPsI.js";export{e as default}; \ No newline at end of file diff --git a/assets/ColorPalette-B5CDhrZt.js b/assets/ColorPalette-C8KIoKTf.js similarity index 90% rename from assets/ColorPalette-B5CDhrZt.js rename to assets/ColorPalette-C8KIoKTf.js index 4bb28a20c4d1edc083febada0f419fd90f6c4a31..5fdac5c80de14b5f19b6e05a2f26b746bbfb6b39 100644 --- a/assets/ColorPalette-B5CDhrZt.js +++ b/assets/ColorPalette-C8KIoKTf.js @@ -1 +1 @@ -import{DEFAULT_THEME_COLORS_HUE as e,Fragment as t,createBlock as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,normalizeClass as c,normalizeStyle as l,openBlock as u,renderList as d,toDisplayString as f,unref as p,useSettings as m,withCtx as h}from"./index-Dor8PgzM.js";import{Gg as g,Hg as _,Ug as v,Wg as y,jg as b,qg as x}from"./dist-B8MUgAeh.js";const S={key:0,flex:``,"gap-2":``};var C=s({__name:`ColorPalette`,props:{colors:null},setup(s){let C=m();return(m,w)=>s.colors.length?(u(),i(`div`,S,[(u(!0),i(t,null,d(s.colors,({hex:t,name:r})=>(u(),n(p(_),{key:t||`default`},{default:h(()=>[o(p(y),null,{default:h(()=>[o(p(b),{transition:`all ease-in-out duration-250`,"size-6":``,"cursor-pointer":``,"rounded-full":``,"bg-primary-500":``,style:l(t?{background:t}:{"--chromatic-hue":p(e)}),class:c(p(C).isColorSelectedForPrimary(t)?`scale-150 mx-1`:`hover:scale-110`),onClick:e=>p(C).applyPrimaryColorFrom(t)},null,8,[`style`,`class`,`onClick`]),o(p(x),null,{default:h(()=>[o(p(v),{bg:`white dark:neutral-800`,"rounded-lg":``,"px-3":``,"py-1.5":``,"text-sm":``,"shadow-md":``},{default:h(()=>[a(f(r)+` `,1),o(p(g),{"fill-white":``,"dark:fill-neutral-800":``})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):r(``,!0)}}),w=C;export{w as ColorPalette_default}; \ No newline at end of file +import{DEFAULT_THEME_COLORS_HUE as e,Fragment as t,createBlock as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,normalizeClass as c,normalizeStyle as l,openBlock as u,renderList as d,toDisplayString as f,unref as p,useSettings as m,withCtx as h}from"./index-C-t5bjx6.js";import{Gg as g,Hg as _,Ug as v,Wg as y,jg as b,qg as x}from"./dist-BeDGrW0v.js";const S={key:0,flex:``,"gap-2":``};var C=s({__name:`ColorPalette`,props:{colors:null},setup(s){let C=m();return(m,w)=>s.colors.length?(u(),i(`div`,S,[(u(!0),i(t,null,d(s.colors,({hex:t,name:r})=>(u(),n(p(_),{key:t||`default`},{default:h(()=>[o(p(y),null,{default:h(()=>[o(p(b),{transition:`all ease-in-out duration-250`,"size-6":``,"cursor-pointer":``,"rounded-full":``,"bg-primary-500":``,style:l(t?{background:t}:{"--chromatic-hue":p(e)}),class:c(p(C).isColorSelectedForPrimary(t)?`scale-150 mx-1`:`hover:scale-110`),onClick:e=>p(C).applyPrimaryColorFrom(t)},null,8,[`style`,`class`,`onClick`]),o(p(x),null,{default:h(()=>[o(p(v),{bg:`white dark:neutral-800`,"rounded-lg":``,"px-3":``,"py-1.5":``,"text-sm":``,"shadow-md":``},{default:h(()=>[a(f(r)+` `,1),o(p(g),{"fill-white":``,"dark:fill-neutral-800":``})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):r(``,!0)}}),w=C;export{w as ColorPalette_default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-C72b0_i8.js b/assets/DeleteCardDialog-BIO7MxkY.js similarity index 89% rename from assets/DeleteCardDialog-C72b0_i8.js rename to assets/DeleteCardDialog-BIO7MxkY.js index ca053ec35b842b151eca927294ef3f409b97a000..6b75016e45eb227a27906105bbff2d5f7b06d65a 100644 --- a/assets/DeleteCardDialog-C72b0_i8.js +++ b/assets/DeleteCardDialog-BIO7MxkY.js @@ -1 +1 @@ -import{createBaseVNode as e,createBlock as t,createTextVNode as n,createVNode as r,defineComponent as i,openBlock as a,toDisplayString as o,unref as s,useI18n as c,withCtx as l}from"./index-Dor8PgzM.js";import{Button_default as u}from"./Button-C9y21VLy.js";import{Av as d,Fv as f,Mv as p,Nv as m,Ov as h,Tv as g,Vv as _,kv as v}from"./dist-B8MUgAeh.js";const y={class:`flex flex-row justify-end gap-3`};var b=i({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:null},emits:[`update:modelValue`,`confirm`,`cancel`],setup(i,{emit:b}){let x=b,{t:S}=c();function C(){x(`update:modelValue`,!1),x(`cancel`)}function w(){x(`update:modelValue`,!1),x(`confirm`)}return(c,b)=>(a(),t(s(g),{open:i.modelValue,"onUpdate:open":b[0]||=e=>x(`update:modelValue`,e)},{default:l(()=>[r(s(d),null,{default:l(()=>[r(s(v),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),r(s(h),{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:l(()=>[r(s(_),{class:`mb-4 text-xl font-normal`},{default:l(()=>[n(o(s(S)(`settings.pages.card.delete_card`)),1)]),_:1}),r(s(f),{class:`mb-6`},{default:l(()=>[n(o(s(S)(`settings.pages.card.delete_confirmation`))+` `,1),e(`b`,null,`"`+o(i.cardName||``)+`"`,1)]),_:1}),e(`div`,y,[r(s(p),{"as-child":``},{default:l(()=>[r(s(u),{variant:`secondary`,label:s(S)(`settings.pages.card.cancel`),onClick:C},null,8,[`label`])]),_:1}),r(s(m),{"as-child":``},{default:l(()=>[r(s(u),{variant:`danger`,label:s(S)(`settings.pages.card.delete`),onClick:w},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),x=b;export{x as DeleteCardDialog_default}; \ No newline at end of file +import{createBaseVNode as e,createBlock as t,createTextVNode as n,createVNode as r,defineComponent as i,openBlock as a,toDisplayString as o,unref as s,useI18n as c,withCtx as l}from"./index-C-t5bjx6.js";import{Button_default as u}from"./Button-DE0e46lv.js";import{Av as d,Fv as f,Mv as p,Nv as m,Ov as h,Tv as g,Vv as _,kv as v}from"./dist-BeDGrW0v.js";const y={class:`flex flex-row justify-end gap-3`};var b=i({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:null},emits:[`update:modelValue`,`confirm`,`cancel`],setup(i,{emit:b}){let x=b,{t:S}=c();function C(){x(`update:modelValue`,!1),x(`cancel`)}function w(){x(`update:modelValue`,!1),x(`confirm`)}return(c,b)=>(a(),t(s(g),{open:i.modelValue,"onUpdate:open":b[0]||=e=>x(`update:modelValue`,e)},{default:l(()=>[r(s(d),null,{default:l(()=>[r(s(v),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),r(s(h),{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:l(()=>[r(s(_),{class:`mb-4 text-xl font-normal`},{default:l(()=>[n(o(s(S)(`settings.pages.card.delete_card`)),1)]),_:1}),r(s(f),{class:`mb-6`},{default:l(()=>[n(o(s(S)(`settings.pages.card.delete_confirmation`))+` `,1),e(`b`,null,`"`+o(i.cardName||``)+`"`,1)]),_:1}),e(`div`,y,[r(s(p),{"as-child":``},{default:l(()=>[r(s(u),{variant:`secondary`,label:s(S)(`settings.pages.card.cancel`),onClick:C},null,8,[`label`])]),_:1}),r(s(m),{"as-child":``},{default:l(()=>[r(s(u),{variant:`danger`,label:s(S)(`settings.pages.card.delete`),onClick:w},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),x=b;export{x as DeleteCardDialog_default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-Ca2Mm-16.js b/assets/DeleteCardDialog-Ca2Mm-16.js deleted file mode 100644 index b4af2403a902f63779e36f0da296defeb47d3469..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-Ca2Mm-16.js +++ /dev/null @@ -1 +0,0 @@ -import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import"./dist-B8MUgAeh.js";import{DeleteCardDialog_default as e}from"./DeleteCardDialog-C72b0_i8.js";export{e as default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-D6RQM-NX.js b/assets/DeleteCardDialog-D6RQM-NX.js new file mode 100644 index 0000000000000000000000000000000000000000..56e16023184769fb0725fbda0e2ee5fb58ef8236 --- /dev/null +++ b/assets/DeleteCardDialog-D6RQM-NX.js @@ -0,0 +1 @@ +import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import"./dist-BeDGrW0v.js";import{DeleteCardDialog_default as e}from"./DeleteCardDialog-BIO7MxkY.js";export{e as default}; \ No newline at end of file diff --git a/assets/HeaderLink-BN-EJFUu.js b/assets/HeaderLink-CyWWkOPU.js similarity index 92% rename from assets/HeaderLink-BN-EJFUu.js rename to assets/HeaderLink-CyWWkOPU.js index efbede990d9ad6d5ff3dba727645dab752ffadb1..5b65436d73f2f6011359675cec58da0cb3577c15 100644 --- a/assets/HeaderLink-BN-EJFUu.js +++ b/assets/HeaderLink-CyWWkOPU.js @@ -1 +1 @@ -import{RouterLink as e,__plugin_vue_export_helper_default as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,openBlock as o,unref as s,useDark as c,withCtx as l}from"./index-Dor8PgzM.js";var u=`/assets/logo-dark-B0bvNYTh.svg`,d=`/assets/logo-B2aCU-bH.svg`;const f=[`src`],p=[`src`];var m=a({__name:`HeaderLink`,setup(t){let a=c();return(t,c)=>(o(),r(s(e),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:l(()=>[s(a)?(o(),i(`img`,{key:0,src:s(u),"h-8":``,"w-8":``,class:`theme-colored`},null,8,f)):(o(),i(`img`,{key:1,src:s(d),"h-8":``,"w-8":``,class:`theme-colored`},null,8,p)),c[0]||=n(`div`,{"translate-y":`[2px]`,"font-normal":``,"font-quicksand":``},[n(`span`,null,`AIRI`)],-1)]),_:1,__:[0]}))}}),h=t(m,[[`__scopeId`,`data-v-3488d4a0`]]);export{h as HeaderLink_default}; \ No newline at end of file +import{RouterLink as e,__plugin_vue_export_helper_default as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,openBlock as o,unref as s,useDark as c,withCtx as l}from"./index-C-t5bjx6.js";var u=`/assets/logo-dark-B0bvNYTh.svg`,d=`/assets/logo-B2aCU-bH.svg`;const f=[`src`],p=[`src`];var m=a({__name:`HeaderLink`,setup(t){let a=c();return(t,c)=>(o(),r(s(e),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:l(()=>[s(a)?(o(),i(`img`,{key:0,src:s(u),"h-8":``,"w-8":``,class:`theme-colored`},null,8,f)):(o(),i(`img`,{key:1,src:s(d),"h-8":``,"w-8":``,class:`theme-colored`},null,8,p)),c[0]||=n(`div`,{"translate-y":`[2px]`,"font-normal":``,"font-quicksand":``},[n(`span`,null,`AIRI`)],-1)]),_:1,__:[0]}))}}),h=t(m,[[`__scopeId`,`data-v-3488d4a0`]]);export{h as HeaderLink_default}; \ No newline at end of file diff --git a/assets/IconAnimation-DNjwD43A.js b/assets/IconAnimation-9WCWiV-Y.js similarity index 95% rename from assets/IconAnimation-DNjwD43A.js rename to assets/IconAnimation-9WCWiV-Y.js index a4b69d59ba7611d12473715e34bb9259cfb554ed..42cf05395789edbf2cf43cd9fb47049b09a421fb 100644 --- a/assets/IconAnimation-DNjwD43A.js +++ b/assets/IconAnimation-9WCWiV-Y.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createElementBlock as n,defineComponent as r,normalizeClass as i,normalizeStyle as a,openBlock as o,ref as s,watch as c}from"./index-Dor8PgzM.js";var l=r({__name:`IconAnimation`,props:{icon:null,iconSize:null,position:null,duration:null,started:{type:Boolean},textColor:null,isReverse:{type:Boolean},zIndex:null},emits:[`animationEnded`],setup(r,{emit:l}){let u=r,d=l,f=s(!1);c(()=>u.started,e=>{e&&requestAnimationFrame(()=>{f.value=!0})});let p=e(()=>({opacity:f.value===u.isReverse?0:1,size:f.value===u.isReverse?u.iconSize:25,position:f.value===u.isReverse?u.position:`calc(50dvw - 12.5rem), calc(50dvh - 12.5rem)`,textColor:f.value===u.isReverse?u.textColor:`text-white`})),m=s([]),h=s(!1);function g(e){m.value.push(e.propertyName),m.value.includes(`color`)&&m.value.includes(`width`)&&m.value.includes(`height`)&&m.value.includes(`transform`)&&(h.value=!0,d(`animationEnded`))}return(e,s)=>(o(),n(`div`,{"pointer-events-none":``,fixed:``,w:`100dvw`,h:`100dvh`,style:a({zIndex:h.value?r.zIndex:void 0})},[t(`div`,{fixed:``,"inset-0":``,"bg-primary-500":``,"transition-opacity":``,"ease-linear":``,style:a({opacity:p.value.opacity,transitionDuration:`${r.duration}ms`})},null,4),t(`div`,{fixed:``,"inset-0":``,"ease-in-out":``,style:a({width:`${p.value.size}rem`,height:`${p.value.size}rem`,transform:`translate(${p.value.position})`,transitionDuration:`${r.duration}ms`}),class:i([p.value.textColor,u.icon,{"transition-all":f.value}]),onTransitionend:g},null,38)],4))}}),u=l;export{u as IconAnimation_default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createElementBlock as n,defineComponent as r,normalizeClass as i,normalizeStyle as a,openBlock as o,ref as s,watch as c}from"./index-C-t5bjx6.js";var l=r({__name:`IconAnimation`,props:{icon:null,iconSize:null,position:null,duration:null,started:{type:Boolean},textColor:null,isReverse:{type:Boolean},zIndex:null},emits:[`animationEnded`],setup(r,{emit:l}){let u=r,d=l,f=s(!1);c(()=>u.started,e=>{e&&requestAnimationFrame(()=>{f.value=!0})});let p=e(()=>({opacity:f.value===u.isReverse?0:1,size:f.value===u.isReverse?u.iconSize:25,position:f.value===u.isReverse?u.position:`calc(50dvw - 12.5rem), calc(50dvh - 12.5rem)`,textColor:f.value===u.isReverse?u.textColor:`text-white`})),m=s([]),h=s(!1);function g(e){m.value.push(e.propertyName),m.value.includes(`color`)&&m.value.includes(`width`)&&m.value.includes(`height`)&&m.value.includes(`transform`)&&(h.value=!0,d(`animationEnded`))}return(e,s)=>(o(),n(`div`,{"pointer-events-none":``,fixed:``,w:`100dvw`,h:`100dvh`,style:a({zIndex:h.value?r.zIndex:void 0})},[t(`div`,{fixed:``,"inset-0":``,"bg-primary-500":``,"transition-opacity":``,"ease-linear":``,style:a({opacity:p.value.opacity,transitionDuration:`${r.duration}ms`})},null,4),t(`div`,{fixed:``,"inset-0":``,"ease-in-out":``,style:a({width:`${p.value.size}rem`,height:`${p.value.size}rem`,transform:`translate(${p.value.position})`,transitionDuration:`${r.duration}ms`}),class:i([p.value.textColor,u.icon,{"transition-all":f.value}]),onTransitionend:g},null,38)],4))}}),u=l;export{u as IconAnimation_default}; \ No newline at end of file diff --git a/assets/InputFile-iVzJ4JTk.js b/assets/InputFile-WiujwxGd.js similarity index 96% rename from assets/InputFile-iVzJ4JTk.js rename to assets/InputFile-WiujwxGd.js index a3d89605f326d2874b606c0695395990a998b35e..cab9047c4f4bf1299a3e011308148f96f23e5b6b 100644 --- a/assets/InputFile-iVzJ4JTk.js +++ b/assets/InputFile-WiujwxGd.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,defineComponent as n,mergeModels as r,normalizeClass as i,openBlock as a,ref as o,refDebounced as s,renderSlot as c,unref as l,useModel as u}from"./index-Dor8PgzM.js";const d=[`accept`,`multiple`],f={key:0,text:`center`,"text-sm":``},p={key:1,text:`center`,"text-sm":``};var m=n({__name:`InputFile`,props:r({accept:null,multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let r=u(n,`modelValue`),m=o(),h=o(!1),g=s(h,150);function _(e){let t=e.target;t.files&&t.files.length>0&&(m.value=t.files[0]),r.value=Array.from(t.files||[]),h.value=!1}return(o,s)=>(a(),t(`label`,{relative:``,class:i([`min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6`,[l(g)?`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`,l(g)?`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:s[0]||=e=>h.value=!0,onDragleave:s[1]||=e=>h.value=!1},[e(`input`,{type:`file`,accept:n.accept,multiple:n.multiple,"cursor-pointer":``,class:`absolute inset-0 h-full w-full opacity-0`,onChange:_},null,40,d),c(o.$slots,`default`,{isDragging:l(g),firstFile:m.value,files:r.value},()=>[e(`div`,{class:i([`flex flex-col items-center`,[l(g)?`text-primary-500 dark:text-primary-400`:`text-neutral-400 dark:text-neutral-500`]])},[s[2]||=e(`div`,{"i-solar:upload-square-line-duotone":``,"mb-2":``,"text-5xl":``},null,-1),s[3]||=e(`p`,{"font-medium":``,text:`center lg`},` Upload `,-1),l(g)?(a(),t(`p`,f,` Release to upload `)):(a(),t(`p`,p,` Click or drag and drop a file here `))],2)])],34))}}),h=m;export{h as InputFile_default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,defineComponent as n,mergeModels as r,normalizeClass as i,openBlock as a,ref as o,refDebounced as s,renderSlot as c,unref as l,useModel as u}from"./index-C-t5bjx6.js";const d=[`accept`,`multiple`],f={key:0,text:`center`,"text-sm":``},p={key:1,text:`center`,"text-sm":``};var m=n({__name:`InputFile`,props:r({accept:null,multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let r=u(n,`modelValue`),m=o(),h=o(!1),g=s(h,150);function _(e){let t=e.target;t.files&&t.files.length>0&&(m.value=t.files[0]),r.value=Array.from(t.files||[]),h.value=!1}return(o,s)=>(a(),t(`label`,{relative:``,class:i([`min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6`,[l(g)?`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`,l(g)?`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:s[0]||=e=>h.value=!0,onDragleave:s[1]||=e=>h.value=!1},[e(`input`,{type:`file`,accept:n.accept,multiple:n.multiple,"cursor-pointer":``,class:`absolute inset-0 h-full w-full opacity-0`,onChange:_},null,40,d),c(o.$slots,`default`,{isDragging:l(g),firstFile:m.value,files:r.value},()=>[e(`div`,{class:i([`flex flex-col items-center`,[l(g)?`text-primary-500 dark:text-primary-400`:`text-neutral-400 dark:text-neutral-500`]])},[s[2]||=e(`div`,{"i-solar:upload-square-line-duotone":``,"mb-2":``,"text-5xl":``},null,-1),s[3]||=e(`p`,{"font-medium":``,text:`center lg`},` Upload `,-1),l(g)?(a(),t(`p`,f,` Release to upload `)):(a(),t(`p`,p,` Click or drag and drop a file here `))],2)])],34))}}),h=m;export{h as InputFile_default}; \ No newline at end of file diff --git a/assets/Textarea-D5jZ5rL5.js b/assets/Textarea-SRGnauY5.js similarity index 84% rename from assets/Textarea-D5jZ5rL5.js rename to assets/Textarea-SRGnauY5.js index 700c02ec5a7e991851e1f175209df91028a71cba..4e4fd31a2daf2144aff2fea1336946db6c17c5c8 100644 --- a/assets/Textarea-D5jZ5rL5.js +++ b/assets/Textarea-SRGnauY5.js @@ -1 +1 @@ -import{createBlock as e,defineComponent as t,openBlock as n,useModel as r}from"./index-Dor8PgzM.js";import{Basic_default as i}from"./Basic-CbvQnFR9.js";var a=t({__name:`Textarea`,props:{modelValue:{default:``},modelModifiers:{}},emits:[`update:modelValue`],setup(t){let a=r(t,`modelValue`);return(t,r)=>(n(),e(i,{modelValue:a.value,"onUpdate:modelValue":r[0]||=e=>a.value=e,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`]))}}),o=a;export{o as Textarea_default}; \ No newline at end of file +import{createBlock as e,defineComponent as t,openBlock as n,useModel as r}from"./index-C-t5bjx6.js";import{Basic_default as i}from"./Basic-DnBqne8U.js";var a=t({__name:`Textarea`,props:{modelValue:{default:``},modelModifiers:{}},emits:[`update:modelValue`],setup(t){let a=r(t,`modelValue`);return(t,r)=>(n(),e(i,{modelValue:a.value,"onUpdate:modelValue":r[0]||=e=>a.value=e,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`]))}}),o=a;export{o as Textarea_default}; \ No newline at end of file diff --git a/assets/_...all_-Cre4u0Q1.js b/assets/_...all_-DN80NrxA.js similarity index 72% rename from assets/_...all_-Cre4u0Q1.js rename to assets/_...all_-DN80NrxA.js index 1b634ea2710b75db25e99f3ba4876e280748a9bf..01b877d19b7cf2a40b33b1c74ff1b0d8b70391d6 100644 --- a/assets/_...all_-Cre4u0Q1.js +++ b/assets/_...all_-DN80NrxA.js @@ -1 +1 @@ -import{__plugin_vue_export_helper_default as e,createElementBlock as t,openBlock as n}from"./index-Dor8PgzM.js";const r={};function i(e,r){return n(),t(`div`,null,` 404 - Page not found `)}var a=e(r,[[`render`,i]]);export{a as default}; \ No newline at end of file +import{__plugin_vue_export_helper_default as e,createElementBlock as t,openBlock as n}from"./index-C-t5bjx6.js";const r={};function i(e,r){return n(),t(`div`,null,` 404 - Page not found `)}var a=e(r,[[`render`,i]]);export{a as default}; \ No newline at end of file diff --git a/assets/__vite-browser-external-CFsuT-Qx.js b/assets/__vite-browser-external-CFsuT-Qx.js new file mode 100644 index 0000000000000000000000000000000000000000..60b1ad76c1d20d2498798934ead3e098376f7757 --- /dev/null +++ b/assets/__vite-browser-external-CFsuT-Qx.js @@ -0,0 +1 @@ +import{__commonJSMin as e}from"./index-C-t5bjx6.js";var t=e((exports,t)=>{t.exports={}});export default t(); \ No newline at end of file diff --git a/assets/__vite-browser-external-z9j0cN3P.js b/assets/__vite-browser-external-z9j0cN3P.js deleted file mode 100644 index e95c6ee1bba34b50b7633ea4530e8f83dc1d304d..0000000000000000000000000000000000000000 --- a/assets/__vite-browser-external-z9j0cN3P.js +++ /dev/null @@ -1 +0,0 @@ -import{__commonJSMin as e}from"./index-Dor8PgzM.js";var t=e((exports,t)=>{t.exports={}});export default t(); \ No newline at end of file diff --git a/assets/airi-card-mw1JngjQ.js b/assets/airi-card-DrWWMwCR.js similarity index 88% rename from assets/airi-card-mw1JngjQ.js rename to assets/airi-card-DrWWMwCR.js index bf8e70867bdc1a79dc1bb5f00035a36ee3b506cc..c1158718127cb34b29bad7ebd66e3da86ebcc522 100644 --- a/assets/airi-card-mw1JngjQ.js +++ b/assets/airi-card-DrWWMwCR.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as o,defineComponent as s,normalizeClass as c,openBlock as l,ref as u,renderList as d,resolveDirective as ee,storeToRefs as f,toDisplayString as p,unref as m,useI18n as h,vModelText as te,watch as ne,withCtx as re,withDirectives as g}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useAiriCardStore as ie}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import{Select_default as ae}from"./src-BnFQ5wFr.js";import"./dist-B8MUgAeh.js";import{InputFile_default as _}from"./InputFile-iVzJ4JTk.js";import"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as v}from"./route-block--T8TG4is.js";import{CardCreate_default as y}from"./CardCreate-C0oil_xo.js";import{CardCreationDialog_default as b}from"./CardCreationDialog-CYjvvafK.js";import{DeleteCardDialog_default as x}from"./DeleteCardDialog-C72b0_i8.js";import{CardDetailDialog_default as S}from"./CardDetailDialog-C5WGcTv5.js";import{CardListItem_default as oe}from"./CardListItem-DRyTsPsI.js";const se={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ce={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},C={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},w=[`placeholder`],T={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`},D={key:0,flex:``,"flex-col":``,"items-center":``},O={"font-medium":``,text:`neutral-600 dark:neutral-300`},k={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},A={key:1,flex:``,"flex-col":``,"items-center":``},j={"font-medium":``,text:`primary-600 dark:primary-300`},M={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`},N={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`},P={class:`flex flex-col`},F={class:`font-medium`},I={class:`text-sm text-amber-600 dark:text-amber-400`},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,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var R=s({__name:`index`,setup(s){let{t:v}=h(),R=ie(),{addCard:z,removeCard:B}=R,{cards:V,activeCardId:H}=f(R),U=u(``),W=u(!1),G=u(!1),K=u(``),q=u(`nameAsc`),J=u([]);ne(J,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);U.value=z(n),W.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let Y=t(()=>Array.from(V.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),le=t(()=>{if(!K.value)return Y.value;let e=K.value.toLowerCase();return Y.value.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),X=t(()=>{let e=[...le.value];return q.value===`nameAsc`?e.sort((e,t)=>e.name.localeCompare(t.name)):q.value===`nameDesc`?e.sort((e,t)=>t.name.localeCompare(e.name)):q.value===`recent`?e.sort((e,t)=>t.id.localeCompare(e.id)):e}),Z=u(!1),Q=u(null);function ue(){Q.value&&(B(Q.value),Q.value=null,Z.value=!1)}function de(e){Q.value=e,Z.value=!0}function fe(e){U.value=e,W.value=!0}function pe(){G.value=!0}function me(e){H.value=e}function he(e){let t=V.value.get(e);return t?.version||`1.0.0`}function $(e,t){var n,r,i;let a=V.value.get(e);if(!a||!(!((n=a.extensions)==null||(n=n.airi)==null)&&n.modules))return`default`;let o=a.extensions.airi.modules;return t===`consciousness`?(r=o.consciousness)?.model&&o.consciousness.model.split(`-`).pop()||`default`:t===`voice`&&(i=o.speech)?.voice_id||`default`}return(t,s)=>{var u;let f=ee(`motion`);return l(),a(e,null,[n(`div`,se,[n(`div`,ce,[n(`div`,C,[s[7]||=n(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[n(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),g(n(`input`,{"onUpdate:modelValue":s[0]||=e=>K.value=e,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:m(v)(`settings.pages.card.search`)},null,8,w),[[te,K.value]])]),n(`div`,T,[n(`div`,E,p(m(v)(`settings.pages.card.sort_by`))+`: `,1),o(m(ae),{modelValue:q.value,"onUpdate:modelValue":s[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:m(v)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:m(v)(`settings.pages.card.name_desc`)},{value:`recent`,label:m(v)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),n(`div`,{class:c([`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))]":m(V).size>0}])},[o(m(_),{modelValue:J.value,"onUpdate:modelValue":s[2]||=e=>J.value=e,accept:`*.json`},{default:re(({isDragging:e})=>[e?(l(),a(`div`,A,[s[9]||=n(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),n(`p`,j,p(m(v)(`settings.pages.card.drop_here`)),1)])):(l(),a(`div`,D,[s[8]||=n(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),n(`p`,O,p(m(v)(`settings.pages.card.upload`)),1),n(`p`,k,p(m(v)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),o(y,{onClick:pe}),m(V).size>0?(l(!0),a(e,{key:0},d(X.value,e=>(l(),r(oe,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===m(H),"is-selected":e.id===U.value&&W.value,version:he(e.id),"consciousness-model":$(e.id,`consciousness`),"voice-model":$(e.id,`voice`),onSelect:t=>fe(e.id),onActivate:t=>me(e.id),onDelete:t=>de(e.id)},null,8,[`id`,`name`,`description`,`is-active`,`is-selected`,`version`,`consciousness-model`,`voice-model`,`onSelect`,`onActivate`,`onDelete`]))),128)):i(``,!0),m(V).size===0?(l(),a(`div`,M,[s[10]||=n(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),n(`p`,null,p(m(v)(`settings.pages.card.no_cards`)),1)])):i(``,!0),K.value&&X.value.length===0?(l(),a(`div`,N,[s[11]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,P,[n(`span`,F,p(m(v)(`settings.pages.card.no_results`)),1),n(`span`,I,p(m(v)(`settings.pages.card.try_different_search`)),1)])])):i(``,!0)],2)]),o(x,{modelValue:Z.value,"onUpdate:modelValue":s[3]||=e=>Z.value=e,"card-name":Q.value?(u=m(R).getCard(Q.value))?.name:``,onConfirm:ue,onCancel:s[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),o(S,{modelValue:W.value,"onUpdate:modelValue":s[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),o(b,{modelValue:G.value,"onUpdate:modelValue":s[6]||=e=>G.value=e},null,8,[`modelValue`]),g((l(),a(`div`,L,s[12]||=[n(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof v==`function`&&v(R);var z=R;export{z as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as o,defineComponent as s,normalizeClass as c,openBlock as l,ref as u,renderList as d,resolveDirective as ee,storeToRefs as f,toDisplayString as p,unref as m,useI18n as h,vModelText as te,watch as ne,withCtx as re,withDirectives as g}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useAiriCardStore as ie}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import{Select_default as ae}from"./src-B9Iy8991.js";import"./dist-BeDGrW0v.js";import{InputFile_default as _}from"./InputFile-WiujwxGd.js";import"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as v}from"./route-block--T8TG4is.js";import{CardCreate_default as y}from"./CardCreate-B09nhkcM.js";import{CardCreationDialog_default as b}from"./CardCreationDialog-B1i7X0kT.js";import{DeleteCardDialog_default as x}from"./DeleteCardDialog-BIO7MxkY.js";import{CardDetailDialog_default as S}from"./CardDetailDialog-RKuCdXg0.js";import{CardListItem_default as oe}from"./CardListItem-C5UadVtf.js";const se={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ce={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},C={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},w=[`placeholder`],T={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`},D={key:0,flex:``,"flex-col":``,"items-center":``},O={"font-medium":``,text:`neutral-600 dark:neutral-300`},k={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},A={key:1,flex:``,"flex-col":``,"items-center":``},j={"font-medium":``,text:`primary-600 dark:primary-300`},M={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`},N={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`},P={class:`flex flex-col`},F={class:`font-medium`},I={class:`text-sm text-amber-600 dark:text-amber-400`},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,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var R=s({__name:`index`,setup(s){let{t:v}=h(),R=ie(),{addCard:z,removeCard:B}=R,{cards:V,activeCardId:H}=f(R),U=u(``),W=u(!1),G=u(!1),K=u(``),q=u(`nameAsc`),J=u([]);ne(J,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);U.value=z(n),W.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let Y=t(()=>Array.from(V.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),le=t(()=>{if(!K.value)return Y.value;let e=K.value.toLowerCase();return Y.value.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),X=t(()=>{let e=[...le.value];return q.value===`nameAsc`?e.sort((e,t)=>e.name.localeCompare(t.name)):q.value===`nameDesc`?e.sort((e,t)=>t.name.localeCompare(e.name)):q.value===`recent`?e.sort((e,t)=>t.id.localeCompare(e.id)):e}),Z=u(!1),Q=u(null);function ue(){Q.value&&(B(Q.value),Q.value=null,Z.value=!1)}function de(e){Q.value=e,Z.value=!0}function fe(e){U.value=e,W.value=!0}function pe(){G.value=!0}function me(e){H.value=e}function he(e){let t=V.value.get(e);return t?.version||`1.0.0`}function $(e,t){var n,r,i;let a=V.value.get(e);if(!a||!(!((n=a.extensions)==null||(n=n.airi)==null)&&n.modules))return`default`;let o=a.extensions.airi.modules;return t===`consciousness`?(r=o.consciousness)?.model&&o.consciousness.model.split(`-`).pop()||`default`:t===`voice`&&(i=o.speech)?.voice_id||`default`}return(t,s)=>{var u;let f=ee(`motion`);return l(),a(e,null,[n(`div`,se,[n(`div`,ce,[n(`div`,C,[s[7]||=n(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[n(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),g(n(`input`,{"onUpdate:modelValue":s[0]||=e=>K.value=e,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:m(v)(`settings.pages.card.search`)},null,8,w),[[te,K.value]])]),n(`div`,T,[n(`div`,E,p(m(v)(`settings.pages.card.sort_by`))+`: `,1),o(m(ae),{modelValue:q.value,"onUpdate:modelValue":s[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:m(v)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:m(v)(`settings.pages.card.name_desc`)},{value:`recent`,label:m(v)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),n(`div`,{class:c([`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))]":m(V).size>0}])},[o(m(_),{modelValue:J.value,"onUpdate:modelValue":s[2]||=e=>J.value=e,accept:`*.json`},{default:re(({isDragging:e})=>[e?(l(),a(`div`,A,[s[9]||=n(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),n(`p`,j,p(m(v)(`settings.pages.card.drop_here`)),1)])):(l(),a(`div`,D,[s[8]||=n(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),n(`p`,O,p(m(v)(`settings.pages.card.upload`)),1),n(`p`,k,p(m(v)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),o(y,{onClick:pe}),m(V).size>0?(l(!0),a(e,{key:0},d(X.value,e=>(l(),r(oe,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===m(H),"is-selected":e.id===U.value&&W.value,version:he(e.id),"consciousness-model":$(e.id,`consciousness`),"voice-model":$(e.id,`voice`),onSelect:t=>fe(e.id),onActivate:t=>me(e.id),onDelete:t=>de(e.id)},null,8,[`id`,`name`,`description`,`is-active`,`is-selected`,`version`,`consciousness-model`,`voice-model`,`onSelect`,`onActivate`,`onDelete`]))),128)):i(``,!0),m(V).size===0?(l(),a(`div`,M,[s[10]||=n(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),n(`p`,null,p(m(v)(`settings.pages.card.no_cards`)),1)])):i(``,!0),K.value&&X.value.length===0?(l(),a(`div`,N,[s[11]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,P,[n(`span`,F,p(m(v)(`settings.pages.card.no_results`)),1),n(`span`,I,p(m(v)(`settings.pages.card.try_different_search`)),1)])])):i(``,!0)],2)]),o(x,{modelValue:Z.value,"onUpdate:modelValue":s[3]||=e=>Z.value=e,"card-name":Q.value?(u=m(R).getCard(Q.value))?.name:``,onConfirm:ue,onCancel:s[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),o(S,{modelValue:W.value,"onUpdate:modelValue":s[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),o(b,{modelValue:G.value,"onUpdate:modelValue":s[6]||=e=>G.value=e},null,8,[`modelValue`]),g((l(),a(`div`,L,s[12]||=[n(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof v==`function`&&v(R);var z=R;export{z as default}; \ No newline at end of file diff --git a/assets/alibaba-cloud-model-studio-CzyJX8a2.js b/assets/alibaba-cloud-model-studio-asn8Gwqn.js similarity index 84% rename from assets/alibaba-cloud-model-studio-CzyJX8a2.js rename to assets/alibaba-cloud-model-studio-asn8Gwqn.js index 111663cd8c296c62ec0c62869d0d8997a34d1a72..206b08ceddf4ef1769cff5393ac7077da0ab9a81 100644 --- a/assets/alibaba-cloud-model-studio-CzyJX8a2.js +++ b/assets/alibaba-cloud-model-studio-asn8Gwqn.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import{FieldRange_default as h}from"./src-BnFQ5wFr.js";import{SpeechPlayground_default as g,SpeechProviderSettings_default as _}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as v}from"./route-block--T8TG4is.js";const y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`;var S=i({__name:`alibaba-cloud-model-studio`,setup(i){let v={speed:1},S=s(0),C=s(1),w=s(0),T=m(),E=p(),{providers:D}=c(E),{t:O}=u(),k=e(()=>{var e;return!!(e=D.value[b])?.apiKey}),A=e(()=>T.availableVoices[b]||[]);async function j(e,t,n){let r=E.getProviderInstance(b);if(!r)throw Error(`Failed to initialize speech provider`);let i=E.getProviderConfig(b),a=i.model||x;return await T.speech(r,a,e,t,{...i,...v})}return a(async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)}),d(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),d(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),d(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),d(D,async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(_),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":f(()=>[t(`div`,y,[r(l(h),{modelValue:S.value,"onUpdate:modelValue":i[0]||=e=>S.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(O)(`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`]),r(l(h),{modelValue:C.value,"onUpdate:modelValue":i[1]||=e=>C.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(h),{modelValue:w.value,"onUpdate:modelValue":i[2]||=e=>w.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(O)(`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:f(()=>[r(l(g),{"available-voices":A.value,"generate-speech":j,"api-key-configured":k.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof v==`function`&&v(S);var C=S;export{C as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import{FieldRange_default as h}from"./src-B9Iy8991.js";import{SpeechPlayground_default as g,SpeechProviderSettings_default as _}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as v}from"./route-block--T8TG4is.js";const y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`;var S=i({__name:`alibaba-cloud-model-studio`,setup(i){let v={speed:1},S=s(0),C=s(1),w=s(0),T=m(),E=p(),{providers:D}=c(E),{t:O}=u(),k=e(()=>{var e;return!!(e=D.value[b])?.apiKey}),A=e(()=>T.availableVoices[b]||[]);async function j(e,t,n){let r=E.getProviderInstance(b);if(!r)throw Error(`Failed to initialize speech provider`);let i=E.getProviderConfig(b),a=i.model||x;return await T.speech(r,a,e,t,{...i,...v})}return a(async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)}),d(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),d(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),d(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),d(D,async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(_),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":f(()=>[t(`div`,y,[r(l(h),{modelValue:S.value,"onUpdate:modelValue":i[0]||=e=>S.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(O)(`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`]),r(l(h),{modelValue:C.value,"onUpdate:modelValue":i[1]||=e=>C.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(h),{modelValue:w.value,"onUpdate:modelValue":i[2]||=e=>w.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(O)(`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:f(()=>[r(l(g),{"available-voices":A.value,"generate-speech":j,"api-key-configured":k.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof v==`function`&&v(S);var C=S;export{C as default}; \ No newline at end of file diff --git a/assets/anthropic-CLnNuWBX.js b/assets/anthropic-CbFYT849.js similarity index 88% rename from assets/anthropic-CLnNuWBX.js rename to assets/anthropic-CbFYT849.js index 230e54c54def44393a68b0555a0f118d23811cd0..f38d80854d8aa78a7ebf10c216cd52a36aedb96c 100644 --- a/assets/anthropic-CLnNuWBX.js +++ b/assets/anthropic-CbFYT849.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,onMounted as o,openBlock as s,storeToRefs as c,toDisplayString as l,unref as u,useI18n as d,useRouter as f,watch as p,withCtx as m}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as h}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as g,ProviderApiKeyInput_default as _,ProviderBaseUrlInput_default as v,ProviderBasicSettings_default as y,ProviderSettingsContainer_default as b,ProviderSettingsLayout_default as x}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as S}from"./route-block--T8TG4is.js";const C={bg:`orange-50 dark:orange-900/20`,"rounded-xl":``,"p-4":``,flex:`~ col gap-3`},w={"text-xl":``,"font-semibold":``,text:`orange-700 dark:orange-500`},T={underline:``,href:`https://docs.anthropic.com/en/api/openai-sdk`},E=`anthropic`;var D=a({__name:`anthropic`,setup(a){let{t:S}=d(),D=f(),O=h(),{providers:k}=c(O),A=e(()=>O.getProviderMetadata(E)),j=e({get:()=>{var e;return(e=k.value[E])?.apiKey||``},set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=e({get:()=>{var e;return(e=k.value[E])?.baseUrl||`https://api.anthropic.com/v1/`},set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});o(()=>{var e,t;k.value[E]||(k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}),j.value=(e=k.value[E])?.apiKey||``,M.value=(t=k.value[E])?.baseUrl||`https://api.anthropic.com/v1/`}),p([j,M],()=>{k.value[E]={...k.value[E],apiKey:j.value,baseUrl:M.value||`https://api.anthropic.com/v1/`}});function N(){k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}}return(e,a)=>{var o,c;return s(),n(u(x),{"provider-name":(o=A.value)?.localizedName||`Anthropic | Claude`,"provider-icon":(c=A.value)?.icon,"on-back":()=>u(D).back()},{default:m(()=>[t(`div`,C,[t(`h2`,w,l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),t(`p`,null,[r(l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),t(`a`,T,l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),r(`, `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),a[2]||=t(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),r(` `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),t(`p`,null,[r(l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),a[3]||=t(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),r(` `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),i(u(b),null,{default:m(()=>[i(u(y),{title:u(S)(`settings.pages.providers.common.section.basic.title`),description:u(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:m(()=>{var e;return[i(u(_),{modelValue:j.value,"onUpdate:modelValue":a[0]||=e=>j.value=e,"provider-name":(e=A.value)?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),i(u(g),{title:u(S)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[i(u(v),{modelValue:M.value,"onUpdate:modelValue":a[1]||=e=>M.value=e,placeholder:`https://api.anthropic.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof S==`function`&&S(D);var O=D;export{O as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,onMounted as o,openBlock as s,storeToRefs as c,toDisplayString as l,unref as u,useI18n as d,useRouter as f,watch as p,withCtx as m}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as h}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as g,ProviderApiKeyInput_default as _,ProviderBaseUrlInput_default as v,ProviderBasicSettings_default as y,ProviderSettingsContainer_default as b,ProviderSettingsLayout_default as x}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as S}from"./route-block--T8TG4is.js";const C={bg:`orange-50 dark:orange-900/20`,"rounded-xl":``,"p-4":``,flex:`~ col gap-3`},w={"text-xl":``,"font-semibold":``,text:`orange-700 dark:orange-500`},T={underline:``,href:`https://docs.anthropic.com/en/api/openai-sdk`},E=`anthropic`;var D=a({__name:`anthropic`,setup(a){let{t:S}=d(),D=f(),O=h(),{providers:k}=c(O),A=e(()=>O.getProviderMetadata(E)),j=e({get:()=>{var e;return(e=k.value[E])?.apiKey||``},set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=e({get:()=>{var e;return(e=k.value[E])?.baseUrl||`https://api.anthropic.com/v1/`},set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});o(()=>{var e,t;k.value[E]||(k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}),j.value=(e=k.value[E])?.apiKey||``,M.value=(t=k.value[E])?.baseUrl||`https://api.anthropic.com/v1/`}),p([j,M],()=>{k.value[E]={...k.value[E],apiKey:j.value,baseUrl:M.value||`https://api.anthropic.com/v1/`}});function N(){k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}}return(e,a)=>{var o,c;return s(),n(u(x),{"provider-name":(o=A.value)?.localizedName||`Anthropic | Claude`,"provider-icon":(c=A.value)?.icon,"on-back":()=>u(D).back()},{default:m(()=>[t(`div`,C,[t(`h2`,w,l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),t(`p`,null,[r(l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),t(`a`,T,l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),r(`, `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),a[2]||=t(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),r(` `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),t(`p`,null,[r(l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),a[3]||=t(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),r(` `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),i(u(b),null,{default:m(()=>[i(u(y),{title:u(S)(`settings.pages.providers.common.section.basic.title`),description:u(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:m(()=>{var e;return[i(u(_),{modelValue:j.value,"onUpdate:modelValue":a[0]||=e=>j.value=e,"provider-name":(e=A.value)?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),i(u(g),{title:u(S)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[i(u(v),{modelValue:M.value,"onUpdate:modelValue":a[1]||=e=>M.value=e,placeholder:`https://api.anthropic.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof S==`function`&&S(D);var O=D;export{O as default}; \ No newline at end of file diff --git a/assets/appearance-DBeyZLwP.js b/assets/appearance-Bl3T7BtW.js similarity index 80% rename from assets/appearance-DBeyZLwP.js rename to assets/appearance-Bl3T7BtW.js index 54d5e1992b467e63666d310a1af378d8d5a9e801..e63c9da353180d15fafcca976b2cb58fd67f84f3 100644 --- a/assets/appearance-DBeyZLwP.js +++ b/assets/appearance-Bl3T7BtW.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,normalizeStyle as o,openBlock as s,renderList as c,resolveDirective as l,unref as u,useI18n as d,withDirectives as f}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{IconItem_default as p}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as m}from"./route-block--T8TG4is.js";const h={flex:`~ col gap-4`,"font-normal":``},g={flex:`~ col gap-4`},_={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":``},v={text:`60`,"i-solar:settings-bold-duotone":``};var y=a({__name:`index`,setup(a){let{t:m}=d(),y=t(()=>[{title:m(`settings.pages.themes.general.title`),description:m(`settings.pages.themes.general.description`),icon:`i-solar:emoji-funny-square-bold-duotone`,to:`/settings/appearance/general`},{title:m(`settings.pages.themes.color-scheme.title`),description:m(`settings.pages.themes.color-scheme.description`),icon:`i-solar:pallete-2-bold-duotone`,to:`/settings/appearance/color-scheme`},{title:m(`settings.pages.themes.developer.title`),description:m(`settings.pages.themes.developer.description`),icon:`i-solar:code-bold-duotone`,to:`/settings/appearance/developer`}]);return(t,a)=>{let d=l(`motion`);return s(),i(`div`,h,[a[0]||=n(`div`,null,null,-1),n(`div`,g,[(s(!0),i(e,null,c(y.value,(e,t)=>f((s(),r(u(p),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:o({transitionDelay:`${t*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[d]])),128))]),f((s(),i(`div`,_,[f(n(`div`,v,null,512),[[d]])])),[[d]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,normalizeStyle as o,openBlock as s,renderList as c,resolveDirective as l,unref as u,useI18n as d,withDirectives as f}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{IconItem_default as p}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as m}from"./route-block--T8TG4is.js";const h={flex:`~ col gap-4`,"font-normal":``},g={flex:`~ col gap-4`},_={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":``},v={text:`60`,"i-solar:settings-bold-duotone":``};var y=a({__name:`index`,setup(a){let{t:m}=d(),y=t(()=>[{title:m(`settings.pages.themes.general.title`),description:m(`settings.pages.themes.general.description`),icon:`i-solar:emoji-funny-square-bold-duotone`,to:`/settings/appearance/general`},{title:m(`settings.pages.themes.color-scheme.title`),description:m(`settings.pages.themes.color-scheme.description`),icon:`i-solar:pallete-2-bold-duotone`,to:`/settings/appearance/color-scheme`},{title:m(`settings.pages.themes.developer.title`),description:m(`settings.pages.themes.developer.description`),icon:`i-solar:code-bold-duotone`,to:`/settings/appearance/developer`}]);return(t,a)=>{let d=l(`motion`);return s(),i(`div`,h,[a[0]||=n(`div`,null,null,-1),n(`div`,g,[(s(!0),i(e,null,c(y.value,(e,t)=>f((s(),r(u(p),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:o({transitionDelay:`${t*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[d]])),128))]),f((s(),i(`div`,_,[f(n(`div`,v,null,512),[[d]])])),[[d]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default}; \ No newline at end of file diff --git a/assets/audio-ablSksVU.js b/assets/audio-B0s8-AFI.js similarity index 89% rename from assets/audio-ablSksVU.js rename to assets/audio-B0s8-AFI.js index 5f7713f37181c11927643d39634a9e95dd286176..5310faa042264f26a3f7dd3e9794bb293ffa1a7a 100644 --- a/assets/audio-ablSksVU.js +++ b/assets/audio-B0s8-AFI.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,ref as i}from"./index-Dor8PgzM.js";var a=n({__name:`audio`,setup(n){let a=i(),o=i();function s(e){var t,n;if(!e)return;let r=(t=o.value)==null||(t=t.files)==null?void 0:t[0];if(!r)return;let i=document.createElement(`audio`);(n=a.value)?.appendChild(i),i.src=URL.createObjectURL(r),i.controls=!0,i.load(),i.play()}return(n,i)=>(r(),t(`div`,null,[e(`div`,null,[e(`div`,{ref_key:`containerRef`,ref:a},null,512),e(`input`,{ref_key:`fileInputRef`,ref:o,type:`file`,onChange:s},null,544)])]))}}),o=a;export{o as default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,ref as i}from"./index-C-t5bjx6.js";var a=n({__name:`audio`,setup(n){let a=i(),o=i();function s(e){var t,n;if(!e)return;let r=(t=o.value)==null||(t=t.files)==null?void 0:t[0];if(!r)return;let i=document.createElement(`audio`);(n=a.value)?.appendChild(i),i.src=URL.createObjectURL(r),i.controls=!0,i.load(),i.play()}return(n,i)=>(r(),t(`div`,null,[e(`div`,null,[e(`div`,{ref_key:`containerRef`,ref:a},null,512),e(`input`,{ref_key:`fileInputRef`,ref:o,type:`file`,onChange:s},null,544)])]))}}),o=a;export{o as default}; \ No newline at end of file diff --git a/assets/audio-record-D3btUW_B.js b/assets/audio-record-COiXC0pt.js similarity index 85% rename from assets/audio-record-D3btUW_B.js rename to assets/audio-record-COiXC0pt.js index f63b2fb1ab28afa0424454c89633b642fe8839fe..fb6806ceb08002effc7f0ddeebedd8506348a054 100644 --- a/assets/audio-record-D3btUW_B.js +++ b/assets/audio-record-COiXC0pt.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,isRef as c,onMounted as l,onUnmounted as u,openBlock as d,ref as f,renderList as p,toDisplayString as m,toRef as h,unref as g,until as _,useDevicesList as v,useUserMedia as y,watch as b,withCtx as x}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import{Button_default as S}from"./Button-C9y21VLy.js";import{Option_default as C,Select_default as w}from"./src-BnFQ5wFr.js";import"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";function T(){var e;let n=v({constraints:{audio:!0},requestPermissions:!1}),r=f((e=n.audioInputs.value[0])?.deviceId||``),i=f(),a=t(()=>n.audioInputs.value),o=f({audio:!0}),s=y({constraints:o,autoSwitch:!0,enabled:!1});async function c(){n.permissionGranted.value||n.isSupported.value&&await n.ensurePermissions()}b(r,()=>{r.value&&(o.value={audio:{deviceId:{exact:r.value}}})},{immediate:!0}),b(n.audioInputs,()=>{i.value=a.value.find(e=>e.deviceId===r.value)},{immediate:!0}),b([n.permissionGranted,a,r],async()=>{await c(),n.permissionGranted.value&&a.value.length!==0&&(i.value||=a.value[0])},{immediate:!0});async function l(){await c(),n.permissionGranted.value&&i.value&&(s.enabled.value&&s.restart(),s.start())}function u(){s.stop()}return{selectedAudioInputId:r,selectedAudioInput:i,audioInputs:a,start:l,stop:u,request:c,media:s}}function E(e,t=()=>Promise.resolve()){let n=f(),r=h(e);async function i(){if(await t(),await _(r).toBeTruthy(),!r.value){console.error(`No media media available`);return}n.value=new MediaRecorder(r.value),n.value.start()}function a(){n.value&&(n.value.stop(),n.value.ondataavailable=e=>{let t=e.data,n=URL.createObjectURL(t),r=new Audio(n);r.play()})}return{startRecord:i,stopRecord:a}}const D={class:`mt-4 w-full flex justify-center gap-2`};var O=s({__name:`audio-record`,setup(t){let{audioInputs:s,selectedAudioInputId:f,start:h,stop:_,media:v,request:y}=T(),{startRecord:b,stopRecord:O}=E(v.stream,h);return l(()=>y()),u(()=>_()),(t,l)=>(d(),i(`div`,null,[o(g(w),{modelValue:g(f),"onUpdate:modelValue":l[0]||=e=>c(f)?f.value=e:null,onChange:l[1]||=()=>g(h)()},{default:x(({value:e})=>{var t;return[n(`div`,null,m(e?(t=g(s).find(t=>t.deviceId===e))?.label:`Select Audio Input`),1)]}),options:x(({hide:t})=>[(d(!0),i(e,null,p(g(s),e=>(d(),r(g(C),{key:e.deviceId,value:e.deviceId,active:e.deviceId===g(f),onClick:e=>t()},{default:x(()=>[a(m(e.label),1)]),_:2},1032,[`value`,`active`,`onClick`]))),128))]),_:1},8,[`modelValue`]),n(`div`,D,[o(g(S),{onClick:g(b)},{default:x(()=>l[2]||=[a(` Start Recording `)]),_:1,__:[2]},8,[`onClick`]),o(g(S),{onClick:g(O)},{default:x(()=>l[3]||=[a(` Stop Recording `)]),_:1,__:[3]},8,[`onClick`])])]))}}),k=O;export{k as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,isRef as c,onMounted as l,onUnmounted as u,openBlock as d,ref as f,renderList as p,toDisplayString as m,toRef as h,unref as g,until as _,useDevicesList as v,useUserMedia as y,watch as b,withCtx as x}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import{Button_default as S}from"./Button-DE0e46lv.js";import{Option_default as C,Select_default as w}from"./src-B9Iy8991.js";import"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";function T(){var e;let n=v({constraints:{audio:!0},requestPermissions:!1}),r=f((e=n.audioInputs.value[0])?.deviceId||``),i=f(),a=t(()=>n.audioInputs.value),o=f({audio:!0}),s=y({constraints:o,autoSwitch:!0,enabled:!1});async function c(){n.permissionGranted.value||n.isSupported.value&&await n.ensurePermissions()}b(r,()=>{r.value&&(o.value={audio:{deviceId:{exact:r.value}}})},{immediate:!0}),b(n.audioInputs,()=>{i.value=a.value.find(e=>e.deviceId===r.value)},{immediate:!0}),b([n.permissionGranted,a,r],async()=>{await c(),n.permissionGranted.value&&a.value.length!==0&&(i.value||=a.value[0])},{immediate:!0});async function l(){await c(),n.permissionGranted.value&&i.value&&(s.enabled.value&&s.restart(),s.start())}function u(){s.stop()}return{selectedAudioInputId:r,selectedAudioInput:i,audioInputs:a,start:l,stop:u,request:c,media:s}}function E(e,t=()=>Promise.resolve()){let n=f(),r=h(e);async function i(){if(await t(),await _(r).toBeTruthy(),!r.value){console.error(`No media media available`);return}n.value=new MediaRecorder(r.value),n.value.start()}function a(){n.value&&(n.value.stop(),n.value.ondataavailable=e=>{let t=e.data,n=URL.createObjectURL(t),r=new Audio(n);r.play()})}return{startRecord:i,stopRecord:a}}const D={class:`mt-4 w-full flex justify-center gap-2`};var O=s({__name:`audio-record`,setup(t){let{audioInputs:s,selectedAudioInputId:f,start:h,stop:_,media:v,request:y}=T(),{startRecord:b,stopRecord:O}=E(v.stream,h);return l(()=>y()),u(()=>_()),(t,l)=>(d(),i(`div`,null,[o(g(w),{modelValue:g(f),"onUpdate:modelValue":l[0]||=e=>c(f)?f.value=e:null,onChange:l[1]||=()=>g(h)()},{default:x(({value:e})=>{var t;return[n(`div`,null,m(e?(t=g(s).find(t=>t.deviceId===e))?.label:`Select Audio Input`),1)]}),options:x(({hide:t})=>[(d(!0),i(e,null,p(g(s),e=>(d(),r(g(C),{key:e.deviceId,value:e.deviceId,active:e.deviceId===g(f),onClick:e=>t()},{default:x(()=>[a(m(e.label),1)]),_:2},1032,[`value`,`active`,`onClick`]))),128))]),_:1},8,[`modelValue`]),n(`div`,D,[o(g(S),{onClick:g(b)},{default:x(()=>l[2]||=[a(` Start Recording `)]),_:1,__:[2]},8,[`onClick`]),o(g(S),{onClick:g(O)},{default:x(()=>l[3]||=[a(` Stop Recording `)]),_:1,__:[3]},8,[`onClick`])])]))}}),k=O;export{k as default}; \ No newline at end of file diff --git a/assets/background-remove-Bq9ik3yO.js b/assets/background-remove-DVVfI1Xi.js similarity index 94% rename from assets/background-remove-Bq9ik3yO.js rename to assets/background-remove-DVVfI1Xi.js index 686483a46835abc5210f792fd5e9084c427e22a7..85f2f779a2e6468693e06ae8374020a1bd293588 100644 --- a/assets/background-remove-Bq9ik3yO.js +++ b/assets/background-remove-DVVfI1Xi.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createVNode as a,defineComponent as o,normalizeStyle as s,onMounted as c,openBlock as l,ref as u,renderList as d,toDisplayString as f,unref as p}from"./index-Dor8PgzM.js";import"./src-BnFQ5wFr.js";import{InputFile_default as m}from"./InputFile-iVzJ4JTk.js";import{check as h}from"./webgpu-aYTuek9b.js";import{__webpack_exports__AutoModel as g,__webpack_exports__AutoProcessor as _,__webpack_exports__RawImage as v,__webpack_exports__env as y}from"./transformers.web-WZURbMoG.js";const b={flex:``,"flex-col":``,"items-center":``,"gap-4":``},x=[`disabled`],S={"h-full":``,"w-full":``,flex:``,"gap-2":``},C={w:`[50%]`,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"min-h":`120`,h:`auto`,"overflow-hidden":``,"rounded-lg":``},w=[`src`],T={w:`[50%]`,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"min-h":`120`,h:`auto`,relative:``,"overflow-hidden":``,"rounded-lg":``},E={key:0,bg:`black/50`,absolute:``,"inset-0":``,"z-10":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``},D={"mb-4":``,"text-white":``,"font-medium":``},O={bg:`gray-200/30`,w:`70%`,"h-2":``,"overflow-hidden":``,"rounded-full":``},k=[`src`],A={bg:`black/0 group-hover:black/20`,absolute:``,"inset-0":``,flex:``,"items-center":``,"justify-center":``,"transition-all":``,"duration-200":``},j=[`onClick`],M={key:1,absolute:``,"bottom-2":``,"right-2":``};var N=o({__name:`background-remove`,setup(o){let N=u(),P=u(),F=u(),I=u(),L=u(!1),R=u(0),z=u(),B=u(),V=u([]),H=t(()=>V.value.map(e=>URL.createObjectURL(e)));c(async()=>{try{if(!(await h()).supported)throw Error(`WebGPU is not supported in this browser.`);let e=`Xenova/modnet`;y.backends.onnx.wasm.proxy=!1,N.value??=await g.from_pretrained(e,{device:`webgpu`}),P.value??=await _.from_pretrained(e,{})}catch(e){F.value=e}I.value=!1});async function U(){if(!N.value||!P.value)return;L.value=!0,R.value=0,z.value=[];let e=H.value.length;for(let t=0;t=z.value.length||!V.value[e])return;let t=V.value[e].name,n=t.substring(0,t.lastIndexOf(`.`))||t,r=t.substring(t.lastIndexOf(`.`))||`.png`,i=`${n}-background-removed${r}`,a=document.createElement(`a`);a.href=z.value[e],a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}function G(){!z.value||z.value.length===0||z.value.forEach((e,t)=>{setTimeout(()=>W(t),t*100)})}return(t,o)=>(l(),i(`div`,b,[n(`button`,{bg:`neutral-100 dark:neutral-800`,"w-full":``,"cursor-pointer":``,"rounded-lg":``,"px-3":``,"py-2":``,disabled:L.value,onClick:U},f(L.value?`Processing...`:`Process`),9,x),n(`div`,S,[n(`div`,C,[(l(!0),i(e,null,d(H.value,(e,t)=>(l(),i(`img`,{key:t,src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,w))),128))]),n(`div`,T,[L.value?(l(),i(`div`,E,[n(`div`,D,f(R.value)+`% `,1),n(`div`,O,[n(`div`,{bg:`emerald-500`,"h-full":``,style:s({width:`${R.value}%`}),"transition-all":``,"duration-200":``},null,4)])])):r(``,!0),(l(!0),i(e,null,d(z.value,(e,t)=>(l(),i(`div`,{key:t,relative:``,class:`group`,"h-full":``,"w-full":``},[n(`img`,{src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,k),n(`div`,A,[n(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,"opacity-0":``,"transition-all":``,"duration-200":``,"group-hover:opacity-100":``,onClick:e=>W(t)},o[1]||=[n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[n(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4`})],-1)],8,j)])]))),128)),z.value&&z.value.length>1?(l(),i(`div`,M,[n(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,onClick:G},o[2]||=[n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[n(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12`})],-1)])])):r(``,!0)])]),a(p(m),{modelValue:V.value,"onUpdate:modelValue":o[0]||=e=>V.value=e,"w-full":``},null,8,[`modelValue`])]))}}),P=N;export{P as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createVNode as a,defineComponent as o,normalizeStyle as s,onMounted as c,openBlock as l,ref as u,renderList as d,toDisplayString as f,unref as p}from"./index-C-t5bjx6.js";import"./src-B9Iy8991.js";import{InputFile_default as m}from"./InputFile-WiujwxGd.js";import{check as h}from"./webgpu-aYTuek9b.js";import{__webpack_exports__AutoModel as g,__webpack_exports__AutoProcessor as _,__webpack_exports__RawImage as v,__webpack_exports__env as y}from"./transformers.web-DB6EOtf2.js";const b={flex:``,"flex-col":``,"items-center":``,"gap-4":``},x=[`disabled`],S={"h-full":``,"w-full":``,flex:``,"gap-2":``},C={w:`[50%]`,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"min-h":`120`,h:`auto`,"overflow-hidden":``,"rounded-lg":``},w=[`src`],T={w:`[50%]`,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"min-h":`120`,h:`auto`,relative:``,"overflow-hidden":``,"rounded-lg":``},E={key:0,bg:`black/50`,absolute:``,"inset-0":``,"z-10":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``},D={"mb-4":``,"text-white":``,"font-medium":``},O={bg:`gray-200/30`,w:`70%`,"h-2":``,"overflow-hidden":``,"rounded-full":``},k=[`src`],A={bg:`black/0 group-hover:black/20`,absolute:``,"inset-0":``,flex:``,"items-center":``,"justify-center":``,"transition-all":``,"duration-200":``},j=[`onClick`],M={key:1,absolute:``,"bottom-2":``,"right-2":``};var N=o({__name:`background-remove`,setup(o){let N=u(),P=u(),F=u(),I=u(),L=u(!1),R=u(0),z=u(),B=u(),V=u([]),H=t(()=>V.value.map(e=>URL.createObjectURL(e)));c(async()=>{try{if(!(await h()).supported)throw Error(`WebGPU is not supported in this browser.`);let e=`Xenova/modnet`;y.backends.onnx.wasm.proxy=!1,N.value??=await g.from_pretrained(e,{device:`webgpu`}),P.value??=await _.from_pretrained(e,{})}catch(e){F.value=e}I.value=!1});async function U(){if(!N.value||!P.value)return;L.value=!0,R.value=0,z.value=[];let e=H.value.length;for(let t=0;t=z.value.length||!V.value[e])return;let t=V.value[e].name,n=t.substring(0,t.lastIndexOf(`.`))||t,r=t.substring(t.lastIndexOf(`.`))||`.png`,i=`${n}-background-removed${r}`,a=document.createElement(`a`);a.href=z.value[e],a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}function G(){!z.value||z.value.length===0||z.value.forEach((e,t)=>{setTimeout(()=>W(t),t*100)})}return(t,o)=>(l(),i(`div`,b,[n(`button`,{bg:`neutral-100 dark:neutral-800`,"w-full":``,"cursor-pointer":``,"rounded-lg":``,"px-3":``,"py-2":``,disabled:L.value,onClick:U},f(L.value?`Processing...`:`Process`),9,x),n(`div`,S,[n(`div`,C,[(l(!0),i(e,null,d(H.value,(e,t)=>(l(),i(`img`,{key:t,src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,w))),128))]),n(`div`,T,[L.value?(l(),i(`div`,E,[n(`div`,D,f(R.value)+`% `,1),n(`div`,O,[n(`div`,{bg:`emerald-500`,"h-full":``,style:s({width:`${R.value}%`}),"transition-all":``,"duration-200":``},null,4)])])):r(``,!0),(l(!0),i(e,null,d(z.value,(e,t)=>(l(),i(`div`,{key:t,relative:``,class:`group`,"h-full":``,"w-full":``},[n(`img`,{src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,k),n(`div`,A,[n(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,"opacity-0":``,"transition-all":``,"duration-200":``,"group-hover:opacity-100":``,onClick:e=>W(t)},o[1]||=[n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[n(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4`})],-1)],8,j)])]))),128)),z.value&&z.value.length>1?(l(),i(`div`,M,[n(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,onClick:G},o[2]||=[n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[n(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12`})],-1)])])):r(``,!0)])]),a(p(m),{modelValue:V.value,"onUpdate:modelValue":o[0]||=e=>V.value=e,"w-full":``},null,8,[`modelValue`])]))}}),P=N;export{P as default}; \ No newline at end of file diff --git a/assets/chat-kDuZ8L8x.js b/assets/chat-C7uR1EUr.js similarity index 99% rename from assets/chat-kDuZ8L8x.js rename to assets/chat-C7uR1EUr.js index b1e5b52544788fd983df0ba18957925e8f7332a6..f6cde547834cefa860cc6e83ac5d0acf340db8b6 100644 --- a/assets/chat-kDuZ8L8x.js +++ b/assets/chat-C7uR1EUr.js @@ -1,3 +1,3 @@ -var e=function(exports){function t(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function n(e,n,r){return e.set(t(e,n),r),r}function r(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function i(e,t,n){r(e,t),t.set(e,n)}function a(e,n){return e.get(t(e,n))}return exports.classPrivateFieldGet2=a,exports.classPrivateFieldInitSpec=i,exports.classPrivateFieldSet2=n,exports}({});import{Fragment as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,defineComponent as a,isRef as o,openBlock as s,ref as c,renderList as l,toDisplayString as u,toRaw as d,unref as f,useLocalStorage as p,vModelText as m,withDirectives as h}from"./index-Dor8PgzM.js";import{streamText as g}from"./dist-F6JCieW1.js";var _,v,y;let b;const x=()=>{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(t,n){e=t;try{return n()}finally{e=null}}}},S=new WeakMap,C=new WeakMap;let w=0,T=0;const E=e=>{let t=`${w++}`,n={debugLabel:e?.debugLabel??t,include:e=>r.has(e),with:i=>{let a=`${T++}`,o={[Symbol.toStringTag]:e?.debugLabel??`WorkflowEvent(${t}.${a})`,toString:()=>e?.debugLabel?e.debugLabel:`WorkflowEvent(${t}.${a})`,toJSON:()=>({type:e?.debugLabel?e.debugLabel:t,data:i}),get data(){return i}};return r.add(o),C.set(o,n),o}},r=new WeakSet;S.set(n,r),Object.defineProperty(n,Symbol.toStringTag,{get:()=>n?.debugLabel??`WorkflowEvent<${t}>`}),Object.defineProperty(n,`displayName`,{value:n?.debugLabel??`WorkflowEvent<${t}>`});let i=e?.uniqueId;return Object.defineProperty(n,`uniqueId`,{get:()=>(i||=t,i),set:()=>{throw Error(`uniqueId is readonly`)}}),n.toString=()=>e?.debugLabel??`WorkflowEvent<${t}>`,n},D=e=>typeof e==`object`&&e?S.has(e):!1,O=e=>typeof e==`object`&&e?C.get(e):void 0,k=e=>typeof e==`object`&&!!e&&`data`in e,A=e=>e!=null&&typeof e.then==`function`;function j(e,t){let n=Array(e.length);for(let r of t)for(let t=0;t(e.add(t),()=>{e.delete(t)}),publish:(...t)=>{let n=[];for(let r of e)n.push(r(...t));return n}};return M.set(t,e),t}var F=class extends TransformStream{constructor(){super({transform:(e,t)=>{O(e)&&t.enqueue(JSON.stringify({data:e.data,uniqueId:O(e).uniqueId})+` +var e=function(exports){function t(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function n(e,n,r){return e.set(t(e,n),r),r}function r(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function i(e,t,n){r(e,t),t.set(e,n)}function a(e,n){return e.get(t(e,n))}return exports.classPrivateFieldGet2=a,exports.classPrivateFieldInitSpec=i,exports.classPrivateFieldSet2=n,exports}({});import{Fragment as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,defineComponent as a,isRef as o,openBlock as s,ref as c,renderList as l,toDisplayString as u,toRaw as d,unref as f,useLocalStorage as p,vModelText as m,withDirectives as h}from"./index-C-t5bjx6.js";import{streamText as g}from"./dist-F6JCieW1.js";var _,v,y;let b;const x=()=>{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(t,n){e=t;try{return n()}finally{e=null}}}},S=new WeakMap,C=new WeakMap;let w=0,T=0;const E=e=>{let t=`${w++}`,n={debugLabel:e?.debugLabel??t,include:e=>r.has(e),with:i=>{let a=`${T++}`,o={[Symbol.toStringTag]:e?.debugLabel??`WorkflowEvent(${t}.${a})`,toString:()=>e?.debugLabel?e.debugLabel:`WorkflowEvent(${t}.${a})`,toJSON:()=>({type:e?.debugLabel?e.debugLabel:t,data:i}),get data(){return i}};return r.add(o),C.set(o,n),o}},r=new WeakSet;S.set(n,r),Object.defineProperty(n,Symbol.toStringTag,{get:()=>n?.debugLabel??`WorkflowEvent<${t}>`}),Object.defineProperty(n,`displayName`,{value:n?.debugLabel??`WorkflowEvent<${t}>`});let i=e?.uniqueId;return Object.defineProperty(n,`uniqueId`,{get:()=>(i||=t,i),set:()=>{throw Error(`uniqueId is readonly`)}}),n.toString=()=>e?.debugLabel??`WorkflowEvent<${t}>`,n},D=e=>typeof e==`object`&&e?S.has(e):!1,O=e=>typeof e==`object`&&e?C.get(e):void 0,k=e=>typeof e==`object`&&!!e&&`data`in e,A=e=>e!=null&&typeof e.then==`function`;function j(e,t){let n=Array(e.length);for(let r of t)for(let t=0;t(e.add(t),()=>{e.delete(t)}),publish:(...t)=>{let n=[];for(let r of e)n.push(r(...t));return n}};return M.set(t,e),t}var F=class extends TransformStream{constructor(){super({transform:(e,t)=>{O(e)&&t.enqueue(JSON.stringify({data:e.data,uniqueId:O(e).uniqueId})+` `)}})}},I=(_=new WeakMap,class extends TransformStream{constructor(t){super({transform:(t,n)=>{let r=t.split(` `).map(e=>e.trim()).filter(e=>e.length>0);r.forEach(t=>{let r=JSON.parse(t),i=Object.values(e.classPrivateFieldGet2(_,this)).find(e=>e.uniqueId===r.uniqueId);if(i){let e=i.with(r.data);n.enqueue(e)}else console.warn(`Unknown event: ${r.uniqueId}`)})}}),e.classPrivateFieldInitSpec(this,_,void 0),e.classPrivateFieldSet2(_,this,t)}}),L=(v=new WeakMap,y=new WeakMap,b=Symbol.asyncIterator,class t extends ReadableStream{on(t,n){return e.classPrivateFieldGet2(y,this).subscribe(e=>{t.include(e)&&n(e)})}constructor(t,n){if(!t&&!n)throw TypeError(`Either subscribable or root stream must be provided`);if(super(),e.classPrivateFieldInitSpec(this,v,void 0),e.classPrivateFieldInitSpec(this,y,void 0),t){e.classPrivateFieldSet2(y,this,t);let r;e.classPrivateFieldSet2(v,this,n??new ReadableStream({start:e=>{r=t.subscribe(t=>{e.enqueue(t)})},cancel:()=>{r()}}))}else{e.classPrivateFieldSet2(y,this,P()),e.classPrivateFieldSet2(v,this,n.pipeThrough(new TransformStream({transform:(t,n)=>{e.classPrivateFieldGet2(y,this).publish(t),n.enqueue(t)}})));return}}static fromReadableStream(e){return new t(null,e.pipeThrough(new TransformStream({transform:(e,t)=>{t.enqueue(e)}})))}static fromResponse(e,n){let r=e.body;if(!r)throw Error(`Response body is not readable`);return new t(null,r.pipeThrough(new TextDecoderStream).pipeThrough(new I(n)))}toResponse(t,n=new F){return new Response(e.classPrivateFieldGet2(v,this).pipeThrough(n).pipeThrough(new TextEncoderStream),t)}get locked(){return e.classPrivateFieldGet2(v,this).locked}[b](){return e.classPrivateFieldGet2(v,this)[Symbol.asyncIterator]()}cancel(t){return e.classPrivateFieldGet2(v,this).cancel(t)}getReader(){return e.classPrivateFieldGet2(v,this).getReader()}pipeThrough(n,r){let i=e.classPrivateFieldGet2(v,this).pipeThrough(n,r);return new t(null,i)}pipeTo(t,n){return e.classPrivateFieldGet2(v,this).pipeTo(t,n)}tee(){let[n,r]=e.classPrivateFieldGet2(v,this).tee();return[new t(e.classPrivateFieldGet2(y,this),n),new t(e.classPrivateFieldGet2(y,this),r)]}forEach(t){return e.classPrivateFieldGet2(v,this).pipeTo(new WritableStream({write:e=>{t(e)}}))}map(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(e(t))}}))}values(t){return e.classPrivateFieldGet2(v,this).values(t)}take(e){let t=0;return this.pipeThrough(new TransformStream({transform:(n,r)=>{t=e&&r.terminate()}}))}filter(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{(typeof e==`function`?e(t):D(e)?e.include(t):e===t)&&n.enqueue(t)}}))}until(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(t),(typeof e==`function`?e(t):D(e)?e.include(t):e===t)&&n.terminate()}}))}async toArray(){let e=[];return await this.pipeTo(new WritableStream({write:t=>{e.push(t)}})),e}});const R=x();function z(){let e=R.getStore();if(!e)throw Error(`No current context found`);return e}const B=x(),V=new WeakMap,H=({listeners:e})=>{let t=[],n=(e,t,n,r)=>{let c,l={get abortController(){return c||=new AbortController,c},async:`constructor`in e?e.constructor.name===`AsyncFunction`:!1,pending:null,handler:e,inputEvents:t,inputs:n,outputs:[],prev:r,next:new Set,get root(){return o}};l.prev.next.add(l);let u=i(l);B.run(l,()=>{let e=[...new Set([...N(s.__internal__call_context),...N(u.__internal__call_context)])];R.run(u,()=>{let t=0,n=r=>{if(t===e.length){let e;try{e=r.handler(...r.inputs)}catch(e){if(c??a)(c??a).abort(e);else throw console.error(`unhandled error in handler`,e),e}A(e)?(l.async=!0,l.pending=e.then(e=>(k(e)&&u.sendEvent(e),e))):k(e)&&u.sendEvent(e)}let i=e[t];i&&(t++,i(r,n))};n(l)})})},r=r=>{let i=[...t];[...e].filter(([e])=>{let t=j(e,i);return t.length===e.length}).map(([e,a])=>{let o=j(e,i);o.forEach(e=>{t.splice(t.indexOf(e),1)});for(let t of a)n(t,e,o,r)})},i=e=>{let n=null;return{get stream(){if(!n){let t=P();s.__internal__call_send_event.subscribe(n=>{let r=V.get(n);for(;r;){if(r===e){t.publish(n);break}r=r.prev}}),n=new L(t,null)}return n},get signal(){return e.abortController.signal},sendEvent:(...n)=>{n.forEach(n=>{V.set(n,e),e.outputs.push(n),t.push(n),s.__internal__call_send_event.publish(n,e),r(e)})},__internal__call_context:P(),__internal__call_send_event:P()}},a=new AbortController,o={get abortController(){return a||=new AbortController,a},async:!1,pending:null,inputEvents:[],inputs:[],outputs:[],handler:null,prev:null,next:new Set,get root(){return o}},s=i(o);return s},U=()=>{let e={steps:new Map};return{handle:(t,n)=>{if(e.steps.has(t)){let r=e.steps.get(t);r.add(n)}else{let r=new Set;r.add(n),e.steps.set(t,r)}},createContext(){return H({listeners:e.steps})}}};function W(e,t){let n=(...e)=>{let n=t.filter(([t])=>t.every((t,n)=>t.include(e[n]))).map(([e,t])=>t),r=z(),i=r.sendEvent;return(...e)=>{for(let t=0;tt.include(e[n])))return i(...e)}return console.warn(`Invalid input detected [%s]`,e.map(e=>e.data).join(`, `)),i(...e)}};return{...e,strictHandle:(t,n)=>{let r=(...e)=>{let t=z();return n(t.safeSendEvent,...e)};return e.handle(t,r)},createContext(){let t=e.createContext();return t.__internal__call_context.subscribe((e,t)=>{z().safeSendEvent=n(...e.inputs),t(e)}),t}}}async function G(e,t,n){let{stream:r,sendEvent:i}=e.createContext();i(t);let a=(await r.until(n).toArray()).at(-1);if(!a)throw Error(`No output event received`);return a}const K={flex:``,"flex-col":``,"gap-2":``},q={flex:`~ col`,"gap-2":``},J={flex:``,"flex-col":``,"gap-2":``},Y={grid:``,"grid-cols-2":``,"gap-2":``},X={flex:``,"items-center":``,"gap-2":``},Z={flex:``,"items-center":``,"gap-2":``},Q={flex:``,"items-center":``,"gap-2":``},$={key:0},ee={key:1};var te=a({__name:`chat`,setup(e){let a=p(`settings/llm/baseUrl`,`https://openrouter.ai/api/v1/`),_=p(`settings/llm/apiKey`,``),v=p(`settings/llm/model`,`openai/gpt-4o-mini`),y=c(``),b=c([]),x=c({role:`assistant`,content:``}),S=c(!1),C=E(),w=E(),T=E(),D=E(),O=E();async function k(){S.value=!0;try{let e=W(U(),[[[C],[w,O]],[[w],[T]],[[T],[D]]]);e.handle([C],async()=>{let{sendEvent:t}=e.createContext();x.value={role:`assistant`,content:``},b.value.push({role:`user`,content:y.value}),b.value.push(x.value);let n=await g({baseURL:a.value,apiKey:_.value,model:v.value,messages:b.value.slice(0,b.value.length-1).map(e=>d(e))});for await(let e of n.chunkStream)t(w.with(e.choices[0].delta.content||``));return O.with()}),e.handle([w],async e=>{x.value.content?x.value.content+=e.data:x.value.content=e.data}),await G(e,C.with(),O)}catch(e){console.error(e)}finally{S.value=!1}}return(e,c)=>(s(),i(`div`,K,[n(`div`,q,[n(`div`,J,[c[7]||=n(`div`,null,[n(`span`,{"text-neutral-500":``,"dark:text-neutral-400":``},`LLM`)],-1),n(`div`,Y,[n(`label`,X,[c[4]||=n(`span`,{"text-nowrap":``},` Base URL `,-1),h(n(`input`,{"onUpdate:modelValue":c[0]||=e=>o(a)?a.value=e: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),[[m,f(a)]])]),n(`label`,Z,[c[5]||=n(`span`,{"text-nowrap":``},` API Key `,-1),h(n(`input`,{"onUpdate:modelValue":c[1]||=e=>o(_)?_.value=e: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),[[m,f(_)]])]),n(`label`,Q,[c[6]||=n(`span`,{"text-nowrap":``},` Model `,-1),h(n(`input`,{"onUpdate:modelValue":c[2]||=e=>o(v)?v.value=e: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),[[m,f(v)]])])])]),n(`div`,null,[h(n(`textarea`,{"onUpdate:modelValue":c[3]||=e=>y.value=e,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),[[m,y.value]])]),n(`button`,{"rounded-lg":``,bg:`blue-100 dark:blue-900`,"px-4":``,"py-2":``,onClick:k},` Send `),n(`div`,null,[(s(!0),i(t,null,l(b.value,(e,t)=>(s(),i(`div`,{key:t},[e.role===`user`?(s(),i(`div`,$,[n(`span`,null,u(e.content),1)])):r(``,!0),e.role===`assistant`?(s(),i(`div`,ee,[n(`span`,null,u(e.content),1)])):r(``,!0)]))),128))])])]))}}),ne=te;export{ne as default}; \ No newline at end of file diff --git a/assets/cloudflare-workers-ai-uldf83tZ.js b/assets/cloudflare-workers-ai-CYDm84zU.js similarity index 84% rename from assets/cloudflare-workers-ai-uldf83tZ.js rename to assets/cloudflare-workers-ai-CYDm84zU.js index a360fa8ccfb66418bc63da7ee0468db15f3b665f..ba85c4e38658f9e0d62c019b0bb7a33d62b0f3f9 100644 --- a/assets/cloudflare-workers-ai-uldf83tZ.js +++ b/assets/cloudflare-workers-ai-CYDm84zU.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAccountIdInput_default as p,ProviderApiKeyInput_default as m,ProviderBasicSettings_default as h,ProviderSettingsContainer_default as g,ProviderSettingsLayout_default as _}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as v}from"./route-block--T8TG4is.js";const y=`cloudflare-workers-ai`;var b=r({__name:`cloudflare-workers-ai`,setup(r){let{t:v}=c(),b=l(),x=f(),{providers:S}=o(x),C=e(()=>x.getProviderMetadata(y)),w=e({get:()=>{var e;return(e=S.value[y])?.apiKey||``},set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=e({get:()=>{var e;return(e=S.value[y])?.accountId||``},set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});i(()=>{var e,t;x.initializeProvider(y),w.value=(e=S.value[y])?.apiKey||``,T.value=(t=S.value[y])?.accountId||``}),u([w,T],()=>{S.value[y]={...S.value[y],apiKey:w.value,accountId:T.value}});function E(){var e;S.value[y]={...(e=C.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(_),{"provider-name":(i=C.value)?.localizedName,"provider-icon-color":(o=C.value)?.iconColor,"on-back":()=>s(b).back()},{default:d(()=>[n(s(g),null,{default:d(()=>[n(s(h),{title:s(v)(`settings.pages.providers.common.section.basic.title`),description:s(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:d(()=>{var e;return[n(s(m),{modelValue:w.value,"onUpdate:modelValue":r[0]||=e=>w.value=e,"provider-name":(e=C.value)?.localizedName,placeholder:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),n(s(p),{modelValue:T.value,"onUpdate:modelValue":r[1]||=e=>T.value=e,label:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:s(v)(`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(b);var x=b;export{x as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAccountIdInput_default as p,ProviderApiKeyInput_default as m,ProviderBasicSettings_default as h,ProviderSettingsContainer_default as g,ProviderSettingsLayout_default as _}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as v}from"./route-block--T8TG4is.js";const y=`cloudflare-workers-ai`;var b=r({__name:`cloudflare-workers-ai`,setup(r){let{t:v}=c(),b=l(),x=f(),{providers:S}=o(x),C=e(()=>x.getProviderMetadata(y)),w=e({get:()=>{var e;return(e=S.value[y])?.apiKey||``},set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=e({get:()=>{var e;return(e=S.value[y])?.accountId||``},set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});i(()=>{var e,t;x.initializeProvider(y),w.value=(e=S.value[y])?.apiKey||``,T.value=(t=S.value[y])?.accountId||``}),u([w,T],()=>{S.value[y]={...S.value[y],apiKey:w.value,accountId:T.value}});function E(){var e;S.value[y]={...(e=C.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(_),{"provider-name":(i=C.value)?.localizedName,"provider-icon-color":(o=C.value)?.iconColor,"on-back":()=>s(b).back()},{default:d(()=>[n(s(g),null,{default:d(()=>[n(s(h),{title:s(v)(`settings.pages.providers.common.section.basic.title`),description:s(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:d(()=>{var e;return[n(s(m),{modelValue:w.value,"onUpdate:modelValue":r[0]||=e=>w.value=e,"provider-name":(e=C.value)?.localizedName,placeholder:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),n(s(p),{modelValue:T.value,"onUpdate:modelValue":r[1]||=e=>T.value=e,label:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:s(v)(`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(b);var x=b;export{x as default}; \ No newline at end of file diff --git a/assets/color-scheme-BR3byuGg.js b/assets/color-scheme-CkLbeWU6.js similarity index 91% rename from assets/color-scheme-BR3byuGg.js rename to assets/color-scheme-CkLbeWU6.js index 4f0cf200ad1fe0a26bc331a5b8636e466bb7dd60..e022377805358b67ea653d155dc24feae33b3c34 100644 --- a/assets/color-scheme-BR3byuGg.js +++ b/assets/color-scheme-CkLbeWU6.js @@ -1 +1 @@ -import{Fragment as e,__plugin_vue_export_helper_default as t,createBaseVNode as n,createBlock as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,openBlock as c,renderList as l,resolveDirective as u,toDisplayString as d,unref as f,useI18n as p,useSettings as m,vModelCheckbox as h,withCtx as g,withDirectives as _}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import{ColorHueRange_default as v}from"./src-BnFQ5wFr.js";import"./dist-B8MUgAeh.js";import{Section_default as y}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as b}from"./route-block--T8TG4is.js";import{ColorPalette_default as x}from"./ColorPalette-B5CDhrZt.js";var S=[[],[`#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`]];const C={flex:``,"items-center":``,"justify-between":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:300,delay:5*50,transition:`all ease-in-out duration-250`},w={"text-lg":``,"font-normal":``},T={relative:``,flex:``,"cursor-pointer":``,"items-center":``,"gap-2":``},E={class:`color-bar`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:320,delay:7*50,transition:`all ease-in-out duration-250`},D={"text-white":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:330,delay:8*50,transition:`all ease-in-out duration-250`},O={class:`color-bar transparency-grid`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:340,delay:9*50,transition:`all ease-in-out duration-250`},k=[`duration`,`delay`],A={"font-medium":``},j={text:`sm neutral-500`},M={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":``};var N=s({__name:`color-scheme`,setup(t){let s=m(),{t:b}=p();return(t,p)=>{let m=u(`motion`);return c(),i(e,null,[_((c(),r(f(y),{"mb-2":``,title:f(b)(`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:290,delay:4*50,transition:`all ease-in-out duration-250`},{default:g(()=>[_((c(),i(`div`,C,[n(`span`,w,d(t.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),n(`label`,T,[_(n(`input`,{"onUpdate:modelValue":p[0]||=e=>f(s).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[h,f(s).themeColorsHueDynamic]]),p[2]||=n(`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),a(` `+d(t.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[m]]),_(o(f(v),{modelValue:f(s).themeColorsHue,"onUpdate:modelValue":p[1]||=e=>f(s).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:6*50,disabled:f(s).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[m]]),_((c(),i(`div`,E,[p[4]||=n(`span`,{"bg-primary-50":``},`50`,-1),p[5]||=n(`span`,{"bg-primary-100":``},`100`,-1),p[6]||=n(`span`,{"bg-primary-200":``},`200`,-1),p[7]||=n(`span`,{"bg-primary-300":``},`300`,-1),p[8]||=n(`span`,{"bg-primary-400":``},`400`,-1),p[9]||=n(`span`,{"bg-primary-500":``},`500`,-1),_((c(),i(`div`,D,p[3]||=[n(`span`,{"bg-primary-600":``},`600`,-1),n(`span`,{"bg-primary-700":``},`700`,-1),n(`span`,{"bg-primary-800":``},`800`,-1),n(`span`,{"bg-primary-900":``},`900`,-1),n(`span`,{"bg-primary-950":``},`950`,-1)])),[[m]])])),[[m]]),_((c(),i(`div`,O,p[10]||=[n(`span`,{bg:`primary-500/5`},`500/5`,-1),n(`span`,{bg:`primary-500/10`},`500/10`,-1),n(`span`,{bg:`primary-500/20`},`500/20`,-1),n(`span`,{bg:`primary-500/30`},`500/30`,-1),n(`span`,{bg:`primary-500/40`},`500/40`,-1),n(`span`,{bg:`primary-500/50`},`500/50`,-1),n(`span`,{bg:`primary-500/60`},`500/60`,-1),n(`span`,{bg:`primary-500/70`},`500/70`,-1),n(`span`,{bg:`primary-500/80`},`500/80`,-1),n(`span`,{bg:`primary-500/90`},`500/90`,-1),n(`span`,{bg:`primary-500`},`500`,-1)])),[[m]])]),_:1},8,[`title`])),[[m]]),_((c(),r(f(y),{"mb-2":``,title:f(b)(`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:350,delay:10*50,transition:`all ease-in-out duration-250`},{default:g(()=>[(c(!0),i(e,null,l(t.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:e,description:r,colors:a},s)=>_((c(),i(`div`,{key:s,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:360+s*10,delay:11*50+s*50,transition:`all ease-in-out duration-250`},[n(`div`,null,[n(`span`,A,d(t.$rt(e)),1),n(`div`,j,d(t.$rt(r)),1)]),o(x,{colors:a.map((e,n)=>({hex:f(S)[s][n],name:t.$rt(e)}))},null,8,[`colors`])],8,k)),[[m]])),128))]),_:1},8,[`title`])),[[m]]),_((c(),i(`div`,M,p[11]||=[n(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[m]])],64)}}});typeof b==`function`&&b(N);var P=t(N,[[`__scopeId`,`data-v-8d079c31`]]);export{P as default}; \ No newline at end of file +import{Fragment as e,__plugin_vue_export_helper_default as t,createBaseVNode as n,createBlock as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,openBlock as c,renderList as l,resolveDirective as u,toDisplayString as d,unref as f,useI18n as p,useSettings as m,vModelCheckbox as h,withCtx as g,withDirectives as _}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import{ColorHueRange_default as v}from"./src-B9Iy8991.js";import"./dist-BeDGrW0v.js";import{Section_default as y}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as b}from"./route-block--T8TG4is.js";import{ColorPalette_default as x}from"./ColorPalette-C8KIoKTf.js";var S=[[],[`#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`]];const C={flex:``,"items-center":``,"justify-between":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:300,delay:5*50,transition:`all ease-in-out duration-250`},w={"text-lg":``,"font-normal":``},T={relative:``,flex:``,"cursor-pointer":``,"items-center":``,"gap-2":``},E={class:`color-bar`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:320,delay:7*50,transition:`all ease-in-out duration-250`},D={"text-white":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:330,delay:8*50,transition:`all ease-in-out duration-250`},O={class:`color-bar transparency-grid`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:340,delay:9*50,transition:`all ease-in-out duration-250`},k=[`duration`,`delay`],A={"font-medium":``},j={text:`sm neutral-500`},M={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":``};var N=s({__name:`color-scheme`,setup(t){let s=m(),{t:b}=p();return(t,p)=>{let m=u(`motion`);return c(),i(e,null,[_((c(),r(f(y),{"mb-2":``,title:f(b)(`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:290,delay:4*50,transition:`all ease-in-out duration-250`},{default:g(()=>[_((c(),i(`div`,C,[n(`span`,w,d(t.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),n(`label`,T,[_(n(`input`,{"onUpdate:modelValue":p[0]||=e=>f(s).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[h,f(s).themeColorsHueDynamic]]),p[2]||=n(`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),a(` `+d(t.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[m]]),_(o(f(v),{modelValue:f(s).themeColorsHue,"onUpdate:modelValue":p[1]||=e=>f(s).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:6*50,disabled:f(s).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[m]]),_((c(),i(`div`,E,[p[4]||=n(`span`,{"bg-primary-50":``},`50`,-1),p[5]||=n(`span`,{"bg-primary-100":``},`100`,-1),p[6]||=n(`span`,{"bg-primary-200":``},`200`,-1),p[7]||=n(`span`,{"bg-primary-300":``},`300`,-1),p[8]||=n(`span`,{"bg-primary-400":``},`400`,-1),p[9]||=n(`span`,{"bg-primary-500":``},`500`,-1),_((c(),i(`div`,D,p[3]||=[n(`span`,{"bg-primary-600":``},`600`,-1),n(`span`,{"bg-primary-700":``},`700`,-1),n(`span`,{"bg-primary-800":``},`800`,-1),n(`span`,{"bg-primary-900":``},`900`,-1),n(`span`,{"bg-primary-950":``},`950`,-1)])),[[m]])])),[[m]]),_((c(),i(`div`,O,p[10]||=[n(`span`,{bg:`primary-500/5`},`500/5`,-1),n(`span`,{bg:`primary-500/10`},`500/10`,-1),n(`span`,{bg:`primary-500/20`},`500/20`,-1),n(`span`,{bg:`primary-500/30`},`500/30`,-1),n(`span`,{bg:`primary-500/40`},`500/40`,-1),n(`span`,{bg:`primary-500/50`},`500/50`,-1),n(`span`,{bg:`primary-500/60`},`500/60`,-1),n(`span`,{bg:`primary-500/70`},`500/70`,-1),n(`span`,{bg:`primary-500/80`},`500/80`,-1),n(`span`,{bg:`primary-500/90`},`500/90`,-1),n(`span`,{bg:`primary-500`},`500`,-1)])),[[m]])]),_:1},8,[`title`])),[[m]]),_((c(),r(f(y),{"mb-2":``,title:f(b)(`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:350,delay:10*50,transition:`all ease-in-out duration-250`},{default:g(()=>[(c(!0),i(e,null,l(t.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:e,description:r,colors:a},s)=>_((c(),i(`div`,{key:s,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:360+s*10,delay:11*50+s*50,transition:`all ease-in-out duration-250`},[n(`div`,null,[n(`span`,A,d(t.$rt(e)),1),n(`div`,j,d(t.$rt(r)),1)]),o(x,{colors:a.map((e,n)=>({hex:f(S)[s][n],name:t.$rt(e)}))},null,8,[`colors`])],8,k)),[[m]])),128))]),_:1},8,[`title`])),[[m]]),_((c(),i(`div`,M,p[11]||=[n(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[m]])],64)}}});typeof b==`function`&&b(N);var P=t(N,[[`__scopeId`,`data-v-8d079c31`]]);export{P as default}; \ No newline at end of file diff --git a/assets/components-1m8YjNRO.js b/assets/components-DaLVZOhF.js similarity index 99% rename from assets/components-1m8YjNRO.js rename to assets/components-DaLVZOhF.js index 8f5cb099072211eb008493b69919355b87ced1cc..bc64bebe63e41fc2a1921ee22b6b7c1b6736cb10 100644 --- a/assets/components-1m8YjNRO.js +++ b/assets/components-DaLVZOhF.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-z9j0cN3P.js","assets/index-Dor8PgzM.js","assets/index-BtJ4BQCK.css","assets/default-node-EA9BojRq.js","assets/import-url-browser-D6kI1pk-.js","assets/import-url-browser-BPXUaBlv.js","assets/duckdb-mvp-C3i5IjU8.js","assets/import-url-node-CDn8y3R9.js"])))=>i.map(i=>d[i]); -var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{AdditiveBlending as t,AlwaysStencilFunc as n,AnimationMixer as r,Audio as i,AudioListener as a,AudioLoader as o,BackSide as s,Box2 as c,Box3 as l,BoxGeometry as u,BufferAttribute as d,BufferGeometry as f,CatmullRomCurve3 as p,ClampToEdgeWrapping as m,Color as h,CompressedTexture as g,CubeCamera as _,CubeReflectionMapping as v,CubeTextureLoader as y,CylinderGeometry as b,DataTexture as x,DataTextureLoader as S,DataUtils as C,DepthTexture as w,DoubleSide as T,EdgesGeometry as E,Ee as D,EquirectangularReflectionMapping as O,Euler as k,EventDispatcher as A,ExtrudeGeometry as j,FileLoader as M,Float32BufferAttribute as N,FloatType as ee,Fragment as P,FrontSide as F,Group as I,HalfFloatType as te,InstancedBufferGeometry as ne,InstancedInterleavedBuffer as L,InstancedMesh as re,InterleavedBuffer as R,InterleavedBufferAttribute as ie,InterpolateDiscrete as ae,InterpolateLinear as oe,Ir as se,Line as ce,Line3 as le,LineBasicMaterial as ue,LinearFilter as de,LinearMipmapLinearFilter as fe,LinearMipmapNearestFilter as pe,Loader as me,MOUSE as he,Material as ge,MathUtils as _e,Matrix3 as ve,Matrix4 as ye,Mesh as be,MeshBasicMaterial as xe,MeshDepthMaterial as Se,MeshStandardMaterial as Ce,MirroredRepeatWrapping as we,Mn as Te,NearestFilter as Ee,NearestMipmapLinearFilter as De,NearestMipmapNearestFilter as Oe,NoToneMapping as ke,Object3D as Ae,OctahedronGeometry as je,OrthographicCamera as Me,Path as Ne,PerspectiveCamera as Pe,Plane as Fe,PlaneGeometry as Ie,PropertyBinding as Le,Q as Re,QuadraticBezierCurve3 as ze,Quaternion as Be,REVISION as Ve,RGBAFormat as He,RawShaderMaterial as Ue,Ray as We,Raycaster as Ge,RepeatWrapping as Ke,ReplaceStencilOp as qe,Scene as Je,ShaderChunk as Ye,ShaderMaterial as Xe,Shape as Ze,ShapeGeometry as Qe,ShapePath as $e,ShapeUtils as et,SkinnedMesh as tt,Sphere as nt,SphereGeometry as rt,Spherical as it,TOUCH as at,Texture as ot,TextureLoader as st,TorusGeometry as ct,Transition as lt,Triangle as ut,Uniform as dt,UniformsLib as ft,UniformsUtils as pt,Vector2 as mt,Vector3 as z,Vector4 as ht,Vn as gt,WebGLCubeRenderTarget as _t,WebGLRenderTarget as vt,WebGLRenderer as yt,WireframeGeometry as bt,__commonJSMin as xt,__export as St,__plugin_vue_export_helper_default as Ct,__require as wt,__toDynamicImportESM as Tt,__toESM as Et,__vitePreload as Dt,breakpointsTailwind as Ot,computed as kt,createBaseVNode as B,createBlock as At,createCommentVNode as jt,createElementBlock as V,createTextVNode as Mt,createVNode as Nt,defineComponent as H,defu as Pt,dn as Ft,formatCss as It,formatHex as Lt,getCurrentInstance as Rt,getCurrentScope as zt,guardReactiveProps as Bt,inject as Vt,io as Ht,isReactive as Ut,isRef as Wt,mergeModels as Gt,mergeProps as Kt,nextTick as qt,normalizeClass as Jt,normalizeProps as Yt,normalizeStyle as Xt,oklch as Zt,onBeforeUnmount as Qt,onMounted as $t,onScopeDispose as en,onUnmounted as tn,openBlock as U,pe as nn,reactive as rn,ref as W,render as an,renderList as on,renderSlot as sn,resolveComponent as cn,resolveDirective as ln,shallowReactive as un,shallowRef as dn,so as fn,storeToRefs as pn,toDisplayString as mn,toRaw as hn,toRef as gn,toRefs as _n,toValue$1 as vn,unref as G,useAttrs as yn,useBreakpoints as bn,useDark as xn,useDebounceFn as Sn,useElementBounding as Cn,useI18n as wn,useModel as Tn,useRouter as En,useSettings as Dn,useSlots as On,useWindowSize as kn,vModelCheckbox as An,vModelRadio as jn,vModelSelect as Mn,vModelText as Nn,watch as K,watchDebounced as Pn,watchEffect as Fn,withAsyncContext as In,withCtx as Ln,withDirectives as Rn,withModifiers as zn}from"./index-Dor8PgzM.js";import{getImportUrlBundles as Bn}from"./import-url-browser-BPXUaBlv.js";import{generateSpeech as Vn,useAudioContext as Hn,useChatStore as Un,useProvidersStore as Wn,useSpeakingStore as Gn,useSpeechStore as Kn}from"./stores-BVVBBF04.js";import{Collapsable_default as qn,TransitionVertical_default as Jn}from"./Button-C9y21VLy.js";import{FieldCheckbox_default as Yn,FieldInput_default as Xn,Input_default as Zn}from"./src-BnFQ5wFr.js";import{EMOTION_EmotionMotionName_value as Qn,EMOTION_VRMExpressionName_value as $n,EmotionThinkMotionName as er,chromaticHue as tr,chromaticHueDefault as nr,llmInferenceEndToken as rr,useDelayMessageQueue as ir,useEmotionsMessageQueue as ar,useMessageContentQueue as or}from"./queues-BTBffrrj.js";import{VRMUtils as sr,clipFromVRMAnimation as cr,lerp as lr,loadVRMAnimation as ur,loadVrm as dr,randFloat as fr,randomSaccadeInterval as pr,useBlink as mr,useIdleEyeSaccades as hr,useMarkdown as gr,useVRMEmote as _r}from"./composables-BOdj-CMj.js";import{useQueue as vr}from"./queue-aUPoxb9G.js";var yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa;let oa,sa,ca,la;var ua=H({__name:`AudioSpectrum`,props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(e){let t=e,n=W(Array.from({length:t.bars}).fill(0));$t(()=>{r()}),K(()=>t.stream,()=>{r()});function r(){if(!t.stream)return;let e=new(window.AudioContext||window.webkitAudioContext),r=e.createMediaStreamSource(t.stream),i=e.createAnalyser();i.fftSize=2048,r.connect(i);let a=i.frequencyBinCount,o=new Uint8Array(a),s=e.sampleRate,c=s/i.fftSize,l=Math.floor(t.minFreq/c),u=Math.floor(t.maxFreq/c),d=u-l,f=Math.floor(d/t.bars),p=()=>{try{requestAnimationFrame(p),i.getByteFrequencyData(o);let e=Array.from({length:t.bars}).fill(0);for(let n=0;nsn(e.$slots,`default`,{frequencies:n.value})}}),da=ua;const fa={"h-full":``,flex:``,"items-center":``,"gap-1":``},pa=5;var ma=H({__name:`AudioSpectrumVisualizer`,props:{frequencies:null,barsClass:null},setup(e){let t=e;function n(e,t){let n=.1,r=1;return n+(r-n)*(e/t)}function r(e,r){let i=n(r,t.frequencies.length);return Math.min(100,Math.max(10,e*100*pa*i))}return(t,n)=>(U(),V(`div`,fa,[(U(!0),V(P,null,on(e.frequencies,(t,n)=>(U(),V(`div`,{key:n,"h-full":``,flex:``,"flex-1":``,"items-end":``},[B(`div`,{transition:`all 100 ease-in-out`,"mx-auto":``,"my-0":``,"w-full":``,"rounded-full":``,class:Jt(e.barsClass),style:Xt({height:`${r(t,n)}%`})},null,6)]))),128))]))}}),ha=ma;const ga={key:0,class:`mb-2 flex items-center justify-between`},_a={class:`text-sm font-medium`},va={class:`text-sm text-neutral-500`};var ya=H({__name:`LevelMeter`,props:{level:null,min:{default:0},max:{default:100},numBars:{default:20},label:{default:`Level`},unit:{default:`%`},height:{default:24},showHeader:{type:Boolean,default:!0},animationSpeed:{default:75},colorThresholds:{default:()=>[{value:60,color:`bg-green-500`},{value:80,color:`bg-yellow-500`},{value:100,color:`bg-red-500`}]},formatValue:{type:Function}},setup(e){let t=e,n=kt(()=>{let e=Math.max(0,Math.min(100,(t.level-t.min)/(t.max-t.min)*100)),n=Math.floor(e/100*t.numBars);return Array.from({length:t.numBars},(e,r)=>({active:re.value-t.value);for(let e of i)if(n<=e.value)return e.color;return(r=i[i.length-1])?.color||`bg-green-500`}return(t,i)=>(U(),V(`div`,null,[e.showHeader?(U(),V(`div`,ga,[B(`span`,_a,mn(e.label),1),B(`span`,va,mn(e.formatValue?e.formatValue(e.level):`${Math.round(e.level)}${e.unit}`),1)])):jt(``,!0),B(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 dark:bg-neutral-700`,style:Xt({height:`${e.height}px`})},[(U(!0),V(P,null,on(n.value,(t,n)=>(U(),V(`div`,{key:n,class:Jt([`flex-1 rounded-sm transition-all`,[t.active?r(n,t.level):`bg-neutral-200 dark:bg-neutral-600`,`duration-${e.animationSpeed}`]]),style:Xt({height:t.active?`100%`:`20%`})},null,6))),128))],4)]))}}),ba=ya,xa=H({__name:`Volumed`,props:{perspective:null,transform:null},setup(e){return(t,n)=>(U(),V(`div`,{class:`volumed`,style:Xt({perspective:`${e.perspective}px`,transform:e.transform})},[sn(t.$slots,`default`,{},void 0,!0)],4))}}),Sa=Ct(xa,[[`__scopeId`,`data-v-568551bc`]]),Ca=H({__name:`CursorMomentum`,props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(e,{expose:t}){let n=e,r=W(1),i=W(0),a=0,o=gn(()=>n.friction),s=gn(()=>n.baseSpeed),c=gn(()=>n.momentumFactor);function l(e){a||=e;let t=e-a;a=e,r.value=s.value+(r.value-s.value)*o.value,i.value+=r.value*t,requestAnimationFrame(l)}function u(e){let t=Math.sqrt(e.movementX**2+e.movementY**2);r.value+=t*c.value}return $t(()=>{window.addEventListener(`mousemove`,u),requestAnimationFrame(l)}),tn(()=>{window.removeEventListener(`mousemove`,u)}),t({momentum:r,currentValue:i}),(e,t)=>sn(e.$slots,`default`,{momentum:r.value,currentValue:i.value})}}),wa=Ca,Ta=H({__name:`TestDummyMarkerFlat`,props:{size:null},setup(e){return(t,n)=>(U(),V(`div`,{class:`test-dummy-flat`,style:Xt({width:`${e.size}px`,height:`${e.size}px`})},n[0]||=[B(`div`,{class:`marker`},null,-1)],4))}}),Ea=Ct(Ta,[[`__scopeId`,`data-v-b4ef37ac`]]),Da=H({__name:`TestDummyMarker`,setup(e){return(e,t)=>(U(),At(wa,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:Ln(({currentValue:e})=>[Nt(Sa,{perspective:800,transform:`rotateX(45deg) translateY(3px)`},{default:Ln(()=>[Nt(Ea,{size:24,style:Xt({transform:`rotate(${e}deg)`})},null,8,[`style`])]),_:2},1024)]),_:1}))}}),Oa=Da;const ka={key:0,class:`mb-2 flex items-center justify-between`},Aa={class:`text-sm font-medium`},ja={class:`text-sm text-neutral-500`},Ma={key:1,class:`mt-1 flex gap-3 text-xs text-neutral-500`},Na={class:`flex items-center gap-1`},Pa={class:`flex items-center gap-1`},Fa={class:`flex items-center gap-1`};var Ia=H({__name:`ThresholdMeter`,props:{value:null,threshold:null,min:{default:0},max:{default:1},numBars:{default:20},label:{default:`Value`},unit:{default:`%`},precision:{default:1},height:{default:24},showHeader:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},animationSpeed:{default:100},belowThresholdClass:{default:`bg-primary-300 dark:bg-primary-600`},aboveThresholdClass:{default:`bg-green-500`},thresholdBarClass:{default:`bg-white dark:bg-neutral-800`},inactiveBarClass:{default:`bg-neutral-300 dark:bg-neutral-600`},belowLabel:{default:`Below`},aboveLabel:{default:`Above`},thresholdLabel:{default:`Threshold`},formatValue:{type:Function}},setup(e){let t=e,n=kt(()=>{let e=Math.max(0,Math.min(1,(t.value-t.min)/(t.max-t.min))),n=Math.max(0,Math.min(1,(t.threshold-t.min)/(t.max-t.min))),r=Math.floor(e*t.numBars),i=Math.floor(n*t.numBars);return Array.from({length:t.numBars},(e,t)=>({active:t=i,isBelowThreshold:t(U(),V(`div`,null,[e.showHeader?(U(),V(`div`,ka,[B(`span`,Aa,mn(e.label),1),B(`span`,ja,mn(e.formatValue?e.formatValue(e.value):`${(e.value*100).toFixed(e.precision)}${e.unit}`),1)])):jt(``,!0),B(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 p-1 dark:bg-neutral-700`,style:Xt({height:`${e.height}px`})},[(U(!0),V(P,null,on(n.value,(t,n)=>(U(),V(`div`,{key:`threshold-${n}`,class:Jt([`flex-1 rounded-sm transition-all`,[t.isThreshold?e.thresholdBarClass:t.isAboveThreshold?e.aboveThresholdClass:t.isBelowThreshold?e.belowThresholdClass:e.inactiveBarClass,`duration-${e.animationSpeed}`]]),style:Xt({height:t.active||t.isThreshold?`100%`:`20%`})},null,6))),128))],4),e.showLegend?(U(),V(`div`,Ma,[B(`span`,Na,[B(`div`,{class:Jt(`inline-block h-0.5lh w-1lh rounded-full ${e.belowThresholdClass}`)},null,2),Mt(` `+mn(e.belowLabel),1)]),B(`span`,Pa,[B(`div`,{class:Jt(`inline-block h-0.5lh w-1lh rounded-full border border-neutral-400 ${e.thresholdBarClass}`)},null,2),Mt(` `+mn(e.thresholdLabel),1)]),B(`span`,Fa,[B(`div`,{class:Jt(`inline-block h-0.5lh w-1lh rounded-full ${e.aboveThresholdClass}`)},null,2),Mt(` `+mn(e.aboveLabel),1)])])):jt(``,!0)]))}}),La=Ia;function Ra(e){return{color:e,withAlpha:t=>{let n=Zt(e);if(!n)throw Error(`Invalid color provided for alpha adjustment`);return Ra(Zt({mode:`oklch`,l:n.l,c:n.c,h:n.h,alpha:t}))},toHex:()=>Lt(e),toCSS:()=>It(e)}}function za(e=200,t){let n=t??.18+Math.cos(e*Math.PI/180)*.04,r={50:{lightness:.95,chromaMultiplier:.3,mixWithWhite:.7},100:{lightness:.95,chromaMultiplier:.5,mixWithWhite:.2},200:{lightness:.9,chromaMultiplier:.6},300:{lightness:.85,chromaMultiplier:.75},400:{lightness:.74,chromaMultiplier:.85},500:{lightness:.62,chromaMultiplier:1},600:{lightness:.54,chromaMultiplier:1.15},700:{lightness:.49,chromaMultiplier:1.1},800:{lightness:.42,chromaMultiplier:.85},900:{lightness:.37,chromaMultiplier:.7},950:{lightness:.29,chromaMultiplier:.5}},i=(t,i,a=0)=>{let o=r[t],s=(e+a)%360,c=n*o.chromaMultiplier,l=Zt({mode:`oklch`,l:o.lightness,c,h:s,alpha:i??1});if(o.mixWithWhite){let e=Zt({mode:`oklch`,l:1,c:0,h:0,alpha:i??1});return Ra(Ba(l,e,o.mixWithWhite))}return Ra(l)};return{baseHue:e,chroma:n,getAllShades:(e,t=0)=>{let n={};for(let a of Object.keys(r)){let r=Number.parseInt(a);n[r]=i(r,e,t)}return n},shadeBy:i}}function Ba(e,t,n=.5){let r=Zt(e),i=Zt(t);if(!r||!i)throw Error(`Invalid colors provided for mixing`);return Zt({mode:`oklch`,l:r.l*(1-n)+i.l*n,c:r.c*(1-n)+i.c*n,h:Va(r.h??0,i.h??0,n)})}function Va(e,t,n){let r=t-e;return r>180&&(r-=360),r<-180&&(r+=360),(e+r*n+360)%360}const Ha={key:0,class:`flex items-center justify-between`},Ua={class:`text-sm font-medium`},Wa={class:`text-xs text-neutral-500`},Ga={class:`h-full w-full`},Ka={id:`below-threshold-gradient`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},qa=[`fill`],Ja=[`y`,`height`,`fill`],Ya=[`y1`,`y2`,`stroke`,`fill`],Xa=[`d`,`fill`],Za=[`d`,`stroke`,`stroke-width`],Qa={key:0,class:`absolute left-2 top-2 flex items-center gap-1.5 border border-primary-200 rounded-md bg-primary-50 px-2 py-1 dark:border-primary-800 dark:bg-primary-900`},$a={class:`text-xs text-primary-700 font-medium dark:text-primary-300`},eo={key:1,class:`flex flex-wrap items-center justify-between text-xs text-neutral-500`},to={class:`flex items-center gap-3`},no={class:`flex items-center gap-1 text-nowrap`},ro={class:`flex items-center gap-1 text-nowrap`},io={key:0,class:`text-nowrap`};var ao=H({__name:`TimeSeriesChart`,props:{history:null,currentValue:null,threshold:{default:null},isActive:{type:Boolean},title:{default:`Time Series`},colorsHue:null,lineColor:null,thresholdColor:null,activeColor:null,inactiveColor:null,subtitle:{default:`Recent data`},activeLabel:{default:`Active`},activeLegendLabel:{default:`Active state`},inactiveLegendLabel:{default:`Inactive state`},thresholdLabel:{default:`Threshold`},height:{default:80},lineWidth:{default:1.5},chartHeight:null,minDataPoints:{default:5},precision:{default:0},unit:{default:`%`},showHeader:{type:Boolean,default:!0},showThreshold:{type:Boolean,default:!0},showArea:{type:Boolean,default:!0},showThresholdAreas:{type:Boolean,default:!0},showCurrentValue:{type:Boolean,default:!0},showActiveIndicator:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},formatValue:{type:Function}},setup(e){let t=e,n=kt(()=>t.height),r=W(),i=Vt(tr,nr),a=gn(()=>t.colorsHue||i||nr),o=kt(()=>za(a.value)),s=Cn(r,{windowResize:!0});K([a,r],()=>{r.value&&r.value.style.setProperty(`--chromatic-hue`,a.value.toString())},{immediate:!0});let c=gn(()=>t.lineColor),l=kt(()=>c.value?c.value:o.value.shadeBy(500).toHex()),u=gn(()=>t.thresholdColor),d=kt(()=>{if(!u.value){let e=o.value.shadeBy(500).withAlpha(.1).color;return`oklch(${e.l} ${e.c} ${e.h} / ${e.alpha})`}return u.value}),f=gn(()=>t.activeColor),p=kt(()=>f.value?f.value:o.value.shadeBy(600).toHex()),m=gn(()=>t.inactiveColor),h=kt(()=>m.value?m.value:o.value.shadeBy(400).toHex()),g=Math.random().toString(36).substring(2,9),_=`grid-${g}`,v=`area-gradient-${g}`,y=`threshold-gradient-${g}`,b=kt(()=>t.threshold===null?0:Math.max(0,Math.min(1,t.threshold))),x=kt(()=>t.threshold===null?0:n.value-b.value*n.value),S=kt(()=>{let e=t.history;if(e.length<2)return``;let r=s.width.value,i=n.value,a=`M0,${i-e[0]*i}`;for(let t=1;t{let e=t.history;if(e.length<2)return``;let r=s.width.value,i=n.value,a=`M0,${i} L0,${i-e[0]*i}`;for(let t=1;te.history.length>e.minDataPoints?(U(),V(`div`,{key:0,ref_key:`timeSeriesChartRef`,ref:r,class:`time-series-chart space-y-3`},[e.showHeader?(U(),V(`div`,Ha,[B(`div`,Ua,mn(e.title),1),B(`div`,Wa,mn(e.subtitle),1)])):jt(``,!0),B(`div`,{class:`relative overflow-hidden border border-neutral-200 rounded-lg from-neutral-50 to-neutral-100 bg-gradient-to-b dark:border-neutral-800 dark:from-neutral-800 dark:to-neutral-900`,style:Xt({height:`${n.value}px`})},[(U(),V(`svg`,Ga,[B(`defs`,null,[B(`pattern`,{id:_,width:`20`,height:`10`,patternUnits:`userSpaceOnUse`},i[0]||=[B(`path`,{d:`M 20 0 L 0 0 0 10`,fill:`none`,stroke:`rgb(156 163 175 / 0.1)`,"stroke-width":`0.5`},null,-1)]),B(`linearGradient`,{id:v,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[B(`stop`,{offset:`0%`,style:Xt(`stop-color:${l.value};stop-opacity:0.3`)},null,4),B(`stop`,{offset:`50%`,style:Xt(`stop-color:${l.value};stop-opacity:0.15`)},null,4),B(`stop`,{offset:`100%`,style:Xt(`stop-color:${l.value};stop-opacity:0.05`)},null,4)]),B(`linearGradient`,{id:y,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[B(`stop`,{offset:`0%`,style:Xt(`stop-color:${p.value};stop-opacity:0.3`)},null,4),B(`stop`,{offset:`50%`,style:Xt(`stop-color:${p.value};stop-opacity:0.15`)},null,4),B(`stop`,{offset:`100%`,style:Xt(`stop-color:${p.value};stop-opacity:0.05`)},null,4)]),B(`linearGradient`,Ka,[B(`stop`,{offset:`0%`,style:Xt(`stop-color:${d.value};stop-opacity:0.2`)},null,4),B(`stop`,{offset:`50%`,style:Xt(`stop-color:${d.value};stop-opacity:0.1`)},null,4),B(`stop`,{offset:`100%`,style:Xt(`stop-color:${d.value};stop-opacity:0.05`)},null,4)])]),B(`rect`,{width:`100%`,height:`100%`,fill:`url(#${_})`},null,8,qa),e.showThreshold&&e.threshold!==null?(U(),V(`rect`,{key:0,x:`0`,y:x.value,width:`100%`,height:n.value-x.value,fill:d.value,class:`transition-all duration-300`},null,8,Ja)):jt(``,!0),e.showThreshold&&e.threshold!==null?(U(),V(`line`,{key:1,x1:`0`,y1:x.value,x2:`100%`,y2:x.value,stroke:d.value,"stroke-width":`1.5`,"stroke-dasharray":`4,4`,fill:d.value,class:`transition-all duration-300`},null,8,Ya)):jt(``,!0),C.value&&e.showArea?(U(),V(`path`,{key:2,d:C.value,fill:`url(#${v})`,class:`transition-all duration-75`},null,8,Xa)):jt(``,!0),S.value?(U(),V(`path`,{key:3,d:S.value,fill:`none`,stroke:l.value,"stroke-width":e.lineWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`drop-shadow-sm transition-all duration-75`},null,8,Za)):jt(``,!0)])),e.showCurrentValue?(U(),V(`div`,{key:0,class:Jt([`absolute right-2 top-2 border border-neutral-200 rounded-md bg-white px-2 py-1 shadow-sm transition-all duration-200 dark:border-neutral-700 dark:bg-neutral-800`,e.isActive?`bg-primary-50 dark:bg-primary-900 border-primary-200 dark:border-primary-800`:``])},[B(`div`,{class:Jt([`text-xs font-medium`,e.isActive?`text-primary-700 dark:text-primary-300`:`text-neutral-600 dark:text-neutral-400`])},mn(e.formatValue?e.formatValue(e.currentValue):`${(e.currentValue*100).toFixed(e.precision)}${e.unit}`),3)],2)):jt(``,!0),Nt(lt,{name:`fade`},{default:Ln(()=>[e.isActive&&e.showActiveIndicator?(U(),V(`div`,Qa,[i[1]||=B(`div`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary-500`},null,-1),B(`span`,$a,mn(e.activeLabel),1)])):jt(``,!0)]),_:1})],4),e.showLegend?(U(),V(`div`,eo,[B(`div`,to,[B(`span`,no,[B(`div`,{class:`h-2 w-2 rounded-full`,style:Xt({backgroundColor:p.value})},null,4),Mt(` `+mn(e.activeLegendLabel),1)]),B(`span`,ro,[B(`div`,{class:`h-2 w-2 rounded-full`,style:Xt({backgroundColor:h.value})},null,4),Mt(` `+mn(e.inactiveLegendLabel),1)])]),e.threshold===null?jt(``,!0):(U(),V(`span`,io,mn(e.thresholdLabel)+`: `+mn((e.threshold*100).toFixed(0))+`%`,1))])):jt(``,!0)],512)):jt(``,!0)}}),oo=Ct(ao,[[`__scopeId`,`data-v-6e84a8be`]]),so;(function(e){e[e.WEBGL_LEGACY=0]=`WEBGL_LEGACY`,e[e.WEBGL=1]=`WEBGL`,e[e.WEBGL2=2]=`WEBGL2`})(so||={});var co;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.WEBGL=1]=`WEBGL`,e[e.CANVAS=2]=`CANVAS`})(co||={});var lo;(function(e){e[e.COLOR=16384]=`COLOR`,e[e.DEPTH=256]=`DEPTH`,e[e.STENCIL=1024]=`STENCIL`})(lo||={});var uo;(function(e){e[e.NORMAL=0]=`NORMAL`,e[e.ADD=1]=`ADD`,e[e.MULTIPLY=2]=`MULTIPLY`,e[e.SCREEN=3]=`SCREEN`,e[e.OVERLAY=4]=`OVERLAY`,e[e.DARKEN=5]=`DARKEN`,e[e.LIGHTEN=6]=`LIGHTEN`,e[e.COLOR_DODGE=7]=`COLOR_DODGE`,e[e.COLOR_BURN=8]=`COLOR_BURN`,e[e.HARD_LIGHT=9]=`HARD_LIGHT`,e[e.SOFT_LIGHT=10]=`SOFT_LIGHT`,e[e.DIFFERENCE=11]=`DIFFERENCE`,e[e.EXCLUSION=12]=`EXCLUSION`,e[e.HUE=13]=`HUE`,e[e.SATURATION=14]=`SATURATION`,e[e.COLOR=15]=`COLOR`,e[e.LUMINOSITY=16]=`LUMINOSITY`,e[e.NORMAL_NPM=17]=`NORMAL_NPM`,e[e.ADD_NPM=18]=`ADD_NPM`,e[e.SCREEN_NPM=19]=`SCREEN_NPM`,e[e.NONE=20]=`NONE`,e[e.SRC_OVER=0]=`SRC_OVER`,e[e.SRC_IN=21]=`SRC_IN`,e[e.SRC_OUT=22]=`SRC_OUT`,e[e.SRC_ATOP=23]=`SRC_ATOP`,e[e.DST_OVER=24]=`DST_OVER`,e[e.DST_IN=25]=`DST_IN`,e[e.DST_OUT=26]=`DST_OUT`,e[e.DST_ATOP=27]=`DST_ATOP`,e[e.ERASE=26]=`ERASE`,e[e.SUBTRACT=28]=`SUBTRACT`,e[e.XOR=29]=`XOR`})(uo||={});var fo;(function(e){e[e.POINTS=0]=`POINTS`,e[e.LINES=1]=`LINES`,e[e.LINE_LOOP=2]=`LINE_LOOP`,e[e.LINE_STRIP=3]=`LINE_STRIP`,e[e.TRIANGLES=4]=`TRIANGLES`,e[e.TRIANGLE_STRIP=5]=`TRIANGLE_STRIP`,e[e.TRIANGLE_FAN=6]=`TRIANGLE_FAN`})(fo||={});var po;(function(e){e[e.RGBA=6408]=`RGBA`,e[e.RGB=6407]=`RGB`,e[e.RG=33319]=`RG`,e[e.RED=6403]=`RED`,e[e.RGBA_INTEGER=36249]=`RGBA_INTEGER`,e[e.RGB_INTEGER=36248]=`RGB_INTEGER`,e[e.RG_INTEGER=33320]=`RG_INTEGER`,e[e.RED_INTEGER=36244]=`RED_INTEGER`,e[e.ALPHA=6406]=`ALPHA`,e[e.LUMINANCE=6409]=`LUMINANCE`,e[e.LUMINANCE_ALPHA=6410]=`LUMINANCE_ALPHA`,e[e.DEPTH_COMPONENT=6402]=`DEPTH_COMPONENT`,e[e.DEPTH_STENCIL=34041]=`DEPTH_STENCIL`})(po||={});var mo;(function(e){e[e.TEXTURE_2D=3553]=`TEXTURE_2D`,e[e.TEXTURE_CUBE_MAP=34067]=`TEXTURE_CUBE_MAP`,e[e.TEXTURE_2D_ARRAY=35866]=`TEXTURE_2D_ARRAY`,e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]=`TEXTURE_CUBE_MAP_POSITIVE_X`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]=`TEXTURE_CUBE_MAP_NEGATIVE_X`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]=`TEXTURE_CUBE_MAP_POSITIVE_Y`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]=`TEXTURE_CUBE_MAP_NEGATIVE_Y`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]=`TEXTURE_CUBE_MAP_POSITIVE_Z`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]=`TEXTURE_CUBE_MAP_NEGATIVE_Z`})(mo||={});var ho;(function(e){e[e.UNSIGNED_BYTE=5121]=`UNSIGNED_BYTE`,e[e.UNSIGNED_SHORT=5123]=`UNSIGNED_SHORT`,e[e.UNSIGNED_SHORT_5_6_5=33635]=`UNSIGNED_SHORT_5_6_5`,e[e.UNSIGNED_SHORT_4_4_4_4=32819]=`UNSIGNED_SHORT_4_4_4_4`,e[e.UNSIGNED_SHORT_5_5_5_1=32820]=`UNSIGNED_SHORT_5_5_5_1`,e[e.UNSIGNED_INT=5125]=`UNSIGNED_INT`,e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]=`UNSIGNED_INT_10F_11F_11F_REV`,e[e.UNSIGNED_INT_2_10_10_10_REV=33640]=`UNSIGNED_INT_2_10_10_10_REV`,e[e.UNSIGNED_INT_24_8=34042]=`UNSIGNED_INT_24_8`,e[e.UNSIGNED_INT_5_9_9_9_REV=35902]=`UNSIGNED_INT_5_9_9_9_REV`,e[e.BYTE=5120]=`BYTE`,e[e.SHORT=5122]=`SHORT`,e[e.INT=5124]=`INT`,e[e.FLOAT=5126]=`FLOAT`,e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]=`FLOAT_32_UNSIGNED_INT_24_8_REV`,e[e.HALF_FLOAT=36193]=`HALF_FLOAT`})(ho||={});var go;(function(e){e[e.FLOAT=0]=`FLOAT`,e[e.INT=1]=`INT`,e[e.UINT=2]=`UINT`})(go||={});var _o;(function(e){e[e.NEAREST=0]=`NEAREST`,e[e.LINEAR=1]=`LINEAR`})(_o||={});var vo;(function(e){e[e.CLAMP=33071]=`CLAMP`,e[e.REPEAT=10497]=`REPEAT`,e[e.MIRRORED_REPEAT=33648]=`MIRRORED_REPEAT`})(vo||={});var yo;(function(e){e[e.OFF=0]=`OFF`,e[e.POW2=1]=`POW2`,e[e.ON=2]=`ON`,e[e.ON_MANUAL=3]=`ON_MANUAL`})(yo||={});var bo;(function(e){e[e.NPM=0]=`NPM`,e[e.UNPACK=1]=`UNPACK`,e[e.PMA=2]=`PMA`,e[e.NO_PREMULTIPLIED_ALPHA=0]=`NO_PREMULTIPLIED_ALPHA`,e[e.PREMULTIPLY_ON_UPLOAD=1]=`PREMULTIPLY_ON_UPLOAD`,e[e.PREMULTIPLY_ALPHA=2]=`PREMULTIPLY_ALPHA`,e[e.PREMULTIPLIED_ALPHA=2]=`PREMULTIPLIED_ALPHA`})(bo||={});var xo;(function(e){e[e.NO=0]=`NO`,e[e.YES=1]=`YES`,e[e.AUTO=2]=`AUTO`,e[e.BLEND=0]=`BLEND`,e[e.CLEAR=1]=`CLEAR`,e[e.BLIT=2]=`BLIT`})(xo||={});var So;(function(e){e[e.AUTO=0]=`AUTO`,e[e.MANUAL=1]=`MANUAL`})(So||={});var Co;(function(e){e.LOW=`lowp`,e.MEDIUM=`mediump`,e.HIGH=`highp`})(Co||={});var wo;(function(e){e[e.NONE=0]=`NONE`,e[e.SCISSOR=1]=`SCISSOR`,e[e.STENCIL=2]=`STENCIL`,e[e.SPRITE=3]=`SPRITE`,e[e.COLOR=4]=`COLOR`})(wo||={});var To;(function(e){e[e.RED=1]=`RED`,e[e.GREEN=2]=`GREEN`,e[e.BLUE=4]=`BLUE`,e[e.ALPHA=8]=`ALPHA`})(To||={});var Eo;(function(e){e[e.NONE=0]=`NONE`,e[e.LOW=2]=`LOW`,e[e.MEDIUM=4]=`MEDIUM`,e[e.HIGH=8]=`HIGH`})(Eo||={});var Do;(function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]=`ELEMENT_ARRAY_BUFFER`,e[e.ARRAY_BUFFER=34962]=`ARRAY_BUFFER`,e[e.UNIFORM_BUFFER=35345]=`UNIFORM_BUFFER`})(Do||={});var Oo={createCanvas:function(e,t){var n=document.createElement(`canvas`);return n.width=e,n.height=t,n},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var e;return(e=document.baseURI)??window.location.href},fetch:function(e,t){return fetch(e,t)}},ko=/iPhone/i,Ao=/iPod/i,jo=/iPad/i,Mo=/\biOS-universal(?:.+)Mac\b/i,No=/\bAndroid(?:.+)Mobile\b/i,Po=/Android/i,Fo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Io=/Silk/i,Lo=/Windows Phone/i,Ro=/\bWindows(?:.+)ARM\b/i,zo=/BlackBerry/i,Bo=/BB10/i,Vo=/Opera Mini/i,Ho=/\b(CriOS|Chrome)(?:.+)Mobile/i,Uo=/Mobile(?:.+)Firefox\b/i,Wo=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function Go(e){return function(t){return t.test(e)}}function Ko(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=Go(n),a={apple:{phone:i(ko)&&!i(Lo),ipod:i(Ao),tablet:!i(ko)&&(i(jo)||Wo(t))&&!i(Lo),universal:i(Mo),device:(i(ko)||i(Ao)||i(jo)||i(Mo)||Wo(t))&&!i(Lo)},amazon:{phone:i(Fo),tablet:!i(Fo)&&i(Io),device:i(Fo)||i(Io)},android:{phone:!i(Lo)&&i(Fo)||!i(Lo)&&i(No),tablet:!i(Lo)&&!i(Fo)&&!i(No)&&(i(Io)||i(Po)),device:!i(Lo)&&(i(Fo)||i(Io)||i(No)||i(Po))||i(/\bokhttp\b/i)},windows:{phone:i(Lo),tablet:i(Ro),device:i(Lo)||i(Ro)},other:{blackberry:i(zo),blackberry10:i(Bo),opera:i(Vo),firefox:i(Uo),chrome:i(Ho),device:i(zo)||i(Bo)||i(Vo)||i(Uo)||i(Ho)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var qo=Ko(globalThis.navigator);function Jo(){return!qo.apple.device}function Yo(e){var t=!0;if(qo.tablet||qo.phone){if(qo.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(qo.android.device){var n=navigator.userAgent.match(/Android\s([0-9.]*)/);if(n){var r=parseInt(n[1],10);r<7&&(t=!1)}}}return t?e:4}var Xo={ADAPTER:Oo,MIPMAP_TEXTURES:yo.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:Eo.NONE,SPRITE_MAX_TEXTURES:Yo(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:So.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:vo.CLAMP,SCALE_MODE:_o.LINEAR,PRECISION_VERTEX:Co.HIGH,PRECISION_FRAGMENT:qo.apple.device?Co.HIGH:Co.MEDIUM,CAN_UPLOAD_SAME_BUFFER:Jo(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Zo=xt((exports,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i{t.exports=n,t.exports.default=n;function n(e,t,n){n||=2;var i=t&&t.length,o=i?t[0]*n:e.length,s=r(e,0,o,n,!0),c=[];if(!s||s.next===s.prev)return c;var l,d,f,p,m,h,g;if(i&&(s=u(e,t,s,n)),e.length>80*n){l=f=e[0],d=p=e[1];for(var _=n;_f&&(f=m),h>p&&(p=h);g=Math.max(f-l,p-d),g=g===0?0:32767/g}return a(s,c,n,l,d,g,0),c}function r(e,t,n,r,i){var a,o;if(i===N(e,t,n,r)>0)for(a=t;a=t;a-=r)o=A(a,e[a],e[a+1],o);return o&&S(o,o.next)&&(j(o),o=o.next),o}function i(e,t){if(!e)return e;t||=e;var n=e,r;do if(r=!1,!n.steiner&&(S(n,n.next)||x(n.prev,n,n.next)===0)){if(j(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function a(e,t,n,r,u,d,f){if(e){!f&&d&&h(e,r,u,d);for(var p=e,m,g;e.prev!==e.next;){if(m=e.prev,g=e.next,d?s(e,r,u,d):o(e)){t.push(m.i/n|0),t.push(e.i/n|0),t.push(g.i/n|0),j(e),e=g.next,p=g.next;continue}if(e=g,e===p){f?f===1?(e=c(i(e),t,n),a(e,t,n,r,u,d,2)):f===2&&l(e,t,n,r,u,d):a(i(e),t,n,r,u,d,1);break}}}}function o(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=t.x,a=n.x,o=r.x,s=t.y,c=n.y,l=r.y,u=ia?i>o?i:o:a>o?a:o,p=s>c?s>l?s:l:c>l?c:l,m=r.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&y(i,s,a,c,o,l,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function s(e,t,n,r){var i=e.prev,a=e,o=e.next;if(x(i,a,o)>=0)return!1;for(var s=i.x,c=a.x,l=o.x,u=i.y,d=a.y,f=o.y,p=sc?s>l?s:l:c>l?c:l,g=u>d?u>f?u:f:d>f?d:f,v=_(p,m,t,n,r),b=_(h,g,t,n,r),S=e.prevZ,C=e.nextZ;S&&S.z>=v&&C&&C.z<=b;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0||(S=S.prevZ,C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;S&&S.z>=v;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;C&&C.z<=b;){if(C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function c(e,t,n){var r=e;do{var a=r.prev,o=r.next.next;!S(a,o)&&C(a,r,r.next,o)&&D(a,o)&&D(o,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),j(r),j(r.next),r=e=o),r=r.next}while(r!==e);return i(r)}function l(e,t,n,r,o,s){var c=e;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&b(c,l)){var u=k(c,l);c=i(c,c.next),u=i(u,u.next),a(c,t,n,r,o,s,0),a(u,t,n,r,o,s,0);return}l=l.next}c=c.next}while(c!==e)}function u(e,t,n,i){var a=[],o,s,c,l,u;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a&&(a=s,o=n.x=n.x&&n.x>=l&&r!==n.x&&y(io.x||n.x===o.x&&m(o,n)))&&(o=n,d=f)),n=n.next;while(n!==c);return o}function m(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,n,r){var i=e;do i.z===0&&(i.z=_(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(e){var t,n,r,i,a,o,s,c,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||c>0&&r;)s!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1);return e}function _(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function v(e){var t=e,n=e;do(t.x=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function b(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!E(e,t)&&(D(e,t)&&D(t,e)&&O(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||S(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function S(e,t){return e.x===t.x&&e.y===t.y}function C(e,t,n,r){var i=T(x(e,t,n)),a=T(x(e,t,r)),o=T(x(n,r,e)),s=T(x(n,r,t));return!!(i!==a&&o!==s||i===0&&w(e,n,t)||a===0&&w(e,r,t)||o===0&&w(n,e,r)||s===0&&w(n,t,r))}function w(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function T(e){return e>0?1:e<0?-1:0}function E(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&C(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function D(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function O(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function k(e,t){var n=new M(e.i,e.x,e.y),r=new M(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function A(e,t,n,r){var i=new M(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function j(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(N(e,0,a,n));if(i)for(var s=0,c=t.length;s0&&(r+=e[i-1].length,n.holes.push(r))}return n}}),$o=xt((exports,t)=>{(function(n){var r=typeof exports==`object`&&exports&&!exports.nodeType&&exports,i=typeof t==`object`&&t&&!t.nodeType&&t,a=typeof global==`object`&&global;(a.global===a||a.window===a||a.self===a)&&(n=a);var o,s=2147483647,c=36,l=1,u=26,d=38,f=700,p=72,m=128,h=`-`,g=/^xn--/,_=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},b=c-l,x=Math.floor,S=String.fromCharCode,C;function w(e){throw RangeError(y[e])}function T(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function E(e,t){var n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(v,`.`);var i=e.split(`.`),a=T(i,t).join(`.`);return r+a}function D(e){for(var t=[],n=0,r=e.length,i,a;n=55296&&i<=56319&&n65535&&(e-=65536,t+=S(e>>>10&1023|55296),e=56320|e&1023),t+=S(e),t}).join(``)}function k(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function A(e,t){return e+22+75*(e<26)-((t!=0)<<5)}function j(e,t,n){var r=0;for(e=n?x(e/f):e>>1,e+=x(e/t);e>b*u>>1;r+=c)e=x(e/b);return x(r+(b+1)*e/(e+d))}function M(e){var t=[],n=e.length,r,i=0,a=m,o=p,d,f,g,_,v,y,b,S,C;for(d=e.lastIndexOf(h),d<0&&(d=0),f=0;f=128&&w(`not-basic`),t.push(e.charCodeAt(f));for(g=d>0?d+1:0;g=n&&w(`invalid-input`),b=k(e.charCodeAt(g++)),(b>=c||b>x((s-i)/v))&&w(`overflow`),i+=b*v,S=y<=o?l:y>=o+u?u:y-o,!(bx(s/C)&&w(`overflow`),v*=C;r=t.length+1,o=j(i-_,r,_==0),x(i/r)>s-a&&w(`overflow`),a+=x(i/r),i%=r,t.splice(i++,0,a)}return O(t)}function N(e){var t,n,r,i,a,o,d,f,g,_,v,y=[],b,C,T,E;for(e=D(e),b=e.length,t=m,n=0,a=p,o=0;o=t&&vx((s-n)/C)&&w(`overflow`),n+=(d-t)*C,t=d,o=0;os&&w(`overflow`),v==t){for(f=n,g=c;_=g<=a?l:g>=a+u?u:g-a,!(f<_);g+=c)E=f-_,T=c-_,y.push(S(A(_+E%T,0))),f=x(E/T);y.push(S(A(f,0))),a=j(n,C,r==i),n=0,++r}++n,++t}return y.join(``)}function ee(e){return E(e,function(e){return g.test(e)?M(e.slice(4).toLowerCase()):e})}function P(e){return E(e,function(e){return _.test(e)?`xn--`+N(e):e})}if(o={version:`1.4.1`,ucs2:{decode:D,encode:O},decode:M,encode:N,toASCII:P,toUnicode:ee},typeof define==`function`&&typeof define.amd==`object`&&define.amd)define(`punycode`,function(){return o});else if(r&&i)if(t.exports==r)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(r[C]=o[C]);else n.punycode=o})(void 0)}),es=xt((exports,t)=>{Object.defineProperty(exports,`__esModule`,{value:!0});function n(){let e,t,n=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.get(n)}else if(t)return t.get(n)},r=(n,r)=>{n&&(typeof n==`object`||typeof n==`function`)?(e||=new WeakMap,e.set(n,r)):(t||=new Map,t.set(n,r))},i=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.has(n)}else if(t)return t.has(n);return!1},a=e=>{if(!i(e))throw TypeError(`Side channel does not contain the given key`)};return{get:n,set:r,has:i,assert:a}}exports.default=n,(typeof exports.default==`object`&&exports.default!==null||typeof exports.default==`function`)&&(Object.assign(exports.default,exports),t.exports=exports.default)}),ts=xt((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),ns=xt((exports,t)=>{var n=ts(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a=d?s.slice(l,l+d):s,f=[],p=0;p=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r{var n=es(),r=ns(),i=ts(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,O=0,k=!1;(D=D.get(m))!==void 0&&!k;){var A=D.get(t);if(O+=1,A!==void 0){if(A===O)throw RangeError(`Cyclic object value`);k=!0}D.get(m)===void 0&&(O=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var j=C?i:g(i,f.encoder,w,`key`,x);return[S(j)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var M=[];if(E===void 0)return M;var N;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),N=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))N=_;else{var ee=Object.keys(E);N=v?ee.sort(v):ee}var P=h?String(i).replace(/\./g,`%2E`):String(i),F=o&&s(E)&&E.length===1?P+`[]`:P;if(c&&s(E)&&E.length===0)return F+`[]`;for(var I=0;I0?b+y:``}}),os=xt((exports,t)=>{var n=ns(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f{var n=rs(),r=os(),i=ts();t.exports={formats:i,parse:r,stringify:n}}),cs=xt(exports=>{var t=$o();function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=[`<`,`>`,`"`,"`",` `,`\r`,` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-CFsuT-Qx.js","assets/index-C-t5bjx6.js","assets/index-BtJ4BQCK.css","assets/default-node-DFUtCPbV.js","assets/import-url-browser-D6kI1pk-.js","assets/import-url-browser-BPXUaBlv.js","assets/duckdb-mvp-C3i5IjU8.js","assets/import-url-node-CDn8y3R9.js"])))=>i.map(i=>d[i]); +var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{AdditiveBlending as t,AlwaysStencilFunc as n,AnimationMixer as r,Audio as i,AudioListener as a,AudioLoader as o,BackSide as s,Box2 as c,Box3 as l,BoxGeometry as u,BufferAttribute as d,BufferGeometry as f,CatmullRomCurve3 as p,ClampToEdgeWrapping as m,Color as h,CompressedTexture as g,CubeCamera as _,CubeReflectionMapping as v,CubeTextureLoader as y,CylinderGeometry as b,DataTexture as x,DataTextureLoader as S,DataUtils as C,DepthTexture as w,DoubleSide as T,EdgesGeometry as E,Ee as D,EquirectangularReflectionMapping as O,Euler as k,EventDispatcher as A,ExtrudeGeometry as j,FileLoader as M,Float32BufferAttribute as N,FloatType as ee,Fragment as P,FrontSide as F,Group as I,HalfFloatType as te,InstancedBufferGeometry as ne,InstancedInterleavedBuffer as L,InstancedMesh as re,InterleavedBuffer as R,InterleavedBufferAttribute as ie,InterpolateDiscrete as ae,InterpolateLinear as oe,Ir as se,Line as ce,Line3 as le,LineBasicMaterial as ue,LinearFilter as de,LinearMipmapLinearFilter as fe,LinearMipmapNearestFilter as pe,Loader as me,MOUSE as he,Material as ge,MathUtils as _e,Matrix3 as ve,Matrix4 as ye,Mesh as be,MeshBasicMaterial as xe,MeshDepthMaterial as Se,MeshStandardMaterial as Ce,MirroredRepeatWrapping as we,Mn as Te,NearestFilter as Ee,NearestMipmapLinearFilter as De,NearestMipmapNearestFilter as Oe,NoToneMapping as ke,Object3D as Ae,OctahedronGeometry as je,OrthographicCamera as Me,Path as Ne,PerspectiveCamera as Pe,Plane as Fe,PlaneGeometry as Ie,PropertyBinding as Le,Q as Re,QuadraticBezierCurve3 as ze,Quaternion as Be,REVISION as Ve,RGBAFormat as He,RawShaderMaterial as Ue,Ray as We,Raycaster as Ge,RepeatWrapping as Ke,ReplaceStencilOp as qe,Scene as Je,ShaderChunk as Ye,ShaderMaterial as Xe,Shape as Ze,ShapeGeometry as Qe,ShapePath as $e,ShapeUtils as et,SkinnedMesh as tt,Sphere as nt,SphereGeometry as rt,Spherical as it,TOUCH as at,Texture as ot,TextureLoader as st,TorusGeometry as ct,Transition as lt,Triangle as ut,Uniform as dt,UniformsLib as ft,UniformsUtils as pt,Vector2 as mt,Vector3 as z,Vector4 as ht,Vn as gt,WebGLCubeRenderTarget as _t,WebGLRenderTarget as vt,WebGLRenderer as yt,WireframeGeometry as bt,__commonJSMin as xt,__export as St,__plugin_vue_export_helper_default as Ct,__require as wt,__toDynamicImportESM as Tt,__toESM as Et,__vitePreload as Dt,breakpointsTailwind as Ot,computed as kt,createBaseVNode as B,createBlock as At,createCommentVNode as jt,createElementBlock as V,createTextVNode as Mt,createVNode as Nt,defineComponent as H,defu as Pt,dn as Ft,formatCss as It,formatHex as Lt,getCurrentInstance as Rt,getCurrentScope as zt,guardReactiveProps as Bt,inject as Vt,io as Ht,isReactive as Ut,isRef as Wt,mergeModels as Gt,mergeProps as Kt,nextTick as qt,normalizeClass as Jt,normalizeProps as Yt,normalizeStyle as Xt,oklch as Zt,onBeforeUnmount as Qt,onMounted as $t,onScopeDispose as en,onUnmounted as tn,openBlock as U,pe as nn,reactive as rn,ref as W,render as an,renderList as on,renderSlot as sn,resolveComponent as cn,resolveDirective as ln,shallowReactive as un,shallowRef as dn,so as fn,storeToRefs as pn,toDisplayString as mn,toRaw as hn,toRef as gn,toRefs as _n,toValue$1 as vn,unref as G,useAttrs as yn,useBreakpoints as bn,useDark as xn,useDebounceFn as Sn,useElementBounding as Cn,useI18n as wn,useModel as Tn,useRouter as En,useSettings as Dn,useSlots as On,useWindowSize as kn,vModelCheckbox as An,vModelRadio as jn,vModelSelect as Mn,vModelText as Nn,watch as K,watchDebounced as Pn,watchEffect as Fn,withAsyncContext as In,withCtx as Ln,withDirectives as Rn,withModifiers as zn}from"./index-C-t5bjx6.js";import{getImportUrlBundles as Bn}from"./import-url-browser-BPXUaBlv.js";import{generateSpeech as Vn,useAudioContext as Hn,useChatStore as Un,useProvidersStore as Wn,useSpeakingStore as Gn,useSpeechStore as Kn}from"./stores-BW_6w_OI.js";import{Collapsable_default as qn,TransitionVertical_default as Jn}from"./Button-DE0e46lv.js";import{FieldCheckbox_default as Yn,FieldInput_default as Xn,Input_default as Zn}from"./src-B9Iy8991.js";import{EMOTION_EmotionMotionName_value as Qn,EMOTION_VRMExpressionName_value as $n,EmotionThinkMotionName as er,chromaticHue as tr,chromaticHueDefault as nr,llmInferenceEndToken as rr,useDelayMessageQueue as ir,useEmotionsMessageQueue as ar,useMessageContentQueue as or}from"./queues-DD1Fxfss.js";import{VRMUtils as sr,clipFromVRMAnimation as cr,lerp as lr,loadVRMAnimation as ur,loadVrm as dr,randFloat as fr,randomSaccadeInterval as pr,useBlink as mr,useIdleEyeSaccades as hr,useMarkdown as gr,useVRMEmote as _r}from"./composables-CEnUnIM2.js";import{useQueue as vr}from"./queue-Bp4D1cP3.js";var yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa;let oa,sa,ca,la;var ua=H({__name:`AudioSpectrum`,props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(e){let t=e,n=W(Array.from({length:t.bars}).fill(0));$t(()=>{r()}),K(()=>t.stream,()=>{r()});function r(){if(!t.stream)return;let e=new(window.AudioContext||window.webkitAudioContext),r=e.createMediaStreamSource(t.stream),i=e.createAnalyser();i.fftSize=2048,r.connect(i);let a=i.frequencyBinCount,o=new Uint8Array(a),s=e.sampleRate,c=s/i.fftSize,l=Math.floor(t.minFreq/c),u=Math.floor(t.maxFreq/c),d=u-l,f=Math.floor(d/t.bars),p=()=>{try{requestAnimationFrame(p),i.getByteFrequencyData(o);let e=Array.from({length:t.bars}).fill(0);for(let n=0;nsn(e.$slots,`default`,{frequencies:n.value})}}),da=ua;const fa={"h-full":``,flex:``,"items-center":``,"gap-1":``},pa=5;var ma=H({__name:`AudioSpectrumVisualizer`,props:{frequencies:null,barsClass:null},setup(e){let t=e;function n(e,t){let n=.1,r=1;return n+(r-n)*(e/t)}function r(e,r){let i=n(r,t.frequencies.length);return Math.min(100,Math.max(10,e*100*pa*i))}return(t,n)=>(U(),V(`div`,fa,[(U(!0),V(P,null,on(e.frequencies,(t,n)=>(U(),V(`div`,{key:n,"h-full":``,flex:``,"flex-1":``,"items-end":``},[B(`div`,{transition:`all 100 ease-in-out`,"mx-auto":``,"my-0":``,"w-full":``,"rounded-full":``,class:Jt(e.barsClass),style:Xt({height:`${r(t,n)}%`})},null,6)]))),128))]))}}),ha=ma;const ga={key:0,class:`mb-2 flex items-center justify-between`},_a={class:`text-sm font-medium`},va={class:`text-sm text-neutral-500`};var ya=H({__name:`LevelMeter`,props:{level:null,min:{default:0},max:{default:100},numBars:{default:20},label:{default:`Level`},unit:{default:`%`},height:{default:24},showHeader:{type:Boolean,default:!0},animationSpeed:{default:75},colorThresholds:{default:()=>[{value:60,color:`bg-green-500`},{value:80,color:`bg-yellow-500`},{value:100,color:`bg-red-500`}]},formatValue:{type:Function}},setup(e){let t=e,n=kt(()=>{let e=Math.max(0,Math.min(100,(t.level-t.min)/(t.max-t.min)*100)),n=Math.floor(e/100*t.numBars);return Array.from({length:t.numBars},(e,r)=>({active:re.value-t.value);for(let e of i)if(n<=e.value)return e.color;return(r=i[i.length-1])?.color||`bg-green-500`}return(t,i)=>(U(),V(`div`,null,[e.showHeader?(U(),V(`div`,ga,[B(`span`,_a,mn(e.label),1),B(`span`,va,mn(e.formatValue?e.formatValue(e.level):`${Math.round(e.level)}${e.unit}`),1)])):jt(``,!0),B(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 dark:bg-neutral-700`,style:Xt({height:`${e.height}px`})},[(U(!0),V(P,null,on(n.value,(t,n)=>(U(),V(`div`,{key:n,class:Jt([`flex-1 rounded-sm transition-all`,[t.active?r(n,t.level):`bg-neutral-200 dark:bg-neutral-600`,`duration-${e.animationSpeed}`]]),style:Xt({height:t.active?`100%`:`20%`})},null,6))),128))],4)]))}}),ba=ya,xa=H({__name:`Volumed`,props:{perspective:null,transform:null},setup(e){return(t,n)=>(U(),V(`div`,{class:`volumed`,style:Xt({perspective:`${e.perspective}px`,transform:e.transform})},[sn(t.$slots,`default`,{},void 0,!0)],4))}}),Sa=Ct(xa,[[`__scopeId`,`data-v-568551bc`]]),Ca=H({__name:`CursorMomentum`,props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(e,{expose:t}){let n=e,r=W(1),i=W(0),a=0,o=gn(()=>n.friction),s=gn(()=>n.baseSpeed),c=gn(()=>n.momentumFactor);function l(e){a||=e;let t=e-a;a=e,r.value=s.value+(r.value-s.value)*o.value,i.value+=r.value*t,requestAnimationFrame(l)}function u(e){let t=Math.sqrt(e.movementX**2+e.movementY**2);r.value+=t*c.value}return $t(()=>{window.addEventListener(`mousemove`,u),requestAnimationFrame(l)}),tn(()=>{window.removeEventListener(`mousemove`,u)}),t({momentum:r,currentValue:i}),(e,t)=>sn(e.$slots,`default`,{momentum:r.value,currentValue:i.value})}}),wa=Ca,Ta=H({__name:`TestDummyMarkerFlat`,props:{size:null},setup(e){return(t,n)=>(U(),V(`div`,{class:`test-dummy-flat`,style:Xt({width:`${e.size}px`,height:`${e.size}px`})},n[0]||=[B(`div`,{class:`marker`},null,-1)],4))}}),Ea=Ct(Ta,[[`__scopeId`,`data-v-b4ef37ac`]]),Da=H({__name:`TestDummyMarker`,setup(e){return(e,t)=>(U(),At(wa,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:Ln(({currentValue:e})=>[Nt(Sa,{perspective:800,transform:`rotateX(45deg) translateY(3px)`},{default:Ln(()=>[Nt(Ea,{size:24,style:Xt({transform:`rotate(${e}deg)`})},null,8,[`style`])]),_:2},1024)]),_:1}))}}),Oa=Da;const ka={key:0,class:`mb-2 flex items-center justify-between`},Aa={class:`text-sm font-medium`},ja={class:`text-sm text-neutral-500`},Ma={key:1,class:`mt-1 flex gap-3 text-xs text-neutral-500`},Na={class:`flex items-center gap-1`},Pa={class:`flex items-center gap-1`},Fa={class:`flex items-center gap-1`};var Ia=H({__name:`ThresholdMeter`,props:{value:null,threshold:null,min:{default:0},max:{default:1},numBars:{default:20},label:{default:`Value`},unit:{default:`%`},precision:{default:1},height:{default:24},showHeader:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},animationSpeed:{default:100},belowThresholdClass:{default:`bg-primary-300 dark:bg-primary-600`},aboveThresholdClass:{default:`bg-green-500`},thresholdBarClass:{default:`bg-white dark:bg-neutral-800`},inactiveBarClass:{default:`bg-neutral-300 dark:bg-neutral-600`},belowLabel:{default:`Below`},aboveLabel:{default:`Above`},thresholdLabel:{default:`Threshold`},formatValue:{type:Function}},setup(e){let t=e,n=kt(()=>{let e=Math.max(0,Math.min(1,(t.value-t.min)/(t.max-t.min))),n=Math.max(0,Math.min(1,(t.threshold-t.min)/(t.max-t.min))),r=Math.floor(e*t.numBars),i=Math.floor(n*t.numBars);return Array.from({length:t.numBars},(e,t)=>({active:t=i,isBelowThreshold:t(U(),V(`div`,null,[e.showHeader?(U(),V(`div`,ka,[B(`span`,Aa,mn(e.label),1),B(`span`,ja,mn(e.formatValue?e.formatValue(e.value):`${(e.value*100).toFixed(e.precision)}${e.unit}`),1)])):jt(``,!0),B(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 p-1 dark:bg-neutral-700`,style:Xt({height:`${e.height}px`})},[(U(!0),V(P,null,on(n.value,(t,n)=>(U(),V(`div`,{key:`threshold-${n}`,class:Jt([`flex-1 rounded-sm transition-all`,[t.isThreshold?e.thresholdBarClass:t.isAboveThreshold?e.aboveThresholdClass:t.isBelowThreshold?e.belowThresholdClass:e.inactiveBarClass,`duration-${e.animationSpeed}`]]),style:Xt({height:t.active||t.isThreshold?`100%`:`20%`})},null,6))),128))],4),e.showLegend?(U(),V(`div`,Ma,[B(`span`,Na,[B(`div`,{class:Jt(`inline-block h-0.5lh w-1lh rounded-full ${e.belowThresholdClass}`)},null,2),Mt(` `+mn(e.belowLabel),1)]),B(`span`,Pa,[B(`div`,{class:Jt(`inline-block h-0.5lh w-1lh rounded-full border border-neutral-400 ${e.thresholdBarClass}`)},null,2),Mt(` `+mn(e.thresholdLabel),1)]),B(`span`,Fa,[B(`div`,{class:Jt(`inline-block h-0.5lh w-1lh rounded-full ${e.aboveThresholdClass}`)},null,2),Mt(` `+mn(e.aboveLabel),1)])])):jt(``,!0)]))}}),La=Ia;function Ra(e){return{color:e,withAlpha:t=>{let n=Zt(e);if(!n)throw Error(`Invalid color provided for alpha adjustment`);return Ra(Zt({mode:`oklch`,l:n.l,c:n.c,h:n.h,alpha:t}))},toHex:()=>Lt(e),toCSS:()=>It(e)}}function za(e=200,t){let n=t??.18+Math.cos(e*Math.PI/180)*.04,r={50:{lightness:.95,chromaMultiplier:.3,mixWithWhite:.7},100:{lightness:.95,chromaMultiplier:.5,mixWithWhite:.2},200:{lightness:.9,chromaMultiplier:.6},300:{lightness:.85,chromaMultiplier:.75},400:{lightness:.74,chromaMultiplier:.85},500:{lightness:.62,chromaMultiplier:1},600:{lightness:.54,chromaMultiplier:1.15},700:{lightness:.49,chromaMultiplier:1.1},800:{lightness:.42,chromaMultiplier:.85},900:{lightness:.37,chromaMultiplier:.7},950:{lightness:.29,chromaMultiplier:.5}},i=(t,i,a=0)=>{let o=r[t],s=(e+a)%360,c=n*o.chromaMultiplier,l=Zt({mode:`oklch`,l:o.lightness,c,h:s,alpha:i??1});if(o.mixWithWhite){let e=Zt({mode:`oklch`,l:1,c:0,h:0,alpha:i??1});return Ra(Ba(l,e,o.mixWithWhite))}return Ra(l)};return{baseHue:e,chroma:n,getAllShades:(e,t=0)=>{let n={};for(let a of Object.keys(r)){let r=Number.parseInt(a);n[r]=i(r,e,t)}return n},shadeBy:i}}function Ba(e,t,n=.5){let r=Zt(e),i=Zt(t);if(!r||!i)throw Error(`Invalid colors provided for mixing`);return Zt({mode:`oklch`,l:r.l*(1-n)+i.l*n,c:r.c*(1-n)+i.c*n,h:Va(r.h??0,i.h??0,n)})}function Va(e,t,n){let r=t-e;return r>180&&(r-=360),r<-180&&(r+=360),(e+r*n+360)%360}const Ha={key:0,class:`flex items-center justify-between`},Ua={class:`text-sm font-medium`},Wa={class:`text-xs text-neutral-500`},Ga={class:`h-full w-full`},Ka={id:`below-threshold-gradient`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},qa=[`fill`],Ja=[`y`,`height`,`fill`],Ya=[`y1`,`y2`,`stroke`,`fill`],Xa=[`d`,`fill`],Za=[`d`,`stroke`,`stroke-width`],Qa={key:0,class:`absolute left-2 top-2 flex items-center gap-1.5 border border-primary-200 rounded-md bg-primary-50 px-2 py-1 dark:border-primary-800 dark:bg-primary-900`},$a={class:`text-xs text-primary-700 font-medium dark:text-primary-300`},eo={key:1,class:`flex flex-wrap items-center justify-between text-xs text-neutral-500`},to={class:`flex items-center gap-3`},no={class:`flex items-center gap-1 text-nowrap`},ro={class:`flex items-center gap-1 text-nowrap`},io={key:0,class:`text-nowrap`};var ao=H({__name:`TimeSeriesChart`,props:{history:null,currentValue:null,threshold:{default:null},isActive:{type:Boolean},title:{default:`Time Series`},colorsHue:null,lineColor:null,thresholdColor:null,activeColor:null,inactiveColor:null,subtitle:{default:`Recent data`},activeLabel:{default:`Active`},activeLegendLabel:{default:`Active state`},inactiveLegendLabel:{default:`Inactive state`},thresholdLabel:{default:`Threshold`},height:{default:80},lineWidth:{default:1.5},chartHeight:null,minDataPoints:{default:5},precision:{default:0},unit:{default:`%`},showHeader:{type:Boolean,default:!0},showThreshold:{type:Boolean,default:!0},showArea:{type:Boolean,default:!0},showThresholdAreas:{type:Boolean,default:!0},showCurrentValue:{type:Boolean,default:!0},showActiveIndicator:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},formatValue:{type:Function}},setup(e){let t=e,n=kt(()=>t.height),r=W(),i=Vt(tr,nr),a=gn(()=>t.colorsHue||i||nr),o=kt(()=>za(a.value)),s=Cn(r,{windowResize:!0});K([a,r],()=>{r.value&&r.value.style.setProperty(`--chromatic-hue`,a.value.toString())},{immediate:!0});let c=gn(()=>t.lineColor),l=kt(()=>c.value?c.value:o.value.shadeBy(500).toHex()),u=gn(()=>t.thresholdColor),d=kt(()=>{if(!u.value){let e=o.value.shadeBy(500).withAlpha(.1).color;return`oklch(${e.l} ${e.c} ${e.h} / ${e.alpha})`}return u.value}),f=gn(()=>t.activeColor),p=kt(()=>f.value?f.value:o.value.shadeBy(600).toHex()),m=gn(()=>t.inactiveColor),h=kt(()=>m.value?m.value:o.value.shadeBy(400).toHex()),g=Math.random().toString(36).substring(2,9),_=`grid-${g}`,v=`area-gradient-${g}`,y=`threshold-gradient-${g}`,b=kt(()=>t.threshold===null?0:Math.max(0,Math.min(1,t.threshold))),x=kt(()=>t.threshold===null?0:n.value-b.value*n.value),S=kt(()=>{let e=t.history;if(e.length<2)return``;let r=s.width.value,i=n.value,a=`M0,${i-e[0]*i}`;for(let t=1;t{let e=t.history;if(e.length<2)return``;let r=s.width.value,i=n.value,a=`M0,${i} L0,${i-e[0]*i}`;for(let t=1;te.history.length>e.minDataPoints?(U(),V(`div`,{key:0,ref_key:`timeSeriesChartRef`,ref:r,class:`time-series-chart space-y-3`},[e.showHeader?(U(),V(`div`,Ha,[B(`div`,Ua,mn(e.title),1),B(`div`,Wa,mn(e.subtitle),1)])):jt(``,!0),B(`div`,{class:`relative overflow-hidden border border-neutral-200 rounded-lg from-neutral-50 to-neutral-100 bg-gradient-to-b dark:border-neutral-800 dark:from-neutral-800 dark:to-neutral-900`,style:Xt({height:`${n.value}px`})},[(U(),V(`svg`,Ga,[B(`defs`,null,[B(`pattern`,{id:_,width:`20`,height:`10`,patternUnits:`userSpaceOnUse`},i[0]||=[B(`path`,{d:`M 20 0 L 0 0 0 10`,fill:`none`,stroke:`rgb(156 163 175 / 0.1)`,"stroke-width":`0.5`},null,-1)]),B(`linearGradient`,{id:v,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[B(`stop`,{offset:`0%`,style:Xt(`stop-color:${l.value};stop-opacity:0.3`)},null,4),B(`stop`,{offset:`50%`,style:Xt(`stop-color:${l.value};stop-opacity:0.15`)},null,4),B(`stop`,{offset:`100%`,style:Xt(`stop-color:${l.value};stop-opacity:0.05`)},null,4)]),B(`linearGradient`,{id:y,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[B(`stop`,{offset:`0%`,style:Xt(`stop-color:${p.value};stop-opacity:0.3`)},null,4),B(`stop`,{offset:`50%`,style:Xt(`stop-color:${p.value};stop-opacity:0.15`)},null,4),B(`stop`,{offset:`100%`,style:Xt(`stop-color:${p.value};stop-opacity:0.05`)},null,4)]),B(`linearGradient`,Ka,[B(`stop`,{offset:`0%`,style:Xt(`stop-color:${d.value};stop-opacity:0.2`)},null,4),B(`stop`,{offset:`50%`,style:Xt(`stop-color:${d.value};stop-opacity:0.1`)},null,4),B(`stop`,{offset:`100%`,style:Xt(`stop-color:${d.value};stop-opacity:0.05`)},null,4)])]),B(`rect`,{width:`100%`,height:`100%`,fill:`url(#${_})`},null,8,qa),e.showThreshold&&e.threshold!==null?(U(),V(`rect`,{key:0,x:`0`,y:x.value,width:`100%`,height:n.value-x.value,fill:d.value,class:`transition-all duration-300`},null,8,Ja)):jt(``,!0),e.showThreshold&&e.threshold!==null?(U(),V(`line`,{key:1,x1:`0`,y1:x.value,x2:`100%`,y2:x.value,stroke:d.value,"stroke-width":`1.5`,"stroke-dasharray":`4,4`,fill:d.value,class:`transition-all duration-300`},null,8,Ya)):jt(``,!0),C.value&&e.showArea?(U(),V(`path`,{key:2,d:C.value,fill:`url(#${v})`,class:`transition-all duration-75`},null,8,Xa)):jt(``,!0),S.value?(U(),V(`path`,{key:3,d:S.value,fill:`none`,stroke:l.value,"stroke-width":e.lineWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`drop-shadow-sm transition-all duration-75`},null,8,Za)):jt(``,!0)])),e.showCurrentValue?(U(),V(`div`,{key:0,class:Jt([`absolute right-2 top-2 border border-neutral-200 rounded-md bg-white px-2 py-1 shadow-sm transition-all duration-200 dark:border-neutral-700 dark:bg-neutral-800`,e.isActive?`bg-primary-50 dark:bg-primary-900 border-primary-200 dark:border-primary-800`:``])},[B(`div`,{class:Jt([`text-xs font-medium`,e.isActive?`text-primary-700 dark:text-primary-300`:`text-neutral-600 dark:text-neutral-400`])},mn(e.formatValue?e.formatValue(e.currentValue):`${(e.currentValue*100).toFixed(e.precision)}${e.unit}`),3)],2)):jt(``,!0),Nt(lt,{name:`fade`},{default:Ln(()=>[e.isActive&&e.showActiveIndicator?(U(),V(`div`,Qa,[i[1]||=B(`div`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary-500`},null,-1),B(`span`,$a,mn(e.activeLabel),1)])):jt(``,!0)]),_:1})],4),e.showLegend?(U(),V(`div`,eo,[B(`div`,to,[B(`span`,no,[B(`div`,{class:`h-2 w-2 rounded-full`,style:Xt({backgroundColor:p.value})},null,4),Mt(` `+mn(e.activeLegendLabel),1)]),B(`span`,ro,[B(`div`,{class:`h-2 w-2 rounded-full`,style:Xt({backgroundColor:h.value})},null,4),Mt(` `+mn(e.inactiveLegendLabel),1)])]),e.threshold===null?jt(``,!0):(U(),V(`span`,io,mn(e.thresholdLabel)+`: `+mn((e.threshold*100).toFixed(0))+`%`,1))])):jt(``,!0)],512)):jt(``,!0)}}),oo=Ct(ao,[[`__scopeId`,`data-v-6e84a8be`]]),so;(function(e){e[e.WEBGL_LEGACY=0]=`WEBGL_LEGACY`,e[e.WEBGL=1]=`WEBGL`,e[e.WEBGL2=2]=`WEBGL2`})(so||={});var co;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.WEBGL=1]=`WEBGL`,e[e.CANVAS=2]=`CANVAS`})(co||={});var lo;(function(e){e[e.COLOR=16384]=`COLOR`,e[e.DEPTH=256]=`DEPTH`,e[e.STENCIL=1024]=`STENCIL`})(lo||={});var uo;(function(e){e[e.NORMAL=0]=`NORMAL`,e[e.ADD=1]=`ADD`,e[e.MULTIPLY=2]=`MULTIPLY`,e[e.SCREEN=3]=`SCREEN`,e[e.OVERLAY=4]=`OVERLAY`,e[e.DARKEN=5]=`DARKEN`,e[e.LIGHTEN=6]=`LIGHTEN`,e[e.COLOR_DODGE=7]=`COLOR_DODGE`,e[e.COLOR_BURN=8]=`COLOR_BURN`,e[e.HARD_LIGHT=9]=`HARD_LIGHT`,e[e.SOFT_LIGHT=10]=`SOFT_LIGHT`,e[e.DIFFERENCE=11]=`DIFFERENCE`,e[e.EXCLUSION=12]=`EXCLUSION`,e[e.HUE=13]=`HUE`,e[e.SATURATION=14]=`SATURATION`,e[e.COLOR=15]=`COLOR`,e[e.LUMINOSITY=16]=`LUMINOSITY`,e[e.NORMAL_NPM=17]=`NORMAL_NPM`,e[e.ADD_NPM=18]=`ADD_NPM`,e[e.SCREEN_NPM=19]=`SCREEN_NPM`,e[e.NONE=20]=`NONE`,e[e.SRC_OVER=0]=`SRC_OVER`,e[e.SRC_IN=21]=`SRC_IN`,e[e.SRC_OUT=22]=`SRC_OUT`,e[e.SRC_ATOP=23]=`SRC_ATOP`,e[e.DST_OVER=24]=`DST_OVER`,e[e.DST_IN=25]=`DST_IN`,e[e.DST_OUT=26]=`DST_OUT`,e[e.DST_ATOP=27]=`DST_ATOP`,e[e.ERASE=26]=`ERASE`,e[e.SUBTRACT=28]=`SUBTRACT`,e[e.XOR=29]=`XOR`})(uo||={});var fo;(function(e){e[e.POINTS=0]=`POINTS`,e[e.LINES=1]=`LINES`,e[e.LINE_LOOP=2]=`LINE_LOOP`,e[e.LINE_STRIP=3]=`LINE_STRIP`,e[e.TRIANGLES=4]=`TRIANGLES`,e[e.TRIANGLE_STRIP=5]=`TRIANGLE_STRIP`,e[e.TRIANGLE_FAN=6]=`TRIANGLE_FAN`})(fo||={});var po;(function(e){e[e.RGBA=6408]=`RGBA`,e[e.RGB=6407]=`RGB`,e[e.RG=33319]=`RG`,e[e.RED=6403]=`RED`,e[e.RGBA_INTEGER=36249]=`RGBA_INTEGER`,e[e.RGB_INTEGER=36248]=`RGB_INTEGER`,e[e.RG_INTEGER=33320]=`RG_INTEGER`,e[e.RED_INTEGER=36244]=`RED_INTEGER`,e[e.ALPHA=6406]=`ALPHA`,e[e.LUMINANCE=6409]=`LUMINANCE`,e[e.LUMINANCE_ALPHA=6410]=`LUMINANCE_ALPHA`,e[e.DEPTH_COMPONENT=6402]=`DEPTH_COMPONENT`,e[e.DEPTH_STENCIL=34041]=`DEPTH_STENCIL`})(po||={});var mo;(function(e){e[e.TEXTURE_2D=3553]=`TEXTURE_2D`,e[e.TEXTURE_CUBE_MAP=34067]=`TEXTURE_CUBE_MAP`,e[e.TEXTURE_2D_ARRAY=35866]=`TEXTURE_2D_ARRAY`,e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]=`TEXTURE_CUBE_MAP_POSITIVE_X`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]=`TEXTURE_CUBE_MAP_NEGATIVE_X`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]=`TEXTURE_CUBE_MAP_POSITIVE_Y`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]=`TEXTURE_CUBE_MAP_NEGATIVE_Y`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]=`TEXTURE_CUBE_MAP_POSITIVE_Z`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]=`TEXTURE_CUBE_MAP_NEGATIVE_Z`})(mo||={});var ho;(function(e){e[e.UNSIGNED_BYTE=5121]=`UNSIGNED_BYTE`,e[e.UNSIGNED_SHORT=5123]=`UNSIGNED_SHORT`,e[e.UNSIGNED_SHORT_5_6_5=33635]=`UNSIGNED_SHORT_5_6_5`,e[e.UNSIGNED_SHORT_4_4_4_4=32819]=`UNSIGNED_SHORT_4_4_4_4`,e[e.UNSIGNED_SHORT_5_5_5_1=32820]=`UNSIGNED_SHORT_5_5_5_1`,e[e.UNSIGNED_INT=5125]=`UNSIGNED_INT`,e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]=`UNSIGNED_INT_10F_11F_11F_REV`,e[e.UNSIGNED_INT_2_10_10_10_REV=33640]=`UNSIGNED_INT_2_10_10_10_REV`,e[e.UNSIGNED_INT_24_8=34042]=`UNSIGNED_INT_24_8`,e[e.UNSIGNED_INT_5_9_9_9_REV=35902]=`UNSIGNED_INT_5_9_9_9_REV`,e[e.BYTE=5120]=`BYTE`,e[e.SHORT=5122]=`SHORT`,e[e.INT=5124]=`INT`,e[e.FLOAT=5126]=`FLOAT`,e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]=`FLOAT_32_UNSIGNED_INT_24_8_REV`,e[e.HALF_FLOAT=36193]=`HALF_FLOAT`})(ho||={});var go;(function(e){e[e.FLOAT=0]=`FLOAT`,e[e.INT=1]=`INT`,e[e.UINT=2]=`UINT`})(go||={});var _o;(function(e){e[e.NEAREST=0]=`NEAREST`,e[e.LINEAR=1]=`LINEAR`})(_o||={});var vo;(function(e){e[e.CLAMP=33071]=`CLAMP`,e[e.REPEAT=10497]=`REPEAT`,e[e.MIRRORED_REPEAT=33648]=`MIRRORED_REPEAT`})(vo||={});var yo;(function(e){e[e.OFF=0]=`OFF`,e[e.POW2=1]=`POW2`,e[e.ON=2]=`ON`,e[e.ON_MANUAL=3]=`ON_MANUAL`})(yo||={});var bo;(function(e){e[e.NPM=0]=`NPM`,e[e.UNPACK=1]=`UNPACK`,e[e.PMA=2]=`PMA`,e[e.NO_PREMULTIPLIED_ALPHA=0]=`NO_PREMULTIPLIED_ALPHA`,e[e.PREMULTIPLY_ON_UPLOAD=1]=`PREMULTIPLY_ON_UPLOAD`,e[e.PREMULTIPLY_ALPHA=2]=`PREMULTIPLY_ALPHA`,e[e.PREMULTIPLIED_ALPHA=2]=`PREMULTIPLIED_ALPHA`})(bo||={});var xo;(function(e){e[e.NO=0]=`NO`,e[e.YES=1]=`YES`,e[e.AUTO=2]=`AUTO`,e[e.BLEND=0]=`BLEND`,e[e.CLEAR=1]=`CLEAR`,e[e.BLIT=2]=`BLIT`})(xo||={});var So;(function(e){e[e.AUTO=0]=`AUTO`,e[e.MANUAL=1]=`MANUAL`})(So||={});var Co;(function(e){e.LOW=`lowp`,e.MEDIUM=`mediump`,e.HIGH=`highp`})(Co||={});var wo;(function(e){e[e.NONE=0]=`NONE`,e[e.SCISSOR=1]=`SCISSOR`,e[e.STENCIL=2]=`STENCIL`,e[e.SPRITE=3]=`SPRITE`,e[e.COLOR=4]=`COLOR`})(wo||={});var To;(function(e){e[e.RED=1]=`RED`,e[e.GREEN=2]=`GREEN`,e[e.BLUE=4]=`BLUE`,e[e.ALPHA=8]=`ALPHA`})(To||={});var Eo;(function(e){e[e.NONE=0]=`NONE`,e[e.LOW=2]=`LOW`,e[e.MEDIUM=4]=`MEDIUM`,e[e.HIGH=8]=`HIGH`})(Eo||={});var Do;(function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]=`ELEMENT_ARRAY_BUFFER`,e[e.ARRAY_BUFFER=34962]=`ARRAY_BUFFER`,e[e.UNIFORM_BUFFER=35345]=`UNIFORM_BUFFER`})(Do||={});var Oo={createCanvas:function(e,t){var n=document.createElement(`canvas`);return n.width=e,n.height=t,n},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var e;return(e=document.baseURI)??window.location.href},fetch:function(e,t){return fetch(e,t)}},ko=/iPhone/i,Ao=/iPod/i,jo=/iPad/i,Mo=/\biOS-universal(?:.+)Mac\b/i,No=/\bAndroid(?:.+)Mobile\b/i,Po=/Android/i,Fo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Io=/Silk/i,Lo=/Windows Phone/i,Ro=/\bWindows(?:.+)ARM\b/i,zo=/BlackBerry/i,Bo=/BB10/i,Vo=/Opera Mini/i,Ho=/\b(CriOS|Chrome)(?:.+)Mobile/i,Uo=/Mobile(?:.+)Firefox\b/i,Wo=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function Go(e){return function(t){return t.test(e)}}function Ko(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=Go(n),a={apple:{phone:i(ko)&&!i(Lo),ipod:i(Ao),tablet:!i(ko)&&(i(jo)||Wo(t))&&!i(Lo),universal:i(Mo),device:(i(ko)||i(Ao)||i(jo)||i(Mo)||Wo(t))&&!i(Lo)},amazon:{phone:i(Fo),tablet:!i(Fo)&&i(Io),device:i(Fo)||i(Io)},android:{phone:!i(Lo)&&i(Fo)||!i(Lo)&&i(No),tablet:!i(Lo)&&!i(Fo)&&!i(No)&&(i(Io)||i(Po)),device:!i(Lo)&&(i(Fo)||i(Io)||i(No)||i(Po))||i(/\bokhttp\b/i)},windows:{phone:i(Lo),tablet:i(Ro),device:i(Lo)||i(Ro)},other:{blackberry:i(zo),blackberry10:i(Bo),opera:i(Vo),firefox:i(Uo),chrome:i(Ho),device:i(zo)||i(Bo)||i(Vo)||i(Uo)||i(Ho)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var qo=Ko(globalThis.navigator);function Jo(){return!qo.apple.device}function Yo(e){var t=!0;if(qo.tablet||qo.phone){if(qo.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(qo.android.device){var n=navigator.userAgent.match(/Android\s([0-9.]*)/);if(n){var r=parseInt(n[1],10);r<7&&(t=!1)}}}return t?e:4}var Xo={ADAPTER:Oo,MIPMAP_TEXTURES:yo.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:Eo.NONE,SPRITE_MAX_TEXTURES:Yo(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:So.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:vo.CLAMP,SCALE_MODE:_o.LINEAR,PRECISION_VERTEX:Co.HIGH,PRECISION_FRAGMENT:qo.apple.device?Co.HIGH:Co.MEDIUM,CAN_UPLOAD_SAME_BUFFER:Jo(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Zo=xt((exports,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i{t.exports=n,t.exports.default=n;function n(e,t,n){n||=2;var i=t&&t.length,o=i?t[0]*n:e.length,s=r(e,0,o,n,!0),c=[];if(!s||s.next===s.prev)return c;var l,d,f,p,m,h,g;if(i&&(s=u(e,t,s,n)),e.length>80*n){l=f=e[0],d=p=e[1];for(var _=n;_f&&(f=m),h>p&&(p=h);g=Math.max(f-l,p-d),g=g===0?0:32767/g}return a(s,c,n,l,d,g,0),c}function r(e,t,n,r,i){var a,o;if(i===N(e,t,n,r)>0)for(a=t;a=t;a-=r)o=A(a,e[a],e[a+1],o);return o&&S(o,o.next)&&(j(o),o=o.next),o}function i(e,t){if(!e)return e;t||=e;var n=e,r;do if(r=!1,!n.steiner&&(S(n,n.next)||x(n.prev,n,n.next)===0)){if(j(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function a(e,t,n,r,u,d,f){if(e){!f&&d&&h(e,r,u,d);for(var p=e,m,g;e.prev!==e.next;){if(m=e.prev,g=e.next,d?s(e,r,u,d):o(e)){t.push(m.i/n|0),t.push(e.i/n|0),t.push(g.i/n|0),j(e),e=g.next,p=g.next;continue}if(e=g,e===p){f?f===1?(e=c(i(e),t,n),a(e,t,n,r,u,d,2)):f===2&&l(e,t,n,r,u,d):a(i(e),t,n,r,u,d,1);break}}}}function o(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=t.x,a=n.x,o=r.x,s=t.y,c=n.y,l=r.y,u=ia?i>o?i:o:a>o?a:o,p=s>c?s>l?s:l:c>l?c:l,m=r.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&y(i,s,a,c,o,l,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function s(e,t,n,r){var i=e.prev,a=e,o=e.next;if(x(i,a,o)>=0)return!1;for(var s=i.x,c=a.x,l=o.x,u=i.y,d=a.y,f=o.y,p=sc?s>l?s:l:c>l?c:l,g=u>d?u>f?u:f:d>f?d:f,v=_(p,m,t,n,r),b=_(h,g,t,n,r),S=e.prevZ,C=e.nextZ;S&&S.z>=v&&C&&C.z<=b;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0||(S=S.prevZ,C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;S&&S.z>=v;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;C&&C.z<=b;){if(C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function c(e,t,n){var r=e;do{var a=r.prev,o=r.next.next;!S(a,o)&&C(a,r,r.next,o)&&D(a,o)&&D(o,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),j(r),j(r.next),r=e=o),r=r.next}while(r!==e);return i(r)}function l(e,t,n,r,o,s){var c=e;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&b(c,l)){var u=k(c,l);c=i(c,c.next),u=i(u,u.next),a(c,t,n,r,o,s,0),a(u,t,n,r,o,s,0);return}l=l.next}c=c.next}while(c!==e)}function u(e,t,n,i){var a=[],o,s,c,l,u;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a&&(a=s,o=n.x=n.x&&n.x>=l&&r!==n.x&&y(io.x||n.x===o.x&&m(o,n)))&&(o=n,d=f)),n=n.next;while(n!==c);return o}function m(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,n,r){var i=e;do i.z===0&&(i.z=_(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(e){var t,n,r,i,a,o,s,c,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||c>0&&r;)s!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1);return e}function _(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function v(e){var t=e,n=e;do(t.x=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function b(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!E(e,t)&&(D(e,t)&&D(t,e)&&O(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||S(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function S(e,t){return e.x===t.x&&e.y===t.y}function C(e,t,n,r){var i=T(x(e,t,n)),a=T(x(e,t,r)),o=T(x(n,r,e)),s=T(x(n,r,t));return!!(i!==a&&o!==s||i===0&&w(e,n,t)||a===0&&w(e,r,t)||o===0&&w(n,e,r)||s===0&&w(n,t,r))}function w(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function T(e){return e>0?1:e<0?-1:0}function E(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&C(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function D(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function O(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function k(e,t){var n=new M(e.i,e.x,e.y),r=new M(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function A(e,t,n,r){var i=new M(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function j(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(N(e,0,a,n));if(i)for(var s=0,c=t.length;s0&&(r+=e[i-1].length,n.holes.push(r))}return n}}),$o=xt((exports,t)=>{(function(n){var r=typeof exports==`object`&&exports&&!exports.nodeType&&exports,i=typeof t==`object`&&t&&!t.nodeType&&t,a=typeof global==`object`&&global;(a.global===a||a.window===a||a.self===a)&&(n=a);var o,s=2147483647,c=36,l=1,u=26,d=38,f=700,p=72,m=128,h=`-`,g=/^xn--/,_=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},b=c-l,x=Math.floor,S=String.fromCharCode,C;function w(e){throw RangeError(y[e])}function T(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function E(e,t){var n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(v,`.`);var i=e.split(`.`),a=T(i,t).join(`.`);return r+a}function D(e){for(var t=[],n=0,r=e.length,i,a;n=55296&&i<=56319&&n65535&&(e-=65536,t+=S(e>>>10&1023|55296),e=56320|e&1023),t+=S(e),t}).join(``)}function k(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function A(e,t){return e+22+75*(e<26)-((t!=0)<<5)}function j(e,t,n){var r=0;for(e=n?x(e/f):e>>1,e+=x(e/t);e>b*u>>1;r+=c)e=x(e/b);return x(r+(b+1)*e/(e+d))}function M(e){var t=[],n=e.length,r,i=0,a=m,o=p,d,f,g,_,v,y,b,S,C;for(d=e.lastIndexOf(h),d<0&&(d=0),f=0;f=128&&w(`not-basic`),t.push(e.charCodeAt(f));for(g=d>0?d+1:0;g=n&&w(`invalid-input`),b=k(e.charCodeAt(g++)),(b>=c||b>x((s-i)/v))&&w(`overflow`),i+=b*v,S=y<=o?l:y>=o+u?u:y-o,!(bx(s/C)&&w(`overflow`),v*=C;r=t.length+1,o=j(i-_,r,_==0),x(i/r)>s-a&&w(`overflow`),a+=x(i/r),i%=r,t.splice(i++,0,a)}return O(t)}function N(e){var t,n,r,i,a,o,d,f,g,_,v,y=[],b,C,T,E;for(e=D(e),b=e.length,t=m,n=0,a=p,o=0;o=t&&vx((s-n)/C)&&w(`overflow`),n+=(d-t)*C,t=d,o=0;os&&w(`overflow`),v==t){for(f=n,g=c;_=g<=a?l:g>=a+u?u:g-a,!(f<_);g+=c)E=f-_,T=c-_,y.push(S(A(_+E%T,0))),f=x(E/T);y.push(S(A(f,0))),a=j(n,C,r==i),n=0,++r}++n,++t}return y.join(``)}function ee(e){return E(e,function(e){return g.test(e)?M(e.slice(4).toLowerCase()):e})}function P(e){return E(e,function(e){return _.test(e)?`xn--`+N(e):e})}if(o={version:`1.4.1`,ucs2:{decode:D,encode:O},decode:M,encode:N,toASCII:P,toUnicode:ee},typeof define==`function`&&typeof define.amd==`object`&&define.amd)define(`punycode`,function(){return o});else if(r&&i)if(t.exports==r)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(r[C]=o[C]);else n.punycode=o})(void 0)}),es=xt((exports,t)=>{Object.defineProperty(exports,`__esModule`,{value:!0});function n(){let e,t,n=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.get(n)}else if(t)return t.get(n)},r=(n,r)=>{n&&(typeof n==`object`||typeof n==`function`)?(e||=new WeakMap,e.set(n,r)):(t||=new Map,t.set(n,r))},i=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.has(n)}else if(t)return t.has(n);return!1},a=e=>{if(!i(e))throw TypeError(`Side channel does not contain the given key`)};return{get:n,set:r,has:i,assert:a}}exports.default=n,(typeof exports.default==`object`&&exports.default!==null||typeof exports.default==`function`)&&(Object.assign(exports.default,exports),t.exports=exports.default)}),ts=xt((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),ns=xt((exports,t)=>{var n=ts(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a=d?s.slice(l,l+d):s,f=[],p=0;p=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r{var n=es(),r=ns(),i=ts(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,O=0,k=!1;(D=D.get(m))!==void 0&&!k;){var A=D.get(t);if(O+=1,A!==void 0){if(A===O)throw RangeError(`Cyclic object value`);k=!0}D.get(m)===void 0&&(O=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var j=C?i:g(i,f.encoder,w,`key`,x);return[S(j)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var M=[];if(E===void 0)return M;var N;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),N=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))N=_;else{var ee=Object.keys(E);N=v?ee.sort(v):ee}var P=h?String(i).replace(/\./g,`%2E`):String(i),F=o&&s(E)&&E.length===1?P+`[]`:P;if(c&&s(E)&&E.length===0)return F+`[]`;for(var I=0;I0?b+y:``}}),os=xt((exports,t)=>{var n=ns(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f{var n=rs(),r=os(),i=ts();t.exports={formats:i,parse:r,stringify:n}}),cs=xt(exports=>{var t=$o();function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=[`<`,`>`,`"`,"`",` `,`\r`,` `,` `],s=[`{`,`}`,`|`,`\\`,`^`,"`"].concat(o),c=[`'`].concat(s),l=[`%`,`/`,`?`,`;`,`#`].concat(c),u=[`/`,`?`,`#`],d=255,f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},h={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=ss();function v(e,t,r){if(e&&typeof e==`object`&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}n.prototype.parse=function(e,n,i){if(typeof e!=`string`)throw TypeError(`Parameter 'url' must be a string, not `+typeof e);var o=e.indexOf(`?`),s=o!==-1&&o127?ee+=`x`:ee+=N[P];if(!ee.match(f)){var I=j.slice(0,E),te=j.slice(E+1),ne=N.match(p);ne&&(I.push(ne[1]),te.unshift(ne[2])),te.length&&(b=`/`+te.join(`.`)+b),this.hostname=I.join(`.`);break}}}this.hostname.length>d?this.hostname=``:this.hostname=this.hostname.toLowerCase(),A||(this.hostname=t.toASCII(this.hostname));var L=this.port?`:`+this.port:``,re=this.hostname||``;this.host=re+L,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),b[0]!==`/`&&(b=`/`+b))}if(!m[C])for(var E=0,M=c.length;E0?r.host.split(`@`):!1;w&&(r.auth=w.shift(),r.hostname=w.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path=`/`+r.search:r.path=null,r.href=r.format(),r;for(var T=S.slice(-1)[0],E=(r.host||e.host||S.length>1)&&(T===`.`||T===`..`)||T===``,D=0,O=S.length;O>=0;O--)T=S[O],T===`.`?S.splice(O,1):T===`..`?(S.splice(O,1),D++):D&&(S.splice(O,1),D--);if(!b&&!x)for(;D--;)S.unshift(`..`);b&&S[0]!==``&&(!S[0]||S[0].charAt(0)!==`/`)&&S.unshift(``),E&&S.join(`/`).substr(-1)!==`/`&&S.push(``);var k=S[0]===``||S[0]&&S[0].charAt(0)===`/`;if(C){r.hostname=k?``:S.length?S.shift():``,r.host=r.hostname;var w=r.host&&r.host.indexOf(`@`)>0?r.host.split(`@`):!1;w&&(r.auth=w.shift(),r.hostname=w.shift(),r.host=r.hostname)}return b||=r.host&&S.length,b&&!k&&S.unshift(``),S.length>0?r.pathname=S.join(`/`):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},exports.parse=v,exports.resolve=b,exports.resolveObject=x,exports.format=y,exports.Url=n}),ls=Et(Zo(),1),us=Et(Qo(),1),ds=Et(cs(),1),fs={parse:ds.parse,format:ds.format,resolve:ds.resolve};Xo.RETINA_PREFIX=/@([0-9\.]+)x/,Xo.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var ps=!1,ms=`6.5.10`;function hs(e){var t;if(!ps){if(Xo.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf(`chrome`)>-1){var n=[` %c %c %c PixiJS `+ms+` - ✰ `+e+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ @@ -3763,11 +3763,11 @@ float PCSS (sampler2D shadowMap, vec4 coords) { }`,r=Ye.shadowmap_pars_fragment,{renderer:i,scene:a,camera:o}=fn();function s(e,t){let i=r;i=i.replace(`#ifdef USE_SHADOWMAP`,`#ifdef USE_SHADOWMAP ${n(t)}`),i=i.replace(`#if defined( SHADOWMAP_TYPE_PCF )`,`${lj} #if defined( SHADOWMAP_TYPE_PCF )`),Ye.shadowmap_pars_fragment=i,e.shadowMap.enabled=!0}function c(e,t,n){t.traverse(t=>{var n,r;`material`in t&&t.material&&(e.properties.remove(t.material),typeof t.material==`object`&&`dispose`in t.material&&typeof t.material.dispose==`function`&&((r=(n=t.material).dispose)==null||r.call(n)))}),e.info.programs&&(e.info.programs.length=0),e.compile(t,n)}return tn(()=>{o.value&&(Ye.shadowmap_pars_fragment=r,c(i.value,a.value,o.value))}),K(t,()=>{o.value&&(s(i.value,t),c(i.value,a.value,o.value))},{immediate:!0}),(e,t)=>(U(),V(`TresGroup`))}});var dj=class extends Ae{constructor(){super(),dx(this,`virtualScene`,null),this.virtualScene=new Je}add(...e){return this.virtualScene.add(...e),this}dispose(){this.virtualScene.traverse(e=>{e instanceof be&&(e.geometry.dispose(),e.material.dispose(),e.material.map&&e.material.map.dispose(),this.virtualScene.remove(e))}),this.virtualScene=null}};const fj=H({__name:`component`,props:{background:{type:[Boolean,String],default:!1},blur:{default:0},files:{default:()=>[]},path:{default:``},preset:{default:void 0},resolution:{default:256},near:{default:1},far:{default:1e3},frames:{default:1/0},backgroundIntensity:{default:1},backgroundRotation:{},environmentIntensity:{default:1},environmentRotation:{},syncMaterials:{type:Boolean}},async setup(e,{expose:t}){let n,r,i=e,a=W(null);t({texture:a});let{extend:o,renderer:c,scene:l}=nn();o({EnvironmentScene:dj});let d=null,f=W(null),p=null,m=W(null),h=([n,r]=In(()=>DE(i,f)),n=await n,r(),n),{onBeforeRender:g}=Ht(),v=1;g(()=>{if(p&&m.value&&f.value&&(i.frames===1/0||v{if(e&&t!=null&&t.virtualScene){let n=hn(t).virtualScene,r=n.children.find(e=>e instanceof be&&e.userData.isEnvironment);r||(r=new be(new u(1,1,1),new xe({side:s})),r.userData.isEnvironment=!0,n.add(r)),n.background=e,n.backgroundBlurriness=i.blur}},{immediate:!0});let y=e=>{e&&d!=null&&d.length?(l.value.environment=e.texture,i.background&&(l.value.background=e.texture)):h.value&&(l.value.environment=h.value,i.background&&(l.value.background=h.value))};return K(h,()=>{f.value&&y(f.value)},{immediate:!0,deep:!0}),K(()=>On().default,e=>{var t;if(e&&(d=e(),Array.isArray(d)&&d.length>0)){o({EnvironmentScene:dj}),f.value=new _t(i.resolution),f.value.texture.type=te,p=new _(i.near,i.far,f.value),y(f.value);return}(t=f.value)==null||t.dispose(),f.value=null,y()},{immediate:!0,deep:!0}),a.value=h.value,tn(()=>{var e,t;(e=m.value)==null||e.dispose(),(t=f.value)==null||t.dispose()}),(e,t)=>f.value?(U(),V(`TresEnvironmentScene`,{key:0,ref_key:`environmentScene`,ref:m},[sn(e.$slots,`default`)],512)):jt(``,!0)}}),pj={key:0,args:[0,1,64]},mj={key:1,args:[.5,1,64]},hj={key:2},gj=[`tone-mapped`,`map`,`side`,`color`],_j=H({__name:`index`,props:{args:{default:null},form:{default:`rect`},toneMapped:{type:Boolean,default:!1},map:{default:null},intensity:{default:1},color:{default:new h(16777215)}},setup(e,{expose:t}){let n=e,r=W(),i=W();return Fn(()=>{r.value&&(r.value.color.copy(new h(n.color)),r.value.color.multiplyScalar(n.intensity),r.value.needsUpdate=!0)}),t({mesh:i}),(e,t)=>(U(),V(`TresMesh`,{ref_key:`mesh`,ref:i},[e.form===`circle`?(U(),V(`TresRingGeometry`,pj)):e.form===`ring`?(U(),V(`TresRingGeometry`,mj)):e.form===`rect`?(U(),V(`TresPlaneGeometry`,hj)):(U(),At(n.form,{key:3,args:e.args},null,8,[`args`])),B(`TresMeshBasicMaterial`,{ref_key:`material`,ref:r,"tone-mapped":e.toneMapped,map:e.map,side:G(T),color:e.color},null,8,gj)],512))}});var vj=H({__name:`Range`,props:{modelValue:null,min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`,`mousedown`],setup(e,{emit:t}){let n=e,r=t,i=W(null);function a(e,t,n){return Math.min(Math.max(e,t),n)}function o(e){let t=e.toString();if(t.includes(`e-`))return Number.parseInt(t.split(`e-`)[1],10);let n=t.includes(`.`)?t.split(`.`)[1].length:0;return n}function s(e,t){let n=o(t),r=10**(n+3);return Number.parseFloat((e*r/r).toFixed(n))}let c=kt(()=>s(a(n.modelValue,n.min,n.max),n.step)),l=kt(()=>{let e=(c.value-n.min)/(n.max-n.min)*100;return{width:`${e}%`,backgroundSize:`${e}% 100%`}});function u(e){if(!i.value)return c.value;let t=i.value.getBoundingClientRect(),r=e.clientX-t.left,a=r/t.width,o=n.max-n.min,s=n.min+o*a,l=Math.round(s/n.step)*n.step;return Math.min(Math.max(l,n.min),n.max)}function d(e){if(n.disabled)return;let t=u(e);r(`update:modelValue`,t)}function f(e){if(n.disabled)return;e.preventDefault();let t=u(e);r(`update:modelValue`,t),window.addEventListener(`mousemove`,d),window.addEventListener(`mouseup`,p)}function p(e){window.removeEventListener(`mousemove`,d),window.removeEventListener(`mouseup`,p)}return tn(()=>{window.removeEventListener(`mousemove`,d),window.removeEventListener(`mouseup`,p)}),(t,n)=>(U(),V(`span`,{ref_key:`sliderRef`,ref:i,class:Jt([`range-slider disabled:pointer-events-none disabled:cursor-default disabled:opacity-50`,{disabled:e.disabled}]),bg:`[#e6e1fc] dark:[#676085]`,"touch-action-none":``,relative:``,"inline-block":``,"w-full":``,"cursor-ew-resize":``,"rounded-sm":``,onMousedown:f},[B(`span`,{style:Xt(l.value),bg:`[#cabeff] dark:[#4e34b9]`,relative:``,block:``,"rounded-sm":``,h:`[14px]`},null,4),B(`span`,{role:`slider`,class:`slider-thumb`,style:Xt({left:`${(c.value-e.min)/(e.max-e.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))}}),yj=vj,bj=H({__name:`Model`,props:{model:null,idleAnimation:null,loadAnimations:null,position:null,paused:{type:Boolean}},emits:[`loadModelProgress`,`error`],setup(e,{expose:t,emit:n}){let i=e,a=n,o,s=W(),c=W(),{scene:l}=nn(),{onBeforeRender:u}=Ht(),d=mr(),f=hr(),p=W();K(()=>i.position,([e,t,n])=>{s.value&&s.value.scene.position.set(e,t,n)}),$t(async()=>{if(l.value)try{let e=await dr(i.model,{scene:l.value,lookAt:!0,position:i.position,onProgress:e=>a(`loadModelProgress`,Number.parseFloat((100*(e.loaded/e.total)).toFixed(2)))});if(!e){console.warn(`No VRM model loaded`);return}let t=await ur(i.idleAnimation),n=await cr(e,t);if(!n){console.warn(`No VRM animation loaded`);return}c.value=new r(e.scene),c.value.clipAction(n).play(),p.value=_r(e),s.value=e,o=u(({delta:e})=>{var t,n,r;(t=c.value)?.update(e),(n=s.value)?.update(e),d.update(s.value,e),f.update(s.value,e),(r=p.value)?.update(e)}).off}catch(e){a(`error`,e)}}),tn(()=>{o?.(),s.value&&(s.value.scene.removeFromParent(),sr.deepDispose(s.value.scene))}),t({setExpression(e){var t;(t=p.value)?.setEmotionWithResetAfter(e,1e3)}});let{pause:m,resume:h}=Ht();return K(()=>i.paused,e=>{e?m():h()}),(e,t)=>sn(e.$slots,`default`)}}),xj=bj;const Sj=[`position`],Cj={absolute:``,bottom:`3`,right:`3`},wj={flex:`~ row`,"cursor-pointer":``},Tj=[`checked`,`aria-checked`],Ej={key:0,"min-w":`50vw`,z:`{var t;(t=f.value)?.setExpression(e)}}),(e,t)=>(U(),At(Kb,{relative:``},{default:Ln(({height:e,width:n})=>[Nt(G(gt),{alpha:!0,antialias:!0,width:n,height:e},{default:Ln(()=>[Nt(G(jD)),B(`TresPerspectiveCamera`,{position:[o.value,s.value,c.value]},null,8,Sj),t[14]||=B(`TresDirectionalLight`,{color:16777215,intensity:1.2,position:[1,1,1]},null,-1),t[15]||=B(`TresAmbientLight`,{color:16777215,intensity:1.5},null,-1),Nt(xj,{ref_key:`modelRef`,ref:f,model:r.model,"idle-animation":r.idleAnimation,position:[l.value,u.value,d.value],paused:r.paused,onLoadModelProgress:t[0]||=e=>i(`loadModelProgress`,e),onError:t[1]||=e=>i(`error`,e)},null,8,[`model`,`idle-animation`,`position`,`paused`])]),_:2,__:[14,15]},1032,[`width`,`height`]),B(`div`,Cj,[B(`div`,wj,[B(`label`,{class:Jt([a.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":``},[Rn(B(`input`,{"onUpdate:modelValue":t[2]||=e=>a.value=e,checked:a.value,"aria-checked":a.value,name:`showLive2DViewerInspector`,type:`checkbox`,"appearance-none":``,"outline-none":``,hidden:``},null,8,Tj),[[An,a.value]]),t[16]||=B(`div`,{"select-none":``},[B(`div`,{"i-solar:bug-bold-duotone":``})],-1)],2)]),Nt(G(Jn),null,{default:Ln(()=>[a.value?(U(),V(`div`,Ej,[B(`div`,Dj,[B(`div`,Oj,[B(`span`,null,mn(G(p)(`stage.viewers.debug-menu.vrm.model.title`)),1)]),Nt(qn,{"h-fit":``,"w-full":``,flex:`~ col`,border:`~ gray/25 rounded-lg`,divide:`y dashed gray/25`,"of-clip":``,"shadow-sm":``},{label:Ln(()=>[B(`span`,kj,mn(G(p)(`stage.viewers.debug-menu.vrm.camera`)),1)]),default:Ln(()=>[B(`div`,Aj,[t[17]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`X`)],-1),B(`label`,jj,[Nt(yj,{modelValue:o.value,"onUpdate:modelValue":t[3]||=e=>o.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,Mj,[B(`span`,null,mn(o.value),1)]),t[18]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`Y`)],-1),B(`label`,Nj,[Nt(yj,{modelValue:s.value,"onUpdate:modelValue":t[4]||=e=>s.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,Pj,[B(`span`,null,mn(s.value),1)]),t[19]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`Z`)],-1),B(`label`,Fj,[Nt(yj,{modelValue:c.value,"onUpdate:modelValue":t[5]||=e=>c.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,Ij,[B(`span`,null,mn(c.value),1)])])]),_:1}),Nt(qn,{"h-fit":``,"w-full":``,flex:`~ col`,border:`~ gray/25 rounded-lg`,divide:`y dashed gray/25`,"of-clip":``,"shadow-sm":``},{label:Ln(()=>[B(`span`,Lj,mn(G(p)(`stage.viewers.debug-menu.vrm.model.title`)),1)]),default:Ln(()=>[B(`div`,Rj,[t[20]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`X`)],-1),B(`label`,zj,[Nt(yj,{modelValue:l.value,"onUpdate:modelValue":t[6]||=e=>l.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,Bj,[B(`span`,null,mn(l.value),1)]),t[21]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`Y`)],-1),B(`label`,Vj,[Nt(yj,{modelValue:u.value,"onUpdate:modelValue":t[7]||=e=>u.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,Hj,[B(`span`,null,mn(u.value),1)]),t[22]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`Z`)],-1),B(`label`,Uj,[Nt(yj,{modelValue:d.value,"onUpdate:modelValue":t[8]||=e=>d.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,Wj,[B(`span`,null,mn(d.value),1)])])]),_:1}),B(`div`,Gj,[B(`span`,null,mn(G(p)(`stage.viewers.debug-menu.emotions`)),1)]),B(`div`,Kj,[B(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[9]||=e=>{var t;return(t=f.value)?.setExpression(`neutral`)}},mn(G(p)(`stage.viewers.debug-menu.emotions-btn.neutral`)),1),B(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[10]||=e=>{var t;return(t=f.value)?.setExpression(`surprised`)}},mn(G(p)(`stage.viewers.debug-menu.emotions-btn.surprised`)),1),B(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[11]||=e=>{var t;return(t=f.value)?.setExpression(`sad`)}},mn(G(p)(`stage.viewers.debug-menu.emotions-btn.sad`)),1),B(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[12]||=e=>{var t;return(t=f.value)?.setExpression(`angry`)}},mn(G(p)(`stage.viewers.debug-menu.emotions-btn.angry`)),1),B(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[13]||=e=>{var t;return(t=f.value)?.setExpression(`happy`)}},mn(G(p)(`stage.viewers.debug-menu.emotions-btn.happy`)),1)])])])):jt(``,!0)]),_:1})])]),_:1}))}}),Jj=qj;const Yj=[`onClick`],Xj={flex:``,"gap-1.5":``};var Zj=H({__name:`Section`,props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(e){return(t,n)=>(U(),At(qn,{default:e.expand},{trigger:Ln(t=>[B(`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:e=>t.setVisible(!t.visible)},[B(`div`,Xj,[B(`div`,{class:Jt(e.icon),"size-6":``},null,2),Mt(` `+mn(e.title),1)]),B(`div`,{"i-solar:alt-arrow-down-linear":``,transition:`transform duration-250`,class:Jt({"rotate-180":t.visible})},null,2)],8,Yj)]),default:Ln(()=>[B(`div`,{grid:``,"gap-2":``,"p-4":``,class:Jt(e.innerClass)},[sn(t.$slots,`default`)],2)]),_:3},8,[`default`]))}}),Qj=Zj;function $j(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function eM(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function tM(e){return this instanceof tM?(this.v=e,this):new tM(e)}function nM(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof tM?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function rM(e){var t,n;return t={},r(`next`),r(`throw`,function(e){throw e}),r(`return`),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:tM(e[r](t)),done:!1}:i?i(t):t}:i}}function iM(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof eM==`function`?eM(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}const aM=new TextDecoder(`utf-8`),oM=e=>aM.decode(e),sM=new TextEncoder,cM=e=>sM.encode(e),lM=e=>typeof e==`number`,uM=e=>typeof e==`boolean`,dM=e=>typeof e==`function`,fM=e=>e!=null&&Object(e)===e,pM=e=>fM(e)&&dM(e.then),mM=e=>fM(e)&&dM(e[Symbol.iterator]),hM=e=>fM(e)&&dM(e[Symbol.asyncIterator]),gM=e=>fM(e)&&fM(e.schema),_M=e=>fM(e)&&`done`in e&&`value`in e,vM=e=>fM(e)&&dM(e.stat)&&lM(e.fd),yM=e=>fM(e)&&SM(e.body),bM=e=>`_getDOMStream`in e&&`_getNodeStream`in e,xM=e=>fM(e)&&dM(e.abort)&&dM(e.getWriter)&&!bM(e),SM=e=>fM(e)&&dM(e.cancel)&&dM(e.getReader)&&!bM(e),CM=e=>fM(e)&&dM(e.end)&&dM(e.write)&&uM(e.writable)&&!bM(e),wM=e=>fM(e)&&dM(e.read)&&dM(e.pipe)&&uM(e.readable)&&!bM(e),TM=e=>fM(e)&&dM(e.clear)&&dM(e.bytes)&&dM(e.position)&&dM(e.setPosition)&&dM(e.capacity)&&dM(e.getBufferIdentifier)&&dM(e.createLong),EM=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function DM(e){let t=e[0]?[e[0]]:[],n,r,i,a;for(let o,s,c=0,l=0,u=e.length;++ce+t.byteLength,0),i,a,o,s=0,c=-1,l=Math.min(t||1/0,r);for(let e=n.length;++cAM(Int32Array,e),MM=e=>AM(BigInt64Array,e),NM=e=>AM(Uint8Array,e),PM=e=>(e.next(),e);function*FM(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof EM?n(t):mM(t)?t:n(t);return yield*PM(function*(t){let n=null;do n=t.next(yield AM(e,n));while(!n.done)}(r[Symbol.iterator]())),new e}const IM=e=>FM(Uint8Array,e);function LM(e,t){return nM(this,arguments,function*(){if(pM(t))return yield tM(yield tM(yield*rM(iM(LM(e,yield tM(t))))));let n=function(e){return nM(this,arguments,function*(){yield yield tM(yield tM(e))})},r=function(e){return nM(this,arguments,function*(){yield tM(yield*rM(iM(PM(function*(e){let t=null;do t=e.next(yield t?.value);while(!t.done)}(e[Symbol.iterator]())))))})},i=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof EM?n(t):mM(t)?r(t):hM(t)?t:n(t);return yield tM(yield*rM(iM(PM(function(t){return nM(this,arguments,function*(){let n=null;do n=yield tM(t.next(yield yield tM(AM(e,n))));while(!n.done)})}(i[Symbol.asyncIterator]()))))),yield tM(new e)})}const RM=e=>LM(Uint8Array,e);function zM(e,t,n){if(e!==0){n=n.slice(0,t);for(let t=-1,r=n.length;++t0)do if(e[n]!==t[n])return!1;while(++n(e.next(),e);function*UM(e){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?kM(r,o)[0]:([i,r,s]=kM(r,o),i)}({cmd:a,size:o}=(yield(()=>null)())||{cmd:`read`,size:0});let l=IM(e)[Symbol.iterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?l.next():l.next(o-s),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield c());while(onull)()))||{cmd:`read`,size:0});let l=RM(e)[Symbol.asyncIterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?yield tM(l.next()):yield tM(l.next(o-s)),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield tM(c()));while(onull)()))||{cmd:`read`,size:0});let l=new KM(e);try{do if({done:t,value:i}=Number.isNaN(o-s)?yield tM(l.read()):yield tM(l.read(o-s)),!t&&i.byteLength>0&&(r.push(NM(i)),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield tM(c()));while(o{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return $j(this,void 0,void 0,function*(){let{reader:t,source:n}=this;t&&(yield t.cancel(e).catch(()=>{})),n&&n.locked&&this.releaseLock()})}read(e){return $j(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array};let t=yield this.reader.read();return!t.done&&(t.value=NM(t)),t})}};const qM=(e,t)=>{let n=e=>r([t,e]),r;return[t,n,new Promise(i=>(r=i)&&e.once(t,n))]};function JM(e){return nM(this,arguments,function*(){let t=[],n=`error`,r=!1,i=null,a,o,s=0,c=[],l;function u(){return a===`peek`?kM(c,o)[0]:([l,c,s]=kM(c,o),l)}if({cmd:a,size:o}=(yield yield tM((()=>null)()))||{cmd:`read`,size:0},e.isTTY)return yield yield tM(new Uint8Array),yield tM(null);try{t[0]=qM(e,`end`),t[1]=qM(e,`error`);do{if(t[2]=qM(e,`readable`),[n,i]=yield tM(Promise.race(t.map(e=>e[2]))),n===`error`)break;if((r=n===`end`)||(Number.isFinite(o-s)?(l=NM(e.read(o-s)),l.byteLength0&&(c.push(l),s+=l.byteLength)),r||o<=s)do({cmd:a,size:o}=yield yield tM(u()));while(o{for(let[n,r]of t)e.off(n,r);try{let t=e.destroy;t&&t.call(e,n),n=void 0}catch(e){n=e||n}finally{n==null?r():i(n)}})}})}var YM;(function(e){e[e.V1=0]=`V1`,e[e.V2=1]=`V2`,e[e.V3=2]=`V3`,e[e.V4=3]=`V4`,e[e.V5=4]=`V5`})(YM||={});var XM;(function(e){e[e.Sparse=0]=`Sparse`,e[e.Dense=1]=`Dense`})(XM||={});var ZM;(function(e){e[e.HALF=0]=`HALF`,e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`})(ZM||={});var QM;(function(e){e[e.DAY=0]=`DAY`,e[e.MILLISECOND=1]=`MILLISECOND`})(QM||={});var $M;(function(e){e[e.SECOND=0]=`SECOND`,e[e.MILLISECOND=1]=`MILLISECOND`,e[e.MICROSECOND=2]=`MICROSECOND`,e[e.NANOSECOND=3]=`NANOSECOND`})($M||={});var eN;(function(e){e[e.YEAR_MONTH=0]=`YEAR_MONTH`,e[e.DAY_TIME=1]=`DAY_TIME`,e[e.MONTH_DAY_NANO=2]=`MONTH_DAY_NANO`})(eN||={});const tN=2,nN=4,rN=4,iN=4,aN=new Int32Array(2),oN=new Float32Array(aN.buffer),sN=new Float64Array(aN.buffer),cN=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var lN;(function(e){e[e.UTF8_BYTES=1]=`UTF8_BYTES`,e[e.UTF16_STRING=2]=`UTF16_STRING`})(lN||={});var uN=class e{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new e(new Uint8Array(t))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<>8}writeUint16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeInt32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeUint32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeInt64(e,t){this.writeInt32(e,Number(BigInt.asIntN(32,t))),this.writeInt32(e+4,Number(BigInt.asIntN(32,t>>BigInt(32))))}writeUint64(e,t){this.writeUint32(e,Number(BigInt.asUintN(32,t))),this.writeUint32(e+4,Number(BigInt.asUintN(32,t>>BigInt(32))))}writeFloat32(e,t){oN[0]=t,this.writeInt32(e,aN[0])}writeFloat64(e,t){sN[0]=t,this.writeInt32(e,aN[cN?0:1]),this.writeInt32(e+4,aN[cN?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=t);let r=~(this.bb.capacity()-this.space+n)+1&t-1;for(;this.space=0&&this.vtable[t]==0;t--);let n=t+1;for(;t>=0;t--)this.addInt16(this.vtable[t]==0?0:e-this.vtable[t]);let r=2;this.addInt16(e-this.object_start);let i=(n+r)*tN;this.addInt16(i);let a=0,o=this.space;outer_loop:for(t=0;t=0;t--)this.writeInt8(e.charCodeAt(t))}this.prep(this.minalign,nN+r),this.addOffset(e),r&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,t){this.finish(e,t,!0)}requiredField(e,t){let n=this.bb.capacity()-e,r=n-this.bb.readInt32(n),i=t=0;n--)e.addInt32(t[n]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){let t=e.endObject();return t}static createUnion(t,n,r){return e.startUnion(t),e.addMode(t,n),e.addTypeIds(t,r),e.endUnion(t)}},HN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,n){return t.setPosition(t.position()+iN),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(e){e.startObject(0)}static endUtf8(e){let t=e.endObject();return t}static createUtf8(t){return e.startUtf8(t),e.endUtf8(t)}},UN;(function(e){e[e.NONE=0]=`NONE`,e[e.Null=1]=`Null`,e[e.Int=2]=`Int`,e[e.FloatingPoint=3]=`FloatingPoint`,e[e.Binary=4]=`Binary`,e[e.Utf8=5]=`Utf8`,e[e.Bool=6]=`Bool`,e[e.Decimal=7]=`Decimal`,e[e.Date=8]=`Date`,e[e.Time=9]=`Time`,e[e.Timestamp=10]=`Timestamp`,e[e.Interval=11]=`Interval`,e[e.List=12]=`List`,e[e.Struct_=13]=`Struct_`,e[e.Union=14]=`Union`,e[e.FixedSizeBinary=15]=`FixedSizeBinary`,e[e.FixedSizeList=16]=`FixedSizeList`,e[e.Map=17]=`Map`,e[e.Duration=18]=`Duration`,e[e.LargeBinary=19]=`LargeBinary`,e[e.LargeUtf8=20]=`LargeUtf8`,e[e.LargeList=21]=`LargeList`,e[e.RunEndEncoded=22]=`RunEndEncoded`})(UN||={});var WN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,n){return t.setPosition(t.position()+iN),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}name(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):UN.NONE}type(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){let t=this.bb.__offset(this.bb_pos,12);return t?(e||new SN).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(t,n){let r=this.bb.__offset(this.bb_pos,14);return r?(n||new e).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+t*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,16);return n?(t||new CN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,UN.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){let t=e.endObject();return t}},GN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,n){return t.setPosition(t.position()+iN),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):yN.Little}fields(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new WN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,8);return n?(t||new CN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):BigInt(0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,yN.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let n=t.length-1;n>=0;n--)e.addInt64(t[n]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){let t=e.endObject();return t}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(t,n,r,i,a){return e.startSchema(t),e.addEndianness(t,n),e.addFields(t,r),e.addCustomMetadata(t,i),e.addFeatures(t,a),e.endSchema(t)}},KN;(function(e){e[e.NONE=0]=`NONE`,e[e.Schema=1]=`Schema`,e[e.DictionaryBatch=2]=`DictionaryBatch`,e[e.RecordBatch=3]=`RecordBatch`,e[e.Tensor=4]=`Tensor`,e[e.SparseTensor=5]=`SparseTensor`})(KN||={});var Y;(function(e){e[e.NONE=0]=`NONE`,e[e.Null=1]=`Null`,e[e.Int=2]=`Int`,e[e.Float=3]=`Float`,e[e.Binary=4]=`Binary`,e[e.Utf8=5]=`Utf8`,e[e.Bool=6]=`Bool`,e[e.Decimal=7]=`Decimal`,e[e.Date=8]=`Date`,e[e.Time=9]=`Time`,e[e.Timestamp=10]=`Timestamp`,e[e.Interval=11]=`Interval`,e[e.List=12]=`List`,e[e.Struct=13]=`Struct`,e[e.Union=14]=`Union`,e[e.FixedSizeBinary=15]=`FixedSizeBinary`,e[e.FixedSizeList=16]=`FixedSizeList`,e[e.Map=17]=`Map`,e[e.Duration=18]=`Duration`,e[e.LargeBinary=19]=`LargeBinary`,e[e.LargeUtf8=20]=`LargeUtf8`,e[e.Dictionary=-1]=`Dictionary`,e[e.Int8=-2]=`Int8`,e[e.Int16=-3]=`Int16`,e[e.Int32=-4]=`Int32`,e[e.Int64=-5]=`Int64`,e[e.Uint8=-6]=`Uint8`,e[e.Uint16=-7]=`Uint16`,e[e.Uint32=-8]=`Uint32`,e[e.Uint64=-9]=`Uint64`,e[e.Float16=-10]=`Float16`,e[e.Float32=-11]=`Float32`,e[e.Float64=-12]=`Float64`,e[e.DateDay=-13]=`DateDay`,e[e.DateMillisecond=-14]=`DateMillisecond`,e[e.TimestampSecond=-15]=`TimestampSecond`,e[e.TimestampMillisecond=-16]=`TimestampMillisecond`,e[e.TimestampMicrosecond=-17]=`TimestampMicrosecond`,e[e.TimestampNanosecond=-18]=`TimestampNanosecond`,e[e.TimeSecond=-19]=`TimeSecond`,e[e.TimeMillisecond=-20]=`TimeMillisecond`,e[e.TimeMicrosecond=-21]=`TimeMicrosecond`,e[e.TimeNanosecond=-22]=`TimeNanosecond`,e[e.DenseUnion=-23]=`DenseUnion`,e[e.SparseUnion=-24]=`SparseUnion`,e[e.IntervalDayTime=-25]=`IntervalDayTime`,e[e.IntervalYearMonth=-26]=`IntervalYearMonth`,e[e.DurationSecond=-27]=`DurationSecond`,e[e.DurationMillisecond=-28]=`DurationMillisecond`,e[e.DurationMicrosecond=-29]=`DurationMicrosecond`,e[e.DurationNanosecond=-30]=`DurationNanosecond`})(Y||={});var qN;(function(e){e[e.OFFSET=0]=`OFFSET`,e[e.DATA=1]=`DATA`,e[e.VALIDITY=2]=`VALIDITY`,e[e.TYPE=3]=`TYPE`})(qN||={});const JN=void 0;function YN(e){if(e===null)return`null`;if(e===JN)return`undefined`;switch(typeof e){case`number`:return`${e}`;case`bigint`:return`${e}`;case`string`:return`"${e}"`}return typeof e[Symbol.toPrimitive]==`function`?e[Symbol.toPrimitive](`string`):ArrayBuffer.isView(e)?e instanceof BigInt64Array||e instanceof BigUint64Array?`[${[...e].map(e=>YN(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function XN(e){if(typeof e==`bigint`&&(e<-(2**53-1)||e>2**53-1))throw TypeError(`${e} is not safe to convert to a number.`);return Number(e)}function ZN(e,t){return XN(e/t)+XN(e%t)/XN(t)}const QN=Symbol.for(`isArrowBigNum`);function $N(e,...t){return t.length===0?Object.setPrototypeOf(AM(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}$N.prototype[QN]=!0,$N.prototype.toJSON=function(){return`"${oP(this)}"`},$N.prototype.valueOf=function(e){return aP(this,e)},$N.prototype.toString=function(){return oP(this)},$N.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return aP(this);case`string`:return oP(this);case`default`:return sP(this)}return oP(this)};function eP(...e){return $N.apply(this,e)}function tP(...e){return $N.apply(this,e)}function nP(...e){return $N.apply(this,e)}Object.setPrototypeOf(eP.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(tP.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(nP.prototype,Object.create(Uint32Array.prototype)),Object.assign(eP.prototype,$N.prototype,{constructor:eP,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(tP.prototype,$N.prototype,{constructor:tP,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(nP.prototype,$N.prototype,{constructor:nP,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const rP=BigInt(4294967296)*BigInt(4294967296),iP=rP-BigInt(1);function aP(e,t){let{buffer:n,byteOffset:r,byteLength:i,signed:a}=e,o=new BigUint64Array(n,r,i/8),s=a&&o.at(-1)&BigInt(1)<=0)return cP(e);t=t.slice();let r=1;for(let e=0;e(e.children=null,e.ArrayType=Array,e.OffsetArrayType=Int32Array,e[Symbol.toStringTag]=`DataType`))(MP.prototype);var NP=class extends MP{constructor(){super(Y.Null)}toString(){return`Null`}};dP=Symbol.toStringTag,NP[dP]=(e=>e[Symbol.toStringTag]=`Null`)(NP.prototype);var PP=class extends MP{constructor(e,t){super(Y.Int),this.isSigned=e,this.bitWidth=t}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 Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?`I`:`Ui`}nt${this.bitWidth}`}};fP=Symbol.toStringTag,PP[fP]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(PP.prototype);var FP=class extends PP{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},IP=class extends PP{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},LP=class extends PP{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},RP=class extends PP{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},zP=class extends PP{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},BP=class extends PP{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},VP=class extends PP{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},HP=class extends PP{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(FP.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(IP.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(LP.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(RP.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(zP.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(BP.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(VP.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(HP.prototype,`ArrayType`,{value:BigUint64Array});var UP=class extends MP{constructor(e){super(Y.Float),this.precision=e}get ArrayType(){switch(this.precision){case ZM.HALF:return Uint16Array;case ZM.SINGLE:return Float32Array;case ZM.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};pP=Symbol.toStringTag,UP[pP]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(UP.prototype);var WP=class extends UP{constructor(){super(ZM.HALF)}},GP=class extends UP{constructor(){super(ZM.SINGLE)}},KP=class extends UP{constructor(){super(ZM.DOUBLE)}};Object.defineProperty(WP.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(GP.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(KP.prototype,`ArrayType`,{value:Float64Array});var qP=class extends MP{constructor(){super(Y.Binary)}toString(){return`Binary`}};mP=Symbol.toStringTag,qP[mP]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(qP.prototype);var JP=class extends MP{constructor(){super(Y.LargeBinary)}toString(){return`LargeBinary`}};hP=Symbol.toStringTag,JP[hP]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(JP.prototype);var YP=class extends MP{constructor(){super(Y.Utf8)}toString(){return`Utf8`}};gP=Symbol.toStringTag,YP[gP]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(YP.prototype);var XP=class extends MP{constructor(){super(Y.LargeUtf8)}toString(){return`LargeUtf8`}};_P=Symbol.toStringTag,XP[_P]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(XP.prototype);var ZP=class extends MP{constructor(){super(Y.Bool)}toString(){return`Bool`}};vP=Symbol.toStringTag,ZP[vP]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(ZP.prototype);var QP=class extends MP{constructor(e,t,n=128){super(Y.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};yP=Symbol.toStringTag,QP[yP]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(QP.prototype);var $P=class extends MP{constructor(e){super(Y.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${QM[this.unit]}>`}get ArrayType(){return this.unit===QM.DAY?Int32Array:BigInt64Array}};bP=Symbol.toStringTag,$P[bP]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))($P.prototype);var eF=class extends MP{constructor(e,t){super(Y.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${$M[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};xP=Symbol.toStringTag,eF[xP]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(eF.prototype);var tF=class extends MP{constructor(e,t){super(Y.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${$M[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};SP=Symbol.toStringTag,tF[SP]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(tF.prototype);var nF=class extends MP{constructor(e){super(Y.Interval),this.unit=e}toString(){return`Interval<${eN[this.unit]}>`}};CP=Symbol.toStringTag,nF[CP]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(nF.prototype);var rF=class extends MP{constructor(e){super(Y.Duration),this.unit=e}toString(){return`Duration<${$M[this.unit]}>`}};wP=Symbol.toStringTag,rF[wP]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(rF.prototype);var iF=class extends MP{constructor(e){super(Y.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};TP=Symbol.toStringTag,iF[TP]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(iF.prototype);var aF=class extends MP{constructor(e){super(Y.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};EP=Symbol.toStringTag,aF[EP]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(aF.prototype);var oF=class extends MP{constructor(e,t,n){super(Y.Union),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((e,t,n)=>(e[t]=n)&&e||e,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(` | `)}>`}};DP=Symbol.toStringTag,oF[DP]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(oF.prototype);var sF=class extends MP{constructor(e){super(Y.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};OP=Symbol.toStringTag,sF[OP]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(sF.prototype);var cF=class extends MP{constructor(e,t){super(Y.FixedSizeList),this.listSize=e,this.children=[t]}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}>`}};kP=Symbol.toStringTag,cF[kP]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(cF.prototype);var lF=class extends MP{constructor(e,t=!1){var n,r,i;if(super(Y.Map),this.children=[e],this.keysSorted=t,e&&(e.name=`entries`,(n=e?.type)?.children)){let t=(r=e?.type)?.children[0];t&&(t.name=`key`);let n=(i=e?.type)?.children[1];n&&(n.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(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};AP=Symbol.toStringTag,lF[AP]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(lF.prototype);const uF=(e=>()=>++e)(-1);var dF=class extends MP{constructor(e,t,n,r){super(Y.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?uF():XN(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};jP=Symbol.toStringTag,dF[jP]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(dF.prototype);function fF(e){let t=e;switch(e.typeId){case Y.Decimal:return e.bitWidth/32;case Y.Interval:return 1+t.unit;case Y.FixedSizeList:return t.listSize;case Y.FixedSizeBinary:return t.byteWidth;default:return 1}}var pF=class{visitMany(e,...t){return e.map((e,n)=>this.visit(e,...t.map(e=>e[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return mF(this,e,t)}getVisitFnByTypeId(e,t=!0){return hF(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};function mF(e,t,n=!0){return typeof t==`number`?hF(e,t,n):typeof t==`string`&&t in Y?hF(e,Y[t],n):t&&t instanceof MP?hF(e,gF(t),n):t?.type&&t.type instanceof MP?hF(e,gF(t.type),n):hF(e,Y.NONE,n)}function hF(e,t,n=!0){let r=null;switch(t){case Y.Null:r=e.visitNull;break;case Y.Bool:r=e.visitBool;break;case Y.Int:r=e.visitInt;break;case Y.Int8:r=e.visitInt8||e.visitInt;break;case Y.Int16:r=e.visitInt16||e.visitInt;break;case Y.Int32:r=e.visitInt32||e.visitInt;break;case Y.Int64:r=e.visitInt64||e.visitInt;break;case Y.Uint8:r=e.visitUint8||e.visitInt;break;case Y.Uint16:r=e.visitUint16||e.visitInt;break;case Y.Uint32:r=e.visitUint32||e.visitInt;break;case Y.Uint64:r=e.visitUint64||e.visitInt;break;case Y.Float:r=e.visitFloat;break;case Y.Float16:r=e.visitFloat16||e.visitFloat;break;case Y.Float32:r=e.visitFloat32||e.visitFloat;break;case Y.Float64:r=e.visitFloat64||e.visitFloat;break;case Y.Utf8:r=e.visitUtf8;break;case Y.LargeUtf8:r=e.visitLargeUtf8;break;case Y.Binary:r=e.visitBinary;break;case Y.LargeBinary:r=e.visitLargeBinary;break;case Y.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case Y.Date:r=e.visitDate;break;case Y.DateDay:r=e.visitDateDay||e.visitDate;break;case Y.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case Y.Timestamp:r=e.visitTimestamp;break;case Y.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case Y.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case Y.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case Y.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case Y.Time:r=e.visitTime;break;case Y.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case Y.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case Y.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case Y.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case Y.Decimal:r=e.visitDecimal;break;case Y.List:r=e.visitList;break;case Y.Struct:r=e.visitStruct;break;case Y.Union:r=e.visitUnion;break;case Y.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case Y.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case Y.Dictionary:r=e.visitDictionary;break;case Y.Interval:r=e.visitInterval;break;case Y.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case Y.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case Y.Duration:r=e.visitDuration;break;case Y.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case Y.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case Y.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case Y.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case Y.FixedSizeList:r=e.visitFixedSizeList;break;case Y.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${Y[t]}'`)}function gF(e){switch(e.typeId){case Y.Null:return Y.Null;case Y.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?Y.Int8:Y.Uint8;case 16:return n?Y.Int16:Y.Uint16;case 32:return n?Y.Int32:Y.Uint32;case 64:return n?Y.Int64:Y.Uint64}return Y.Int}case Y.Float:switch(e.precision){case ZM.HALF:return Y.Float16;case ZM.SINGLE:return Y.Float32;case ZM.DOUBLE:return Y.Float64}return Y.Float;case Y.Binary:return Y.Binary;case Y.LargeBinary:return Y.LargeBinary;case Y.Utf8:return Y.Utf8;case Y.LargeUtf8:return Y.LargeUtf8;case Y.Bool:return Y.Bool;case Y.Decimal:return Y.Decimal;case Y.Time:switch(e.unit){case $M.SECOND:return Y.TimeSecond;case $M.MILLISECOND:return Y.TimeMillisecond;case $M.MICROSECOND:return Y.TimeMicrosecond;case $M.NANOSECOND:return Y.TimeNanosecond}return Y.Time;case Y.Timestamp:switch(e.unit){case $M.SECOND:return Y.TimestampSecond;case $M.MILLISECOND:return Y.TimestampMillisecond;case $M.MICROSECOND:return Y.TimestampMicrosecond;case $M.NANOSECOND:return Y.TimestampNanosecond}return Y.Timestamp;case Y.Date:switch(e.unit){case QM.DAY:return Y.DateDay;case QM.MILLISECOND:return Y.DateMillisecond}return Y.Date;case Y.Interval:switch(e.unit){case eN.DAY_TIME:return Y.IntervalDayTime;case eN.YEAR_MONTH:return Y.IntervalYearMonth}return Y.Interval;case Y.Duration:switch(e.unit){case $M.SECOND:return Y.DurationSecond;case $M.MILLISECOND:return Y.DurationMillisecond;case $M.MICROSECOND:return Y.DurationMicrosecond;case $M.NANOSECOND:return Y.DurationNanosecond}return Y.Duration;case Y.Map:return Y.Map;case Y.List:return Y.List;case Y.Struct:return Y.Struct;case Y.Union:switch(e.mode){case XM.Dense:return Y.DenseUnion;case XM.Sparse:return Y.SparseUnion}return Y.Union;case Y.FixedSizeBinary:return Y.FixedSizeBinary;case Y.FixedSizeList:return Y.FixedSizeList;case Y.Dictionary:return Y.Dictionary}throw Error(`Unrecognized type '${Y[e.typeId]}'`)}pF.prototype.visitInt8=null,pF.prototype.visitInt16=null,pF.prototype.visitInt32=null,pF.prototype.visitInt64=null,pF.prototype.visitUint8=null,pF.prototype.visitUint16=null,pF.prototype.visitUint32=null,pF.prototype.visitUint64=null,pF.prototype.visitFloat16=null,pF.prototype.visitFloat32=null,pF.prototype.visitFloat64=null,pF.prototype.visitDateDay=null,pF.prototype.visitDateMillisecond=null,pF.prototype.visitTimestampSecond=null,pF.prototype.visitTimestampMillisecond=null,pF.prototype.visitTimestampMicrosecond=null,pF.prototype.visitTimestampNanosecond=null,pF.prototype.visitTimeSecond=null,pF.prototype.visitTimeMillisecond=null,pF.prototype.visitTimeMicrosecond=null,pF.prototype.visitTimeNanosecond=null,pF.prototype.visitDenseUnion=null,pF.prototype.visitSparseUnion=null,pF.prototype.visitIntervalDayTime=null,pF.prototype.visitIntervalYearMonth=null,pF.prototype.visitDuration=null,pF.prototype.visitDurationSecond=null,pF.prototype.visitDurationMillisecond=null,pF.prototype.visitDurationMicrosecond=null,pF.prototype.visitDurationNanosecond=null;const _F=new Float64Array(1),vF=new Uint32Array(_F.buffer);function yF(e){let t=(e&31744)>>10,n=(e&1023)/1024,r=(-1)**((e&32768)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*2**(t-15)*(1+n)}function bF(e){if(e!==e)return 32256;_F[0]=e;let t=(vF[1]&2147483648)>>16&65535,n=vF[1]&2146435072,r=0;return n>=1089470464?vF[0]>0?n=31744:(n=(n&2080374784)>>16,r=(vF[1]&1048575)>>10):n<=1056964608?(r=1048576+(vF[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(vF[1]&1048575)+512>>10),t|n|r&65535}var xF=class extends pF{};function SF(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const CF=(e,t,n)=>{e[t]=Math.floor(n/864e5)},wF=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},DF=({values:e},t,n)=>{e[t]=n},OF=({values:e},t,n)=>{e[t]=bF(n)},kF=(e,t,n)=>{switch(e.type.precision){case ZM.HALF:return OF(e,t,n);case ZM.SINGLE:case ZM.DOUBLE:return DF(e,t,n)}},AF=({values:e},t,n)=>{CF(e,t,n.valueOf())},jF=({values:e},t,n)=>{e[t]=BigInt(n)},MF=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},NF=({values:e,valueOffsets:t},n,r)=>wF(e,t,n,r),PF=({values:e,valueOffsets:t},n,r)=>wF(e,t,n,cM(r)),FF=(e,t,n)=>{e.type.unit===QM.DAY?AF(e,t,n):jF(e,t,n)},IF=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},LF=({values:e},t,n)=>{e[t]=BigInt(n)},RF=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},zF=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},BF=(e,t,n)=>{switch(e.type.unit){case $M.SECOND:return IF(e,t,n);case $M.MILLISECOND:return LF(e,t,n);case $M.MICROSECOND:return RF(e,t,n);case $M.NANOSECOND:return zF(e,t,n)}},VF=({values:e},t,n)=>{e[t]=n},HF=({values:e},t,n)=>{e[t]=n},UF=({values:e},t,n)=>{e[t]=n},WF=({values:e},t,n)=>{e[t]=n},GF=(e,t,n)=>{switch(e.type.unit){case $M.SECOND:return VF(e,t,n);case $M.MILLISECOND:return HF(e,t,n);case $M.MICROSECOND:return UF(e,t,n);case $M.NANOSECOND:return WF(e,t,n)}},KF=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},qF=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=pI.getVisitFn(r);if(Array.isArray(n))for(let e=-1,o=i[t],s=i[t+1];o{let r=e.children[0],{valueOffsets:i}=e,a=pI.getVisitFn(r),{[t]:o,[t+1]:s}=i,c=n instanceof Map?n.entries():Object.entries(n);for(let e of c)if(a(r,o,e),++o>=s)break},YF=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),XF=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),ZF=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),QF=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),$F=(e,t,n)=>{let r=e.type.children.map(e=>pI.getVisitFn(e.type)),i=n instanceof Map?ZF(t,n):n instanceof fR?XF(t,n):Array.isArray(n)?YF(t,n):QF(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},eI=(e,t,n)=>{e.type.mode===XM.Dense?tI(e,t,n):nI(e,t,n)},tI=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];pI.visit(i,e.valueOffsets[t],n)},nI=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];pI.visit(i,t,n)},rI=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},iI=(e,t,n)=>{e.type.unit===eN.DAY_TIME?aI(e,t,n):oI(e,t,n)},aI=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},oI=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},sI=({values:e},t,n)=>{e[t]=n},cI=({values:e},t,n)=>{e[t]=n},lI=({values:e},t,n)=>{e[t]=n},uI=({values:e},t,n)=>{e[t]=n},dI=(e,t,n)=>{switch(e.type.unit){case $M.SECOND:return sI(e,t,n);case $M.MILLISECOND:return cI(e,t,n);case $M.MICROSECOND:return lI(e,t,n);case $M.NANOSECOND:return uI(e,t,n)}},fI=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=pI.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${YN(e)}: ${YN(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new _I(this[mI],this[hI])}},_I=class{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return ee.name)}has(e,t){return e[mI].type.children.findIndex(e=>e.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[mI].type.children.findIndex(e=>e.name===t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[mI].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=lL.visit(e[mI].children[n],e[hI]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[mI].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(pI.visit(e[mI].children[r],e[hI],n),Reflect.set(e,t,n))}},yI=class extends pF{};function bI(e){return(t,n)=>t.getValid(n)?e(t,n):null}const xI=(e,t)=>864e5*e[t],SI=(e,t)=>null,CI=(e,t,n)=>{if(n+1>=t.length)return null;let r=XN(t[n]),i=XN(t[n+1]);return e.subarray(r,i)},wI=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<xI(e,t),EI=({values:e},t)=>XN(e[t]),DI=({stride:e,values:t},n)=>t[e*n],OI=({stride:e,values:t},n)=>yF(t[e*n]),kI=({values:e},t)=>e[t],AI=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),jI=({values:e,valueOffsets:t},n)=>CI(e,t,n),MI=({values:e,valueOffsets:t},n)=>{let r=CI(e,t,n);return r===null?null:oM(r)},NI=({values:e},t)=>e[t],PI=({type:e,values:t},n)=>e.precision===ZM.HALF?yF(t[n]):t[n],FI=(e,t)=>e.type.unit===QM.DAY?TI(e,t):EI(e,t),II=({values:e},t)=>1e3*XN(e[t]),LI=({values:e},t)=>XN(e[t]),RI=({values:e},t)=>ZN(e[t],BigInt(1e3)),zI=({values:e},t)=>ZN(e[t],BigInt(1e6)),BI=(e,t)=>{switch(e.type.unit){case $M.SECOND:return II(e,t);case $M.MILLISECOND:return LI(e,t);case $M.MICROSECOND:return RI(e,t);case $M.NANOSECOND:return zI(e,t)}},VI=({values:e},t)=>e[t],HI=({values:e},t)=>e[t],UI=({values:e},t)=>e[t],WI=({values:e},t)=>e[t],GI=(e,t)=>{switch(e.type.unit){case $M.SECOND:return VI(e,t);case $M.MILLISECOND:return HI(e,t);case $M.MICROSECOND:return UI(e,t);case $M.NANOSECOND:return WI(e,t)}},KI=({values:e,stride:t},n)=>lP.decimal(e.subarray(t*n,t*(n+1))),qI=(e,t)=>{let{valueOffsets:n,stride:r,children:i}=e,{[t*r]:a,[t*r+1]:o}=n,s=i[0],c=s.slice(a,o-a);return new fR([c])},JI=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new mL(o.slice(i,a-i))},YI=(e,t)=>new gI(e,t),XI=(e,t)=>e.type.mode===XM.Dense?ZI(e,t):QI(e,t),ZI=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return lL.visit(r,e.valueOffsets[t])},QI=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return lL.visit(r,t)},$I=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},eL=(e,t)=>e.type.unit===eN.DAY_TIME?tL(e,t):nL(e,t),tL=({values:e},t)=>e.subarray(2*t,2*(t+1)),nL=({values:e},t)=>{let n=e[t],r=new Int32Array(2);return r[0]=Math.trunc(n/12),r[1]=Math.trunc(n%12),r},rL=({values:e},t)=>e[t],iL=({values:e},t)=>e[t],aL=({values:e},t)=>e[t],oL=({values:e},t)=>e[t],sL=(e,t)=>{switch(e.type.unit){case $M.SECOND:return rL(e,t);case $M.MILLISECOND:return iL(e,t);case $M.MICROSECOND:return aL(e,t);case $M.NANOSECOND:return oL(e,t)}},cL=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new fR([a])};yI.prototype.visitNull=bI(SI),yI.prototype.visitBool=bI(wI),yI.prototype.visitInt=bI(NI),yI.prototype.visitInt8=bI(DI),yI.prototype.visitInt16=bI(DI),yI.prototype.visitInt32=bI(DI),yI.prototype.visitInt64=bI(kI),yI.prototype.visitUint8=bI(DI),yI.prototype.visitUint16=bI(DI),yI.prototype.visitUint32=bI(DI),yI.prototype.visitUint64=bI(kI),yI.prototype.visitFloat=bI(PI),yI.prototype.visitFloat16=bI(OI),yI.prototype.visitFloat32=bI(DI),yI.prototype.visitFloat64=bI(DI),yI.prototype.visitUtf8=bI(MI),yI.prototype.visitLargeUtf8=bI(MI),yI.prototype.visitBinary=bI(jI),yI.prototype.visitLargeBinary=bI(jI),yI.prototype.visitFixedSizeBinary=bI(AI),yI.prototype.visitDate=bI(FI),yI.prototype.visitDateDay=bI(TI),yI.prototype.visitDateMillisecond=bI(EI),yI.prototype.visitTimestamp=bI(BI),yI.prototype.visitTimestampSecond=bI(II),yI.prototype.visitTimestampMillisecond=bI(LI),yI.prototype.visitTimestampMicrosecond=bI(RI),yI.prototype.visitTimestampNanosecond=bI(zI),yI.prototype.visitTime=bI(GI),yI.prototype.visitTimeSecond=bI(VI),yI.prototype.visitTimeMillisecond=bI(HI),yI.prototype.visitTimeMicrosecond=bI(UI),yI.prototype.visitTimeNanosecond=bI(WI),yI.prototype.visitDecimal=bI(KI),yI.prototype.visitList=bI(qI),yI.prototype.visitStruct=bI(YI),yI.prototype.visitUnion=bI(XI),yI.prototype.visitDenseUnion=bI(ZI),yI.prototype.visitSparseUnion=bI(QI),yI.prototype.visitDictionary=bI($I),yI.prototype.visitInterval=bI(eL),yI.prototype.visitIntervalDayTime=bI(tL),yI.prototype.visitIntervalYearMonth=bI(nL),yI.prototype.visitDuration=bI(sL),yI.prototype.visitDurationSecond=bI(rL),yI.prototype.visitDurationMillisecond=bI(iL),yI.prototype.visitDurationMicrosecond=bI(aL),yI.prototype.visitDurationNanosecond=bI(oL),yI.prototype.visitFixedSizeList=bI(cL),yI.prototype.visitMap=bI(JI);const lL=new yI,uL=Symbol.for(`keys`),dL=Symbol.for(`vals`),fL=Symbol.for(`kKeysAsStrings`),pL=Symbol.for(`_kKeysAsStrings`);var mL=class{constructor(e){return this[uL]=new fR([e.children[0]]).memoize(),this[dL]=e.children[1],new Proxy(this,new gL)}get[fL](){return this[pL]||(this[pL]=Array.from(this[uL].toArray(),String))}[Symbol.iterator](){return new hL(this[uL],this[dL])}get size(){return this[uL].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[uL],t=this[dL],n={};for(let r=-1,i=e.length;++r`${YN(e)}: ${YN(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},hL=class{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),lL.visit(this.vals,e)]})}},gL=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[fL]}has(e,t){return e[fL].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[fL].indexOf(t);if(n!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[fL].indexOf(t);if(n!==-1){let r=lL.visit(Reflect.get(e,dL),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[fL].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(pI.visit(Reflect.get(e,dL),r,n),Reflect.set(e,t,n))}};Object.defineProperties(mL.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[uL]:{writable:!0,enumerable:!1,configurable:!1,value:null},[dL]:{writable:!0,enumerable:!1,configurable:!1,value:null},[pL]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let _L;function vL(e,t,n,r){let{length:i=0}=e,a=typeof t==`number`?t:0,o=typeof n==`number`?n:i;return a<0&&(a=(a%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),r?r(e,a,o):[a,o]}const yL=(e,t)=>e<0?t+e:e,bL=e=>e!==e;function xL(e){let t=typeof e;if(t!==`object`||e===null)return bL(e)?bL:t=>t===e;if(e instanceof Date){let t=e.valueOf();return e=>e instanceof Date?e.valueOf()===t:!1}return ArrayBuffer.isView(e)?t=>t?BM(e,t):!1:e instanceof Map?CL(e):Array.isArray(e)?SL(e):e instanceof fR?wL(e):TL(e,!0)}function SL(e){let t=[];for(let n=-1,r=e.length;++n!1;let r=[];for(let t=-1,i=n.length;++t{if(!n||typeof n!=`object`)return!1;switch(n.constructor){case Array:return DL(e,n);case Map:return kL(e,n,n.keys());case mL:case gI:case Object:case void 0:return kL(e,n,t||Object.keys(n))}return n instanceof fR?OL(e,n):!1}}function DL(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++r>r}function ML(e,t,n){let r=n.byteLength+7&-8;if(e>0||n.byteLength>3):NL(new PL(n,e,t,null,AL)).subarray(0,r)),i}return n}function NL(e){let t=[],n=0,r=0,i=0;for(let a of e)a&&(i|=1<0)&&(t[n++]=i);let a=new Uint8Array(t.length+7&-8);return a.set(t),a}var PL=class{constructor(e,t,n,r,i){this.bytes=e,this.length=n,this.context=r,this.get=i,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8==0?0:8-t%8);return FL(e,t,i)+FL(e,r,n)+IL(e,i>>3,r-i>>3)}function IL(e,t,n){let r=0,i=Math.trunc(t),a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=n===void 0?e.byteLength:i+n;for(;o-i>=4;)r+=LL(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=LL(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=LL(a.getUint8(i)),i+=1;return r}function LL(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const RL=-1;var zL=class e{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){let{type:e}=this;return MP.isSparseUnion(e)||MP.isDenseUnion(e)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{valueOffsets:t,values:n,nullBitmap:r,typeIds:i}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.children.reduce((e,t)=>e+t.byteLength,e)}get nullCount(){if(MP.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=RL&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-FL(t,this.offset,this.offset+this.length)),e}constructor(t,n,r,i,a,o=[],s){this.type=t,this.children=o,this.dictionary=s,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let c;a instanceof e?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=fF(t),a&&((c=a[0])&&(this.valueOffsets=c),(c=a[1])&&(this.values=c),(c=a[2])&&(this.nullBitmap=c),(c=a[3])&&(this.typeIds=c)))}getValid(e){let{type:t}=this;if(MP.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===XM.Dense?this.valueOffsets[e]:e;return r.getValid(i)}if(this.nullable&&this.nullCount>0){let t=this.offset+e,n=this.nullBitmap[t>>3];return(n&1<>3;(!r||r.byteLength<=c)&&(r=new Uint8Array((i+a+63&-64)>>3).fill(255),this.nullCount>0?(r.set(ML(i,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:r})):Object.assign(this,{nullBitmap:r,_nullCount:0}));let l=r[c];n=(l&s)!==0,r[c]=t?l|s:l&~s}return n!==!!t&&(this._nullCount=this.nullCount+(t?-1:1)),t}clone(t=this.type,n=this.offset,r=this.length,i=this._nullCount,a=this,o=this.children){return new e(t,n,r,i,a,o,this.dictionary)}slice(e,t){let{stride:n,typeId:r,children:i}=this,a=(this._nullCount===0)-1,o=r===16?n:1,s=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,a,s,i.length===0||this.valueOffsets?i:this._sliceChildren(i,o*e,o*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===Y.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:n}=this,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<0&&r.set(ML(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[qN.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}_sliceBuffers(e,t,n,r){let i,{buffers:a}=this;return(i=a[qN.TYPE])&&(a[qN.TYPE]=i.subarray(e,e+t)),(i=a[qN.OFFSET])&&(a[qN.OFFSET]=i.subarray(e,e+t+1))||(i=a[qN.DATA])&&(a[qN.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};zL.prototype.children=Object.freeze([]);var BL=class e extends pF{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new zL(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=NM(e.data),i=NM(e.nullBitmap),a=jM(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zL(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=NM(e.data),i=NM(e.nullBitmap),a=MM(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zL(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=NM(e.data),i=NM(e.nullBitmap),a=jM(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zL(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=NM(e.data),i=NM(e.nullBitmap),a=MM(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zL(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/fF(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/fF(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/fF(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/fF(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/fF(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=NM(e.nullBitmap),a=jM(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zL(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=NM(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=AM(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(MP.isSparseUnion(t))return new zL(t,n,a,o,[void 0,void 0,void 0,i],r);let s=jM(e.valueOffsets);return new zL(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=NM(t.nullBitmap),a=AM(n.indices.ArrayType,t.data),{dictionary:o=new fR([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new zL(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/fF(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new zL(t,n,a,o,[void 0,i,r])}visitFixedSizeList(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.valueType})}=t,a=NM(t.nullBitmap),{length:o=i.length/fF(n),nullCount:s=t.nullBitmap?-1:0}=t;return new zL(n,r,o,s,[void 0,void 0,a],[i])}visitMap(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.childType})}=t,a=NM(t.nullBitmap),o=jM(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new zL(n,r,s,c,[o,void 0,a],[i])}};const VL=new BL;function HL(e){return VL.visit(e)}var UL=class{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndexe.nullable)}function GL(e){return e.reduce((e,t)=>e+t.nullCount,0)}function KL(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function qL(e,t,n,r){let i=[];for(let a=-1,o=e.length;++a=r)break;if(n>=s+c)continue;if(s>=n&&s+c<=r){i.push(o);continue}let l=Math.max(0,n-s),u=Math.min(r-s,c);i.push(o.slice(l,u-l))}return i.length===0&&i.push(e[0].slice(0,0)),i}function JL(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function tR(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new PL(n,e.offset+(t||0),e.length,n,AL)){if(!i)return r;++r}return-1}function nR(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case Y.Union:break;case Y.Dictionary:break;default:return tR(e,n)}let r=lL.getVisitFn(e),i=xL(t);for(let t=(n||0)-1,a=e.length;++t{let n=e.data[t];return n.values.subarray(0,n.length)[Symbol.iterator]()});let n=0;return new UL(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new sR(a)})}var sR=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof zL)))throw TypeError(`Vector constructor expects an Array of Data instances.`);let o=(n=a[0])?.type;switch(a.length){case 0:this._offsets=[0];break;case 1:{let{get:e,set:t,indexOf:n}=uR[o.typeId],r=a[0];this.isValid=e=>YL(r,e),this.get=t=>e(r,t),this.set=(e,n)=>t(r,e,n),this.indexOf=e=>n(r,e),this._offsets=[0,r.length];break}default:Object.setPrototypeOf(this,dR[o.typeId]),this._offsets=KL(a);break}this.data=a,this.type=o,this.stride=fF(o),this.numChildren=(i=(r=o.children)?.length)??0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,t)=>e+t.byteLength,0)}get nullable(){return WL(this.data)}get nullCount(){return GL(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${Y[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(yL(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return cR.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(vL(this,t,n,({data:e,_offsets:t},n,r)=>qL(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case Y.Int:case Y.Float:case Y.Decimal:case Y.Time:case Y.Timestamp:switch(t.length){case 0:return new i;case 1:return t[0].values.subarray(0,n*r);default:return t.reduce((e,{values:t,length:n})=>(e.array.set(t.subarray(0,n*r),e.offset),e.offset+=n*r,e),{array:new i(n*r),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(`,`)}]`}getChild(e){var t;return this.getChildAt((t=this.type.children)?.findIndex(t=>t.name===e))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return MP.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(MP.isDictionary(this.type)){let t=new pR(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new pR(this)}unmemoize(){if(MP.isDictionary(this.type)&&this.isMemoized){let t=this.data[0].dictionary.unmemoize(),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return this}};lR=Symbol.toStringTag,fR[lR]=(e=>{e.type=MP.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;let t=Object.keys(Y).map(e=>Y[e]).filter(e=>typeof e==`number`&&e!==Y.NONE);for(let n of t){let t=lL.getVisitFnByTypeId(n),r=pI.getVisitFnByTypeId(n),i=iR.getVisitFnByTypeId(n);uR[n]={get:t,set:r,indexOf:i},dR[n]=Object.create(e,{isValid:{value:XL(YL)},get:{value:XL(lL.getVisitFnByTypeId(n))},set:{value:ZL(pI.getVisitFnByTypeId(n))},indexOf:{value:QL(iR.getVisitFnByTypeId(n))}})}return`Vector`})(fR.prototype);var pR=class e extends fR{constructor(t){super(t.data);let n=this.get,r=this.set,i=this.slice,a=Array(this.length);Object.defineProperty(this,`get`,{value(e){let t=a[e];if(t!==void 0)return t;let r=n.call(this,e);return a[e]=r,r}}),Object.defineProperty(this,`set`,{value(e,t){r.call(this,e,t),a[e]=t}}),Object.defineProperty(this,`slice`,{value:(t,n)=>new e(i.call(this,t,n))}),Object.defineProperty(this,`isMemoized`,{value:!0}),Object.defineProperty(this,`unmemoize`,{value:()=>new fR(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},mR=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,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(e,t,n,r){return e.prep(8,24),e.writeInt64(BigInt(r??0)),e.pad(4),e.writeInt32(n),e.writeInt64(BigInt(t??0)),e.offset()}},hR=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,n){return t.setPosition(t.position()+iN),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):YM.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new GN).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let n=this.bb.__offset(this.bb_pos,8);return n?(t||new mR).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){let n=this.bb.__offset(this.bb_pos,10);return n?(t||new mR).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,12);return n?(t||new CN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,YM.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){let t=e.endObject();return t}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}},gR=class e{constructor(e=[],t,n,r=YM.V5){this.fields=e||[],this.metadata=t||new Map,n||=yR(this.fields),this.dictionaries=n,this.metadataVersion=r}get[Symbol.toStringTag](){return`Schema`}get names(){return this.fields.map(e=>e.name)}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(`, `)} }>`}select(t){let n=new Set(t),r=this.fields.filter(e=>n.has(e.name));return new e(r,this.metadata)}selectAt(t){let n=t.map(e=>this.fields[e]).filter(Boolean);return new e(n,this.metadata)}assign(...t){let n=t[0]instanceof e?t[0]:Array.isArray(t[0])?new e(t[0]):new e(t),r=[...this.fields],i=vR(vR(new Map,this.metadata),n.metadata),a=n.fields.filter(e=>{let t=r.findIndex(t=>t.name===e.name);return~t?(r[t]=e.clone({metadata:vR(vR(new Map,r[t].metadata),e.metadata)}))&&!1:!0}),o=yR(a,new Map);return new e([...r,...a],i,new Map([...this.dictionaries,...o]))}};gR.prototype.fields=null,gR.prototype.metadata=null,gR.prototype.dictionaries=null;var _R=class e{static new(...t){let[n,r,i,a]=t;return t[0]&&typeof t[0]==`object`&&({name:n}=t[0],r===void 0&&(r=t[0].type),i===void 0&&(i=t[0].nullable),a===void 0&&(a=t[0].metadata)),new e(`${n}`,r,i,a)}constructor(e,t,n=!1,r){this.name=e,this.type=t,this.nullable=n,this.metadata=r||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return`Field`}toString(){return`${this.name}: ${this.type}`}clone(...t){let[n,r,i,a]=t;return!t[0]||typeof t[0]!=`object`?[n=this.name,r=this.type,i=this.nullable,a=this.metadata]=t:{name:n=this.name,type:r=this.type,nullable:i=this.nullable,metadata:a=this.metadata}=t[0],e.new(n,r,i,a)}};_R.prototype.type=null,_R.prototype.name=null,_R.prototype.nullable=null,_R.prototype.metadata=null;function vR(e,t){return new Map([...e||new Map,...t||new Map])}function yR(e,t=new Map){for(let n=-1,r=e.length;++n0&&yR(i.children,t)}return t}var bR=dN,xR=uN,SR=class{static decode(e){e=new xR(NM(e));let t=hR.getRootAsFooter(e),n=gR.decode(t.schema(),new Map,t.version());return new CR(n,t)}static encode(e){let t=new bR,n=gR.encode(t,e.schema);hR.startRecordBatchesVector(t,e.numRecordBatches);for(let n of[...e.recordBatches()].slice().reverse())wR.encode(t,n);let r=t.endVector();hR.startDictionariesVector(t,e.numDictionaries);for(let n of[...e.dictionaryBatches()].slice().reverse())wR.encode(t,n);let i=t.endVector();return hR.startFooter(t),hR.addSchema(t,n),hR.addVersion(t,YM.V5),hR.addRecordBatches(t,r),hR.addDictionaries(t,i),hR.finishFooterBuffer(t,hR.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=YM.V5,n,r){this.schema=e,this.version=t,n&&(this._recordBatches=n),r&&(this._dictionaryBatches=r)}*recordBatches(){for(let e,t=-1,n=this.numRecordBatches;++t=0&&e=0&&e=0&&e=0&&ethis._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return $j(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(TR);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return VM.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return VM.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return $j(this,void 0,void 0,function*(){return yield this.abort(e),TR})}return(e){return $j(this,void 0,void 0,function*(){return yield this.close(),TR})}read(e){return $j(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return $j(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(...e){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,t)=>{this.resolvers.push({resolve:e,reject:t})}):Promise.resolve(TR)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw Error(`AsyncQueue is closed`)}},kR=class extends OR{write(e){if((e=NM(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?oM(this.toUint8Array(!0)):this.toUint8Array(!1).then(oM)}toUint8Array(e=!1){return e?kM(this._values)[0]:(()=>$j(this,void 0,void 0,function*(){var e,t,n,r;let i=[],a=0;try{for(var o=!0,s=iM(this),c;c=yield s.next(),e=c.done,!e;o=!0){r=c.value,o=!1;let e=r;i.push(e),a+=e.byteLength}}catch(e){t={error:e}}finally{try{!o&&!e&&(n=s.return)&&(yield n.call(s))}finally{if(t)throw t.error}}return kM(i,a)[0]}))()}},AR=class{constructor(e){e&&(this.source=new MR(VM.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},jR=class e{constructor(t){t instanceof e?this.source=t.source:t instanceof kR?this.source=new NR(VM.fromAsyncIterable(t)):wM(t)?this.source=new NR(VM.fromNodeStream(t)):SM(t)?this.source=new NR(VM.fromDOMStream(t)):yM(t)?this.source=new NR(VM.fromDOMStream(t.body)):mM(t)?this.source=new NR(VM.fromIterable(t)):(pM(t)||hM(t))&&(this.source=new NR(VM.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},MR=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,`peek`).value}read(e){return this.next(e,`read`).value}next(e,t=`read`){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||TR)}return(e){return Object.create(this.source.return&&this.source.return(e)||TR)}},NR=class{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(e){return $j(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return $j(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return $j(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(e){return $j(this,arguments,void 0,function*(e,t=`read`){return yield this.source.next({cmd:t,size:e})})}throw(e){return $j(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||TR;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return $j(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||TR;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},PR=class extends AR{constructor(e,t){super(),this.position=0,this.buffer=NM(e),this.size=t===void 0?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:n}=this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e$j(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return $j(this,void 0,void 0,function*(){let{buffer:t,byteOffset:n}=yield this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)})}seek(e){return $j(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),r=t[3]*n[3];this.buffer[0]=r&65535;let i=r>>>16;return r=t[2]*n[3],i+=r,r=t[3]*n[2]>>>0,i+=r,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]>>0&&++t[1],t[1]>>0&&++t[2],t[2]>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${LR(this.buffer[3])} ${LR(this.buffer[2])} ${LR(this.buffer[1])} ${LR(this.buffer[0])}`}static multiply(t,n){let r=new e(new Uint32Array(t.buffer));return r.times(n)}static add(t,n){let r=new e(new Uint32Array(t.buffer));return r.plus(n)}static from(t,n=new Uint32Array(4)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(4)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(4)){let r=t.startsWith(`-`),i=t.length,a=new e(n);for(let n=r?1:0;n0&&this.readData(e,n)||new Uint8Array}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+t)}readDictionary(e){return this.dictionaries.get(e.id)}},GR=class extends WR{constructor(e,t,n,r,i){super(new Uint8Array,t,n,r,i),this.sources=e}readNullBitmap(e,t,{offset:n}=this.nextBufferRange()){return t<=0?new Uint8Array:NL(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return AM(Uint8Array,AM(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return AM(Uint8Array,AM(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:n}=this;return MP.isTimestamp(e)||(MP.isInt(e)||MP.isTime(e))&&e.bitWidth===64||MP.isDuration(e)||MP.isDate(e)&&e.unit===QM.MILLISECOND?AM(Uint8Array,HR.convertArray(n[t])):MP.isDecimal(e)?AM(Uint8Array,UR.convertArray(n[t])):MP.isBinary(e)||MP.isLargeBinary(e)||MP.isFixedSizeBinary(e)?KR(n[t]):MP.isBool(e)?NL(n[t]):MP.isUtf8(e)||MP.isLargeUtf8(e)?cM(n[t].join(``)):AM(Uint8Array,AM(e.ArrayType,n[t].map(e=>+e)))}};function KR(e){let t=e.join(``),n=new Uint8Array(t.length/2);for(let e=0;e>1]=Number.parseInt(t.slice(e,e+2),16);return n}var qR=class extends pF{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>this.compareFields(e,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};function JR(e,t){return t instanceof e.constructor}function YR(e,t){return e===t||JR(e,t)}function XR(e,t){return e===t||JR(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function ZR(e,t){return e===t||JR(e,t)&&e.precision===t.precision}function QR(e,t){return e===t||JR(e,t)&&e.byteWidth===t.byteWidth}function $R(e,t){return e===t||JR(e,t)&&e.unit===t.unit}function ez(e,t){return e===t||JR(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function tz(e,t){return e===t||JR(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function nz(e,t){return e===t||JR(e,t)&&e.children.length===t.children.length&&uz.compareManyFields(e.children,t.children)}function rz(e,t){return e===t||JR(e,t)&&e.children.length===t.children.length&&uz.compareManyFields(e.children,t.children)}function iz(e,t){return e===t||JR(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&uz.compareManyFields(e.children,t.children)}function az(e,t){return e===t||JR(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&uz.visit(e.indices,t.indices)&&uz.visit(e.dictionary,t.dictionary)}function oz(e,t){return e===t||JR(e,t)&&e.unit===t.unit}function sz(e,t){return e===t||JR(e,t)&&e.unit===t.unit}function cz(e,t){return e===t||JR(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&uz.compareManyFields(e.children,t.children)}function lz(e,t){return e===t||JR(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&uz.compareManyFields(e.children,t.children)}qR.prototype.visitNull=YR,qR.prototype.visitBool=YR,qR.prototype.visitInt=XR,qR.prototype.visitInt8=XR,qR.prototype.visitInt16=XR,qR.prototype.visitInt32=XR,qR.prototype.visitInt64=XR,qR.prototype.visitUint8=XR,qR.prototype.visitUint16=XR,qR.prototype.visitUint32=XR,qR.prototype.visitUint64=XR,qR.prototype.visitFloat=ZR,qR.prototype.visitFloat16=ZR,qR.prototype.visitFloat32=ZR,qR.prototype.visitFloat64=ZR,qR.prototype.visitUtf8=YR,qR.prototype.visitLargeUtf8=YR,qR.prototype.visitBinary=YR,qR.prototype.visitLargeBinary=YR,qR.prototype.visitFixedSizeBinary=QR,qR.prototype.visitDate=$R,qR.prototype.visitDateDay=$R,qR.prototype.visitDateMillisecond=$R,qR.prototype.visitTimestamp=ez,qR.prototype.visitTimestampSecond=ez,qR.prototype.visitTimestampMillisecond=ez,qR.prototype.visitTimestampMicrosecond=ez,qR.prototype.visitTimestampNanosecond=ez,qR.prototype.visitTime=tz,qR.prototype.visitTimeSecond=tz,qR.prototype.visitTimeMillisecond=tz,qR.prototype.visitTimeMicrosecond=tz,qR.prototype.visitTimeNanosecond=tz,qR.prototype.visitDecimal=YR,qR.prototype.visitList=nz,qR.prototype.visitStruct=rz,qR.prototype.visitUnion=iz,qR.prototype.visitDenseUnion=iz,qR.prototype.visitSparseUnion=iz,qR.prototype.visitDictionary=az,qR.prototype.visitInterval=oz,qR.prototype.visitIntervalDayTime=oz,qR.prototype.visitIntervalYearMonth=oz,qR.prototype.visitDuration=sz,qR.prototype.visitDurationSecond=sz,qR.prototype.visitDurationMillisecond=sz,qR.prototype.visitDurationMicrosecond=sz,qR.prototype.visitDurationNanosecond=sz,qR.prototype.visitFixedSizeList=cz,qR.prototype.visitMap=lz;const uz=new qR;function dz(e,t){return uz.compareSchemas(e,t)}function fz(e,t){return pz(e,t.map(e=>e.data.concat()))}function pz(e,t){let n=[...e.fields],r=[],i={numBatches:t.reduce((e,t)=>Math.max(e,t.length),0)},a=0,o=0,s=-1,c=t.length,l,u=[];for(;i.numBatches-- >0;){for(o=1/0,s=-1;++s0&&(r[a++]=HL({type:new aF(n),length:o,nullCount:0,children:u.slice()})))}return[e=e.assign(n),r.map(t=>new vz(e,t))]}function mz(e,t,n,r,i){var a;let o=(t+63&-64)>>3;for(let s=-1,c=r.length;++s=t)l===t?n[s]=c:(n[s]=c.slice(0,t),i.numBatches=Math.max(i.numBatches,r[s].unshift(c.slice(t,l-t))));else{let r=e[s];e[s]=r.clone({nullable:!0}),n[s]=(a=c?._changeLengthAndBackfillNullBitmap(t))??HL({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return n}var hz,gz=class e{constructor(...t){var n,r;if(t.length===0)return this.batches=[],this.schema=new gR([]),this._offsets=[0],this;let i,a;t[0]instanceof gR&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(a=t.pop());let o=t=>{if(t){if(t instanceof vz)return[t];if(t instanceof e)return t.batches;if(t instanceof zL){if(t.type instanceof aF)return[new vz(new gR(t.type.children),t)]}else if(Array.isArray(t))return t.flatMap(e=>o(e));else if(typeof t[Symbol.iterator]==`function`)return[...t].flatMap(e=>o(e));else if(typeof t==`object`){let e=Object.keys(t),n=e.map(e=>new fR([t[e]])),r=i??new gR(e.map((e,t)=>new _R(String(e),n[t].type,n[t].nullable))),[,a]=fz(r,n);return a.length===0?[new vz(t)]:a}}return[]},s=t.flatMap(e=>o(e));if(i=(r=i??(n=s[0])?.schema)??new gR([]),!(i instanceof gR))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);for(let e of s){if(!(e instanceof vz))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);if(!dz(i,e.schema))throw TypeError(`Table and inner RecordBatch schemas must be equivalent.`)}this.schema=i,this.batches=s,this._offsets=a??KL(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,t)=>e+t.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=GL(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(yL(e,this.numRows))}set(e,t){}indexOf(e,t){return-1}[Symbol.iterator](){return this.batches.length>0?cR.visit(new fR(this.data)):[][Symbol.iterator]()}toArray(){return[...this]}toString(){return`[\n ${this.toArray().join(`, - `)}\n]`}concat(...t){let n=this.schema,r=this.data.concat(t.flatMap(({data:e})=>e));return new e(n,r.map(e=>new vz(n,e)))}slice(t,n){let r=this.schema;[t,n]=vL({length:this.numRows},t,n);let i=qL(this.data,this._offsets,t,n);return new e(r,i.map(e=>new vz(r,e)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&et.children[e]);if(t.length===0){let{type:n}=this.schema.fields[e],r=HL({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new fR(t)}return null}setChild(e,t){var n;return this.setChildAt((n=this.schema.fields)?.findIndex(t=>t.name===e),t)}setChildAt(t,n){let r=this.schema,i=[...this.batches];if(t>-1&&tthis.getChildAt(t));[e[t],o[t]]=[a,n],[r,i]=fz(r,o)}return new e(r,i)}select(e){let t=this.schema.fields.reduce((e,t,n)=>e.set(t.name,n),new Map);return this.selectAt(e.map(e=>t.get(e)).filter(e=>e>-1))}selectAt(t){let n=this.schema.selectAt(t),r=this.batches.map(e=>e.selectAt(t));return new e(n,r)}assign(t){let n=this.schema.fields,[r,i]=t.schema.fields.reduce((e,t,r)=>{let[i,a]=e,o=n.findIndex(e=>e.name===t.name);return~o?a[o]=r:i.push(r),e},[[],[]]),a=this.schema.assign(t.schema),o=[...n.map((e,t)=>[t,i[t]]).map(([e,n])=>n===void 0?this.getChildAt(e):t.getChildAt(n)),...r.map(e=>t.getChildAt(e))].filter(Boolean);return new e(...fz(a,o))}};hz=Symbol.toStringTag,gz[hz]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=XL(YL),e.get=XL(lL.getVisitFn(Y.Struct)),e.set=ZL(pI.getVisitFn(Y.Struct)),e.indexOf=QL(iR.getVisitFn(Y.Struct)),`Table`))(gz.prototype);var _z,vz=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof gR)||([,this.data=HL({nullCount:0,type:new aF(this.schema.fields),children:this.schema.fields.map(e=>HL({type:e.type,nullCount:0}))})]=e,!(this.data instanceof zL)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=yz(this.schema,this.data.children);break;case 1:{let[t]=e,{fields:n,children:r,length:i}=Object.keys(t).reduce((e,n,r)=>(e.children[r]=t[n],e.length=Math.max(e.length,t[n].length),e.fields[r]=_R.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new gR(n),o=HL({type:new aF(n),length:i,children:r,nullCount:0});[this.schema,this.data]=yz(a,o.children,i);break}default:throw TypeError(`RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.`)}}get dictionaries(){return this._dictionaries||=bz(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(e){return this.data.getValid(e)}get(e){return lL.visit(this.data,e)}at(e){return this.get(yL(e,this.numRows))}set(e,t){return pI.visit(this.data,e,t)}indexOf(e,t){return iR.visit(this.data,e,t)}[Symbol.iterator](){return cR.visit(new fR([this.data]))}toArray(){return[...this]}concat(...e){return new gz(this.schema,[this,...e])}slice(t,n){let[r]=new fR([this.data]).slice(t,n).data;return new e(this.schema,r)}getChild(e){var t;return this.getChildAt((t=this.schema.fields)?.findIndex(t=>t.name===e))}getChildAt(e){return e>-1&&et.name===e),t)}setChildAt(t,n){let r=this.schema,i=this.data;if(t>-1&&tt.name===e);~t&&(i[t]=this.data.children[t])}return new e(n,HL({type:r,length:this.numRows,children:i}))}selectAt(t){let n=this.schema.selectAt(t),r=t.map(e=>this.data.children[e]).filter(Boolean),i=HL({type:new aF(n.fields),length:this.numRows,children:r});return new e(n,i)}};_z=Symbol.toStringTag,vz[_z]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(vz.prototype);function yz(e,t,n=t.reduce((e,t)=>Math.max(e,t.length),0)){var r;let i=[...e.fields],a=[...t],o=(n+63&-64)>>3;for(let[s,c]of e.fields.entries()){let e=t[s];(!e||e.length!==n)&&(i[s]=c.clone({nullable:!0}),a[s]=(r=e?._changeLengthAndBackfillNullBitmap(n))??HL({type:c.type,length:n,nullCount:n,nullBitmap:new Uint8Array(o)}))}return[e.assign(i),HL({type:new aF(i),length:n,children:a})]}function bz(e,t,n=new Map){var r,i;if(((r=e?.length)??0)>0&&e?.length===t?.length)for(let r=-1,a=e.length;++rHL({type:e.type})),n=HL({type:new aF(e.fields),nullCount:0,children:t});super(e,n)}},Sz=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,n){return t.setPosition(t.position()+iN),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):YM.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):KN.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt(`0`)}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,12);return n?(t||new CN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,YM.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,KN.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,BigInt(`0`))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){let t=e.endObject();return t}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(t,n,r,i,a,o){return e.startMessage(t),e.addVersion(t,n),e.addHeaderType(t,r),e.addHeader(t,i),e.addBodyLength(t,a),e.addCustomMetadata(t,o),e.endMessage(t)}},Cz=class extends pF{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return LN.startNull(t),LN.endNull(t)}visitInt(e,t){return xN.startInt(t),xN.addBitWidth(t,e.bitWidth),xN.addIsSigned(t,e.isSigned),xN.endInt(t)}visitFloat(e,t){return jN.startFloatingPoint(t),jN.addPrecision(t,e.precision),jN.endFloatingPoint(t)}visitBinary(e,t){return wN.startBinary(t),wN.endBinary(t)}visitLargeBinary(e,t){return NN.startLargeBinary(t),NN.endLargeBinary(t)}visitBool(e,t){return TN.startBool(t),TN.endBool(t)}visitUtf8(e,t){return HN.startUtf8(t),HN.endUtf8(t)}visitLargeUtf8(e,t){return PN.startLargeUtf8(t),PN.endLargeUtf8(t)}visitDecimal(e,t){return DN.startDecimal(t),DN.addScale(t,e.scale),DN.addPrecision(t,e.precision),DN.addBitWidth(t,e.bitWidth),DN.endDecimal(t)}visitDate(e,t){return EN.startDate(t),EN.addUnit(t,e.unit),EN.endDate(t)}visitTime(e,t){return zN.startTime(t),zN.addUnit(t,e.unit),zN.addBitWidth(t,e.bitWidth),zN.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return BN.startTimestamp(t),BN.addUnit(t,e.unit),n!==void 0&&BN.addTimezone(t,n),BN.endTimestamp(t)}visitInterval(e,t){return MN.startInterval(t),MN.addUnit(t,e.unit),MN.endInterval(t)}visitDuration(e,t){return ON.startDuration(t),ON.addUnit(t,e.unit),ON.endDuration(t)}visitList(e,t){return FN.startList(t),FN.endList(t)}visitStruct(e,t){return RN.startStruct_(t),RN.endStruct_(t)}visitUnion(e,t){VN.startTypeIdsVector(t,e.typeIds.length);let n=VN.createTypeIdsVector(t,e.typeIds);return VN.startUnion(t),VN.addMode(t,e.mode),VN.addTypeIds(t,n),VN.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return SN.startDictionaryEncoding(t),SN.addId(t,BigInt(e.id)),SN.addIsOrdered(t,e.isOrdered),n!==void 0&&SN.addIndexType(t,n),SN.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return kN.startFixedSizeBinary(t),kN.addByteWidth(t,e.byteWidth),kN.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return AN.startFixedSizeList(t),AN.addListSize(t,e.listSize),AN.endFixedSizeList(t)}visitMap(e,t){return IN.startMap(t),IN.addKeysSorted(t,e.keysSorted),IN.endMap(t)}};const wz=new Cz;function Tz(e,t=new Map){return new gR(Oz(e,t),Pz(e.metadata),t)}function Ez(e){return new Bz(e.count,Az(e.columns),jz(e.columns))}function Dz(e){return new Vz(Ez(e.data),e.id,e.isDelta)}function Oz(e,t){return(e.fields||[]).filter(Boolean).map(e=>_R.fromJSON(e,t))}function kz(e,t){return(e.children||[]).filter(Boolean).map(e=>_R.fromJSON(e,t))}function Az(e){return(e||[]).reduce((e,t)=>[...e,new Uz(t.count,Mz(t.VALIDITY)),...Az(t.children)],[])}function jz(e,t=[]){for(let n=-1,r=(e||[]).length;++ne+ +(t===0),0)}function Nz(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=Iz(e,kz(e,t)),i=new _R(e.name,o,e.nullable,Pz(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?Fz(r):new LP,s=new dF(t.get(n),r,n,a.isOrdered),i=new _R(e.name,s,e.nullable,Pz(e.metadata))):(r=(r=a.indexType)?Fz(r):new LP,t.set(n,o=Iz(e,kz(e,t))),s=new dF(o,r,n,a.isOrdered),i=new _R(e.name,s,e.nullable,Pz(e.metadata))),i||null}function Pz(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function Fz(e){return new PP(e.isSigned,e.bitWidth)}function Iz(e,t){let n=e.type.name;switch(n){case`NONE`:return new NP;case`null`:return new NP;case`binary`:return new qP;case`largebinary`:return new JP;case`utf8`:return new YP;case`largeutf8`:return new XP;case`bool`:return new ZP;case`list`:return new iF((t||[])[0]);case`struct`:return new aF(t||[]);case`struct_`:return new aF(t||[])}switch(n){case`int`:{let t=e.type;return new PP(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new UP(ZM[t.precision])}case`decimal`:{let t=e.type;return new QP(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new $P(QM[t.unit])}case`time`:{let t=e.type;return new eF($M[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new tF($M[t.unit],t.timezone)}case`interval`:{let t=e.type;return new nF(eN[t.unit])}case`duration`:{let t=e.type;return new rF($M[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase(),a=r.toUpperCase()+i.join(``);return new oF(XM[a],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new sF(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new cF(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new lF((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var Lz=dN,Rz=uN,zz=class e{static fromJSON(t,n){let r=new e(0,YM.V5,n);return r._createHeader=Wz(t,n),r}static decode(t){t=new Rz(NM(t));let n=Sz.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=Gz(n,a),o}static encode(e){let t=new Lz,n=-1;return e.isSchema()?n=gR.encode(t,e.header()):e.isRecordBatch()?n=Bz.encode(t,e.header()):e.isDictionaryBatch()&&(n=Vz.encode(t,e.header())),Sz.startMessage(t),Sz.addVersion(t,YM.V5),Sz.addHeader(t,n),Sz.addHeaderType(t,e.headerType),Sz.addBodyLength(t,BigInt(e.bodyLength)),Sz.finishMessageBuffer(t,Sz.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof gR)return new e(0,YM.V5,KN.Schema,t);if(t instanceof Bz)return new e(n,YM.V5,KN.RecordBatch,t);if(t instanceof Vz)return new e(n,YM.V5,KN.DictionaryBatch,t);throw 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===KN.Schema}isRecordBatch(){return this.headerType===KN.RecordBatch}isDictionaryBatch(){return this.headerType===KN.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=XN(e)}},Bz=class{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,n){this._nodes=t,this._buffers=n,this._length=XN(e)}},Vz=class{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(e,t,n=!1){this._data=e,this._isDelta=n,this._id=XN(t)}},Hz=class{constructor(e,t){this.offset=XN(e),this.length=XN(t)}},Uz=class{constructor(e,t){this.length=XN(e),this.nullCount=XN(t)}};function Wz(e,t){return()=>{switch(t){case KN.Schema:return gR.fromJSON(e);case KN.RecordBatch:return Bz.fromJSON(e);case KN.DictionaryBatch:return Vz.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${KN[t]}, type: ${t} }`)}}function Gz(e,t){return()=>{switch(t){case KN.Schema:return gR.decode(e.header(new GN),new Map,e.version());case KN.RecordBatch:return Bz.decode(e.header(new _N),e.version());case KN.DictionaryBatch:return Vz.decode(e.header(new vN),e.version())}throw Error(`Unrecognized Message type: { name: ${KN[t]}, type: ${t} }`)}}_R.encode=oB,_R.decode=tB,_R.fromJSON=Nz,gR.encode=aB,gR.decode=Kz,gR.fromJSON=Tz,Bz.encode=sB,Bz.decode=qz,Bz.fromJSON=Ez,Vz.encode=cB,Vz.decode=Jz,Vz.fromJSON=Dz,Uz.encode=lB,Uz.decode=Xz,Hz.encode=uB,Hz.decode=Yz;function Kz(e,t=new Map,n=YM.V5){let r=$z(e,t);return new gR(r,nB(e),t,n)}function qz(e,t=YM.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new Bz(e.length(),Zz(e),Qz(e,t))}function Jz(e,t=YM.V5){return new Vz(Bz.decode(e.data(),t),e.id(),e.isDelta())}function Yz(e){return new Hz(e.offset(),e.length())}function Xz(e){return new Uz(e.length(),e.nullCount())}function Zz(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++r_R.encode(e,t));GN.startFieldsVector(e,n.length);let r=GN.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?GN.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return CN.startKeyValue(e),CN.addKey(e,r),CN.addValue(e,i),CN.endKeyValue(e)})):-1;return GN.startSchema(e),GN.addFields(e,r),GN.addEndianness(e,dB?yN.Little:yN.Big),i!==-1&&GN.addCustomMetadata(e,i),GN.endSchema(e)}function oB(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;MP.isDictionary(a)?(o=a.dictionary.typeId,i=wz.visit(a,e),r=wz.visit(a.dictionary,e)):r=wz.visit(a,e);let s=(a.children||[]).map(t=>_R.encode(e,t)),c=WN.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?WN.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return CN.startKeyValue(e),CN.addKey(e,r),CN.addValue(e,i),CN.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),WN.startField(e),WN.addType(e,r),WN.addTypeType(e,o),WN.addChildren(e,c),WN.addNullable(e,!!t.nullable),n!==-1&&WN.addName(e,n),i!==-1&&WN.addDictionary(e,i),l!==-1&&WN.addCustomMetadata(e,l),WN.endField(e)}function sB(e,t){let n=t.nodes||[],r=t.buffers||[];_N.startNodesVector(e,n.length);for(let t of n.slice().reverse())Uz.encode(e,t);let i=e.endVector();_N.startBuffersVector(e,r.length);for(let t of r.slice().reverse())Hz.encode(e,t);let a=e.endVector();return _N.startRecordBatch(e),_N.addLength(e,BigInt(t.length)),_N.addNodes(e,i),_N.addBuffers(e,a),_N.endRecordBatch(e)}function cB(e,t){let n=Bz.encode(e,t.data);return vN.startDictionaryBatch(e),vN.addId(e,BigInt(t.id)),vN.addIsDelta(e,t.isDelta),vN.addData(e,n),vN.endDictionaryBatch(e)}function lB(e,t){return gN.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function uB(e,t){return hN.createBuffer(e,BigInt(t.offset),BigInt(t.length))}const dB=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),fB=e=>`Expected ${KN[e]} Message in stream, but was null or length 0.`,pB=e=>`Header pointer of flatbuffer-encoded ${KN[e]} Message is null or length 0.`,mB=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,hB=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;var gB=class{constructor(e){this.source=e instanceof AR?e:new AR(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?TR:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(fB(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=NM(this.source.read(e));if(t.byteLength[...e,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE_ID&&[n.TYPE_ID]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...t(n.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(fB(e));return t.value}readSchema(){let e=KN.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(pB(e));return n}};const yB=4,bB=`ARROW1`,xB=new Uint8Array(bB.length);for(let e=0;ethis):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return VM.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return VM.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}static from(t){return t instanceof e?t:gM(t)?BB(t):vM(t)?UB(t):pM(t)?(()=>$j(this,void 0,void 0,function*(){return yield e.from(yield t)}))():yM(t)||SM(t)||wM(t)||hM(t)?HB(new jR(t)):VB(new AR(t))}static readAll(t){return t instanceof e?t.isSync()?RB(t):zB(t):gM(t)||ArrayBuffer.isView(t)||mM(t)||_M(t)?RB(t):zB(t)}},DB=class extends EB{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return nM(this,arguments,function*(){yield tM(yield*rM(iM(this[Symbol.iterator]())))})}},OB=class extends EB{constructor(e){super(e),this._impl=e}readAll(){return $j(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=iM(this),s;s=yield o.next(),e=s.done,!e;a=!0){r=s.value,a=!1;let e=r;i.push(e)}}catch(e){t={error:e}}finally{try{!a&&!e&&(n=o.return)&&(yield n.call(o))}finally{if(t)throw t.error}}return i})}[Symbol.iterator](){throw Error(`AsyncRecordBatchStreamReader is not Iterable`)}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},kB=class extends DB{constructor(e){super(e),this._impl=e}},AB=class extends OB{constructor(e){super(e),this._impl=e}},jB=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){let n=this._loadVectors(e,t,this.schema.fields),r=HL({type:new aF(this.schema.fields),length:e.length,children:n});return new vz(this.schema,r)}_loadDictionaryBatch(e,t){let{id:n,isDelta:r}=e,{dictionaries:i,schema:a}=this,o=i.get(n),s=a.dictionaries.get(n),c=this._loadVectors(e.data,t,[s]);return(o&&r?o.concat(new fR(c)):new fR(c)).memoize()}_loadVectors(e,t,n){return new WR(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},MB=class extends jB{constructor(e,t){super(t),this._reader=gM(e)?new vB(this._handle=e):new gB(this._handle=e)}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(e){return this.closed||(this.autoDestroy=LB(this,e),(this.schema||=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):TR}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):TR}next(){if(this.closed)return TR;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadRecordBatch(n,r);return{done:!1,value:i}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new xz(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},NB=class extends jB{constructor(e,t){super(t),this._reader=new _B(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return $j(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return $j(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=LB(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return $j(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):TR})}return(e){return $j(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):TR})}next(){return $j(this,void 0,void 0,function*(){if(this.closed)return TR;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadRecordBatch(n,r);return{done:!1,value:i}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new xz(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return $j(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},PB=class extends MB{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof PR?e:new PR(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();let n=(t=this._footer)?.getRecordBatch(e);if(n&&this._handle.seek(n.offset)){let e=this._reader.readMessage(KN.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadRecordBatch(t,n);return r}}return null}_readDictionaryBatch(e){var t;let n=(t=this._footer)?.getDictionaryBatch(e);if(n&&this._handle.seek(n.offset)){let e=this._reader.readMessage(KN.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}_readFooter(){let{_handle:e}=this,t=e.size-wB,n=e.readInt32(t),r=e.readAt(t-n,n);return SR.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return $j(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return $j(this,void 0,void 0,function*(){var t;if(this.closed)return null;this._footer||(yield this.open());let n=(t=this._footer)?.getRecordBatch(e);if(n&&(yield this._handle.seek(n.offset))){let e=yield this._reader.readMessage(KN.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadRecordBatch(t,n);return r}}return null})}_readDictionaryBatch(e){return $j(this,void 0,void 0,function*(){var t;let n=(t=this._footer)?.getDictionaryBatch(e);if(n&&(yield this._handle.seek(n.offset))){let e=yield this._reader.readMessage(KN.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}})}_readFooter(){return $j(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-wB,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return SR.decode(r)})}_readNextMessageAndValidate(e){return $j(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?SB(t)?new kB(new PB(e.read())):new DB(new MB(e)):new DB(new MB(function*(){}()))}function HB(e){return $j(this,void 0,void 0,function*(){let t=yield e.peek(CB+7&-8);return t&&t.byteLength>=4?SB(t)?new kB(new PB(yield e.read())):new OB(new NB(e)):new OB(new NB(function(){return nM(this,arguments,function*(){})}()))})}function UB(e){return $j(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new FR(e,t);return t>=TB&&SB(yield n.readAt(0,CB+7&-8))?new AB(new FB(n)):new OB(new NB(n))})}var WB=class e extends pF{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof vz?e.data.children:e.data),r=new e;return r.visitMany(n(t)),r}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(e){if(e instanceof fR)return this.visitMany(e.data),this;let{type:t}=e;if(!MP.isDictionary(t)){let{length:n}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);if(MP.isUnion(t))this.nodes.push(new Uz(n,0));else{let{nullCount:r}=e;MP.isNull(t)||GB.call(this,r<=0?new Uint8Array:ML(e.offset,n,e.nullBitmap)),this.nodes.push(new Uz(n,r))}}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};function GB(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new Hz(this._byteLength,t)),this._byteLength+=t,this}function KB(e){var t;let{type:n,length:r,typeIds:i,valueOffsets:a}=e;if(GB.call(this,i),n.mode===XM.Sparse)return ZB.call(this,e);if(n.mode===XM.Dense){if(e.offset<=0)return GB.call(this,a),ZB.call(this,e);{let o=new Int32Array(r),s=Object.create(null),c=Object.create(null);for(let e,n,l=-1;++l{let i=n.typeIds[t],a=s[i],o=c[i];return e.slice(a,Math.min(r,o))}))}}return this}function qB(e){let t;return e.nullCount>=e.length?GB.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?GB.call(this,ML(e.offset,e.length,t)):GB.call(this,NL(e.values))}function JB(e){return GB.call(this,e.values.subarray(0,e.length*e.stride))}function YB(e){let{length:t,values:n,valueOffsets:r}=e,i=XN(r[0]),a=XN(r[t]),o=Math.min(a-i,n.byteLength-i);return GB.call(this,zM(-i,t+1,r)),GB.call(this,n.subarray(i,i+o)),this}function XB(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return GB.call(this,zM(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function ZB(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}WB.prototype.visitBool=qB,WB.prototype.visitInt=JB,WB.prototype.visitFloat=JB,WB.prototype.visitUtf8=YB,WB.prototype.visitLargeUtf8=YB,WB.prototype.visitBinary=YB,WB.prototype.visitLargeBinary=YB,WB.prototype.visitFixedSizeBinary=JB,WB.prototype.visitDate=JB,WB.prototype.visitTimestamp=JB,WB.prototype.visitTime=JB,WB.prototype.visitDecimal=JB,WB.prototype.visitList=XB,WB.prototype.visitStruct=ZB,WB.prototype.visitUnion=KB,WB.prototype.visitInterval=JB,WB.prototype.visitDuration=JB,WB.prototype.visitFixedSizeList=XB,WB.prototype.visitMap=XB;var QB=class extends DR{static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}constructor(e){super(),this._position=0,this._started=!1,this._sink=new kR,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,fM(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy==`boolean`?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat==`boolean`?e.writeLegacyIpcFormat:!1}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return pM(e)?e.then(e=>this.writeAll(e)):hM(e)?nV(this,e):tV(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof kR?this._sink=e:(this._sink=new kR,e&&xM(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&CM(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!t||!dz(t,this._schema))&&(t==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null||e instanceof gz&&!(t=e.schema)||e instanceof vz&&!(t=e.schema))return this.finish()&&void 0}else throw Error(`RecordBatchWriter is closed`);if(t&&!dz(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof vz?e instanceof xz||this._writeRecordBatch(e):e instanceof gz?this.writeAll(e.batches):mM(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=zz.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===KN.RecordBatch?this._recordBatchBlocks.push(new wR(o,e.bodyLength,this._position)):e.headerType===KN.DictionaryBatch&&this._dictionaryBlocks.push(new wR(o,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(o-a)),i>0&&this._write(r),this._writePadding(s)}_write(e){if(this._started){let t=NM(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(zz.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(xB)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=WB.assemble(e),a=new Bz(e.numRows,n,r),o=zz.from(a,t);return this._writeDictionaries(e)._writeMessage(o)._writeBodyBuffers(i)}_writeDictionaryBatch(e,t,n=!1){let{byteLength:r,nodes:i,bufferRegions:a,buffers:o}=WB.assemble(new fR([e])),s=new Bz(e.length,i,a),c=new Vz(s,t,n),l=zz.from(c,r);return this._writeMessage(l)._writeBodyBuffers(o)}_writeBodyBuffers(e){let t,n,r;for(let i=-1,a=e.length;++i0&&(this._write(t),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}_writeDictionaries(e){var t,n;for(let[r,i]of e.dictionaries){let e=(t=i?.data)??[],a=this._seenDictionaries.get(r),o=(n=this._dictionaryDeltaOffsets.get(r))??0;if(!a||a.data[0]!==e[0])for(let[t,n]of e.entries())this._writeDictionaryBatch(n,r,t>0);else if(or.writeAll(e)):hM(t)?nV(r,t):tV(r,t)}},eV=class e extends QB{static writeAll(t){let n=new e;return pM(t)?t.then(e=>n.writeAll(e)):hM(t)?nV(n,t):tV(n,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(e,t,n=!1){if(!n&&this._seenDictionaries.has(t))throw Error(`The Arrow File format does not support replacement dictionaries. `);return super._writeDictionaryBatch(e,t,n)}_writeFooter(e){let t=SR.encode(new SR(e,YM.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function tV(e,t){let n=t;t instanceof gz&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function nV(e,t){return $j(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=iM(t);i=yield r.next(),a=i.done,!a;n=!0){c=i.value,n=!1;let t=c;e.write(t)}}catch(e){o={error:e}}finally{try{!n&&!a&&(s=r.return)&&(yield s.call(r))}finally{if(o)throw o.error}}return e.finish()})}function rV(e,t=`stream`){return(t===`stream`?$B:eV).writeAll(e).toUint8Array(!0)}var iV=Object.create,aV=Object.defineProperty,oV=Object.getOwnPropertyDescriptor,sV=Object.getOwnPropertyNames,cV=Object.getPrototypeOf,lV=Object.prototype.hasOwnProperty,uV=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),dV=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of sV(t))!lV.call(e,i)&&i!==n&&aV(e,i,{get:()=>t[i],enumerable:!(r=oV(t,i))||r.enumerable});return e},fV=(e,t,n)=>(n=e==null?{}:iV(cV(e)),dV(t||!e||!e.__esModule?aV(n,`default`,{value:e,enumerable:!0}):n,e)),pV=uV((e,t)=>{t.exports=Worker}),mV=(e=>(e[e.UNDEFINED=0]=`UNDEFINED`,e[e.AUTOMATIC=1]=`AUTOMATIC`,e[e.READ_ONLY=2]=`READ_ONLY`,e[e.READ_WRITE=3]=`READ_WRITE`,e))(mV||{}),hV=(e=>(e[e.IDENTIFIER=0]=`IDENTIFIER`,e[e.NUMERIC_CONSTANT=1]=`NUMERIC_CONSTANT`,e[e.STRING_CONSTANT=2]=`STRING_CONSTANT`,e[e.OPERATOR=3]=`OPERATOR`,e[e.KEYWORD=4]=`KEYWORD`,e[e.COMMENT=5]=`COMMENT`,e))(hV||{}),gV=(e=>(e[e.NONE=0]=`NONE`,e[e.DEBUG=1]=`DEBUG`,e[e.INFO=2]=`INFO`,e[e.WARNING=3]=`WARNING`,e[e.ERROR=4]=`ERROR`,e))(gV||{}),_V=(e=>(e[e.NONE=0]=`NONE`,e[e.CONNECT=1]=`CONNECT`,e[e.DISCONNECT=2]=`DISCONNECT`,e[e.OPEN=3]=`OPEN`,e[e.QUERY=4]=`QUERY`,e[e.INSTANTIATE=5]=`INSTANTIATE`,e))(_V||{}),vV=(e=>(e[e.NONE=0]=`NONE`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`,e[e.START=3]=`START`,e[e.RUN=4]=`RUN`,e[e.CAPTURE=5]=`CAPTURE`,e))(vV||{}),yV=(e=>(e[e.NONE=0]=`NONE`,e[e.WEB_WORKER=1]=`WEB_WORKER`,e[e.NODE_WORKER=2]=`NODE_WORKER`,e[e.BINDINGS=3]=`BINDINGS`,e[e.ASYNC_DUCKDB=4]=`ASYNC_DUCKDB`,e))(yV||{}),bV=class{log(e){}},xV=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},SV=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e))(SV||{}),CV=class{constructor(e,t){this._bindings=e,this._conn=t}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}async query(e){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:e});let t=await this._bindings.runQuery(this._conn,e),n=EB.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new gz(n)}async send(e,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:e});let n=await this._bindings.startPendingQuery(this._conn,e,t);for(;n==null;)n=await this._bindings.pollPendingQuery(this._conn);let r=new wV(this._bindings,this._conn,n),i=await EB.from(r);return console.assert(i.isAsync()),console.assert(i.isStream()),i}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(e){return await this._bindings.getTableNames(this._conn,e)}async prepare(e){let t=await this._bindings.createPrepared(this._conn,e);return new TV(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=rV(e,`stream`);await this.insertArrowFromIPCStream(n,t)}async insertArrowFromIPCStream(e,t){await this._bindings.insertArrowFromIPCStream(this._conn,e,t)}async insertCSVFromPath(e,t){await this._bindings.insertCSVFromPath(this._conn,e,t)}async insertJSONFromPath(e,t){await this._bindings.insertJSONFromPath(this._conn,e,t)}},wV=class{constructor(e,t,n){this.db=e,this.conn=t,this.header=n,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 e;return this._inFlight==null?e=await this.db.fetchQueryResults(this.conn):(e=await this._inFlight,this._inFlight=null),this._depleted=e.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:e}}[Symbol.asyncIterator](){return this}},TV=class{constructor(e,t,n){this.bindings=e,this.connectionId=t,this.statementId=n}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...e){let t=await this.bindings.runPrepared(this.connectionId,this.statementId,e),n=EB.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new gz(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new wV(this.bindings,this.connectionId,t),r=await EB.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},EV=(e=>(e.CANCEL_PENDING_QUERY=`CANCEL_PENDING_QUERY`,e.CLOSE_PREPARED=`CLOSE_PREPARED`,e.COLLECT_FILE_STATISTICS=`COLLECT_FILE_STATISTICS`,e.REGISTER_OPFS_FILE_NAME=`REGISTER_OPFS_FILE_NAME`,e.CONNECT=`CONNECT`,e.COPY_FILE_TO_BUFFER=`COPY_FILE_TO_BUFFER`,e.COPY_FILE_TO_PATH=`COPY_FILE_TO_PATH`,e.CREATE_PREPARED=`CREATE_PREPARED`,e.DISCONNECT=`DISCONNECT`,e.DROP_FILE=`DROP_FILE`,e.DROP_FILES=`DROP_FILES`,e.EXPORT_FILE_STATISTICS=`EXPORT_FILE_STATISTICS`,e.FETCH_QUERY_RESULTS=`FETCH_QUERY_RESULTS`,e.FLUSH_FILES=`FLUSH_FILES`,e.GET_FEATURE_FLAGS=`GET_FEATURE_FLAGS`,e.GET_TABLE_NAMES=`GET_TABLE_NAMES`,e.GET_VERSION=`GET_VERSION`,e.GLOB_FILE_INFOS=`GLOB_FILE_INFOS`,e.INSERT_ARROW_FROM_IPC_STREAM=`INSERT_ARROW_FROM_IPC_STREAM`,e.INSERT_CSV_FROM_PATH=`IMPORT_CSV_FROM_PATH`,e.INSERT_JSON_FROM_PATH=`IMPORT_JSON_FROM_PATH`,e.INSTANTIATE=`INSTANTIATE`,e.OPEN=`OPEN`,e.PING=`PING`,e.POLL_PENDING_QUERY=`POLL_PENDING_QUERY`,e.REGISTER_FILE_BUFFER=`REGISTER_FILE_BUFFER`,e.REGISTER_FILE_HANDLE=`REGISTER_FILE_HANDLE`,e.REGISTER_FILE_URL=`REGISTER_FILE_URL`,e.RESET=`RESET`,e.RUN_PREPARED=`RUN_PREPARED`,e.RUN_QUERY=`RUN_QUERY`,e.SEND_PREPARED=`SEND_PREPARED`,e.START_PENDING_QUERY=`START_PENDING_QUERY`,e.TOKENIZE=`TOKENIZE`,e))(EV||{}),DV=(e=>(e.CONNECTION_INFO=`CONNECTION_INFO`,e.ERROR=`ERROR`,e.FEATURE_FLAGS=`FEATURE_FLAGS`,e.FILE_BUFFER=`FILE_BUFFER`,e.FILE_INFOS=`FILE_INFOS`,e.FILE_SIZE=`FILE_SIZE`,e.FILE_STATISTICS=`FILE_STATISTICS`,e.INSTANTIATE_PROGRESS=`INSTANTIATE_PROGRESS`,e.LOG=`LOG`,e.OK=`OK`,e.PREPARED_STATEMENT_ID=`PREPARED_STATEMENT_ID`,e.QUERY_PLAN=`QUERY_PLAN`,e.QUERY_RESULT=`QUERY_RESULT`,e.QUERY_RESULT_CHUNK=`QUERY_RESULT_CHUNK`,e.QUERY_RESULT_HEADER=`QUERY_RESULT_HEADER`,e.QUERY_RESULT_HEADER_OR_NULL=`QUERY_RESULT_HEADER_OR_NULL`,e.REGISTERED_FILE=`REGISTERED_FILE`,e.SCRIPT_TOKENS=`SCRIPT_TOKENS`,e.SUCCESS=`SUCCESS`,e.TABLE_NAMES=`TABLE_NAMES`,e.VERSION_STRING=`VERSION_STRING`,e))(DV||{}),OV=class{constructor(e,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=e,this.data=t,this.promise=new Promise((e,t)=>{this.promiseResolver=e,this.promiseRejecter=t})}};function kV(e){switch(e.typeId){case Y.Binary:return{sqlType:`binary`};case Y.Bool:return{sqlType:`bool`};case Y.Date:return{sqlType:`date`};case Y.DateDay:return{sqlType:`date32[d]`};case Y.DateMillisecond:return{sqlType:`date64[ms]`};case Y.Decimal:{let t=e;return{sqlType:`decimal`,precision:t.precision,scale:t.scale}}case Y.Float:return{sqlType:`float`};case Y.Float16:return{sqlType:`float16`};case Y.Float32:return{sqlType:`float32`};case Y.Float64:return{sqlType:`float64`};case Y.Int:return{sqlType:`int32`};case Y.Int16:return{sqlType:`int16`};case Y.Int32:return{sqlType:`int32`};case Y.Int64:return{sqlType:`int64`};case Y.Uint16:return{sqlType:`uint16`};case Y.Uint32:return{sqlType:`uint32`};case Y.Uint64:return{sqlType:`uint64`};case Y.Uint8:return{sqlType:`uint8`};case Y.IntervalDayTime:return{sqlType:`interval[dt]`};case Y.IntervalYearMonth:return{sqlType:`interval[m]`};case Y.List:return{sqlType:`list`,valueType:kV(e.valueType)};case Y.FixedSizeBinary:return{sqlType:`fixedsizebinary`,byteWidth:e.byteWidth};case Y.Null:return{sqlType:`null`};case Y.Utf8:return{sqlType:`utf8`};case Y.Struct:return{sqlType:`struct`,fields:e.children.map(e=>AV(e.name,e.type))};case Y.Map:{let t=e;return{sqlType:`map`,keyType:kV(t.keyType),valueType:kV(t.valueType)}}case Y.Time:return{sqlType:`time[s]`};case Y.TimeMicrosecond:return{sqlType:`time[us]`};case Y.TimeMillisecond:return{sqlType:`time[ms]`};case Y.TimeNanosecond:return{sqlType:`time[ns]`};case Y.TimeSecond:return{sqlType:`time[s]`};case Y.Timestamp:return{sqlType:`timestamp`,timezone:e.timezone||void 0};case Y.TimestampSecond:return{sqlType:`timestamp[s]`,timezone:e.timezone||void 0};case Y.TimestampMicrosecond:return{sqlType:`timestamp[us]`,timezone:e.timezone||void 0};case Y.TimestampNanosecond:return{sqlType:`timestamp[ns]`,timezone:e.timezone||void 0};case Y.TimestampMillisecond:return{sqlType:`timestamp[ms]`,timezone:e.timezone||void 0}}throw Error(`unsupported arrow type: ${e.toString()}`)}function AV(e,t){let n=kV(t);return n.name=e,n}var jV=new TextEncoder,MV=class{constructor(e,t=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=e,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(e){this._worker=e,this._worker.addEventListener(`message`,this._onMessageHandler),this._worker.addEventListener(`error`,this._onErrorHandler),this._worker.addEventListener(`close`,this._onCloseHandler),this._workerShutdownPromise=new Promise((e,t)=>{this._workerShutdownResolver=e})}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(e,t=[]){if(!this._worker){console.error(`cannot send a message since the worker is not set!`);return}let n=this._nextMessageId++;return this._pendingRequests.set(n,e),this._worker.postMessage({messageId:n,type:e.type,data:e.data},t),await e.promise}onMessage(e){var t;let n=e.data;switch(n.type){case`LOG`:this._logger.log(n.data);return;case`INSTANTIATE_PROGRESS`:for(let e of this._onInstantiationProgress)e(n.data);return}let r=this._pendingRequests.get(n.requestId);if(!r){console.warn(`unassociated response: [${n.requestId}, ${n.type.toString()}]`);return}if(this._pendingRequests.delete(n.requestId),n.type==`ERROR`){let e=Error(n.data.message);e.name=n.data.name,(t=Object.getOwnPropertyDescriptor(e,`stack`))!=null&&t.writable&&(e.stack=n.data.stack),r.promiseRejecter(e);return}switch(r.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(n.type==`OK`){r.promiseResolver(n.data);return}break;case`INSTANTIATE`:if(this._onInstantiationProgress=[],n.type==`OK`){r.promiseResolver(n.data);return}break;case`GLOB_FILE_INFOS`:if(n.type==`FILE_INFOS`){r.promiseResolver(n.data);return}break;case`GET_VERSION`:if(n.type==`VERSION_STRING`){r.promiseResolver(n.data);return}break;case`GET_FEATURE_FLAGS`:if(n.type==`FEATURE_FLAGS`){r.promiseResolver(n.data);return}break;case`GET_TABLE_NAMES`:if(n.type==`TABLE_NAMES`){r.promiseResolver(n.data);return}break;case`TOKENIZE`:if(n.type==`SCRIPT_TOKENS`){r.promiseResolver(n.data);return}break;case`COPY_FILE_TO_BUFFER`:if(n.type==`FILE_BUFFER`){r.promiseResolver(n.data);return}break;case`EXPORT_FILE_STATISTICS`:if(n.type==`FILE_STATISTICS`){r.promiseResolver(n.data);return}break;case`CONNECT`:if(n.type==`CONNECTION_INFO`){r.promiseResolver(n.data);return}break;case`RUN_PREPARED`:case`RUN_QUERY`:if(n.type==`QUERY_RESULT`){r.promiseResolver(n.data);return}break;case`SEND_PREPARED`:if(n.type==`QUERY_RESULT_HEADER`){r.promiseResolver(n.data);return}break;case`START_PENDING_QUERY`:if(n.type==`QUERY_RESULT_HEADER_OR_NULL`){r.promiseResolver(n.data);return}break;case`POLL_PENDING_QUERY`:if(n.type==`QUERY_RESULT_HEADER_OR_NULL`){r.promiseResolver(n.data);return}break;case`CANCEL_PENDING_QUERY`:if(this._onInstantiationProgress=[],n.type==`SUCCESS`){r.promiseResolver(n.data);return}break;case`FETCH_QUERY_RESULTS`:if(n.type==`QUERY_RESULT_CHUNK`){r.promiseResolver(n.data);return}break;case`CREATE_PREPARED`:if(n.type==`PREPARED_STATEMENT_ID`){r.promiseResolver(n.data);return}break}r.promiseRejecter(Error(`unexpected response type: ${n.type.toString()}`))}onError(e){console.error(e),console.error(`error in duckdb worker: ${e.message}`),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn(`worker terminated with ${this._pendingRequests.size} pending requests`);return}this._pendingRequests.clear()}async reset(){let e=new OV(`RESET`,null);return await this.postTask(e)}async ping(){let e=new OV(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new OV(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new OV(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new OV(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new OV(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new OV(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new OV(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new OV(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new OV(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new OV(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new CV(this,e)}async disconnect(e){let t=new OV(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new OV(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new OV(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new OV(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new OV(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new OV(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new OV(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new OV(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new OV(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new OV(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new OV(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new OV(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=jV.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new OV(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new OV(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new OV(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new OV(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new OV(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new OV(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new OV(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new OV(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new OV(`INSERT_ARROW_FROM_IPC_STREAM`,[e,t,n]);await this.postTask(r,[t.buffer])}async insertCSVFromPath(e,t,n){if(n.columns!==void 0){let e=[];for(let t in n.columns){let r=n.columns[t];e.push(AV(t,r))}n.columnsFlat=e,delete n.columns}let r=new OV(`IMPORT_CSV_FROM_PATH`,[e,t,n]);await this.postTask(r)}async insertJSONFromPath(e,t,n){if(n.columns!==void 0){let e=[];for(let t in n.columns){let r=n.columns[t];e.push(AV(t,r))}n.columnsFlat=e,delete n.columns}let r=new OV(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function NV(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}var PV=NV(),FV=(e=>(e[e.BUFFER=0]=`BUFFER`,e[e.NODE_FS=1]=`NODE_FS`,e[e.BROWSER_FILEREADER=2]=`BROWSER_FILEREADER`,e[e.BROWSER_FSACCESS=3]=`BROWSER_FSACCESS`,e[e.HTTP=4]=`HTTP`,e[e.S3=5]=`S3`,e))(FV||{}),IV=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])),LV=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])),RV=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])),zV=()=>(async e=>{try{return typeof MessageChannel<`u`&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}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])),BV={name:`@duckdb/duckdb-wasm`,version:`1.29.1-dev68.0`,description:`DuckDB powered by WebAssembly`,license:`MIT`,repository:{type:`git`,url:`https://github.com/duckdb/duckdb-wasm.git`},keywords:[`sql`,`duckdb`,`relational`,`database`,`data`,`query`,`wasm`,`analytics`,`olap`,`arrow`,`parquet`,`json`,`csv`],dependencies:{"apache-arrow":`^17.0.0`},devDependencies:{"@types/emscripten":`^1.39.10`,"@types/jasmine":`^5.1.4`,"@typescript-eslint/eslint-plugin":`^6.21.0`,"@typescript-eslint/parser":`^6.21.0`,esbuild:`^0.20.2`,eslint:`^8.57.0`,"eslint-plugin-jasmine":`^4.1.3`,"eslint-plugin-react":`^7.34.0`,"fast-glob":`^3.3.2`,jasmine:`^5.1.0`,"jasmine-core":`^5.1.2`,"jasmine-spec-reporter":`^7.0.0`,"js-sha256":`^0.11.0`,karma:`^6.4.2`,"karma-chrome-launcher":`^3.2.0`,"karma-coverage":`^2.2.1`,"karma-firefox-launcher":`^2.1.3`,"karma-jasmine":`^5.1.0`,"karma-jasmine-html-reporter":`^2.1.0`,"karma-sourcemap-loader":`^0.4.0`,"karma-spec-reporter":`^0.0.36`,"make-dir":`^4.0.0`,nyc:`^15.1.0`,prettier:`^3.2.5`,puppeteer:`^22.8.0`,rimraf:`^5.0.5`,s3rver:`^3.7.1`,typedoc:`^0.25.13`,typescript:`^5.3.3`,"wasm-feature-detect":`^1.6.1`,"web-worker":`^1.2.0`},scripts:{"build:debug":`node bundle.mjs debug && tsc --emitDeclarationOnly`,"build:release":`node bundle.mjs release && tsc --emitDeclarationOnly`,docs:`typedoc`,report:`node ./coverage.mjs`,"test:node":`node --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:node:debug":`node --inspect-brk --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:node:coverage":`nyc -r json --report-dir ./coverage/node node ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:firefox":`karma start ./karma/tests-firefox.cjs`,"test:chrome":`karma start ./karma/tests-chrome.cjs`,"test:chrome:eh":`karma start ./karma/tests-chrome-eh.cjs`,"test:chrome:coverage":`karma start ./karma/tests-chrome-coverage.cjs`,"test:browser":`karma start ./karma/tests-all.cjs`,"test:browser:debug":`karma start ./karma/tests-debug.cjs`,test:`npm run test:chrome && npm run test:node`,"test:coverage":`npm run test:chrome:coverage && npm run test:node:coverage && npm run report`,lint:`eslint src test`},files:[`dist`,`!dist/tests-*`,`!dist/duckdb-browser-mvp.worker.js.map`,`!dist/types/test`],main:`dist/duckdb-browser.cjs`,module:`dist/duckdb-browser.mjs`,types:`dist/duckdb-browser.d.ts`,jsdelivr:`dist/duckdb-browser.cjs`,unpkg:`dist/duckdb-browser.mjs`,sideEffects:!1,browser:{fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},exports:{"./dist/duckdb-mvp.wasm":`./dist/duckdb-mvp.wasm`,"./dist/duckdb-eh.wasm":`./dist/duckdb-eh.wasm`,"./dist/duckdb-coi.wasm":`./dist/duckdb-coi.wasm`,"./dist/duckdb-browser":`./dist/duckdb-browser.mjs`,"./dist/duckdb-browser.cjs":`./dist/duckdb-browser.cjs`,"./dist/duckdb-browser.mjs":`./dist/duckdb-browser.mjs`,"./dist/duckdb-browser-coi.pthread.worker.js":`./dist/duckdb-browser-coi.pthread.worker.js`,"./dist/duckdb-browser-coi.worker.js":`./dist/duckdb-browser-coi.worker.js`,"./dist/duckdb-browser-eh.worker.js":`./dist/duckdb-browser-eh.worker.js`,"./dist/duckdb-browser-mvp.worker.js":`./dist/duckdb-browser-mvp.worker.js`,"./dist/duckdb-node":`./dist/duckdb-node.cjs`,"./dist/duckdb-node.cjs":`./dist/duckdb-node.cjs`,"./dist/duckdb-node-blocking":`./dist/duckdb-node-blocking.cjs`,"./dist/duckdb-node-blocking.cjs":`./dist/duckdb-node-blocking.cjs`,"./dist/duckdb-node-eh.worker.cjs":`./dist/duckdb-node-eh.worker.cjs`,"./dist/duckdb-node-mvp.worker.cjs":`./dist/duckdb-node-mvp.worker.cjs`,"./blocking":{node:{types:`./dist/duckdb-node-blocking.d.ts`,require:`./dist/duckdb-node-blocking.cjs`,import:`./dist/duckdb-node-blocking.cjs`},types:`./dist/duckdb-node-blocking.d.ts`,import:`./dist/duckdb-node-blocking.mjs`,require:`./dist/duckdb-node-blocking.cjs`},".":{browser:{types:`./dist/duckdb-browser.d.ts`,import:`./dist/duckdb-browser.mjs`,require:`./dist/duckdb-browser.cjs`},node:{types:`./dist/duckdb-node.d.ts`,import:`./dist/duckdb-node.cjs`,require:`./dist/duckdb-node.cjs`},types:`./dist/duckdb-browser.d.ts`,import:`./dist/duckdb-browser.mjs`,require:`./dist/duckdb-browser.cjs`}}},VV=BV.name,HV=BV.version,UV=BV.version.split(`.`),WV=UV[0],GV=UV[1],KV=UV[2],qV=()=>typeof navigator>`u`,JV=()=>qV()?`node`:navigator.userAgent,YV=()=>JV().includes(`Firefox`),XV=()=>/^((?!chrome|android).)*safari/i.test(JV()),ZV=null,QV=null,$V=null,eH=null,tH=null;async function nH(){return ZV??=typeof BigInt64Array<`u`,QV??=await LV(),$V??=await zV(),eH??=await RV(),tH??=await IV(),{bigInt64Array:ZV,crossOriginIsolated:qV()||globalThis.crossOriginIsolated||!1,wasmExceptions:QV,wasmSIMD:eH,wasmThreads:$V,wasmBulkMemory:tH}}async function rH(e){let t=await nH();if(t.wasmExceptions){if(t.wasmSIMD&&t.wasmThreads&&t.crossOriginIsolated&&e.coi)return{mainModule:e.coi.mainModule,mainWorker:e.coi.mainWorker,pthreadWorker:e.coi.pthreadWorker};if(e.eh)return{mainModule:e.eh.mainModule,mainWorker:e.eh.mainWorker,pthreadWorker:null}}return{mainModule:e.mvp.mainModule,mainWorker:e.mvp.mainWorker,pthreadWorker:null}}var iH=fV(pV());const aH=Symbol.for(`constructDateFrom`),oH={},sH={};function cH(e,t){try{let n=oH[e]||(oH[e]=new Intl.DateTimeFormat(`en-GB`,{timeZone:e,hour:`numeric`,timeZoneName:`longOffset`}).format),r=n(t).split(`GMT`)[1]||``;return r in sH?sH[r]:uH(r,r.split(`:`))}catch{if(e in sH)return sH[e];let t=e?.match(lH);return t?uH(e,t.slice(1)):NaN}}const lH=/([+-]\d\d):?(\d\d)?/;function uH(e,t){let n=+t[0],r=+(t[1]||0);return sH[e]=n>0?n*60+r:n*60-r}var dH=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(cH(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),hH(this,NaN),pH(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){return-cH(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),pH(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};const fH=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!fH.test(e))return;let t=e.replace(fH,`$1UTC`);dH.prototype[t]&&(e.startsWith(`get`)?dH.prototype[e]=function(){return this.internal[t]()}:(dH.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),mH(this),+this},dH.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),pH(this),+this}))});function pH(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function mH(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),hH(e)}function hH(e){let t=cH(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);let r=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),a=r-i,o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);let s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);let c=cH(e.timeZone,e),l=-new Date(+e).getTimezoneOffset(),u=l-c,d=c!==t,f=u-s;if(d&&f){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+f);let t=cH(e.timeZone,e),n=c-t;n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}var gH=class e extends dH{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${_H(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset(),t=e>0?`-`:`+`,n=String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),r=String(Math.abs(e)%60).padStart(2,`0`);return[t,n,r]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};function _H(e,t){return new Intl.DateTimeFormat(`en-GB`,{timeZone:e,timeZoneName:`long`}).format(t).slice(12)}const vH=new TextDecoder(`utf-8`),yH=e=>vH.decode(e),bH=new TextEncoder,xH=e=>bH.encode(e),SH=e=>typeof e==`function`,CH=e=>e!=null&&Object(e)===e,wH=e=>CH(e)&&SH(e.then),TH=e=>CH(e)&&SH(e[Symbol.iterator]),EH=e=>CH(e)&&SH(e[Symbol.asyncIterator]),DH=e=>CH(e)&&`done`in e&&`value`in e,OH=e=>CH(e)&&SH(e.clear)&&SH(e.bytes)&&SH(e.position)&&SH(e.setPosition)&&SH(e.capacity)&&SH(e.getBufferIdentifier)&&SH(e.createLong);var kH={};St(kH,{compareArrayLike:()=>mU,joinUint8Arrays:()=>NH,memcpy:()=>MH,rebaseValueOffsets:()=>pU,toArrayBufferView:()=>PH,toArrayBufferViewAsyncIterator:()=>rU,toArrayBufferViewIterator:()=>qH,toBigInt64Array:()=>RH,toBigUint64Array:()=>HH,toFloat32Array:()=>UH,toFloat32ArrayAsyncIterator:()=>uU,toFloat32ArrayIterator:()=>eU,toFloat64Array:()=>WH,toFloat64ArrayAsyncIterator:()=>dU,toFloat64ArrayIterator:()=>tU,toInt16Array:()=>IH,toInt16ArrayAsyncIterator:()=>aU,toInt16ArrayIterator:()=>YH,toInt32Array:()=>LH,toInt32ArrayAsyncIterator:()=>oU,toInt32ArrayIterator:()=>XH,toInt8Array:()=>FH,toInt8ArrayAsyncIterator:()=>iU,toInt8ArrayIterator:()=>JH,toUint16Array:()=>BH,toUint16ArrayAsyncIterator:()=>cU,toUint16ArrayIterator:()=>QH,toUint32Array:()=>VH,toUint32ArrayAsyncIterator:()=>lU,toUint32ArrayIterator:()=>$H,toUint8Array:()=>zH,toUint8ArrayAsyncIterator:()=>sU,toUint8ArrayIterator:()=>ZH,toUint8ClampedArray:()=>GH,toUint8ClampedArrayAsyncIterator:()=>fU,toUint8ClampedArrayIterator:()=>nU});const AH=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function jH(e){let t=e[0]?[e[0]]:[],n,r,i,a;for(let o,s,c=0,l=0,u=e.length;++ce+t.byteLength,0),i,a,o,s=0,c=-1,l=Math.min(t||1/0,r);for(let e=n.length;++cPH(Int8Array,e),IH=e=>PH(Int16Array,e),LH=e=>PH(Int32Array,e),RH=e=>PH(BigInt64Array,e),zH=e=>PH(Uint8Array,e),BH=e=>PH(Uint16Array,e),VH=e=>PH(Uint32Array,e),HH=e=>PH(BigUint64Array,e),UH=e=>PH(Float32Array,e),WH=e=>PH(Float64Array,e),GH=e=>PH(Uint8ClampedArray,e),KH=e=>(e.next(),e);function*qH(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof AH?n(t):TH(t)?t:n(t);return yield*KH(function*(t){let n=null;do n=t.next(yield PH(e,n));while(!n.done)}(r[Symbol.iterator]())),new e}const JH=e=>qH(Int8Array,e),YH=e=>qH(Int16Array,e),XH=e=>qH(Int32Array,e),ZH=e=>qH(Uint8Array,e),QH=e=>qH(Uint16Array,e),$H=e=>qH(Uint32Array,e),eU=e=>qH(Float32Array,e),tU=e=>qH(Float64Array,e),nU=e=>qH(Uint8ClampedArray,e);function rU(e,t){return nM(this,arguments,function*(){if(wH(t))return yield tM(yield tM(yield*rM(iM(rU(e,yield tM(t))))));let n=function(e){return nM(this,arguments,function*(){yield yield tM(yield tM(e))})},r=function(e){return nM(this,arguments,function*(){yield tM(yield*rM(iM(KH(function*(e){let t=null;do t=e.next(yield t?.value);while(!t.done)}(e[Symbol.iterator]())))))})},i=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof AH?n(t):TH(t)?r(t):EH(t)?t:n(t);return yield tM(yield*rM(iM(KH(function(t){return nM(this,arguments,function*(){let n=null;do n=yield tM(t.next(yield yield tM(PH(e,n))));while(!n.done)})}(i[Symbol.asyncIterator]()))))),yield tM(new e)})}const iU=e=>rU(Int8Array,e),aU=e=>rU(Int16Array,e),oU=e=>rU(Int32Array,e),sU=e=>rU(Uint8Array,e),cU=e=>rU(Uint16Array,e),lU=e=>rU(Uint32Array,e),uU=e=>rU(Float32Array,e),dU=e=>rU(Float64Array,e),fU=e=>rU(Uint8ClampedArray,e);function pU(e,t,n){if(e!==0){n=n.slice(0,t);for(let t=-1,r=n.length;++t0)do if(e[n]!==t[n])return!1;while(++nCU});const SU=void 0;function CU(e){if(e===null)return`null`;if(e===SU)return`undefined`;switch(typeof e){case`number`:return`${e}`;case`bigint`:return`${e}`;case`string`:return`"${e}"`}return typeof e[Symbol.toPrimitive]==`function`?e[Symbol.toPrimitive](`string`):ArrayBuffer.isView(e)?e instanceof BigInt64Array||e instanceof BigUint64Array?`[${[...e].map(e=>CU(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function wU(e){if(typeof e==`bigint`&&(e<-(2**53-1)||e>2**53-1))throw TypeError(`${e} is not safe to convert to a number.`);return Number(e)}function TU(e,t){return wU(e/t)+wU(e%t)/wU(t)}var EU={};St(EU,{BN:()=>RU,bigNumToBigInt:()=>IU,bigNumToNumber:()=>PU,bigNumToString:()=>FU,isArrowBigNumSymbol:()=>DU});const DU=Symbol.for(`isArrowBigNum`);function OU(e,...t){return t.length===0?Object.setPrototypeOf(PH(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}OU.prototype[DU]=!0,OU.prototype.toJSON=function(){return`"${FU(this)}"`},OU.prototype.valueOf=function(e){return PU(this,e)},OU.prototype.toString=function(){return FU(this)},OU.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return PU(this);case`string`:return FU(this);case`default`:return IU(this)}return FU(this)};function kU(...e){return OU.apply(this,e)}function AU(...e){return OU.apply(this,e)}function jU(...e){return OU.apply(this,e)}Object.setPrototypeOf(kU.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(AU.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(jU.prototype,Object.create(Uint32Array.prototype)),Object.assign(kU.prototype,OU.prototype,{constructor:kU,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(AU.prototype,OU.prototype,{constructor:AU,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(jU.prototype,OU.prototype,{constructor:jU,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const MU=BigInt(4294967296)*BigInt(4294967296),NU=MU-BigInt(1);function PU(e,t){let{buffer:n,byteOffset:r,byteLength:i,signed:a}=e,o=new BigUint64Array(n,r,i/8),s=a&&o.at(-1)&BigInt(1)<0){let e=BigInt(`1`.padEnd(t+1,`0`)),n=c/e,r=s?-(c%e):c%e,i=wU(n),a=`${r}`.padStart(t,`0`),o=s&&i===0?`-`:``;return+`${o}${i}.${a}`}return wU(c)}function FU(e){if(e.byteLength===8){let t=new e.BigIntArray(e.buffer,e.byteOffset,1);return`${t[0]}`}if(!e.signed)return LU(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=new Int16Array([t.at(-1)])[0];if(n>=0)return LU(e);t=t.slice();let r=1;for(let e=0;e(e.children=null,e.ArrayType=Array,e.OffsetArrayType=Int32Array,e[Symbol.toStringTag]=`DataType`))(sW.prototype);var cW=class extends sW{constructor(){super(X.Null)}toString(){return`Null`}};BU=Symbol.toStringTag,cW[BU]=(e=>e[Symbol.toStringTag]=`Null`)(cW.prototype);var lW=class extends sW{constructor(e,t){super(X.Int),this.isSigned=e,this.bitWidth=t}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 Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?`I`:`Ui`}nt${this.bitWidth}`}};VU=Symbol.toStringTag,lW[VU]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(lW.prototype);var uW=class extends lW{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},dW=class extends lW{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},fW=class extends lW{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},pW=class extends lW{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},mW=class extends lW{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},hW=class extends lW{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},gW=class extends lW{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},_W=class extends lW{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(uW.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(dW.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(fW.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(pW.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(mW.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(hW.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(gW.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(_W.prototype,`ArrayType`,{value:BigUint64Array});var vW=class extends sW{constructor(e){super(X.Float),this.precision=e}get ArrayType(){switch(this.precision){case gU.HALF:return Uint16Array;case gU.SINGLE:return Float32Array;case gU.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};HU=Symbol.toStringTag,vW[HU]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(vW.prototype);var yW=class extends vW{constructor(){super(gU.HALF)}},bW=class extends vW{constructor(){super(gU.SINGLE)}},xW=class extends vW{constructor(){super(gU.DOUBLE)}};Object.defineProperty(yW.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(bW.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(xW.prototype,`ArrayType`,{value:Float64Array});var SW=class extends sW{constructor(){super(X.Binary)}toString(){return`Binary`}};UU=Symbol.toStringTag,SW[UU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(SW.prototype);var CW=class extends sW{constructor(){super(X.LargeBinary)}toString(){return`LargeBinary`}};WU=Symbol.toStringTag,CW[WU]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(CW.prototype);var wW=class extends sW{constructor(){super(X.Utf8)}toString(){return`Utf8`}};GU=Symbol.toStringTag,wW[GU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(wW.prototype);var TW=class extends sW{constructor(){super(X.LargeUtf8)}toString(){return`LargeUtf8`}};KU=Symbol.toStringTag,TW[KU]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(TW.prototype);var EW=class extends sW{constructor(){super(X.Bool)}toString(){return`Bool`}};qU=Symbol.toStringTag,EW[qU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(EW.prototype);var DW=class extends sW{constructor(e,t,n=128){super(X.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};JU=Symbol.toStringTag,DW[JU]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(DW.prototype);var OW=class extends sW{constructor(e){super(X.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${_U[this.unit]}>`}get ArrayType(){return this.unit===_U.DAY?Int32Array:BigInt64Array}};YU=Symbol.toStringTag,OW[YU]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(OW.prototype);var kW=class extends sW{constructor(e,t){super(X.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${vU[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};XU=Symbol.toStringTag,kW[XU]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(kW.prototype);var AW=class extends sW{constructor(e,t){super(X.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${vU[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};ZU=Symbol.toStringTag,AW[ZU]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(AW.prototype);var jW=class extends sW{constructor(e){super(X.Interval),this.unit=e}toString(){return`Interval<${yU[this.unit]}>`}};QU=Symbol.toStringTag,jW[QU]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(jW.prototype);var MW=class extends sW{constructor(e){super(X.Duration),this.unit=e}toString(){return`Duration<${vU[this.unit]}>`}};$U=Symbol.toStringTag,MW[$U]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(MW.prototype);var NW=class extends sW{constructor(e){super(X.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};eW=Symbol.toStringTag,NW[eW]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(NW.prototype);var PW=class extends sW{constructor(e){super(X.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};tW=Symbol.toStringTag,PW[tW]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(PW.prototype);var FW=class extends sW{constructor(e,t,n){super(X.Union),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((e,t,n)=>(e[t]=n)&&e||e,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(` | `)}>`}};nW=Symbol.toStringTag,FW[nW]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(FW.prototype);var IW=class extends sW{constructor(e){super(X.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};rW=Symbol.toStringTag,IW[rW]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(IW.prototype);var LW=class extends sW{constructor(e,t){super(X.FixedSizeList),this.listSize=e,this.children=[t]}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}>`}};iW=Symbol.toStringTag,LW[iW]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(LW.prototype);var RW=class extends sW{constructor(e,t=!1){var n,r,i;if(super(X.Map),this.children=[e],this.keysSorted=t,e&&(e.name=`entries`,(n=e?.type)?.children)){let t=(r=e?.type)?.children[0];t&&(t.name=`key`);let n=(i=e?.type)?.children[1];n&&(n.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(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};aW=Symbol.toStringTag,RW[aW]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(RW.prototype);const zW=(e=>()=>++e)(-1);var BW=class extends sW{constructor(e,t,n,r){super(X.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?zW():wU(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};oW=Symbol.toStringTag,BW[oW]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(BW.prototype);function VW(e){let t=e;switch(e.typeId){case X.Decimal:return e.bitWidth/32;case X.Interval:return t.unit===yU.MONTH_DAY_NANO?4:1+t.unit;case X.FixedSizeList:return t.listSize;case X.FixedSizeBinary:return t.byteWidth;default:return 1}}var HW=class{visitMany(e,...t){return e.map((e,n)=>this.visit(e,...t.map(e=>e[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return UW(this,e,t)}getVisitFnByTypeId(e,t=!0){return WW(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};function UW(e,t,n=!0){return typeof t==`number`?WW(e,t,n):typeof t==`string`&&t in X?WW(e,X[t],n):t&&t instanceof sW?WW(e,GW(t),n):t?.type&&t.type instanceof sW?WW(e,GW(t.type),n):WW(e,X.NONE,n)}function WW(e,t,n=!0){let r=null;switch(t){case X.Null:r=e.visitNull;break;case X.Bool:r=e.visitBool;break;case X.Int:r=e.visitInt;break;case X.Int8:r=e.visitInt8||e.visitInt;break;case X.Int16:r=e.visitInt16||e.visitInt;break;case X.Int32:r=e.visitInt32||e.visitInt;break;case X.Int64:r=e.visitInt64||e.visitInt;break;case X.Uint8:r=e.visitUint8||e.visitInt;break;case X.Uint16:r=e.visitUint16||e.visitInt;break;case X.Uint32:r=e.visitUint32||e.visitInt;break;case X.Uint64:r=e.visitUint64||e.visitInt;break;case X.Float:r=e.visitFloat;break;case X.Float16:r=e.visitFloat16||e.visitFloat;break;case X.Float32:r=e.visitFloat32||e.visitFloat;break;case X.Float64:r=e.visitFloat64||e.visitFloat;break;case X.Utf8:r=e.visitUtf8;break;case X.LargeUtf8:r=e.visitLargeUtf8;break;case X.Binary:r=e.visitBinary;break;case X.LargeBinary:r=e.visitLargeBinary;break;case X.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case X.Date:r=e.visitDate;break;case X.DateDay:r=e.visitDateDay||e.visitDate;break;case X.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case X.Timestamp:r=e.visitTimestamp;break;case X.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case X.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case X.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case X.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case X.Time:r=e.visitTime;break;case X.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case X.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case X.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case X.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case X.Decimal:r=e.visitDecimal;break;case X.List:r=e.visitList;break;case X.Struct:r=e.visitStruct;break;case X.Union:r=e.visitUnion;break;case X.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case X.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case X.Dictionary:r=e.visitDictionary;break;case X.Interval:r=e.visitInterval;break;case X.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case X.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case X.IntervalMonthDayNano:r=e.visitIntervalMonthDayNano||e.visitInterval;break;case X.Duration:r=e.visitDuration;break;case X.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case X.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case X.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case X.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case X.FixedSizeList:r=e.visitFixedSizeList;break;case X.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${X[t]}'`)}function GW(e){switch(e.typeId){case X.Null:return X.Null;case X.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?X.Int8:X.Uint8;case 16:return n?X.Int16:X.Uint16;case 32:return n?X.Int32:X.Uint32;case 64:return n?X.Int64:X.Uint64}return X.Int}case X.Float:switch(e.precision){case gU.HALF:return X.Float16;case gU.SINGLE:return X.Float32;case gU.DOUBLE:return X.Float64}return X.Float;case X.Binary:return X.Binary;case X.LargeBinary:return X.LargeBinary;case X.Utf8:return X.Utf8;case X.LargeUtf8:return X.LargeUtf8;case X.Bool:return X.Bool;case X.Decimal:return X.Decimal;case X.Time:switch(e.unit){case vU.SECOND:return X.TimeSecond;case vU.MILLISECOND:return X.TimeMillisecond;case vU.MICROSECOND:return X.TimeMicrosecond;case vU.NANOSECOND:return X.TimeNanosecond}return X.Time;case X.Timestamp:switch(e.unit){case vU.SECOND:return X.TimestampSecond;case vU.MILLISECOND:return X.TimestampMillisecond;case vU.MICROSECOND:return X.TimestampMicrosecond;case vU.NANOSECOND:return X.TimestampNanosecond}return X.Timestamp;case X.Date:switch(e.unit){case _U.DAY:return X.DateDay;case _U.MILLISECOND:return X.DateMillisecond}return X.Date;case X.Interval:switch(e.unit){case yU.DAY_TIME:return X.IntervalDayTime;case yU.YEAR_MONTH:return X.IntervalYearMonth;case yU.MONTH_DAY_NANO:return X.IntervalMonthDayNano}return X.Interval;case X.Duration:switch(e.unit){case vU.SECOND:return X.DurationSecond;case vU.MILLISECOND:return X.DurationMillisecond;case vU.MICROSECOND:return X.DurationMicrosecond;case vU.NANOSECOND:return X.DurationNanosecond}return X.Duration;case X.Map:return X.Map;case X.List:return X.List;case X.Struct:return X.Struct;case X.Union:switch(e.mode){case hU.Dense:return X.DenseUnion;case hU.Sparse:return X.SparseUnion}return X.Union;case X.FixedSizeBinary:return X.FixedSizeBinary;case X.FixedSizeList:return X.FixedSizeList;case X.Dictionary:return X.Dictionary}throw Error(`Unrecognized type '${X[e.typeId]}'`)}HW.prototype.visitInt8=null,HW.prototype.visitInt16=null,HW.prototype.visitInt32=null,HW.prototype.visitInt64=null,HW.prototype.visitUint8=null,HW.prototype.visitUint16=null,HW.prototype.visitUint32=null,HW.prototype.visitUint64=null,HW.prototype.visitFloat16=null,HW.prototype.visitFloat32=null,HW.prototype.visitFloat64=null,HW.prototype.visitDateDay=null,HW.prototype.visitDateMillisecond=null,HW.prototype.visitTimestampSecond=null,HW.prototype.visitTimestampMillisecond=null,HW.prototype.visitTimestampMicrosecond=null,HW.prototype.visitTimestampNanosecond=null,HW.prototype.visitTimeSecond=null,HW.prototype.visitTimeMillisecond=null,HW.prototype.visitTimeMicrosecond=null,HW.prototype.visitTimeNanosecond=null,HW.prototype.visitDenseUnion=null,HW.prototype.visitSparseUnion=null,HW.prototype.visitIntervalDayTime=null,HW.prototype.visitIntervalYearMonth=null,HW.prototype.visitIntervalMonthDayNano=null,HW.prototype.visitDuration=null,HW.prototype.visitDurationSecond=null,HW.prototype.visitDurationMillisecond=null,HW.prototype.visitDurationMicrosecond=null,HW.prototype.visitDurationNanosecond=null;var KW={};St(KW,{float64ToUint16:()=>XW,uint16ToFloat64:()=>YW});const qW=new Float64Array(1),JW=new Uint32Array(qW.buffer);function YW(e){let t=(e&31744)>>10,n=(e&1023)/1024,r=(-1)**((e&32768)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*2**(t-15)*(1+n)}function XW(e){if(e!==e)return 32256;qW[0]=e;let t=(JW[1]&2147483648)>>16&65535,n=JW[1]&2146435072,r=0;return n>=1089470464?JW[0]>0?n=31744:(n=(n&2080374784)>>16,r=(JW[1]&1048575)>>10):n<=1056964608?(r=1048576+(JW[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(JW[1]&1048575)+512>>10),t|n|r&65535}var ZW=class extends HW{};function QW(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const $W=(e,t,n)=>{e[t]=Math.floor(n/864e5)},eG=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},rG=({values:e},t,n)=>{e[t]=n},iG=({values:e},t,n)=>{e[t]=XW(n)},aG=(e,t,n)=>{switch(e.type.precision){case gU.HALF:return iG(e,t,n);case gU.SINGLE:case gU.DOUBLE:return rG(e,t,n)}},oG=({values:e},t,n)=>{$W(e,t,n.valueOf())},sG=({values:e},t,n)=>{e[t]=BigInt(n)},cG=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},lG=({values:e,valueOffsets:t},n,r)=>eG(e,t,n,r),uG=({values:e,valueOffsets:t},n,r)=>eG(e,t,n,xH(r)),dG=(e,t,n)=>{e.type.unit===_U.DAY?oG(e,t,n):sG(e,t,n)},fG=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},pG=({values:e},t,n)=>{e[t]=BigInt(n)},mG=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},hG=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},gG=(e,t,n)=>{switch(e.type.unit){case vU.SECOND:return fG(e,t,n);case vU.MILLISECOND:return pG(e,t,n);case vU.MICROSECOND:return mG(e,t,n);case vU.NANOSECOND:return hG(e,t,n)}},_G=({values:e},t,n)=>{e[t]=n},vG=({values:e},t,n)=>{e[t]=n},yG=({values:e},t,n)=>{e[t]=n},bG=({values:e},t,n)=>{e[t]=n},xG=(e,t,n)=>{switch(e.type.unit){case vU.SECOND:return _G(e,t,n);case vU.MILLISECOND:return vG(e,t,n);case vU.MICROSECOND:return yG(e,t,n);case vU.NANOSECOND:return bG(e,t,n)}},SG=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},CG=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=WG.getVisitFn(r);if(Array.isArray(n))for(let e=-1,o=i[t],s=i[t+1];o{let r=e.children[0],{valueOffsets:i}=e,a=WG.getVisitFn(r),{[t]:o,[t+1]:s}=i,c=n instanceof Map?n.entries():Object.entries(n);for(let e of c)if(a(r,o,e),++o>=s)break},TG=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),EG=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),DG=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),OG=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),kG=(e,t,n)=>{let r=e.type.children.map(e=>WG.getVisitFn(e.type)),i=n instanceof Map?DG(t,n):n instanceof qq?EG(t,n):Array.isArray(n)?TG(t,n):OG(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},AG=(e,t,n)=>{e.type.mode===hU.Dense?jG(e,t,n):MG(e,t,n)},jG=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];WG.visit(i,e.valueOffsets[t],n)},MG=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];WG.visit(i,t,n)},NG=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},PG=(e,t,n)=>{switch(e.type.unit){case yU.YEAR_MONTH:return IG(e,t,n);case yU.DAY_TIME:return FG(e,t,n);case yU.MONTH_DAY_NANO:return LG(e,t,n)}},FG=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},IG=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},LG=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},RG=({values:e},t,n)=>{e[t]=n},zG=({values:e},t,n)=>{e[t]=n},BG=({values:e},t,n)=>{e[t]=n},VG=({values:e},t,n)=>{e[t]=n},HG=(e,t,n)=>{switch(e.type.unit){case vU.SECOND:return RG(e,t,n);case vU.MILLISECOND:return zG(e,t,n);case vU.MICROSECOND:return BG(e,t,n);case vU.NANOSECOND:return VG(e,t,n)}},UG=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=WG.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${CU(e)}: ${CU(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new JG(this[GG],this[KG])}},JG=class{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return ee.name)}has(e,t){return e[GG].type.children.some(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(e[GG].type.children.some(e=>e.name===t))return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[GG].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=HK.visit(e[GG].children[n],e[KG]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[GG].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(WG.visit(e[GG].children[r],e[KG],n),Reflect.set(e,t,n))}};const XG=new YG;var ZG=class extends HW{};function QG(e){return(t,n)=>t.getValid(n)?e(t,n):null}const $G=(e,t)=>864e5*e[t],eK=(e,t)=>null,tK=(e,t,n)=>{if(n+1>=t.length)return null;let r=wU(t[n]),i=wU(t[n+1]);return e.subarray(r,i)},nK=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<$G(e,t),iK=({values:e},t)=>wU(e[t]),aK=({stride:e,values:t},n)=>t[e*n],oK=({stride:e,values:t},n)=>YW(t[e*n]),sK=({values:e},t)=>e[t],cK=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),lK=({values:e,valueOffsets:t},n)=>tK(e,t,n),uK=({values:e,valueOffsets:t},n)=>{let r=tK(e,t,n);return r===null?null:yH(r)},dK=({values:e},t)=>e[t],fK=({type:e,values:t},n)=>e.precision===gU.HALF?YW(t[n]):t[n],pK=(e,t)=>e.type.unit===_U.DAY?rK(e,t):iK(e,t),mK=({values:e},t)=>1e3*wU(e[t]),hK=({values:e},t)=>wU(e[t]),gK=({values:e},t)=>TU(e[t],BigInt(1e3)),_K=({values:e},t)=>TU(e[t],BigInt(1e6)),vK=(e,t)=>{switch(e.type.unit){case vU.SECOND:return mK(e,t);case vU.MILLISECOND:return hK(e,t);case vU.MICROSECOND:return gK(e,t);case vU.NANOSECOND:return _K(e,t)}},yK=({values:e},t)=>e[t],bK=({values:e},t)=>e[t],xK=({values:e},t)=>e[t],SK=({values:e},t)=>e[t],CK=(e,t)=>{switch(e.type.unit){case vU.SECOND:return yK(e,t);case vU.MILLISECOND:return bK(e,t);case vU.MICROSECOND:return xK(e,t);case vU.NANOSECOND:return SK(e,t)}},wK=({values:e,stride:t},n)=>RU.decimal(e.subarray(t*n,t*(n+1))),TK=(e,t)=>{let{valueOffsets:n,stride:r,children:i}=e,{[t*r]:a,[t*r+1]:o}=n,s=i[0],c=s.slice(a,o-a);return new qq([c])},EK=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new qK(o.slice(i,a-i))},DK=(e,t)=>new qG(e,t),OK=(e,t)=>e.type.mode===hU.Dense?kK(e,t):AK(e,t),kK=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return HK.visit(r,e.valueOffsets[t])},AK=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return HK.visit(r,t)},jK=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},MK=(e,t)=>e.type.unit===yU.MONTH_DAY_NANO?FK(e,t):e.type.unit===yU.DAY_TIME?NK(e,t):PK(e,t),NK=({values:e},t)=>e.subarray(2*t,2*(t+1)),PK=({values:e},t)=>{let n=e[t],r=new Int32Array(2);return r[0]=Math.trunc(n/12),r[1]=Math.trunc(n%12),r},FK=({values:e},t)=>e.subarray(4*t,4*(t+1)),IK=({values:e},t)=>e[t],LK=({values:e},t)=>e[t],RK=({values:e},t)=>e[t],zK=({values:e},t)=>e[t],BK=(e,t)=>{switch(e.type.unit){case vU.SECOND:return IK(e,t);case vU.MILLISECOND:return LK(e,t);case vU.MICROSECOND:return RK(e,t);case vU.NANOSECOND:return zK(e,t)}},VK=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new qq([a])};ZG.prototype.visitNull=QG(eK),ZG.prototype.visitBool=QG(nK),ZG.prototype.visitInt=QG(dK),ZG.prototype.visitInt8=QG(aK),ZG.prototype.visitInt16=QG(aK),ZG.prototype.visitInt32=QG(aK),ZG.prototype.visitInt64=QG(sK),ZG.prototype.visitUint8=QG(aK),ZG.prototype.visitUint16=QG(aK),ZG.prototype.visitUint32=QG(aK),ZG.prototype.visitUint64=QG(sK),ZG.prototype.visitFloat=QG(fK),ZG.prototype.visitFloat16=QG(oK),ZG.prototype.visitFloat32=QG(aK),ZG.prototype.visitFloat64=QG(aK),ZG.prototype.visitUtf8=QG(uK),ZG.prototype.visitLargeUtf8=QG(uK),ZG.prototype.visitBinary=QG(lK),ZG.prototype.visitLargeBinary=QG(lK),ZG.prototype.visitFixedSizeBinary=QG(cK),ZG.prototype.visitDate=QG(pK),ZG.prototype.visitDateDay=QG(rK),ZG.prototype.visitDateMillisecond=QG(iK),ZG.prototype.visitTimestamp=QG(vK),ZG.prototype.visitTimestampSecond=QG(mK),ZG.prototype.visitTimestampMillisecond=QG(hK),ZG.prototype.visitTimestampMicrosecond=QG(gK),ZG.prototype.visitTimestampNanosecond=QG(_K),ZG.prototype.visitTime=QG(CK),ZG.prototype.visitTimeSecond=QG(yK),ZG.prototype.visitTimeMillisecond=QG(bK),ZG.prototype.visitTimeMicrosecond=QG(xK),ZG.prototype.visitTimeNanosecond=QG(SK),ZG.prototype.visitDecimal=QG(wK),ZG.prototype.visitList=QG(TK),ZG.prototype.visitStruct=QG(DK),ZG.prototype.visitUnion=QG(OK),ZG.prototype.visitDenseUnion=QG(kK),ZG.prototype.visitSparseUnion=QG(AK),ZG.prototype.visitDictionary=QG(jK),ZG.prototype.visitInterval=QG(MK),ZG.prototype.visitIntervalDayTime=QG(NK),ZG.prototype.visitIntervalYearMonth=QG(PK),ZG.prototype.visitIntervalMonthDayNano=QG(FK),ZG.prototype.visitDuration=QG(BK),ZG.prototype.visitDurationSecond=QG(IK),ZG.prototype.visitDurationMillisecond=QG(LK),ZG.prototype.visitDurationMicrosecond=QG(RK),ZG.prototype.visitDurationNanosecond=QG(zK),ZG.prototype.visitFixedSizeList=QG(VK),ZG.prototype.visitMap=QG(EK);const HK=new ZG,UK=Symbol.for(`keys`),WK=Symbol.for(`vals`),GK=Symbol.for(`kKeysAsStrings`),KK=Symbol.for(`_kKeysAsStrings`);var qK=class{constructor(e){return this[UK]=new qq([e.children[0]]).memoize(),this[WK]=e.children[1],new Proxy(this,new YK)}get[GK](){return this[KK]||(this[KK]=Array.from(this[UK].toArray(),String))}[Symbol.iterator](){return new JK(this[UK],this[WK])}get size(){return this[UK].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[UK],t=this[WK],n={};for(let r=-1,i=e.length;++r`${CU(e)}: ${CU(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},JK=class{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),HK.visit(this.vals,e)]})}},YK=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[GK]}has(e,t){return e[GK].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[GK].indexOf(t);if(n!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[GK].indexOf(t);if(n!==-1){let r=HK.visit(Reflect.get(e,WK),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[GK].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(WG.visit(Reflect.get(e,WK),r,n),Reflect.set(e,t,n))}};Object.defineProperties(qK.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[UK]:{writable:!0,enumerable:!1,configurable:!1,value:null},[WK]:{writable:!0,enumerable:!1,configurable:!1,value:null},[KK]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var XK={};St(XK,{clampRange:()=>QK,createElementComparator:()=>tq,wrapIndex:()=>$K});let ZK;function QK(e,t,n,r){let{length:i=0}=e,a=typeof t==`number`?t:0,o=typeof n==`number`?n:i;return a<0&&(a=(a%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),r?r(e,a,o):[a,o]}const $K=(e,t)=>e<0?t+e:e,eq=e=>e!==e;function tq(e){let t=typeof e;if(t!==`object`||e===null)return eq(e)?eq:t=>t===e;if(e instanceof Date){let t=e.valueOf();return e=>e instanceof Date?e.valueOf()===t:!1}return ArrayBuffer.isView(e)?t=>t?mU(e,t):!1:e instanceof Map?rq(e):Array.isArray(e)?nq(e):e instanceof qq?iq(e):aq(e,!0)}function nq(e){let t=[];for(let n=-1,r=e.length;++n!1;let r=[];for(let t=-1,i=n.length;++t{if(!n||typeof n!=`object`)return!1;switch(n.constructor){case Array:return sq(e,n);case Map:return lq(e,n,n.keys());case qK:case qG:case Object:case void 0:return lq(e,n,t||Object.keys(n))}return n instanceof qq?cq(e,n):!1}}function sq(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++rgq,getBit:()=>fq,getBool:()=>dq,packBools:()=>hq,popcnt_array:()=>vq,popcnt_bit_range:()=>_q,popcnt_uint32:()=>yq,setBool:()=>pq,truncateBitmap:()=>mq});function dq(e,t,n,r){return(n&1<>r}function pq(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):hq(new gq(n,e,t,null,dq)).subarray(0,r)),i}return n}function hq(e){let t=[],n=0,r=0,i=0;for(let a of e)a&&(i|=1<0)&&(t[n++]=i);let a=new Uint8Array(t.length+7&-8);return a.set(t),a}var gq=class{constructor(e,t,n,r,i){this.bytes=e,this.length=n,this.context=r,this.get=i,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8==0?0:8-t%8);return _q(e,t,i)+_q(e,r,n)+vq(e,i>>3,r-i>>3)}function vq(e,t,n){let r=0,i=Math.trunc(t),a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=n===void 0?e.byteLength:i+n;for(;o-i>=4;)r+=yq(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=yq(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=yq(a.getUint8(i)),i+=1;return r}function yq(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const bq=-1;var xq=class e{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){let{type:e}=this;return sW.isSparseUnion(e)||sW.isDenseUnion(e)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{valueOffsets:t,values:n,nullBitmap:r,typeIds:i}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.children.reduce((e,t)=>e+t.byteLength,e)}get nullCount(){if(sW.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=bq&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-_q(t,this.offset,this.offset+this.length)),e}constructor(t,n,r,i,a,o=[],s){this.type=t,this.children=o,this.dictionary=s,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let c;a instanceof e?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=VW(t),a&&((c=a[0])&&(this.valueOffsets=c),(c=a[1])&&(this.values=c),(c=a[2])&&(this.nullBitmap=c),(c=a[3])&&(this.typeIds=c)))}getValid(e){let{type:t}=this;if(sW.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===hU.Dense?this.valueOffsets[e]:e;return r.getValid(i)}if(this.nullable&&this.nullCount>0){let t=this.offset+e,n=this.nullBitmap[t>>3];return(n&1<>3;(!r||r.byteLength<=c)&&(r=new Uint8Array((i+a+63&-64)>>3).fill(255),this.nullCount>0?(r.set(mq(i,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:r})):Object.assign(this,{nullBitmap:r,_nullCount:0}));let l=r[c];n=(l&s)!==0,r[c]=t?l|s:l&~s}return n!==!!t&&(this._nullCount=this.nullCount+(t?-1:1)),t}clone(t=this.type,n=this.offset,r=this.length,i=this._nullCount,a=this,o=this.children){return new e(t,n,r,i,a,o,this.dictionary)}slice(e,t){let{stride:n,typeId:r,children:i}=this,a=(this._nullCount===0)-1,o=r===16?n:1,s=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,a,s,i.length===0||this.valueOffsets?i:this._sliceChildren(i,o*e,o*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===X.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:n}=this,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<0&&r.set(mq(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[bU.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}_sliceBuffers(e,t,n,r){let i,{buffers:a}=this;return(i=a[bU.TYPE])&&(a[bU.TYPE]=i.subarray(e,e+t)),(i=a[bU.OFFSET])&&(a[bU.OFFSET]=i.subarray(e,e+t+1))||(i=a[bU.DATA])&&(a[bU.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};xq.prototype.children=Object.freeze([]);var Sq=class e extends HW{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new xq(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=zH(e.data),i=zH(e.nullBitmap),a=LH(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xq(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=zH(e.data),i=zH(e.nullBitmap),a=RH(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xq(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=zH(e.data),i=zH(e.nullBitmap),a=LH(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xq(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=zH(e.data),i=zH(e.nullBitmap),a=RH(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xq(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=zH(e.nullBitmap),a=LH(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xq(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=zH(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=PH(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(sW.isSparseUnion(t))return new xq(t,n,a,o,[void 0,void 0,void 0,i],r);let s=LH(e.valueOffsets);return new xq(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=zH(t.nullBitmap),a=PH(n.indices.ArrayType,t.data),{dictionary:o=new qq([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new xq(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitFixedSizeList(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.valueType})}=t,a=zH(t.nullBitmap),{length:o=i.length/VW(n),nullCount:s=t.nullBitmap?-1:0}=t;return new xq(n,r,o,s,[void 0,void 0,a],[i])}visitMap(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.childType})}=t,a=zH(t.nullBitmap),o=LH(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new xq(n,r,s,c,[o,void 0,a],[i])}};const Cq=new Sq;var wq=class{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndexe.nullable)}function Eq(e){return e.reduce((e,t)=>e+t.nullCount,0)}function Dq(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function Oq(e,t,n,r){let i=[];for(let a=-1,o=e.length;++a=r)break;if(n>=s+c)continue;if(s>=n&&s+c<=r){i.push(o);continue}let l=Math.max(0,n-s),u=Math.min(r-s,c);i.push(o.slice(l,u-l))}return i.length===0&&i.push(e[0].slice(0,0)),i}function kq(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function Iq(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new gq(n,e.offset+(t||0),e.length,n,dq)){if(!i)return r;++r}return-1}function Lq(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case X.Union:break;case X.Dictionary:break;default:return Iq(e,n)}let r=HK.getVisitFn(e),i=tq(t);for(let t=(n||0)-1,a=e.length;++t{let n=e.data[t];return n.values.subarray(0,n.length)[Symbol.iterator]()});let n=0;return new wq(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new Hq(a)})}var Hq=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof xq)))throw TypeError(`Vector constructor expects an Array of Data instances.`);let o=(n=a[0])?.type;switch(a.length){case 0:this._offsets=[0];break;case 1:{let{get:e,set:t,indexOf:n}=Gq[o.typeId],r=a[0];this.isValid=e=>Aq(r,e),this.get=t=>e(r,t),this.set=(e,n)=>t(r,e,n),this.indexOf=e=>n(r,e),this._offsets=[0,r.length];break}default:Object.setPrototypeOf(this,Kq[o.typeId]),this._offsets=Dq(a);break}this.data=a,this.type=o,this.stride=VW(o),this.numChildren=(i=(r=o.children)?.length)??0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,t)=>e+t.byteLength,0)}get nullable(){return Tq(this.data)}get nullCount(){return Eq(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${X[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get($K(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return Uq.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(QK(this,t,n,({data:e,_offsets:t},n,r)=>Oq(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case X.Int:case X.Float:case X.Decimal:case X.Time:case X.Timestamp:switch(t.length){case 0:return new i;case 1:return t[0].values.subarray(0,n*r);default:return t.reduce((e,{values:t,length:n})=>(e.array.set(t.subarray(0,n*r),e.offset),e.offset+=n*r,e),{array:new i(n*r),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(`,`)}]`}getChild(e){var t;return this.getChildAt((t=this.type.children)?.findIndex(t=>t.name===e))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return sW.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(sW.isDictionary(this.type)){let t=new Jq(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new Jq(this)}unmemoize(){if(sW.isDictionary(this.type)&&this.isMemoized){let t=this.data[0].dictionary.unmemoize(),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return this}};Wq=Symbol.toStringTag,qq[Wq]=(e=>{e.type=sW.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;let t=Object.keys(X).map(e=>X[e]).filter(e=>typeof e==`number`&&e!==X.NONE);for(let n of t){let t=HK.getVisitFnByTypeId(n),r=WG.getVisitFnByTypeId(n),i=zq.getVisitFnByTypeId(n);Gq[n]={get:t,set:r,indexOf:i},Kq[n]=Object.create(e,{isValid:{value:jq(Aq)},get:{value:jq(HK.getVisitFnByTypeId(n))},set:{value:Mq(WG.getVisitFnByTypeId(n))},indexOf:{value:Nq(zq.getVisitFnByTypeId(n))}})}return`Vector`})(qq.prototype);var Jq=class e extends qq{constructor(t){super(t.data);let n=this.get,r=this.set,i=this.slice,a=Array(this.length);Object.defineProperty(this,`get`,{value(e){let t=a[e];if(t!==void 0)return t;let r=n.call(this,e);return a[e]=r,r}}),Object.defineProperty(this,`set`,{value(e,t){r.call(this,e,t),a[e]=t}}),Object.defineProperty(this,`slice`,{value:(t,n)=>new e(i.call(this,t,n))}),Object.defineProperty(this,`isMemoized`,{value:!0}),Object.defineProperty(this,`unmemoize`,{value:()=>new qq(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},Yq={};St(Yq,{BaseInt64:()=>eJ,Int128:()=>rJ,Int64:()=>nJ,Uint64:()=>tJ});const Xq=65536;function Zq(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const Qq=8,$q=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];var eJ=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),r=t[3]*n[3];this.buffer[0]=r&65535;let i=r>>>16;return r=t[2]*n[3],i+=r,r=t[3]*n[2]>>>0,i+=r,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]>>0&&++t[1],t[1]>>0&&++t[2],t[2]>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${Zq(this.buffer[3])} ${Zq(this.buffer[2])} ${Zq(this.buffer[1])} ${Zq(this.buffer[0])}`}static multiply(t,n){let r=new e(new Uint32Array(t.buffer));return r.times(n)}static add(t,n){let r=new e(new Uint32Array(t.buffer));return r.plus(n)}static from(t,n=new Uint32Array(4)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(4)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(4)){let r=t.startsWith(`-`),i=t.length,a=new e(n);for(let n=r?1:0;naJ,toIntervalDayTimeObjects:()=>sJ,toIntervalMonthDayNanoInt32Array:()=>oJ,toIntervalMonthDayNanoObjects:()=>cJ});function aJ(e){var t,n;let r=e.length,i=new Int32Array(r*2);for(let a=0,o=0;a>BigInt(32))):o+=2}return i}function sJ(e){let t=e.length,n=Array(t/2);for(let r=0,i=0;r>>0);r[a++]={months:e[i],days:e[i+1],nanoseconds:t?`${n}`:n}}return r}var lJ=class extends HW{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>this.compareFields(e,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};function uJ(e,t){return t instanceof e.constructor}function dJ(e,t){return e===t||uJ(e,t)}function fJ(e,t){return e===t||uJ(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function pJ(e,t){return e===t||uJ(e,t)&&e.precision===t.precision}function mJ(e,t){return e===t||uJ(e,t)&&e.byteWidth===t.byteWidth}function hJ(e,t){return e===t||uJ(e,t)&&e.unit===t.unit}function gJ(e,t){return e===t||uJ(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function _J(e,t){return e===t||uJ(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function vJ(e,t){return e===t||uJ(e,t)&&e.children.length===t.children.length&&EJ.compareManyFields(e.children,t.children)}function yJ(e,t){return e===t||uJ(e,t)&&e.children.length===t.children.length&&EJ.compareManyFields(e.children,t.children)}function bJ(e,t){return e===t||uJ(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&EJ.compareManyFields(e.children,t.children)}function xJ(e,t){return e===t||uJ(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&EJ.visit(e.indices,t.indices)&&EJ.visit(e.dictionary,t.dictionary)}function SJ(e,t){return e===t||uJ(e,t)&&e.unit===t.unit}function CJ(e,t){return e===t||uJ(e,t)&&e.unit===t.unit}function wJ(e,t){return e===t||uJ(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&EJ.compareManyFields(e.children,t.children)}function TJ(e,t){return e===t||uJ(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&EJ.compareManyFields(e.children,t.children)}lJ.prototype.visitNull=dJ,lJ.prototype.visitBool=dJ,lJ.prototype.visitInt=fJ,lJ.prototype.visitInt8=fJ,lJ.prototype.visitInt16=fJ,lJ.prototype.visitInt32=fJ,lJ.prototype.visitInt64=fJ,lJ.prototype.visitUint8=fJ,lJ.prototype.visitUint16=fJ,lJ.prototype.visitUint32=fJ,lJ.prototype.visitUint64=fJ,lJ.prototype.visitFloat=pJ,lJ.prototype.visitFloat16=pJ,lJ.prototype.visitFloat32=pJ,lJ.prototype.visitFloat64=pJ,lJ.prototype.visitUtf8=dJ,lJ.prototype.visitLargeUtf8=dJ,lJ.prototype.visitBinary=dJ,lJ.prototype.visitLargeBinary=dJ,lJ.prototype.visitFixedSizeBinary=mJ,lJ.prototype.visitDate=hJ,lJ.prototype.visitDateDay=hJ,lJ.prototype.visitDateMillisecond=hJ,lJ.prototype.visitTimestamp=gJ,lJ.prototype.visitTimestampSecond=gJ,lJ.prototype.visitTimestampMillisecond=gJ,lJ.prototype.visitTimestampMicrosecond=gJ,lJ.prototype.visitTimestampNanosecond=gJ,lJ.prototype.visitTime=_J,lJ.prototype.visitTimeSecond=_J,lJ.prototype.visitTimeMillisecond=_J,lJ.prototype.visitTimeMicrosecond=_J,lJ.prototype.visitTimeNanosecond=_J,lJ.prototype.visitDecimal=dJ,lJ.prototype.visitList=vJ,lJ.prototype.visitStruct=yJ,lJ.prototype.visitUnion=bJ,lJ.prototype.visitDenseUnion=bJ,lJ.prototype.visitSparseUnion=bJ,lJ.prototype.visitDictionary=xJ,lJ.prototype.visitInterval=SJ,lJ.prototype.visitIntervalDayTime=SJ,lJ.prototype.visitIntervalYearMonth=SJ,lJ.prototype.visitIntervalMonthDayNano=SJ,lJ.prototype.visitDuration=CJ,lJ.prototype.visitDurationSecond=CJ,lJ.prototype.visitDurationMillisecond=CJ,lJ.prototype.visitDurationMicrosecond=CJ,lJ.prototype.visitDurationNanosecond=CJ,lJ.prototype.visitFixedSizeList=wJ,lJ.prototype.visitMap=TJ;const EJ=new lJ;function DJ(e,t){return EJ.compareSchemas(e,t)}function OJ(e,t){return EJ.compareFields(e,t)}function kJ(e,t){return EJ.visit(e,t)}const AJ=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},EU),Yq),uq),KW),kH),XK),xU),iJ),{compareSchemas:DJ,compareFields:OJ,compareTypes:kJ}),jJ=365.2425,MJ=10**8*24*60*60*1e3,NJ=6048e5,PJ=864e5,FJ=3600,IJ=FJ*24,LJ=IJ*7,RJ=IJ*jJ,zJ=RJ/12,BJ=zJ*3,VJ=Symbol.for(`constructDateFrom`);function HJ(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&VJ in e?e[VJ](t):e instanceof Date?new e.constructor(t):new Date(t)}function UJ(e,t){return HJ(t||e,e)}let WJ={};function GJ(){return WJ}function KJ(e,t){var n,r;let i=GJ(),a=t?.weekStartsOn??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.weekStartsOn)??i.weekStartsOn??((r=i.locale)==null||(r=r.options)==null?void 0:r.weekStartsOn)??0,o=UJ(e,t?.in),s=o.getDay(),c=(s=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function YJ(e){let t=UJ(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function XJ(e,...t){let n=HJ.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function ZJ(e,t){let n=UJ(e,t?.in);return n.setHours(0,0,0,0),n}function QJ(e,t,n){let[r,i]=XJ(n?.in,e,t),a=ZJ(r),o=ZJ(i),s=+a-YJ(a),c=+o-YJ(o);return Math.round((s-c)/PJ)}function $J(e,t){let n=JJ(e,t),r=HJ(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),qJ(r)}function eY(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function tY(e){return!(!eY(e)&&typeof e!=`number`||isNaN(+UJ(e)))}function nY(e,t){let n=UJ(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const rY={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`}},iY=(e,t,n)=>{let r,i=rY[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function aY(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}const oY={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},sY={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},cY={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},lY={date:aY({formats:oY,defaultWidth:`full`}),time:aY({formats:sY,defaultWidth:`full`}),dateTime:aY({formats:cY,defaultWidth:`full`})},uY={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},dY=(e,t,n,r)=>uY[e];function fY(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const pY={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},mY={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},hY={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`]},gY={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`]},_Y={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`}},vY={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`}},yY=(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},bY={ordinalNumber:yY,era:fY({values:pY,defaultWidth:`wide`}),quarter:fY({values:mY,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:fY({values:hY,defaultWidth:`wide`}),day:fY({values:gY,defaultWidth:`wide`}),dayPeriod:fY({values:_Y,defaultWidth:`wide`,formattingValues:vY,defaultFormattingWidth:`wide`})};function xY(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?CY(s,e=>e.test(o)):SY(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function SY(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function CY(e,t){for(let n=0;n{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}const TY=/^(\d+)(th|st|nd|rd)?/i,EY=/\d+/i,DY={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},OY={any:[/^b/i,/^(a|c)/i]},kY={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},AY={any:[/1/i,/2/i,/3/i,/4/i]},jY={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},MY={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]},NY={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},PY={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]},FY={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},IY={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}},LY={ordinalNumber:wY({matchPattern:TY,parsePattern:EY,valueCallback:e=>parseInt(e,10)}),era:xY({matchPatterns:DY,defaultMatchWidth:`wide`,parsePatterns:OY,defaultParseWidth:`any`}),quarter:xY({matchPatterns:kY,defaultMatchWidth:`wide`,parsePatterns:AY,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:xY({matchPatterns:jY,defaultMatchWidth:`wide`,parsePatterns:MY,defaultParseWidth:`any`}),day:xY({matchPatterns:NY,defaultMatchWidth:`wide`,parsePatterns:PY,defaultParseWidth:`any`}),dayPeriod:xY({matchPatterns:FY,defaultMatchWidth:`any`,parsePatterns:IY,defaultParseWidth:`any`})},RY={code:`en-US`,formatDistance:iY,formatLong:lY,formatRelative:dY,localize:bY,match:LY,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zY(e,t){let n=UJ(e,t?.in),r=QJ(n,nY(n)),i=r+1;return i}function BY(e,t){let n=UJ(e,t?.in),r=qJ(n)-+$J(n);return Math.round(r/NJ)+1}function VY(e,t){var n,r;let i=UJ(e,t?.in),a=i.getFullYear(),o=GJ(),s=t?.firstWeekContainsDate??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.firstWeekContainsDate)??o.firstWeekContainsDate??((r=o.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??1,c=HJ(t?.in||e,0);c.setFullYear(a+1,0,s),c.setHours(0,0,0,0);let l=KJ(c,t),u=HJ(t?.in||e,0);u.setFullYear(a,0,s),u.setHours(0,0,0,0);let d=KJ(u,t);return+i>=+l?a+1:+i>=+d?a:a-1}function HY(e,t){var n,r;let i=GJ(),a=t?.firstWeekContainsDate??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.firstWeekContainsDate)??i.firstWeekContainsDate??((r=i.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??1,o=VY(e,t),s=HJ(t?.in||e,0);s.setFullYear(o,0,a),s.setHours(0,0,0,0);let c=KJ(s,t);return c}function UY(e,t){let n=UJ(e,t?.in),r=KJ(n,t)-+HY(n,t);return Math.round(r/NJ)+1}function WY(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString().padStart(t,`0`);return n+r}const GY={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return WY(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):WY(n+1,2)},d(e,t){return WY(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];case`aaaa`:default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return WY(e.getHours()%12||12,t.length)},H(e,t){return WY(e.getHours(),t.length)},m(e,t){return WY(e.getMinutes(),t.length)},s(e,t){return WY(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*10**(n-3));return WY(i,t.length)}},KY={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},qY={G:function(e,t,n){let r=e.getFullYear()>0?1:0;switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});case`GGGG`:default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return GY.y(e,t)},Y:function(e,t,n,r){let i=VY(e,r),a=i>0?i:1-i;if(t===`YY`){let e=a%100;return WY(e,2)}return t===`Yo`?n.ordinalNumber(a,{unit:`year`}):WY(a,t.length)},R:function(e,t){let n=JJ(e);return WY(n,t.length)},u:function(e,t){let n=e.getFullYear();return WY(n,t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return WY(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});case`QQQQ`:default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return WY(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});case`qqqq`:default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return GY.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});case`MMMM`:default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return WY(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});case`LLLL`:default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=UY(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):WY(i,t.length)},I:function(e,t,n){let r=BY(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):WY(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):GY.d(e,t)},D:function(e,t,n){let r=zY(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):WY(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});case`EEEE`:default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return WY(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});case`eeee`:default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return WY(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});case`cccc`:default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return WY(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});case`iiii`:default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours(),i=r/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`aaaa`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?KY.noon:r===0?KY.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`bbbb`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?KY.evening:r>=12?KY.afternoon:r>=4?KY.morning:KY.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`BBBB`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return GY.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):GY.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):WY(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):WY(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):GY.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):GY.s(e,t)},S:function(e,t){return GY.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return YY(r);case`XXXX`:case`XX`:return XY(r);case`XXXXX`:case`XXX`:default:return XY(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return YY(r);case`xxxx`:case`xx`:return XY(r);case`xxxxx`:case`xxx`:default:return XY(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+JY(r,`:`);case`OOOO`:default:return`GMT`+XY(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+JY(r,`:`);case`zzzz`:default:return`GMT`+XY(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return WY(r,t.length)},T:function(e,t,n){return WY(+e,t.length)}};function JY(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+WY(a,2)}function YY(e,t){if(e%60==0){let t=e>0?`-`:`+`;return t+WY(Math.abs(e)/60,2)}return XY(e,t)}function XY(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=WY(Math.trunc(r/60),2),a=WY(r%60,2);return n+i+t+a}const ZY=(e,t)=>{switch(e){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`})}},QY=(e,t)=>{switch(e){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`})}},$Y=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return ZY(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;case`PPPP`:default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,ZY(r,t)).replace(`{{time}}`,QY(i,t))},eX={p:QY,P:$Y},tX=/^D+$/,nX=/^Y+$/,rX=[`D`,`DD`,`YY`,`YYYY`];function iX(e){return tX.test(e)}function aX(e){return nX.test(e)}function oX(e,t,n){let r=sX(e,t,n);if(console.warn(r),rX.includes(e))throw RangeError(r)}function sX(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const cX=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lX=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,uX=/^'([^]*?)'?$/,dX=/''/g,fX=/[a-zA-Z]/;function pX(e,t,n){var r,i,a,o;let s=GJ(),c=n?.locale??s.locale??RY,l=n?.firstWeekContainsDate??(n==null||(r=n.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??s.firstWeekContainsDate??((i=s.locale)==null||(i=i.options)==null?void 0:i.firstWeekContainsDate)??1,u=n?.weekStartsOn??(n==null||(a=n.locale)==null||(a=a.options)==null?void 0:a.weekStartsOn)??s.weekStartsOn??((o=s.locale)==null||(o=o.options)==null?void 0:o.weekStartsOn)??0,d=UJ(e,n?.in);if(!tY(d))throw RangeError(`Invalid time value`);let f=t.match(lX).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=eX[t];return n(e,c.formatLong)}return e}).join(``).match(cX).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:mX(e)};if(qY[t])return{isToken:!0,value:e};if(t.match(fX))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});c.localize.preprocessor&&(f=c.localize.preprocessor(d,f));let p={firstWeekContainsDate:l,weekStartsOn:u,locale:c};return f.map(r=>{if(!r.isToken)return r.value;let i=r.value;(!n?.useAdditionalWeekYearTokens&&aX(i)||!n?.useAdditionalDayOfYearTokens&&iX(i))&&oX(i,t,String(e));let a=qY[i[0]];return a(d,i,c.localize,p)}).join(``)}function mX(e){let t=e.match(uX);return t?t[1].replace(dX,`'`):e}function hX(e,t){return UJ(e*1e3,t?.in)}function gX(e,t){let n=_X(t)?new t(0):HJ(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function _X(e){var t;return typeof e==`function`&&(t=e.prototype)?.constructor===e}function vX(e,t){if(t===void 0)return e.trimEnd();let n=e.length;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n>0&&e[n-1]===t;)n--;break;case`object`:for(;n>0&&t.includes(e[n-1]);)n--}return e.substring(0,n)}function yX(e){return e==null}function bX(e){return e!=null}async function xX(){if(typeof window<`u`&&window!==null)return`browser`;try{let e=await Dt(()=>import(`./__vite-browser-external-z9j0cN3P.js`).then(Tt(1)),__vite__mapDeps([0,1,2]));return e!==void 0&&e.versions!=null&&e.versions.node!=null?`node`:`unknown`}catch{return`unknown`}}function SX(e){return yX(e)?!1:sW.isInt(e.type)&&!OX(e)||CX(e)}function CX(e){return yX(e)?!1:sW.isInt(e.type)&&e.type.isSigned===!1}function wX(e){return yX(e)?!1:sW.isFloat(e.type)??!1}function TX(e){return yX(e)?!1:sW.isDecimal(e.type)}function EX(e){return yX(e)?!1:sW.isBool(e.type)}function DX(e){return yX(e)?!1:sW.isDuration(e.type)}function OX(e){return yX(e)?!1:sW.isInt(e.type)&&e.metadata.get(`ARROW:extension:name`)===`period`}function kX(e){return yX(e)?!1:sW.isTimestamp(e.type)}function AX(e){return yX(e)?!1:sW.isDate(e.type)}function jX(e){return yX(e)?!1:sW.isTime(e.type)}function MX(e){return yX(e)?!1:sW.isList(e.type)||sW.isFixedSizeList(e.type)}function NX(e){return yX(e)?!1:sW.isStruct(e.type)||sW.isMap(e.type)}function PX(e){return yX(e)?!1:sW.isStruct(e.type)&&e.metadata.get(`ARROW:extension:name`)===`interval`||sW.isInterval(e.type)}const FX=new Date(1970,0,1);function IX(e,t){let n;if(t===vU.MILLISECOND)n=1e3;else if(t===vU.MICROSECOND)n=1e3*1e3;else if(t===vU.NANOSECOND)n=1e3*1e3*1e3;else return Number(e);return typeof e==`bigint`&&!Number.isSafeInteger(Number(e))?Number(e/BigInt(n)):Number(e)/n}function LX(e,t){var n;let r=IX(e,(t==null||(n=t.type)==null?void 0:n.unit)??vU.SECOND);return hX(r)}function RX(e,t){let n=LX(e,t);return pX(n,n.getMilliseconds()===0?`HH:mm:ss`:`HH:mm:ss.SSS`)}function zX(e){let t=`yyyy-MM-dd`;return e instanceof Date||typeof e==`number`&&Number.isFinite(e)?pX(e,t):(console.warn(`Unsupported date value: ${e}`),String(e))}function BX(e,t){var n;if(!(e instanceof Date||typeof e==`number`&&Number.isFinite(e)))return console.warn(`Unsupported datetime value: ${e}`),null;let r,i=t==null||(n=t.type)==null?void 0:n.timezone;return r=i?new dH(e,i):new dH(e),gX(r,Date)}function VX(e,t){var n;let r=(t==null||(n=t.type)==null?void 0:n.scale)||0,i=AJ.bigNumToString(new AJ.BN(e)).padStart(r,`0`);if(r===0)return i;let a=``;i.startsWith(`-`)&&(a=`-`,i=i.slice(1));let o=i.slice(0,-r)||`0`,s=vX(i.slice(-r),`0`)||``;return`${a}${o}${s?`.${s}`:``}`}const HX=new Intl.NumberFormat(`en-US`,{style:`decimal`,maximumFractionDigits:4,minimumFractionDigits:4,useGrouping:!0});function UX(e){let t=e[0],n=e[1],r=[];return t!==0&&r.push(`${t} year${t>1?`s`:``}`),n!==0&&r.push(`${n} month${n>1?`s`:``}`),r.length?r.join(` `):`0 months`}function WX(e,t){if(sW.isInterval(t?.type))return UX(e);let n=t&&t.metadata.get(`ARROW:extension:name`);if(n&&n===`pandas.interval`){var r,i;let n=JSON.parse(t.metadata.get(`ARROW:extension:metadata`)),{closed:a}=n,o=e.toJSON(),s=a===`both`||a===`left`?`[`:`(`,c=a===`both`||a===`right`?`]`:`)`,l=KX(o.left,(r=t.type)==null||(r=r.children)==null?void 0:r[0]),u=KX(o.right,(i=t.type)==null||(i=i.children)==null?void 0:i[1]);return`${s+l}, ${u+c}`}return String(e)}function GX(e,t){return t?.type instanceof PW?JSON.parse(JSON.stringify(e,(e,t)=>{if(bX(t))return typeof t==`bigint`?Number(t):t})):JSON.parse(JSON.stringify(e,(e,t)=>typeof t==`bigint`?Number(t):t))}function KX(e,t){if(yX(e))return null;let n=e instanceof Date||Number.isFinite(e);if(n&&AX(t))return zX(e);if(typeof e==`bigint`&&jX(t))return RX(Number(e),t);if(n&&kX(t))return BX(e,t);if(OX(t))throw Error(`Period type is not supported yet`);if(PX(t))return WX(e,t);if(DX(t))throw Error(`Duration type is not supported yet`);return TX(t)?VX(e,t):wX(t)&&Number.isFinite(e)||SX(t)?e:NX(t)||MX(t)?GX(e,t):EX(t)?!!e:String(e)}function qX(e){let t=(e.toArray()||[]).map(e=>e.toJSON())||[],n=t.map(t=>(e.schema.fields.forEach(e=>t[e.name]=KX(t[e.name],e)),t));return n}let JX=function(e){return e.ORIGIN_PRIVATE_FS=`origin-private-fs`,e.NODE_FS=`node-fs`,e}({});async function YX(e){let t=Pt(e,{logger:!1}),n,r,i=await xX();if(i===`browser`){if(t.bundles===void 0){let{getBundles:e}=await Dt(async()=>{let{getBundles:e}=await import(`./default-browser-vwqgKA0M.js`);return{getBundles:e}},[]);t.bundles=await e()}r=await rH(await t.bundles),n=new Worker(r.mainWorker)}else if(i===`node`){if(t.bundles===void 0){let{getBundles:e}=await Dt(async()=>{let{getBundles:e}=await import(`./default-node-EA9BojRq.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]));t.bundles=await e()}r=await rH(await t.bundles);let e=r.mainWorker;e.startsWith(`/@fs/`)&&(e=e.replace(`/@fs/`,`file://`));let i=await Dt(()=>import(`./browser-CMSJHaBF.js`),[]);n=new i.default(e,{type:`module`})}else throw Error(`Unsupported environment: ${i}`);let a;a=t.logger===!0?new xV:t.logger===!1?new bV:t.logger;let o=new MV(a,n);if(await o.instantiate(r.mainModule,r.pthreadWorker),t.storage)switch(t.storage.type){case JX.ORIGIN_PRIVATE_FS:try{let e=t.storage.path;e.startsWith(`/`)&&(e=e.slice(1)),await o.open({path:`opfs://${e}`,accessMode:t.storage.accessMode})}catch(e){throw await o.terminate(),await n.terminate(),e}break;case JX.NODE_FS:try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(e){throw await o.terminate(),await n.terminate(),e}break}let s=await o.connect();async function c(e,t=[]){if(!t||t.length===0){let t=await s.query(e);return{_results:t,_schema:t.schema,columns:t.schema.fields,rows:qX(t)}}let n=await s.prepare(e),r=await n.query(...t);return n.close(),{_results:r,_schema:r.schema,columns:r.schema.fields,rows:qX(r)}}return{worker:n,db:o,conn:s,query:async(e,t=[])=>c(e,t).then(e=>e.rows),queryWithColumns:async(e,t=[])=>c(e,t),close:async()=>{await s.close(),await o.terminate(),await n.terminate()}}}async function XX(e,t){await(await e).conn.send(`BEGIN TRANSACTION`);try{let n=await t(e);return await(await e).conn.send(`COMMIT`),n}catch(t){throw await(await e).conn.send(`ROLLBACK`),t}}async function ZX(e,t,n){await(await e).conn.send(`SAVEPOINT ${t}`);try{let r=await n(e);return await(await e).conn.send(`RELEASE SAVEPOINT ${t}`),r}catch(n){throw await(await e).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),n}}const Z=Symbol.for(`drizzle:entityKind`),QX=Symbol.for(`drizzle:hasOwnEntityKind`);function Q(e,t){if(!e||typeof e!=`object`)return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,Z))throw 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 n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(Z in n&&n[Z]===t[Z])return!0;n=Object.getPrototypeOf(n)}return!1}var $X=(yr=class{constructor(t,n){e.defineProperty(this,`name`,void 0),e.defineProperty(this,`keyAsName`,void 0),e.defineProperty(this,`primary`,void 0),e.defineProperty(this,`notNull`,void 0),e.defineProperty(this,`default`,void 0),e.defineProperty(this,`defaultFn`,void 0),e.defineProperty(this,`onUpdateFn`,void 0),e.defineProperty(this,`hasDefault`,void 0),e.defineProperty(this,`isUnique`,void 0),e.defineProperty(this,`uniqueName`,void 0),e.defineProperty(this,`uniqueType`,void 0),e.defineProperty(this,`dataType`,void 0),e.defineProperty(this,`columnType`,void 0),e.defineProperty(this,`enumValues`,void 0),e.defineProperty(this,`generated`,void 0),e.defineProperty(this,`generatedIdentity`,void 0),e.defineProperty(this,`config`,void 0),this.table=t,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!==`byDefault`}},e.defineProperty(yr,Z,`Column`),yr),eZ=(br=class{constructor(t,n,r){e.defineProperty(this,`config`,void 0),e.defineProperty(this,`$default`,this.$defaultFn),e.defineProperty(this,`$onUpdate`,this.$onUpdateFn),this.config={name:t,keyAsName:t===``,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:n,columnType:r,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(e){return this.config.default=e,this.config.hasDefault=!0,this}$defaultFn(e){return this.config.defaultFn=e,this.config.hasDefault=!0,this}$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===``&&(this.config.name=e)}},e.defineProperty(br,Z,`ColumnBuilder`),br);const tZ=Symbol.for(`drizzle:Name`);var nZ=(xr=class{constructor(t,n){e.defineProperty(this,`reference`,void 0),e.defineProperty(this,`_onUpdate`,`no action`),e.defineProperty(this,`_onDelete`,`no action`),this.reference=()=>{let{name:e,columns:n,foreignColumns:r}=t();return{name:e,columns:n,foreignTable:r[0].table,foreignColumns:r}},n&&(this._onUpdate=n.onUpdate,this._onDelete=n.onDelete)}onUpdate(e){return this._onUpdate=e===void 0?`no action`:e,this}onDelete(e){return this._onDelete=e===void 0?`no action`:e,this}build(e){return new rZ(e,this)}},e.defineProperty(xr,Z,`PgForeignKeyBuilder`),xr),rZ=(Sr=class{constructor(t,n){e.defineProperty(this,`reference`,void 0),e.defineProperty(this,`onUpdate`,void 0),e.defineProperty(this,`onDelete`,void 0),this.table=t,this.reference=n.reference,this.onUpdate=n._onUpdate,this.onDelete=n._onDelete}getName(){let{name:e,columns:t,foreignColumns:n}=this.reference(),r=t.map(e=>e.name),i=n.map(e=>e.name),a=[this.table[tZ],...r,n[0].table[tZ],...i];return e??`${a.join(`_`)}_fk`}},e.defineProperty(Sr,Z,`PgForeignKey`),Sr);function iZ(e,...t){return e(...t)}function aZ(e,t){return`${e[tZ]}_${t.join(`_`)}_unique`}var oZ=(Cr=class{constructor(t,n){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`nullsNotDistinctConfig`,!1),this.name=n,this.columns=t}nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(e){return new cZ(e,this.columns,this.nullsNotDistinctConfig,this.name)}},e.defineProperty(Cr,Z,`PgUniqueConstraintBuilder`),Cr),sZ=(wr=class{constructor(t){e.defineProperty(this,`name`,void 0),this.name=t}on(...e){return new oZ(e,this.name)}},e.defineProperty(wr,Z,`PgUniqueOnConstraintBuilder`),wr),cZ=(Tr=class{constructor(t,n,r,i){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),e.defineProperty(this,`nullsNotDistinct`,!1),this.table=t,this.columns=n,this.name=i??aZ(this.table,this.columns.map(e=>e.name)),this.nullsNotDistinct=r}getName(){return this.name}},e.defineProperty(Tr,Z,`PgUniqueConstraint`),Tr);function lZ(e,t,n){for(let r=t;rArray.isArray(e)?fZ(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var pZ=(Er=class extends eZ{constructor(...t){super(...t),e.defineProperty(this,`foreignKeyConfigs`,[])}array(e){return new _Z(this.config.name,this,e)}references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e,t){return this.config.isUnique=!0,this.config.uniqueName=e,this.config.uniqueType=t?.nulls,this}generatedAlwaysAs(e){return this.config.generated={as:e,type:`always`,mode:`stored`},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,actions:r})=>iZ((n,r)=>{let i=new nZ(()=>{let t=n();return{columns:[e],foreignColumns:[t]}});return r.onUpdate&&i.onUpdate(r.onUpdate),r.onDelete&&i.onDelete(r.onDelete),i.build(t)},n,r))}buildExtraConfigColumn(e){return new hZ(e,this.config)}},e.defineProperty(Er,Z,`PgColumnBuilder`),Er),mZ=(Dr=class extends $X{constructor(e,t){t.uniqueName||=aZ(e,[t.name]),super(e,t),this.table=e}},e.defineProperty(Dr,Z,`PgColumn`),Dr),hZ=(Or=class extends mZ{constructor(...t){super(...t),e.defineProperty(this,`indexConfig`,{order:this.config.order??`asc`,nulls:this.config.nulls??`last`,opClass:this.config.opClass}),e.defineProperty(this,`defaultConfig`,{order:`asc`,nulls:`last`,opClass:void 0})}getSQLType(){return this.getSQLType()}asc(){return this.indexConfig.order=`asc`,this}desc(){return this.indexConfig.order=`desc`,this}nullsFirst(){return this.indexConfig.nulls=`first`,this}nullsLast(){return this.indexConfig.nulls=`last`,this}op(e){return this.indexConfig.opClass=e,this}},e.defineProperty(Or,Z,`ExtraConfigColumn`),Or),gZ=(kr=class{constructor(t,n,r,i){e.defineProperty(this,`name`,void 0),e.defineProperty(this,`keyAsName`,void 0),e.defineProperty(this,`type`,void 0),e.defineProperty(this,`indexConfig`,void 0),this.name=t,this.keyAsName=n,this.type=r,this.indexConfig=i}},e.defineProperty(kr,Z,`IndexedColumn`),kr),_Z=(Ar=class extends pZ{constructor(e,t,n){super(e,`array`,`PgArray`),this.config.baseBuilder=t,this.config.size=n}build(e){let t=this.config.baseBuilder.build(e);return new vZ(e,this.config,t)}},e.defineProperty(Ar,Z,`PgArrayBuilder`),Ar),vZ=(jr=class t extends mZ{constructor(t,n,r,i){super(t,n),e.defineProperty(this,`size`,void 0),this.baseColumn=r,this.range=i,this.size=n.size}getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==`number`?this.size:``}]`}mapFromDriverValue(e){return typeof e==`string`&&(e=dZ(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(e,n=!1){let r=e.map(e=>e===null?null:Q(this.baseColumn,t)?this.baseColumn.mapToDriverValue(e,!0):this.baseColumn.mapToDriverValue(e));return n?r:fZ(r)}},e.defineProperty(jr,Z,`PgArray`),jr),yZ=(Mr=class extends pZ{constructor(e,t){super(e,`string`,`PgEnumObjectColumn`),this.config.enum=t}build(e){return new bZ(e,this.config)}},e.defineProperty(Mr,Z,`PgEnumObjectColumnBuilder`),Mr),bZ=(Nr=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`enum`,void 0),e.defineProperty(this,`enumValues`,this.config.enum.enumValues),this.enum=n.enum}getSQLType(){return this.enum.enumName}},e.defineProperty(Nr,Z,`PgEnumObjectColumn`),Nr);const xZ=Symbol.for(`drizzle:isPgEnum`);function SZ(e){return!!e&&typeof e==`function`&&xZ in e&&e[xZ]===!0}var CZ=(Pr=class extends pZ{constructor(e,t){super(e,`string`,`PgEnumColumn`),this.config.enum=t}build(e){return new wZ(e,this.config)}},e.defineProperty(Pr,Z,`PgEnumColumnBuilder`),Pr),wZ=(Fr=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`enum`,this.config.enum),e.defineProperty(this,`enumValues`,this.config.enum.enumValues),this.enum=n.enum}getSQLType(){return this.enum.enumName}},e.defineProperty(Fr,Z,`PgEnumColumn`),Fr),TZ=(Ir=class{constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},e.defineProperty(Ir,Z,`Subquery`),Ir),EZ=(Lr=class extends TZ{},e.defineProperty(Lr,Z,`WithSubquery`),Lr),DZ=`0.44.2`;let OZ,kZ;const AZ={startActiveSpan(e,t){return OZ?(kZ||=OZ.trace.getTracer(`drizzle-orm`,DZ),iZ((n,r)=>r.startActiveSpan(e,e=>{try{return t(e)}catch(t){throw e.setStatus({code:n.SpanStatusCode.ERROR,message:t instanceof Error?t.message:`Unknown error`}),t}finally{e.end()}}),OZ,kZ)):t()}},jZ=Symbol.for(`drizzle:ViewBaseConfig`),MZ=Symbol.for(`drizzle:Schema`),NZ=Symbol.for(`drizzle:Columns`),PZ=Symbol.for(`drizzle:ExtraConfigColumns`),FZ=Symbol.for(`drizzle:OriginalName`),IZ=Symbol.for(`drizzle:BaseName`),LZ=Symbol.for(`drizzle:IsAlias`),RZ=Symbol.for(`drizzle:ExtraConfigBuilder`),zZ=Symbol.for(`drizzle:IsDrizzleTable`);var BZ=(Rr=class{constructor(t,n,r){e.defineProperty(this,tZ,void 0),e.defineProperty(this,FZ,void 0),e.defineProperty(this,MZ,void 0),e.defineProperty(this,NZ,void 0),e.defineProperty(this,PZ,void 0),e.defineProperty(this,IZ,void 0),e.defineProperty(this,LZ,!1),e.defineProperty(this,zZ,!0),e.defineProperty(this,RZ,void 0),this[tZ]=this[FZ]=t,this[MZ]=n,this[IZ]=r}},e.defineProperty(Rr,Z,`Table`),e.defineProperty(Rr,`Symbol`,{Name:tZ,Schema:MZ,OriginalName:FZ,Columns:NZ,ExtraConfigColumns:PZ,BaseName:IZ,IsAlias:LZ,ExtraConfigBuilder:RZ}),Rr);function VZ(e){return e[tZ]}function HZ(e){return`${e[MZ]??`public`}.${e[tZ]}`}var UZ=(zr=class{},e.defineProperty(zr,Z,`FakePrimitiveParam`),zr);function WZ(e){return e!=null&&typeof e.getSQL==`function`}function GZ(e){let t={sql:``,params:[]};for(let r of e){var n;t.sql+=r.sql,t.params.push(...r.params),(n=r.typings)?.length&&(t.typings||=[],t.typings.push(...r.typings))}return t}var KZ=(Br=class{constructor(t){e.defineProperty(this,`value`,void 0),this.value=Array.isArray(t)?t:[t]}getSQL(){return new qZ([this])}},e.defineProperty(Br,Z,`StringChunk`),Br),qZ=(Vr=class t{constructor(t){e.defineProperty(this,`decoder`,XZ),e.defineProperty(this,`shouldInlineParams`,!1),e.defineProperty(this,`usedTables`,[]),this.queryChunks=t;for(let e of t)if(Q(e,BZ)){let t=e[BZ.Symbol.Schema];this.usedTables.push(t===void 0?e[BZ.Symbol.Name]:t+`.`+e[BZ.Symbol.Name])}}append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return AZ.startActiveSpan(`drizzle.buildSQL`,t=>{let n=this.buildQueryFromSourceParams(this.queryChunks,e);return t?.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(e,n){let r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:i,escapeName:a,escapeParam:o,prepareTyping:s,inlineParams:c,paramStartIndex:l}=r;return GZ(e.map(e=>{if(Q(e,KZ))return{sql:e.value.join(``),params:[]};if(Q(e,JZ))return{sql:a(e.value),params:[]};if(e===void 0)return{sql:``,params:[]};if(Array.isArray(e)){let t=[new KZ(`(`)];for(let[n,r]of e.entries())t.push(r),ne},ZZ={mapToDriverValue:e=>e},QZ={...XZ,...ZZ};var $Z=(Ur=class{constructor(t,n=ZZ){e.defineProperty(this,`brand`,void 0),this.value=t,this.encoder=n}getSQL(){return new qZ([this])}},e.defineProperty(Ur,Z,`Param`),Ur);function $(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new KZ(e[0]));for(let[r,i]of t.entries())n.push(i,new KZ(e[r+1]));return new qZ(n)}(e=>{function t(){return new qZ([])}e.empty=t;function n(e){return new qZ(e)}e.fromList=n;function r(e){return new qZ([new KZ(e)])}e.raw=r;function i(e,t){let n=[];for(let[r,i]of e.entries())r>0&&t!==void 0&&n.push(t),n.push(i);return new qZ(n)}e.join=i;function a(e){return new JZ(e)}e.identifier=a;function o(e){return new eQ(e)}e.placeholder=o;function s(e,t){return new $Z(e,t)}e.param=s})($||={}),(t=>{class n{constructor(t,n){e.defineProperty(this,`isSelectionField`,!1),this.sql=t,this.fieldAlias=n}getSQL(){return this.sql}clone(){return new n(this.sql,this.fieldAlias)}}e.defineProperty(n,Z,`SQL.Aliased`),t.Aliased=n})(qZ||={});var eQ=(Wr=class{constructor(e){this.name=e}getSQL(){return new qZ([this])}},e.defineProperty(Wr,Z,`Placeholder`),Wr);function tQ(e,t){return e.map(e=>{if(Q(e,eQ)){if(!(e.name in t))throw Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(Q(e,$Z)&&Q(e.value,eQ)){if(!(e.value.name in t))throw Error(`No value for placeholder "${e.value.name}" was provided`);return e.encoder.mapToDriverValue(t[e.value.name])}return e})}const nQ=Symbol.for(`drizzle:IsDrizzleView`);var rQ=(Gr=class{constructor({name:t,schema:n,selectedFields:r,query:i}){e.defineProperty(this,jZ,void 0),e.defineProperty(this,nQ,!0),this[jZ]={name:t,originalName:t,schema:n,selectedFields:r,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new qZ([this])}},e.defineProperty(Gr,Z,`View`),Gr);$X.prototype.getSQL=function(){return new qZ([this])},BZ.prototype.getSQL=function(){return new qZ([this])},TZ.prototype.getSQL=function(){return new qZ([this])};var iQ=(Kr=class{constructor(e){this.table=e}get(e,t){return t===`table`?this.table:e[t]}},e.defineProperty(Kr,Z,`ColumnAliasProxyHandler`),Kr),aQ=(qr=class{constructor(e,t){this.alias=e,this.replaceOriginalName=t}get(e,t){if(t===BZ.Symbol.IsAlias)return!0;if(t===BZ.Symbol.Name||this.replaceOriginalName&&t===BZ.Symbol.OriginalName)return this.alias;if(t===jZ)return{...e[jZ],name:this.alias,isAlias:!0};if(t===BZ.Symbol.Columns){let t=e[BZ.Symbol.Columns];if(!t)return t;let n={};return Object.keys(t).map(r=>{n[r]=new Proxy(t[r],new iQ(new Proxy(e,this)))}),n}let n=e[t];return Q(n,$X)?new Proxy(n,new iQ(new Proxy(e,this))):n}},e.defineProperty(qr,Z,`TableAliasProxyHandler`),qr),oQ=(Jr=class{constructor(e){this.alias=e}get(e,t){return t===`sourceTable`?sQ(e.sourceTable,this.alias):e[t]}},e.defineProperty(Jr,Z,`RelationTableAliasProxyHandler`),Jr);function sQ(e,t){return new Proxy(e,new aQ(t,!1))}function cQ(e,t){return new Proxy(e,new iQ(new Proxy(e.table,new aQ(t,!1))))}function lQ(e,t){return new qZ.Aliased(uQ(e.sql,t),e.fieldAlias)}function uQ(e,t){return $.join(e.queryChunks.map(e=>Q(e,$X)?cQ(e,t):Q(e,qZ)?uQ(e,t):Q(e,qZ.Aliased)?lQ(e,t):e))}var dQ=(Yr=class extends Error{constructor({message:e,cause:t}){super(e),this.name=`DrizzleError`,this.cause=t}},e.defineProperty(Yr,Z,`DrizzleError`),Yr),fQ=(Xr=class extends dQ{constructor(){super({message:`Rollback`})}},e.defineProperty(Xr,Z,`TransactionRollbackError`),Xr),pQ=(Zr=class{write(e){console.log(e)}},e.defineProperty(Zr,Z,`ConsoleLogWriter`),Zr),mQ=(Qr=class{constructor(t){e.defineProperty(this,`writer`,void 0),this.writer=t?.writer??new pQ}logQuery(e,t){let n=t.map(e=>{try{return JSON.stringify(e)}catch{return String(e)}}),r=n.length?` -- params: [${n.join(`, `)}]`:``;this.writer.write(`Query: ${e}${r}`)}},e.defineProperty(Qr,Z,`DefaultLogger`),Qr),hQ=($r=class{logQuery(){}},e.defineProperty($r,Z,`NoopLogger`),$r),gQ=(oa=Symbol.toStringTag,ei=class{constructor(){e.defineProperty(this,oa,`QueryPromise`)}catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}then(e,t){return this.execute().then(e,t)}},e.defineProperty(ei,Z,`QueryPromise`),ei);function _Q(e,t){return Object.entries(e).reduce((e,[n,r])=>{if(typeof n!=`string`)return e;let i=t?[...t,n]:[n];return Q(r,$X)||Q(r,qZ)||Q(r,qZ.Aliased)?e.push({path:i,field:r}):Q(r,BZ)?e.push(..._Q(r[BZ.Symbol.Columns],i)):e.push(..._Q(r,i)),e},[])}function vQ(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let[e,t]of n.entries())if(t!==r[e])return!1;return!0}function yQ(e,t){let n=Object.entries(t).filter(([,e])=>e!==void 0).map(([t,n])=>Q(n,qZ)||Q(n,$X)?[t,n]:[t,new $Z(n,e[BZ.Symbol.Columns][t])]);if(n.length===0)throw Error(`No values to set`);return Object.fromEntries(n)}function bQ(e,t){for(let n of t)for(let t of Object.getOwnPropertyNames(n.prototype)){if(t===`constructor`)continue;Object.defineProperty(e.prototype,t,Object.getOwnPropertyDescriptor(n.prototype,t)||Object.create(null))}}function xQ(e){return e[BZ.Symbol.Columns]}function SQ(e){return Q(e,TZ)?e._.alias:Q(e,rQ)?e[jZ].name:Q(e,qZ)?void 0:e[BZ.Symbol.IsAlias]?e[BZ.Symbol.Name]:e[BZ.Symbol.BaseName]}function CQ(e){if(typeof e!=`object`||!e||e.constructor.name!==`Object`)return!1;if(`logger`in e){let t=typeof e.logger;return!(t!==`boolean`&&(t!==`object`||typeof e.logger.logQuery!=`function`)&&t!==`undefined`)}if(`schema`in e){let t=typeof e.schema;return!(t!==`object`&&t!==`undefined`)}if(`casing`in e){let t=typeof e.casing;return!(t!==`string`&&t!==`undefined`)}if(`mode`in e)return!(e.mode!==`default`||e.mode!==`planetscale`||e.mode!==void 0);if(`connection`in e){let t=typeof e.connection;return!(t!==`string`&&t!==`object`&&t!==`undefined`)}if(`client`in e){let t=typeof e.client;return!(t!==`object`&&t!==`function`&&t!==`undefined`)}return Object.keys(e).length===0}var wQ=(ti=class extends pZ{defaultNow(){return this.default($`now()`)}},e.defineProperty(ti,Z,`PgDateColumnBaseBuilder`),ti),TQ=(ni=class extends wQ{constructor(e){super(e,`date`,`PgDate`)}build(e){return new EQ(e,this.config)}},e.defineProperty(ni,Z,`PgDateBuilder`),ni),EQ=(ri=class extends mZ{getSQLType(){return`date`}mapFromDriverValue(e){return new Date(e)}mapToDriverValue(e){return e.toISOString()}},e.defineProperty(ri,Z,`PgDate`),ri),DQ=(ii=class extends wQ{constructor(e){super(e,`string`,`PgDateString`)}build(e){return new OQ(e,this.config)}},e.defineProperty(ii,Z,`PgDateStringBuilder`),ii),OQ=(ai=class extends mZ{getSQLType(){return`date`}},e.defineProperty(ai,Z,`PgDateString`),ai),kQ=(oi=class extends pZ{constructor(e){super(e,`json`,`PgJson`)}build(e){return new AQ(e,this.config)}},e.defineProperty(oi,Z,`PgJsonBuilder`),oi),AQ=(si=class extends mZ{constructor(e,t){super(e,t)}getSQLType(){return`json`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}},e.defineProperty(si,Z,`PgJson`),si),jQ=(ci=class extends pZ{constructor(e){super(e,`json`,`PgJsonb`)}build(e){return new MQ(e,this.config)}},e.defineProperty(ci,Z,`PgJsonbBuilder`),ci),MQ=(li=class extends mZ{constructor(e,t){super(e,t)}getSQLType(){return`jsonb`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}},e.defineProperty(li,Z,`PgJsonb`),li),NQ=(ui=class extends pZ{constructor(e,t,n){super(e,`string`,`PgNumeric`),this.config.precision=t,this.config.scale=n}build(e){return new PQ(e,this.config)}},e.defineProperty(ui,Z,`PgNumericBuilder`),ui),PQ=(di=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),this.precision=n.precision,this.scale=n.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})`}},e.defineProperty(di,Z,`PgNumeric`),di),FQ=(fi=class extends pZ{constructor(e,t,n){super(e,`number`,`PgNumericNumber`),this.config.precision=t,this.config.scale=n}build(e){return new IQ(e,this.config)}},e.defineProperty(fi,Z,`PgNumericNumberBuilder`),fi),IQ=(pi=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),e.defineProperty(this,`mapToDriverValue`,String),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(e){return typeof e==`number`?e:Number(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},e.defineProperty(pi,Z,`PgNumericNumber`),pi),LQ=(mi=class extends pZ{constructor(e,t,n){super(e,`bigint`,`PgNumericBigInt`),this.config.precision=t,this.config.scale=n}build(e){return new RQ(e,this.config)}},e.defineProperty(mi,Z,`PgNumericBigIntBuilder`),mi),RQ=(hi=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),e.defineProperty(this,`mapFromDriverValue`,BigInt),e.defineProperty(this,`mapToDriverValue`,String),this.precision=n.precision,this.scale=n.scale}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},e.defineProperty(hi,Z,`PgNumericBigInt`),hi),zQ=(gi=class extends wQ{constructor(e,t,n){super(e,`string`,`PgTime`),this.withTimezone=t,this.precision=n,this.config.withTimezone=t,this.config.precision=n}build(e){return new BQ(e,this.config)}},e.defineProperty(gi,Z,`PgTimeBuilder`),gi),BQ=(_i=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`time${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(_i,Z,`PgTime`),_i),VQ=(vi=class extends wQ{constructor(e,t,n){super(e,`date`,`PgTimestamp`),this.config.withTimezone=t,this.config.precision=n}build(e){return new HQ(e,this.config)}},e.defineProperty(vi,Z,`PgTimestampBuilder`),vi),HQ=(yi=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`mapFromDriverValue`,e=>new Date(this.withTimezone?e:e+`+0000`)),e.defineProperty(this,`mapToDriverValue`,e=>e.toISOString()),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:` (${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(yi,Z,`PgTimestamp`),yi),UQ=(bi=class extends wQ{constructor(e,t,n){super(e,`string`,`PgTimestampString`),this.config.withTimezone=t,this.config.precision=n}build(e){return new WQ(e,this.config)}},e.defineProperty(bi,Z,`PgTimestampStringBuilder`),bi),WQ=(xi=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(xi,Z,`PgTimestampString`),xi),GQ=(Si=class extends pZ{constructor(e){super(e,`string`,`PgUUID`)}defaultRandom(){return this.default($`gen_random_uuid()`)}build(e){return new KQ(e,this.config)}},e.defineProperty(Si,Z,`PgUUIDBuilder`),Si),KQ=(Ci=class extends mZ{getSQLType(){return`uuid`}},e.defineProperty(Ci,Z,`PgUUID`),Ci);const qQ=Symbol.for(`drizzle:PgInlineForeignKeys`),JQ=Symbol.for(`drizzle:EnableRLS`);var YQ=(sa=BZ.Symbol.ExtraConfigBuilder,ca=BZ.Symbol.ExtraConfigColumns,wi=class extends BZ{constructor(...t){super(...t),e.defineProperty(this,qQ,[]),e.defineProperty(this,JQ,!1),e.defineProperty(this,sa,void 0),e.defineProperty(this,ca,{})}},e.defineProperty(wi,Z,`PgTable`),e.defineProperty(wi,`Symbol`,Object.assign({},BZ.Symbol,{InlineForeignKeys:qQ,EnableRLS:JQ})),wi),XQ=(Ti=class{constructor(t,n){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),this.columns=t,this.name=n}build(e){return new ZQ(e,this.columns,this.name)}},e.defineProperty(Ti,Z,`PgPrimaryKeyBuilder`),Ti),ZQ=(Ei=class{constructor(t,n,r){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),this.table=t,this.columns=n,this.name=r}getName(){return this.name??`${this.table[YQ.Symbol.Name]}_${this.columns.map(e=>e.name).join(`_`)}_pk`}},e.defineProperty(Ei,Z,`PgPrimaryKey`),Ei);function QQ(e,t){return YZ(t)&&!WZ(e)&&!Q(e,$Z)&&!Q(e,eQ)&&!Q(e,$X)&&!Q(e,BZ)&&!Q(e,rQ)?new $Z(e,t):e}const $Q=(e,t)=>$`${e} = ${QQ(t,e)}`,e$=(e,t)=>$`${e} <> ${QQ(t,e)}`;function t$(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new qZ(t):new qZ([new KZ(`(`),$.join(t,new KZ(` and `)),new KZ(`)`)])}function n$(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new qZ(t):new qZ([new KZ(`(`),$.join(t,new KZ(` or `)),new KZ(`)`)])}function r$(e){return $`not ${e}`}const i$=(e,t)=>$`${e} > ${QQ(t,e)}`,a$=(e,t)=>$`${e} >= ${QQ(t,e)}`,o$=(e,t)=>$`${e} < ${QQ(t,e)}`,s$=(e,t)=>$`${e} <= ${QQ(t,e)}`;function c$(e,t){return Array.isArray(t)?t.length===0?$`false`:$`${e} in ${t.map(t=>QQ(t,e))}`:$`${e} in ${QQ(t,e)}`}function l$(e,t){return Array.isArray(t)?t.length===0?$`true`:$`${e} not in ${t.map(t=>QQ(t,e))}`:$`${e} not in ${QQ(t,e)}`}function u$(e){return $`${e} is null`}function d$(e){return $`${e} is not null`}function f$(e){return $`exists ${e}`}function p$(e){return $`not exists ${e}`}function m$(e,t,n){return $`${e} between ${QQ(t,e)} and ${QQ(n,e)}`}function h$(e,t,n){return $`${e} not between ${QQ(t,e)} and ${QQ(n,e)}`}function g$(e,t){return $`${e} like ${t}`}function _$(e,t){return $`${e} not like ${t}`}function v$(e,t){return $`${e} ilike ${t}`}function y$(e,t){return $`${e} not ilike ${t}`}function b$(e){return $`${e} asc`}function x$(e){return $`${e} desc`}var S$=(Di=class{constructor(t,n,r){e.defineProperty(this,`referencedTableName`,void 0),e.defineProperty(this,`fieldName`,void 0),this.sourceTable=t,this.referencedTable=n,this.relationName=r,this.referencedTableName=n[BZ.Symbol.Name]}},e.defineProperty(Di,Z,`Relation`),Di),C$=(Oi=class{constructor(e,t){this.table=e,this.config=t}},e.defineProperty(Oi,Z,`Relations`),Oi),w$=(ki=class e extends S${constructor(e,t,n,r){super(e,t,n?.relationName),this.config=n,this.isNullable=r}withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config,this.isNullable);return n.fieldName=t,n}},e.defineProperty(ki,Z,`One`),ki),T$=(Ai=class e extends S${constructor(e,t,n){super(e,t,n?.relationName),this.config=n}withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config);return n.fieldName=t,n}},e.defineProperty(Ai,Z,`Many`),Ai);function E$(){return{and:t$,between:m$,eq:$Q,exists:f$,gt:i$,gte:a$,ilike:v$,inArray:c$,isNull:u$,isNotNull:d$,like:g$,lt:o$,lte:s$,ne:e$,not:r$,notBetween:h$,notExists:p$,notLike:_$,notIlike:y$,notInArray:l$,or:n$,sql:$}}function D$(){return{sql:$,asc:b$,desc:x$}}function O$(e,t){Object.keys(e).length===1&&`default`in e&&!Q(e.default,BZ)&&(e=e.default);let n={},r={},i={};for(let[o,s]of Object.entries(e))if(Q(s,BZ)){var a;let e=HZ(s),t=r[e];n[e]=o,i[o]={tsName:o,dbName:s[BZ.Symbol.Name],schema:s[BZ.Symbol.Schema],columns:s[BZ.Symbol.Columns],relations:t?.relations??{},primaryKey:t?.primaryKey??[]};for(let e of Object.values(s[BZ.Symbol.Columns]))e.primary&&i[o].primaryKey.push(e);let c=(a=s[BZ.Symbol.ExtraConfigBuilder])?.call(s,s[BZ.Symbol.ExtraConfigColumns]);if(c)for(let e of Object.values(c))Q(e,XQ)&&i[o].primaryKey.push(...e.columns)}else if(Q(s,C$)){let e=HZ(s.table),a=n[e],o=s.config(t(s.table)),c;for(let[t,n]of Object.entries(o))if(a){let e=i[a];e.relations[t]=n,c&&e.primaryKey.push(...c)}else e in r||(r[e]={relations:{},primaryKey:c}),r[e].relations[t]=n}return{tables:i,tableNamesMap:n}}function k$(e){return function(t,n){return new w$(e,t,n,n?.fields.reduce((e,t)=>e&&t.notNull,!0)??!1)}}function A$(e){return function(t,n){return new T$(e,t,n)}}function j$(e,t,n){if(Q(n,w$)&&n.config)return{fields:n.config.fields,references:n.config.references};let r=t[HZ(n.referencedTable)];if(!r)throw Error(`Table "${n.referencedTable[BZ.Symbol.Name]}" not found in schema`);let i=e[r];if(!i)throw Error(`Table "${r}" not found in schema`);let a=n.sourceTable,o=t[HZ(a)];if(!o)throw Error(`Table "${a[BZ.Symbol.Name]}" not found in schema`);let s=[];for(let e of Object.values(i.relations))(n.relationName&&n!==e&&e.relationName===n.relationName||!n.relationName&&e.referencedTable===n.sourceTable)&&s.push(e);if(s.length>1)throw n.relationName?Error(`There are multiple relations with name "${n.relationName}" in table "${r}"`):Error(`There are multiple relations between "${r}" and "${n.sourceTable[BZ.Symbol.Name]}". Please specify relation name`);if(s[0]&&Q(s[0],w$)&&s[0].config)return{fields:s[0].config.references,references:s[0].config.fields};throw Error(`There is not enough information to infer relation "${o}.${n.fieldName}"`)}function M$(e){return{one:k$(e),many:A$(e)}}function N$(e,t,n,r,i=e=>e){let a={};for(let[o,s]of r.entries())if(s.isJson){let r=t.relations[s.tsKey],c=n[o],l=typeof c==`string`?JSON.parse(c):c;a[s.tsKey]=Q(r,w$)?l&&N$(e,e[s.relationTableTsKey],l,s.selection,i):l.map(t=>N$(e,e[s.relationTableTsKey],t,s.selection,i))}else{let e=i(n[o]),t=s.field,r;r=Q(t,$X)?t:Q(t,qZ)?t.decoder:t.sql.decoder,a[s.tsKey]=e===null?null:r.mapFromDriverValue(e)}return a}var P$=(ji=class t{constructor(t){e.defineProperty(this,`config`,void 0),this.config={...t}}get(e,n){if(n===`_`)return{...e._,selectedFields:new Proxy(e._.selectedFields,this)};if(n===jZ)return{...e[jZ],selectedFields:new Proxy(e[jZ].selectedFields,this)};if(typeof n==`symbol`)return e[n];let r=Q(e,TZ)?e._.selectedFields:Q(e,rQ)?e[jZ].selectedFields:e,i=r[n];if(Q(i,qZ.Aliased)){if(this.config.sqlAliasedBehavior===`sql`&&!i.isSelectionField)return i.sql;let e=i.clone();return e.isSelectionField=!0,e}if(Q(i,qZ)){if(this.config.sqlBehavior===`sql`)return i;throw Error(`You tried to reference "${n}" 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 Q(i,$X)?this.config.alias?new Proxy(i,new iQ(new Proxy(i.table,new aQ(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!=`object`||!i?i:new Proxy(i,new t(this.config))}},e.defineProperty(ji,Z,`SelectionProxyHandler`),ji);function F$(e){let t=e.replace(/['\u2019]/g,``).match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[];return t.map(e=>e.toLowerCase()).join(`_`)}function I$(e){let t=e.replace(/['\u2019]/g,``).match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[];return t.reduce((e,t,n)=>{let r=n===0?t.toLowerCase():`${t[0].toUpperCase()}${t.slice(1)}`;return e+r},``)}function L$(e){return e}var R$=(Mi=class{constructor(t){e.defineProperty(this,`cache`,{}),e.defineProperty(this,`cachedTables`,{}),e.defineProperty(this,`convert`,void 0),this.convert=t===`snake_case`?F$:t===`camelCase`?I$:L$}getColumnCasing(e){if(!e.keyAsName)return e.name;let t=e.table[BZ.Symbol.Schema]??`public`,n=e.table[BZ.Symbol.OriginalName],r=`${t}.${n}.${e.name}`;return this.cache[r]||this.cacheTable(e.table),this.cache[r]}cacheTable(e){let t=e[BZ.Symbol.Schema]??`public`,n=e[BZ.Symbol.OriginalName],r=`${t}.${n}`;if(!this.cachedTables[r]){for(let t of Object.values(e[BZ.Symbol.Columns])){let e=`${r}.${t.name}`;this.cache[e]=this.convert(t.name)}this.cachedTables[r]=!0}}clearCache(){this.cache={},this.cachedTables={}}},e.defineProperty(Mi,Z,`CasingCache`),Mi),z$=(Ni=class extends rQ{},e.defineProperty(Ni,Z,`PgViewBase`),Ni),B$=(Pi=class{constructor(t){e.defineProperty(this,`casing`,void 0),this.casing=new R$(t?.casing)}async migrate(e,t,n){let r=typeof n==`string`?`__drizzle_migrations`:n.migrationsTable??`__drizzle_migrations`,i=typeof n==`string`?`drizzle`:n.migrationsSchema??`drizzle`,a=$` + `)}\n]`}concat(...t){let n=this.schema,r=this.data.concat(t.flatMap(({data:e})=>e));return new e(n,r.map(e=>new vz(n,e)))}slice(t,n){let r=this.schema;[t,n]=vL({length:this.numRows},t,n);let i=qL(this.data,this._offsets,t,n);return new e(r,i.map(e=>new vz(r,e)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&et.children[e]);if(t.length===0){let{type:n}=this.schema.fields[e],r=HL({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new fR(t)}return null}setChild(e,t){var n;return this.setChildAt((n=this.schema.fields)?.findIndex(t=>t.name===e),t)}setChildAt(t,n){let r=this.schema,i=[...this.batches];if(t>-1&&tthis.getChildAt(t));[e[t],o[t]]=[a,n],[r,i]=fz(r,o)}return new e(r,i)}select(e){let t=this.schema.fields.reduce((e,t,n)=>e.set(t.name,n),new Map);return this.selectAt(e.map(e=>t.get(e)).filter(e=>e>-1))}selectAt(t){let n=this.schema.selectAt(t),r=this.batches.map(e=>e.selectAt(t));return new e(n,r)}assign(t){let n=this.schema.fields,[r,i]=t.schema.fields.reduce((e,t,r)=>{let[i,a]=e,o=n.findIndex(e=>e.name===t.name);return~o?a[o]=r:i.push(r),e},[[],[]]),a=this.schema.assign(t.schema),o=[...n.map((e,t)=>[t,i[t]]).map(([e,n])=>n===void 0?this.getChildAt(e):t.getChildAt(n)),...r.map(e=>t.getChildAt(e))].filter(Boolean);return new e(...fz(a,o))}};hz=Symbol.toStringTag,gz[hz]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=XL(YL),e.get=XL(lL.getVisitFn(Y.Struct)),e.set=ZL(pI.getVisitFn(Y.Struct)),e.indexOf=QL(iR.getVisitFn(Y.Struct)),`Table`))(gz.prototype);var _z,vz=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof gR)||([,this.data=HL({nullCount:0,type:new aF(this.schema.fields),children:this.schema.fields.map(e=>HL({type:e.type,nullCount:0}))})]=e,!(this.data instanceof zL)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=yz(this.schema,this.data.children);break;case 1:{let[t]=e,{fields:n,children:r,length:i}=Object.keys(t).reduce((e,n,r)=>(e.children[r]=t[n],e.length=Math.max(e.length,t[n].length),e.fields[r]=_R.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new gR(n),o=HL({type:new aF(n),length:i,children:r,nullCount:0});[this.schema,this.data]=yz(a,o.children,i);break}default:throw TypeError(`RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.`)}}get dictionaries(){return this._dictionaries||=bz(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(e){return this.data.getValid(e)}get(e){return lL.visit(this.data,e)}at(e){return this.get(yL(e,this.numRows))}set(e,t){return pI.visit(this.data,e,t)}indexOf(e,t){return iR.visit(this.data,e,t)}[Symbol.iterator](){return cR.visit(new fR([this.data]))}toArray(){return[...this]}concat(...e){return new gz(this.schema,[this,...e])}slice(t,n){let[r]=new fR([this.data]).slice(t,n).data;return new e(this.schema,r)}getChild(e){var t;return this.getChildAt((t=this.schema.fields)?.findIndex(t=>t.name===e))}getChildAt(e){return e>-1&&et.name===e),t)}setChildAt(t,n){let r=this.schema,i=this.data;if(t>-1&&tt.name===e);~t&&(i[t]=this.data.children[t])}return new e(n,HL({type:r,length:this.numRows,children:i}))}selectAt(t){let n=this.schema.selectAt(t),r=t.map(e=>this.data.children[e]).filter(Boolean),i=HL({type:new aF(n.fields),length:this.numRows,children:r});return new e(n,i)}};_z=Symbol.toStringTag,vz[_z]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(vz.prototype);function yz(e,t,n=t.reduce((e,t)=>Math.max(e,t.length),0)){var r;let i=[...e.fields],a=[...t],o=(n+63&-64)>>3;for(let[s,c]of e.fields.entries()){let e=t[s];(!e||e.length!==n)&&(i[s]=c.clone({nullable:!0}),a[s]=(r=e?._changeLengthAndBackfillNullBitmap(n))??HL({type:c.type,length:n,nullCount:n,nullBitmap:new Uint8Array(o)}))}return[e.assign(i),HL({type:new aF(i),length:n,children:a})]}function bz(e,t,n=new Map){var r,i;if(((r=e?.length)??0)>0&&e?.length===t?.length)for(let r=-1,a=e.length;++rHL({type:e.type})),n=HL({type:new aF(e.fields),nullCount:0,children:t});super(e,n)}},Sz=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,n){return t.setPosition(t.position()+iN),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):YM.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):KN.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt(`0`)}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,12);return n?(t||new CN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,YM.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,KN.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,BigInt(`0`))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){let t=e.endObject();return t}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(t,n,r,i,a,o){return e.startMessage(t),e.addVersion(t,n),e.addHeaderType(t,r),e.addHeader(t,i),e.addBodyLength(t,a),e.addCustomMetadata(t,o),e.endMessage(t)}},Cz=class extends pF{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return LN.startNull(t),LN.endNull(t)}visitInt(e,t){return xN.startInt(t),xN.addBitWidth(t,e.bitWidth),xN.addIsSigned(t,e.isSigned),xN.endInt(t)}visitFloat(e,t){return jN.startFloatingPoint(t),jN.addPrecision(t,e.precision),jN.endFloatingPoint(t)}visitBinary(e,t){return wN.startBinary(t),wN.endBinary(t)}visitLargeBinary(e,t){return NN.startLargeBinary(t),NN.endLargeBinary(t)}visitBool(e,t){return TN.startBool(t),TN.endBool(t)}visitUtf8(e,t){return HN.startUtf8(t),HN.endUtf8(t)}visitLargeUtf8(e,t){return PN.startLargeUtf8(t),PN.endLargeUtf8(t)}visitDecimal(e,t){return DN.startDecimal(t),DN.addScale(t,e.scale),DN.addPrecision(t,e.precision),DN.addBitWidth(t,e.bitWidth),DN.endDecimal(t)}visitDate(e,t){return EN.startDate(t),EN.addUnit(t,e.unit),EN.endDate(t)}visitTime(e,t){return zN.startTime(t),zN.addUnit(t,e.unit),zN.addBitWidth(t,e.bitWidth),zN.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return BN.startTimestamp(t),BN.addUnit(t,e.unit),n!==void 0&&BN.addTimezone(t,n),BN.endTimestamp(t)}visitInterval(e,t){return MN.startInterval(t),MN.addUnit(t,e.unit),MN.endInterval(t)}visitDuration(e,t){return ON.startDuration(t),ON.addUnit(t,e.unit),ON.endDuration(t)}visitList(e,t){return FN.startList(t),FN.endList(t)}visitStruct(e,t){return RN.startStruct_(t),RN.endStruct_(t)}visitUnion(e,t){VN.startTypeIdsVector(t,e.typeIds.length);let n=VN.createTypeIdsVector(t,e.typeIds);return VN.startUnion(t),VN.addMode(t,e.mode),VN.addTypeIds(t,n),VN.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return SN.startDictionaryEncoding(t),SN.addId(t,BigInt(e.id)),SN.addIsOrdered(t,e.isOrdered),n!==void 0&&SN.addIndexType(t,n),SN.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return kN.startFixedSizeBinary(t),kN.addByteWidth(t,e.byteWidth),kN.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return AN.startFixedSizeList(t),AN.addListSize(t,e.listSize),AN.endFixedSizeList(t)}visitMap(e,t){return IN.startMap(t),IN.addKeysSorted(t,e.keysSorted),IN.endMap(t)}};const wz=new Cz;function Tz(e,t=new Map){return new gR(Oz(e,t),Pz(e.metadata),t)}function Ez(e){return new Bz(e.count,Az(e.columns),jz(e.columns))}function Dz(e){return new Vz(Ez(e.data),e.id,e.isDelta)}function Oz(e,t){return(e.fields||[]).filter(Boolean).map(e=>_R.fromJSON(e,t))}function kz(e,t){return(e.children||[]).filter(Boolean).map(e=>_R.fromJSON(e,t))}function Az(e){return(e||[]).reduce((e,t)=>[...e,new Uz(t.count,Mz(t.VALIDITY)),...Az(t.children)],[])}function jz(e,t=[]){for(let n=-1,r=(e||[]).length;++ne+ +(t===0),0)}function Nz(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=Iz(e,kz(e,t)),i=new _R(e.name,o,e.nullable,Pz(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?Fz(r):new LP,s=new dF(t.get(n),r,n,a.isOrdered),i=new _R(e.name,s,e.nullable,Pz(e.metadata))):(r=(r=a.indexType)?Fz(r):new LP,t.set(n,o=Iz(e,kz(e,t))),s=new dF(o,r,n,a.isOrdered),i=new _R(e.name,s,e.nullable,Pz(e.metadata))),i||null}function Pz(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function Fz(e){return new PP(e.isSigned,e.bitWidth)}function Iz(e,t){let n=e.type.name;switch(n){case`NONE`:return new NP;case`null`:return new NP;case`binary`:return new qP;case`largebinary`:return new JP;case`utf8`:return new YP;case`largeutf8`:return new XP;case`bool`:return new ZP;case`list`:return new iF((t||[])[0]);case`struct`:return new aF(t||[]);case`struct_`:return new aF(t||[])}switch(n){case`int`:{let t=e.type;return new PP(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new UP(ZM[t.precision])}case`decimal`:{let t=e.type;return new QP(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new $P(QM[t.unit])}case`time`:{let t=e.type;return new eF($M[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new tF($M[t.unit],t.timezone)}case`interval`:{let t=e.type;return new nF(eN[t.unit])}case`duration`:{let t=e.type;return new rF($M[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase(),a=r.toUpperCase()+i.join(``);return new oF(XM[a],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new sF(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new cF(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new lF((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var Lz=dN,Rz=uN,zz=class e{static fromJSON(t,n){let r=new e(0,YM.V5,n);return r._createHeader=Wz(t,n),r}static decode(t){t=new Rz(NM(t));let n=Sz.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=Gz(n,a),o}static encode(e){let t=new Lz,n=-1;return e.isSchema()?n=gR.encode(t,e.header()):e.isRecordBatch()?n=Bz.encode(t,e.header()):e.isDictionaryBatch()&&(n=Vz.encode(t,e.header())),Sz.startMessage(t),Sz.addVersion(t,YM.V5),Sz.addHeader(t,n),Sz.addHeaderType(t,e.headerType),Sz.addBodyLength(t,BigInt(e.bodyLength)),Sz.finishMessageBuffer(t,Sz.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof gR)return new e(0,YM.V5,KN.Schema,t);if(t instanceof Bz)return new e(n,YM.V5,KN.RecordBatch,t);if(t instanceof Vz)return new e(n,YM.V5,KN.DictionaryBatch,t);throw 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===KN.Schema}isRecordBatch(){return this.headerType===KN.RecordBatch}isDictionaryBatch(){return this.headerType===KN.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=XN(e)}},Bz=class{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,n){this._nodes=t,this._buffers=n,this._length=XN(e)}},Vz=class{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(e,t,n=!1){this._data=e,this._isDelta=n,this._id=XN(t)}},Hz=class{constructor(e,t){this.offset=XN(e),this.length=XN(t)}},Uz=class{constructor(e,t){this.length=XN(e),this.nullCount=XN(t)}};function Wz(e,t){return()=>{switch(t){case KN.Schema:return gR.fromJSON(e);case KN.RecordBatch:return Bz.fromJSON(e);case KN.DictionaryBatch:return Vz.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${KN[t]}, type: ${t} }`)}}function Gz(e,t){return()=>{switch(t){case KN.Schema:return gR.decode(e.header(new GN),new Map,e.version());case KN.RecordBatch:return Bz.decode(e.header(new _N),e.version());case KN.DictionaryBatch:return Vz.decode(e.header(new vN),e.version())}throw Error(`Unrecognized Message type: { name: ${KN[t]}, type: ${t} }`)}}_R.encode=oB,_R.decode=tB,_R.fromJSON=Nz,gR.encode=aB,gR.decode=Kz,gR.fromJSON=Tz,Bz.encode=sB,Bz.decode=qz,Bz.fromJSON=Ez,Vz.encode=cB,Vz.decode=Jz,Vz.fromJSON=Dz,Uz.encode=lB,Uz.decode=Xz,Hz.encode=uB,Hz.decode=Yz;function Kz(e,t=new Map,n=YM.V5){let r=$z(e,t);return new gR(r,nB(e),t,n)}function qz(e,t=YM.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new Bz(e.length(),Zz(e),Qz(e,t))}function Jz(e,t=YM.V5){return new Vz(Bz.decode(e.data(),t),e.id(),e.isDelta())}function Yz(e){return new Hz(e.offset(),e.length())}function Xz(e){return new Uz(e.length(),e.nullCount())}function Zz(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++r_R.encode(e,t));GN.startFieldsVector(e,n.length);let r=GN.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?GN.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return CN.startKeyValue(e),CN.addKey(e,r),CN.addValue(e,i),CN.endKeyValue(e)})):-1;return GN.startSchema(e),GN.addFields(e,r),GN.addEndianness(e,dB?yN.Little:yN.Big),i!==-1&&GN.addCustomMetadata(e,i),GN.endSchema(e)}function oB(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;MP.isDictionary(a)?(o=a.dictionary.typeId,i=wz.visit(a,e),r=wz.visit(a.dictionary,e)):r=wz.visit(a,e);let s=(a.children||[]).map(t=>_R.encode(e,t)),c=WN.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?WN.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return CN.startKeyValue(e),CN.addKey(e,r),CN.addValue(e,i),CN.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),WN.startField(e),WN.addType(e,r),WN.addTypeType(e,o),WN.addChildren(e,c),WN.addNullable(e,!!t.nullable),n!==-1&&WN.addName(e,n),i!==-1&&WN.addDictionary(e,i),l!==-1&&WN.addCustomMetadata(e,l),WN.endField(e)}function sB(e,t){let n=t.nodes||[],r=t.buffers||[];_N.startNodesVector(e,n.length);for(let t of n.slice().reverse())Uz.encode(e,t);let i=e.endVector();_N.startBuffersVector(e,r.length);for(let t of r.slice().reverse())Hz.encode(e,t);let a=e.endVector();return _N.startRecordBatch(e),_N.addLength(e,BigInt(t.length)),_N.addNodes(e,i),_N.addBuffers(e,a),_N.endRecordBatch(e)}function cB(e,t){let n=Bz.encode(e,t.data);return vN.startDictionaryBatch(e),vN.addId(e,BigInt(t.id)),vN.addIsDelta(e,t.isDelta),vN.addData(e,n),vN.endDictionaryBatch(e)}function lB(e,t){return gN.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function uB(e,t){return hN.createBuffer(e,BigInt(t.offset),BigInt(t.length))}const dB=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),fB=e=>`Expected ${KN[e]} Message in stream, but was null or length 0.`,pB=e=>`Header pointer of flatbuffer-encoded ${KN[e]} Message is null or length 0.`,mB=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,hB=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;var gB=class{constructor(e){this.source=e instanceof AR?e:new AR(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?TR:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(fB(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=NM(this.source.read(e));if(t.byteLength[...e,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE_ID&&[n.TYPE_ID]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...t(n.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(fB(e));return t.value}readSchema(){let e=KN.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(pB(e));return n}};const yB=4,bB=`ARROW1`,xB=new Uint8Array(bB.length);for(let e=0;ethis):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return VM.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return VM.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}static from(t){return t instanceof e?t:gM(t)?BB(t):vM(t)?UB(t):pM(t)?(()=>$j(this,void 0,void 0,function*(){return yield e.from(yield t)}))():yM(t)||SM(t)||wM(t)||hM(t)?HB(new jR(t)):VB(new AR(t))}static readAll(t){return t instanceof e?t.isSync()?RB(t):zB(t):gM(t)||ArrayBuffer.isView(t)||mM(t)||_M(t)?RB(t):zB(t)}},DB=class extends EB{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return nM(this,arguments,function*(){yield tM(yield*rM(iM(this[Symbol.iterator]())))})}},OB=class extends EB{constructor(e){super(e),this._impl=e}readAll(){return $j(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=iM(this),s;s=yield o.next(),e=s.done,!e;a=!0){r=s.value,a=!1;let e=r;i.push(e)}}catch(e){t={error:e}}finally{try{!a&&!e&&(n=o.return)&&(yield n.call(o))}finally{if(t)throw t.error}}return i})}[Symbol.iterator](){throw Error(`AsyncRecordBatchStreamReader is not Iterable`)}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},kB=class extends DB{constructor(e){super(e),this._impl=e}},AB=class extends OB{constructor(e){super(e),this._impl=e}},jB=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){let n=this._loadVectors(e,t,this.schema.fields),r=HL({type:new aF(this.schema.fields),length:e.length,children:n});return new vz(this.schema,r)}_loadDictionaryBatch(e,t){let{id:n,isDelta:r}=e,{dictionaries:i,schema:a}=this,o=i.get(n),s=a.dictionaries.get(n),c=this._loadVectors(e.data,t,[s]);return(o&&r?o.concat(new fR(c)):new fR(c)).memoize()}_loadVectors(e,t,n){return new WR(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},MB=class extends jB{constructor(e,t){super(t),this._reader=gM(e)?new vB(this._handle=e):new gB(this._handle=e)}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(e){return this.closed||(this.autoDestroy=LB(this,e),(this.schema||=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):TR}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):TR}next(){if(this.closed)return TR;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadRecordBatch(n,r);return{done:!1,value:i}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new xz(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},NB=class extends jB{constructor(e,t){super(t),this._reader=new _B(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return $j(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return $j(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=LB(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return $j(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):TR})}return(e){return $j(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):TR})}next(){return $j(this,void 0,void 0,function*(){if(this.closed)return TR;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadRecordBatch(n,r);return{done:!1,value:i}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new xz(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return $j(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},PB=class extends MB{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof PR?e:new PR(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();let n=(t=this._footer)?.getRecordBatch(e);if(n&&this._handle.seek(n.offset)){let e=this._reader.readMessage(KN.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadRecordBatch(t,n);return r}}return null}_readDictionaryBatch(e){var t;let n=(t=this._footer)?.getDictionaryBatch(e);if(n&&this._handle.seek(n.offset)){let e=this._reader.readMessage(KN.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}_readFooter(){let{_handle:e}=this,t=e.size-wB,n=e.readInt32(t),r=e.readAt(t-n,n);return SR.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return $j(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return $j(this,void 0,void 0,function*(){var t;if(this.closed)return null;this._footer||(yield this.open());let n=(t=this._footer)?.getRecordBatch(e);if(n&&(yield this._handle.seek(n.offset))){let e=yield this._reader.readMessage(KN.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadRecordBatch(t,n);return r}}return null})}_readDictionaryBatch(e){return $j(this,void 0,void 0,function*(){var t;let n=(t=this._footer)?.getDictionaryBatch(e);if(n&&(yield this._handle.seek(n.offset))){let e=yield this._reader.readMessage(KN.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}})}_readFooter(){return $j(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-wB,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return SR.decode(r)})}_readNextMessageAndValidate(e){return $j(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?SB(t)?new kB(new PB(e.read())):new DB(new MB(e)):new DB(new MB(function*(){}()))}function HB(e){return $j(this,void 0,void 0,function*(){let t=yield e.peek(CB+7&-8);return t&&t.byteLength>=4?SB(t)?new kB(new PB(yield e.read())):new OB(new NB(e)):new OB(new NB(function(){return nM(this,arguments,function*(){})}()))})}function UB(e){return $j(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new FR(e,t);return t>=TB&&SB(yield n.readAt(0,CB+7&-8))?new AB(new FB(n)):new OB(new NB(n))})}var WB=class e extends pF{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof vz?e.data.children:e.data),r=new e;return r.visitMany(n(t)),r}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(e){if(e instanceof fR)return this.visitMany(e.data),this;let{type:t}=e;if(!MP.isDictionary(t)){let{length:n}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);if(MP.isUnion(t))this.nodes.push(new Uz(n,0));else{let{nullCount:r}=e;MP.isNull(t)||GB.call(this,r<=0?new Uint8Array:ML(e.offset,n,e.nullBitmap)),this.nodes.push(new Uz(n,r))}}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};function GB(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new Hz(this._byteLength,t)),this._byteLength+=t,this}function KB(e){var t;let{type:n,length:r,typeIds:i,valueOffsets:a}=e;if(GB.call(this,i),n.mode===XM.Sparse)return ZB.call(this,e);if(n.mode===XM.Dense){if(e.offset<=0)return GB.call(this,a),ZB.call(this,e);{let o=new Int32Array(r),s=Object.create(null),c=Object.create(null);for(let e,n,l=-1;++l{let i=n.typeIds[t],a=s[i],o=c[i];return e.slice(a,Math.min(r,o))}))}}return this}function qB(e){let t;return e.nullCount>=e.length?GB.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?GB.call(this,ML(e.offset,e.length,t)):GB.call(this,NL(e.values))}function JB(e){return GB.call(this,e.values.subarray(0,e.length*e.stride))}function YB(e){let{length:t,values:n,valueOffsets:r}=e,i=XN(r[0]),a=XN(r[t]),o=Math.min(a-i,n.byteLength-i);return GB.call(this,zM(-i,t+1,r)),GB.call(this,n.subarray(i,i+o)),this}function XB(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return GB.call(this,zM(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function ZB(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}WB.prototype.visitBool=qB,WB.prototype.visitInt=JB,WB.prototype.visitFloat=JB,WB.prototype.visitUtf8=YB,WB.prototype.visitLargeUtf8=YB,WB.prototype.visitBinary=YB,WB.prototype.visitLargeBinary=YB,WB.prototype.visitFixedSizeBinary=JB,WB.prototype.visitDate=JB,WB.prototype.visitTimestamp=JB,WB.prototype.visitTime=JB,WB.prototype.visitDecimal=JB,WB.prototype.visitList=XB,WB.prototype.visitStruct=ZB,WB.prototype.visitUnion=KB,WB.prototype.visitInterval=JB,WB.prototype.visitDuration=JB,WB.prototype.visitFixedSizeList=XB,WB.prototype.visitMap=XB;var QB=class extends DR{static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}constructor(e){super(),this._position=0,this._started=!1,this._sink=new kR,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,fM(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy==`boolean`?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat==`boolean`?e.writeLegacyIpcFormat:!1}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return pM(e)?e.then(e=>this.writeAll(e)):hM(e)?nV(this,e):tV(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof kR?this._sink=e:(this._sink=new kR,e&&xM(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&CM(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!t||!dz(t,this._schema))&&(t==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null||e instanceof gz&&!(t=e.schema)||e instanceof vz&&!(t=e.schema))return this.finish()&&void 0}else throw Error(`RecordBatchWriter is closed`);if(t&&!dz(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof vz?e instanceof xz||this._writeRecordBatch(e):e instanceof gz?this.writeAll(e.batches):mM(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=zz.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===KN.RecordBatch?this._recordBatchBlocks.push(new wR(o,e.bodyLength,this._position)):e.headerType===KN.DictionaryBatch&&this._dictionaryBlocks.push(new wR(o,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(o-a)),i>0&&this._write(r),this._writePadding(s)}_write(e){if(this._started){let t=NM(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(zz.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(xB)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=WB.assemble(e),a=new Bz(e.numRows,n,r),o=zz.from(a,t);return this._writeDictionaries(e)._writeMessage(o)._writeBodyBuffers(i)}_writeDictionaryBatch(e,t,n=!1){let{byteLength:r,nodes:i,bufferRegions:a,buffers:o}=WB.assemble(new fR([e])),s=new Bz(e.length,i,a),c=new Vz(s,t,n),l=zz.from(c,r);return this._writeMessage(l)._writeBodyBuffers(o)}_writeBodyBuffers(e){let t,n,r;for(let i=-1,a=e.length;++i0&&(this._write(t),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}_writeDictionaries(e){var t,n;for(let[r,i]of e.dictionaries){let e=(t=i?.data)??[],a=this._seenDictionaries.get(r),o=(n=this._dictionaryDeltaOffsets.get(r))??0;if(!a||a.data[0]!==e[0])for(let[t,n]of e.entries())this._writeDictionaryBatch(n,r,t>0);else if(or.writeAll(e)):hM(t)?nV(r,t):tV(r,t)}},eV=class e extends QB{static writeAll(t){let n=new e;return pM(t)?t.then(e=>n.writeAll(e)):hM(t)?nV(n,t):tV(n,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(e,t,n=!1){if(!n&&this._seenDictionaries.has(t))throw Error(`The Arrow File format does not support replacement dictionaries. `);return super._writeDictionaryBatch(e,t,n)}_writeFooter(e){let t=SR.encode(new SR(e,YM.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function tV(e,t){let n=t;t instanceof gz&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function nV(e,t){return $j(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=iM(t);i=yield r.next(),a=i.done,!a;n=!0){c=i.value,n=!1;let t=c;e.write(t)}}catch(e){o={error:e}}finally{try{!n&&!a&&(s=r.return)&&(yield s.call(r))}finally{if(o)throw o.error}}return e.finish()})}function rV(e,t=`stream`){return(t===`stream`?$B:eV).writeAll(e).toUint8Array(!0)}var iV=Object.create,aV=Object.defineProperty,oV=Object.getOwnPropertyDescriptor,sV=Object.getOwnPropertyNames,cV=Object.getPrototypeOf,lV=Object.prototype.hasOwnProperty,uV=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),dV=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of sV(t))!lV.call(e,i)&&i!==n&&aV(e,i,{get:()=>t[i],enumerable:!(r=oV(t,i))||r.enumerable});return e},fV=(e,t,n)=>(n=e==null?{}:iV(cV(e)),dV(t||!e||!e.__esModule?aV(n,`default`,{value:e,enumerable:!0}):n,e)),pV=uV((e,t)=>{t.exports=Worker}),mV=(e=>(e[e.UNDEFINED=0]=`UNDEFINED`,e[e.AUTOMATIC=1]=`AUTOMATIC`,e[e.READ_ONLY=2]=`READ_ONLY`,e[e.READ_WRITE=3]=`READ_WRITE`,e))(mV||{}),hV=(e=>(e[e.IDENTIFIER=0]=`IDENTIFIER`,e[e.NUMERIC_CONSTANT=1]=`NUMERIC_CONSTANT`,e[e.STRING_CONSTANT=2]=`STRING_CONSTANT`,e[e.OPERATOR=3]=`OPERATOR`,e[e.KEYWORD=4]=`KEYWORD`,e[e.COMMENT=5]=`COMMENT`,e))(hV||{}),gV=(e=>(e[e.NONE=0]=`NONE`,e[e.DEBUG=1]=`DEBUG`,e[e.INFO=2]=`INFO`,e[e.WARNING=3]=`WARNING`,e[e.ERROR=4]=`ERROR`,e))(gV||{}),_V=(e=>(e[e.NONE=0]=`NONE`,e[e.CONNECT=1]=`CONNECT`,e[e.DISCONNECT=2]=`DISCONNECT`,e[e.OPEN=3]=`OPEN`,e[e.QUERY=4]=`QUERY`,e[e.INSTANTIATE=5]=`INSTANTIATE`,e))(_V||{}),vV=(e=>(e[e.NONE=0]=`NONE`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`,e[e.START=3]=`START`,e[e.RUN=4]=`RUN`,e[e.CAPTURE=5]=`CAPTURE`,e))(vV||{}),yV=(e=>(e[e.NONE=0]=`NONE`,e[e.WEB_WORKER=1]=`WEB_WORKER`,e[e.NODE_WORKER=2]=`NODE_WORKER`,e[e.BINDINGS=3]=`BINDINGS`,e[e.ASYNC_DUCKDB=4]=`ASYNC_DUCKDB`,e))(yV||{}),bV=class{log(e){}},xV=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},SV=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e))(SV||{}),CV=class{constructor(e,t){this._bindings=e,this._conn=t}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}async query(e){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:e});let t=await this._bindings.runQuery(this._conn,e),n=EB.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new gz(n)}async send(e,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:e});let n=await this._bindings.startPendingQuery(this._conn,e,t);for(;n==null;)n=await this._bindings.pollPendingQuery(this._conn);let r=new wV(this._bindings,this._conn,n),i=await EB.from(r);return console.assert(i.isAsync()),console.assert(i.isStream()),i}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(e){return await this._bindings.getTableNames(this._conn,e)}async prepare(e){let t=await this._bindings.createPrepared(this._conn,e);return new TV(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=rV(e,`stream`);await this.insertArrowFromIPCStream(n,t)}async insertArrowFromIPCStream(e,t){await this._bindings.insertArrowFromIPCStream(this._conn,e,t)}async insertCSVFromPath(e,t){await this._bindings.insertCSVFromPath(this._conn,e,t)}async insertJSONFromPath(e,t){await this._bindings.insertJSONFromPath(this._conn,e,t)}},wV=class{constructor(e,t,n){this.db=e,this.conn=t,this.header=n,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 e;return this._inFlight==null?e=await this.db.fetchQueryResults(this.conn):(e=await this._inFlight,this._inFlight=null),this._depleted=e.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:e}}[Symbol.asyncIterator](){return this}},TV=class{constructor(e,t,n){this.bindings=e,this.connectionId=t,this.statementId=n}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...e){let t=await this.bindings.runPrepared(this.connectionId,this.statementId,e),n=EB.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new gz(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new wV(this.bindings,this.connectionId,t),r=await EB.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},EV=(e=>(e.CANCEL_PENDING_QUERY=`CANCEL_PENDING_QUERY`,e.CLOSE_PREPARED=`CLOSE_PREPARED`,e.COLLECT_FILE_STATISTICS=`COLLECT_FILE_STATISTICS`,e.REGISTER_OPFS_FILE_NAME=`REGISTER_OPFS_FILE_NAME`,e.CONNECT=`CONNECT`,e.COPY_FILE_TO_BUFFER=`COPY_FILE_TO_BUFFER`,e.COPY_FILE_TO_PATH=`COPY_FILE_TO_PATH`,e.CREATE_PREPARED=`CREATE_PREPARED`,e.DISCONNECT=`DISCONNECT`,e.DROP_FILE=`DROP_FILE`,e.DROP_FILES=`DROP_FILES`,e.EXPORT_FILE_STATISTICS=`EXPORT_FILE_STATISTICS`,e.FETCH_QUERY_RESULTS=`FETCH_QUERY_RESULTS`,e.FLUSH_FILES=`FLUSH_FILES`,e.GET_FEATURE_FLAGS=`GET_FEATURE_FLAGS`,e.GET_TABLE_NAMES=`GET_TABLE_NAMES`,e.GET_VERSION=`GET_VERSION`,e.GLOB_FILE_INFOS=`GLOB_FILE_INFOS`,e.INSERT_ARROW_FROM_IPC_STREAM=`INSERT_ARROW_FROM_IPC_STREAM`,e.INSERT_CSV_FROM_PATH=`IMPORT_CSV_FROM_PATH`,e.INSERT_JSON_FROM_PATH=`IMPORT_JSON_FROM_PATH`,e.INSTANTIATE=`INSTANTIATE`,e.OPEN=`OPEN`,e.PING=`PING`,e.POLL_PENDING_QUERY=`POLL_PENDING_QUERY`,e.REGISTER_FILE_BUFFER=`REGISTER_FILE_BUFFER`,e.REGISTER_FILE_HANDLE=`REGISTER_FILE_HANDLE`,e.REGISTER_FILE_URL=`REGISTER_FILE_URL`,e.RESET=`RESET`,e.RUN_PREPARED=`RUN_PREPARED`,e.RUN_QUERY=`RUN_QUERY`,e.SEND_PREPARED=`SEND_PREPARED`,e.START_PENDING_QUERY=`START_PENDING_QUERY`,e.TOKENIZE=`TOKENIZE`,e))(EV||{}),DV=(e=>(e.CONNECTION_INFO=`CONNECTION_INFO`,e.ERROR=`ERROR`,e.FEATURE_FLAGS=`FEATURE_FLAGS`,e.FILE_BUFFER=`FILE_BUFFER`,e.FILE_INFOS=`FILE_INFOS`,e.FILE_SIZE=`FILE_SIZE`,e.FILE_STATISTICS=`FILE_STATISTICS`,e.INSTANTIATE_PROGRESS=`INSTANTIATE_PROGRESS`,e.LOG=`LOG`,e.OK=`OK`,e.PREPARED_STATEMENT_ID=`PREPARED_STATEMENT_ID`,e.QUERY_PLAN=`QUERY_PLAN`,e.QUERY_RESULT=`QUERY_RESULT`,e.QUERY_RESULT_CHUNK=`QUERY_RESULT_CHUNK`,e.QUERY_RESULT_HEADER=`QUERY_RESULT_HEADER`,e.QUERY_RESULT_HEADER_OR_NULL=`QUERY_RESULT_HEADER_OR_NULL`,e.REGISTERED_FILE=`REGISTERED_FILE`,e.SCRIPT_TOKENS=`SCRIPT_TOKENS`,e.SUCCESS=`SUCCESS`,e.TABLE_NAMES=`TABLE_NAMES`,e.VERSION_STRING=`VERSION_STRING`,e))(DV||{}),OV=class{constructor(e,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=e,this.data=t,this.promise=new Promise((e,t)=>{this.promiseResolver=e,this.promiseRejecter=t})}};function kV(e){switch(e.typeId){case Y.Binary:return{sqlType:`binary`};case Y.Bool:return{sqlType:`bool`};case Y.Date:return{sqlType:`date`};case Y.DateDay:return{sqlType:`date32[d]`};case Y.DateMillisecond:return{sqlType:`date64[ms]`};case Y.Decimal:{let t=e;return{sqlType:`decimal`,precision:t.precision,scale:t.scale}}case Y.Float:return{sqlType:`float`};case Y.Float16:return{sqlType:`float16`};case Y.Float32:return{sqlType:`float32`};case Y.Float64:return{sqlType:`float64`};case Y.Int:return{sqlType:`int32`};case Y.Int16:return{sqlType:`int16`};case Y.Int32:return{sqlType:`int32`};case Y.Int64:return{sqlType:`int64`};case Y.Uint16:return{sqlType:`uint16`};case Y.Uint32:return{sqlType:`uint32`};case Y.Uint64:return{sqlType:`uint64`};case Y.Uint8:return{sqlType:`uint8`};case Y.IntervalDayTime:return{sqlType:`interval[dt]`};case Y.IntervalYearMonth:return{sqlType:`interval[m]`};case Y.List:return{sqlType:`list`,valueType:kV(e.valueType)};case Y.FixedSizeBinary:return{sqlType:`fixedsizebinary`,byteWidth:e.byteWidth};case Y.Null:return{sqlType:`null`};case Y.Utf8:return{sqlType:`utf8`};case Y.Struct:return{sqlType:`struct`,fields:e.children.map(e=>AV(e.name,e.type))};case Y.Map:{let t=e;return{sqlType:`map`,keyType:kV(t.keyType),valueType:kV(t.valueType)}}case Y.Time:return{sqlType:`time[s]`};case Y.TimeMicrosecond:return{sqlType:`time[us]`};case Y.TimeMillisecond:return{sqlType:`time[ms]`};case Y.TimeNanosecond:return{sqlType:`time[ns]`};case Y.TimeSecond:return{sqlType:`time[s]`};case Y.Timestamp:return{sqlType:`timestamp`,timezone:e.timezone||void 0};case Y.TimestampSecond:return{sqlType:`timestamp[s]`,timezone:e.timezone||void 0};case Y.TimestampMicrosecond:return{sqlType:`timestamp[us]`,timezone:e.timezone||void 0};case Y.TimestampNanosecond:return{sqlType:`timestamp[ns]`,timezone:e.timezone||void 0};case Y.TimestampMillisecond:return{sqlType:`timestamp[ms]`,timezone:e.timezone||void 0}}throw Error(`unsupported arrow type: ${e.toString()}`)}function AV(e,t){let n=kV(t);return n.name=e,n}var jV=new TextEncoder,MV=class{constructor(e,t=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=e,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(e){this._worker=e,this._worker.addEventListener(`message`,this._onMessageHandler),this._worker.addEventListener(`error`,this._onErrorHandler),this._worker.addEventListener(`close`,this._onCloseHandler),this._workerShutdownPromise=new Promise((e,t)=>{this._workerShutdownResolver=e})}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(e,t=[]){if(!this._worker){console.error(`cannot send a message since the worker is not set!`);return}let n=this._nextMessageId++;return this._pendingRequests.set(n,e),this._worker.postMessage({messageId:n,type:e.type,data:e.data},t),await e.promise}onMessage(e){var t;let n=e.data;switch(n.type){case`LOG`:this._logger.log(n.data);return;case`INSTANTIATE_PROGRESS`:for(let e of this._onInstantiationProgress)e(n.data);return}let r=this._pendingRequests.get(n.requestId);if(!r){console.warn(`unassociated response: [${n.requestId}, ${n.type.toString()}]`);return}if(this._pendingRequests.delete(n.requestId),n.type==`ERROR`){let e=Error(n.data.message);e.name=n.data.name,(t=Object.getOwnPropertyDescriptor(e,`stack`))!=null&&t.writable&&(e.stack=n.data.stack),r.promiseRejecter(e);return}switch(r.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(n.type==`OK`){r.promiseResolver(n.data);return}break;case`INSTANTIATE`:if(this._onInstantiationProgress=[],n.type==`OK`){r.promiseResolver(n.data);return}break;case`GLOB_FILE_INFOS`:if(n.type==`FILE_INFOS`){r.promiseResolver(n.data);return}break;case`GET_VERSION`:if(n.type==`VERSION_STRING`){r.promiseResolver(n.data);return}break;case`GET_FEATURE_FLAGS`:if(n.type==`FEATURE_FLAGS`){r.promiseResolver(n.data);return}break;case`GET_TABLE_NAMES`:if(n.type==`TABLE_NAMES`){r.promiseResolver(n.data);return}break;case`TOKENIZE`:if(n.type==`SCRIPT_TOKENS`){r.promiseResolver(n.data);return}break;case`COPY_FILE_TO_BUFFER`:if(n.type==`FILE_BUFFER`){r.promiseResolver(n.data);return}break;case`EXPORT_FILE_STATISTICS`:if(n.type==`FILE_STATISTICS`){r.promiseResolver(n.data);return}break;case`CONNECT`:if(n.type==`CONNECTION_INFO`){r.promiseResolver(n.data);return}break;case`RUN_PREPARED`:case`RUN_QUERY`:if(n.type==`QUERY_RESULT`){r.promiseResolver(n.data);return}break;case`SEND_PREPARED`:if(n.type==`QUERY_RESULT_HEADER`){r.promiseResolver(n.data);return}break;case`START_PENDING_QUERY`:if(n.type==`QUERY_RESULT_HEADER_OR_NULL`){r.promiseResolver(n.data);return}break;case`POLL_PENDING_QUERY`:if(n.type==`QUERY_RESULT_HEADER_OR_NULL`){r.promiseResolver(n.data);return}break;case`CANCEL_PENDING_QUERY`:if(this._onInstantiationProgress=[],n.type==`SUCCESS`){r.promiseResolver(n.data);return}break;case`FETCH_QUERY_RESULTS`:if(n.type==`QUERY_RESULT_CHUNK`){r.promiseResolver(n.data);return}break;case`CREATE_PREPARED`:if(n.type==`PREPARED_STATEMENT_ID`){r.promiseResolver(n.data);return}break}r.promiseRejecter(Error(`unexpected response type: ${n.type.toString()}`))}onError(e){console.error(e),console.error(`error in duckdb worker: ${e.message}`),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn(`worker terminated with ${this._pendingRequests.size} pending requests`);return}this._pendingRequests.clear()}async reset(){let e=new OV(`RESET`,null);return await this.postTask(e)}async ping(){let e=new OV(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new OV(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new OV(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new OV(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new OV(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new OV(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new OV(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new OV(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new OV(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new OV(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new CV(this,e)}async disconnect(e){let t=new OV(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new OV(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new OV(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new OV(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new OV(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new OV(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new OV(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new OV(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new OV(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new OV(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new OV(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new OV(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=jV.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new OV(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new OV(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new OV(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new OV(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new OV(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new OV(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new OV(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new OV(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new OV(`INSERT_ARROW_FROM_IPC_STREAM`,[e,t,n]);await this.postTask(r,[t.buffer])}async insertCSVFromPath(e,t,n){if(n.columns!==void 0){let e=[];for(let t in n.columns){let r=n.columns[t];e.push(AV(t,r))}n.columnsFlat=e,delete n.columns}let r=new OV(`IMPORT_CSV_FROM_PATH`,[e,t,n]);await this.postTask(r)}async insertJSONFromPath(e,t,n){if(n.columns!==void 0){let e=[];for(let t in n.columns){let r=n.columns[t];e.push(AV(t,r))}n.columnsFlat=e,delete n.columns}let r=new OV(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function NV(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}var PV=NV(),FV=(e=>(e[e.BUFFER=0]=`BUFFER`,e[e.NODE_FS=1]=`NODE_FS`,e[e.BROWSER_FILEREADER=2]=`BROWSER_FILEREADER`,e[e.BROWSER_FSACCESS=3]=`BROWSER_FSACCESS`,e[e.HTTP=4]=`HTTP`,e[e.S3=5]=`S3`,e))(FV||{}),IV=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])),LV=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])),RV=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])),zV=()=>(async e=>{try{return typeof MessageChannel<`u`&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}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])),BV={name:`@duckdb/duckdb-wasm`,version:`1.29.1-dev68.0`,description:`DuckDB powered by WebAssembly`,license:`MIT`,repository:{type:`git`,url:`https://github.com/duckdb/duckdb-wasm.git`},keywords:[`sql`,`duckdb`,`relational`,`database`,`data`,`query`,`wasm`,`analytics`,`olap`,`arrow`,`parquet`,`json`,`csv`],dependencies:{"apache-arrow":`^17.0.0`},devDependencies:{"@types/emscripten":`^1.39.10`,"@types/jasmine":`^5.1.4`,"@typescript-eslint/eslint-plugin":`^6.21.0`,"@typescript-eslint/parser":`^6.21.0`,esbuild:`^0.20.2`,eslint:`^8.57.0`,"eslint-plugin-jasmine":`^4.1.3`,"eslint-plugin-react":`^7.34.0`,"fast-glob":`^3.3.2`,jasmine:`^5.1.0`,"jasmine-core":`^5.1.2`,"jasmine-spec-reporter":`^7.0.0`,"js-sha256":`^0.11.0`,karma:`^6.4.2`,"karma-chrome-launcher":`^3.2.0`,"karma-coverage":`^2.2.1`,"karma-firefox-launcher":`^2.1.3`,"karma-jasmine":`^5.1.0`,"karma-jasmine-html-reporter":`^2.1.0`,"karma-sourcemap-loader":`^0.4.0`,"karma-spec-reporter":`^0.0.36`,"make-dir":`^4.0.0`,nyc:`^15.1.0`,prettier:`^3.2.5`,puppeteer:`^22.8.0`,rimraf:`^5.0.5`,s3rver:`^3.7.1`,typedoc:`^0.25.13`,typescript:`^5.3.3`,"wasm-feature-detect":`^1.6.1`,"web-worker":`^1.2.0`},scripts:{"build:debug":`node bundle.mjs debug && tsc --emitDeclarationOnly`,"build:release":`node bundle.mjs release && tsc --emitDeclarationOnly`,docs:`typedoc`,report:`node ./coverage.mjs`,"test:node":`node --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:node:debug":`node --inspect-brk --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:node:coverage":`nyc -r json --report-dir ./coverage/node node ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:firefox":`karma start ./karma/tests-firefox.cjs`,"test:chrome":`karma start ./karma/tests-chrome.cjs`,"test:chrome:eh":`karma start ./karma/tests-chrome-eh.cjs`,"test:chrome:coverage":`karma start ./karma/tests-chrome-coverage.cjs`,"test:browser":`karma start ./karma/tests-all.cjs`,"test:browser:debug":`karma start ./karma/tests-debug.cjs`,test:`npm run test:chrome && npm run test:node`,"test:coverage":`npm run test:chrome:coverage && npm run test:node:coverage && npm run report`,lint:`eslint src test`},files:[`dist`,`!dist/tests-*`,`!dist/duckdb-browser-mvp.worker.js.map`,`!dist/types/test`],main:`dist/duckdb-browser.cjs`,module:`dist/duckdb-browser.mjs`,types:`dist/duckdb-browser.d.ts`,jsdelivr:`dist/duckdb-browser.cjs`,unpkg:`dist/duckdb-browser.mjs`,sideEffects:!1,browser:{fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},exports:{"./dist/duckdb-mvp.wasm":`./dist/duckdb-mvp.wasm`,"./dist/duckdb-eh.wasm":`./dist/duckdb-eh.wasm`,"./dist/duckdb-coi.wasm":`./dist/duckdb-coi.wasm`,"./dist/duckdb-browser":`./dist/duckdb-browser.mjs`,"./dist/duckdb-browser.cjs":`./dist/duckdb-browser.cjs`,"./dist/duckdb-browser.mjs":`./dist/duckdb-browser.mjs`,"./dist/duckdb-browser-coi.pthread.worker.js":`./dist/duckdb-browser-coi.pthread.worker.js`,"./dist/duckdb-browser-coi.worker.js":`./dist/duckdb-browser-coi.worker.js`,"./dist/duckdb-browser-eh.worker.js":`./dist/duckdb-browser-eh.worker.js`,"./dist/duckdb-browser-mvp.worker.js":`./dist/duckdb-browser-mvp.worker.js`,"./dist/duckdb-node":`./dist/duckdb-node.cjs`,"./dist/duckdb-node.cjs":`./dist/duckdb-node.cjs`,"./dist/duckdb-node-blocking":`./dist/duckdb-node-blocking.cjs`,"./dist/duckdb-node-blocking.cjs":`./dist/duckdb-node-blocking.cjs`,"./dist/duckdb-node-eh.worker.cjs":`./dist/duckdb-node-eh.worker.cjs`,"./dist/duckdb-node-mvp.worker.cjs":`./dist/duckdb-node-mvp.worker.cjs`,"./blocking":{node:{types:`./dist/duckdb-node-blocking.d.ts`,require:`./dist/duckdb-node-blocking.cjs`,import:`./dist/duckdb-node-blocking.cjs`},types:`./dist/duckdb-node-blocking.d.ts`,import:`./dist/duckdb-node-blocking.mjs`,require:`./dist/duckdb-node-blocking.cjs`},".":{browser:{types:`./dist/duckdb-browser.d.ts`,import:`./dist/duckdb-browser.mjs`,require:`./dist/duckdb-browser.cjs`},node:{types:`./dist/duckdb-node.d.ts`,import:`./dist/duckdb-node.cjs`,require:`./dist/duckdb-node.cjs`},types:`./dist/duckdb-browser.d.ts`,import:`./dist/duckdb-browser.mjs`,require:`./dist/duckdb-browser.cjs`}}},VV=BV.name,HV=BV.version,UV=BV.version.split(`.`),WV=UV[0],GV=UV[1],KV=UV[2],qV=()=>typeof navigator>`u`,JV=()=>qV()?`node`:navigator.userAgent,YV=()=>JV().includes(`Firefox`),XV=()=>/^((?!chrome|android).)*safari/i.test(JV()),ZV=null,QV=null,$V=null,eH=null,tH=null;async function nH(){return ZV??=typeof BigInt64Array<`u`,QV??=await LV(),$V??=await zV(),eH??=await RV(),tH??=await IV(),{bigInt64Array:ZV,crossOriginIsolated:qV()||globalThis.crossOriginIsolated||!1,wasmExceptions:QV,wasmSIMD:eH,wasmThreads:$V,wasmBulkMemory:tH}}async function rH(e){let t=await nH();if(t.wasmExceptions){if(t.wasmSIMD&&t.wasmThreads&&t.crossOriginIsolated&&e.coi)return{mainModule:e.coi.mainModule,mainWorker:e.coi.mainWorker,pthreadWorker:e.coi.pthreadWorker};if(e.eh)return{mainModule:e.eh.mainModule,mainWorker:e.eh.mainWorker,pthreadWorker:null}}return{mainModule:e.mvp.mainModule,mainWorker:e.mvp.mainWorker,pthreadWorker:null}}var iH=fV(pV());const aH=Symbol.for(`constructDateFrom`),oH={},sH={};function cH(e,t){try{let n=oH[e]||(oH[e]=new Intl.DateTimeFormat(`en-GB`,{timeZone:e,hour:`numeric`,timeZoneName:`longOffset`}).format),r=n(t).split(`GMT`)[1]||``;return r in sH?sH[r]:uH(r,r.split(`:`))}catch{if(e in sH)return sH[e];let t=e?.match(lH);return t?uH(e,t.slice(1)):NaN}}const lH=/([+-]\d\d):?(\d\d)?/;function uH(e,t){let n=+t[0],r=+(t[1]||0);return sH[e]=n>0?n*60+r:n*60-r}var dH=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(cH(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),hH(this,NaN),pH(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){return-cH(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),pH(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};const fH=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!fH.test(e))return;let t=e.replace(fH,`$1UTC`);dH.prototype[t]&&(e.startsWith(`get`)?dH.prototype[e]=function(){return this.internal[t]()}:(dH.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),mH(this),+this},dH.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),pH(this),+this}))});function pH(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function mH(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),hH(e)}function hH(e){let t=cH(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);let r=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),a=r-i,o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);let s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);let c=cH(e.timeZone,e),l=-new Date(+e).getTimezoneOffset(),u=l-c,d=c!==t,f=u-s;if(d&&f){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+f);let t=cH(e.timeZone,e),n=c-t;n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}var gH=class e extends dH{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${_H(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset(),t=e>0?`-`:`+`,n=String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),r=String(Math.abs(e)%60).padStart(2,`0`);return[t,n,r]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};function _H(e,t){return new Intl.DateTimeFormat(`en-GB`,{timeZone:e,timeZoneName:`long`}).format(t).slice(12)}const vH=new TextDecoder(`utf-8`),yH=e=>vH.decode(e),bH=new TextEncoder,xH=e=>bH.encode(e),SH=e=>typeof e==`function`,CH=e=>e!=null&&Object(e)===e,wH=e=>CH(e)&&SH(e.then),TH=e=>CH(e)&&SH(e[Symbol.iterator]),EH=e=>CH(e)&&SH(e[Symbol.asyncIterator]),DH=e=>CH(e)&&`done`in e&&`value`in e,OH=e=>CH(e)&&SH(e.clear)&&SH(e.bytes)&&SH(e.position)&&SH(e.setPosition)&&SH(e.capacity)&&SH(e.getBufferIdentifier)&&SH(e.createLong);var kH={};St(kH,{compareArrayLike:()=>mU,joinUint8Arrays:()=>NH,memcpy:()=>MH,rebaseValueOffsets:()=>pU,toArrayBufferView:()=>PH,toArrayBufferViewAsyncIterator:()=>rU,toArrayBufferViewIterator:()=>qH,toBigInt64Array:()=>RH,toBigUint64Array:()=>HH,toFloat32Array:()=>UH,toFloat32ArrayAsyncIterator:()=>uU,toFloat32ArrayIterator:()=>eU,toFloat64Array:()=>WH,toFloat64ArrayAsyncIterator:()=>dU,toFloat64ArrayIterator:()=>tU,toInt16Array:()=>IH,toInt16ArrayAsyncIterator:()=>aU,toInt16ArrayIterator:()=>YH,toInt32Array:()=>LH,toInt32ArrayAsyncIterator:()=>oU,toInt32ArrayIterator:()=>XH,toInt8Array:()=>FH,toInt8ArrayAsyncIterator:()=>iU,toInt8ArrayIterator:()=>JH,toUint16Array:()=>BH,toUint16ArrayAsyncIterator:()=>cU,toUint16ArrayIterator:()=>QH,toUint32Array:()=>VH,toUint32ArrayAsyncIterator:()=>lU,toUint32ArrayIterator:()=>$H,toUint8Array:()=>zH,toUint8ArrayAsyncIterator:()=>sU,toUint8ArrayIterator:()=>ZH,toUint8ClampedArray:()=>GH,toUint8ClampedArrayAsyncIterator:()=>fU,toUint8ClampedArrayIterator:()=>nU});const AH=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function jH(e){let t=e[0]?[e[0]]:[],n,r,i,a;for(let o,s,c=0,l=0,u=e.length;++ce+t.byteLength,0),i,a,o,s=0,c=-1,l=Math.min(t||1/0,r);for(let e=n.length;++cPH(Int8Array,e),IH=e=>PH(Int16Array,e),LH=e=>PH(Int32Array,e),RH=e=>PH(BigInt64Array,e),zH=e=>PH(Uint8Array,e),BH=e=>PH(Uint16Array,e),VH=e=>PH(Uint32Array,e),HH=e=>PH(BigUint64Array,e),UH=e=>PH(Float32Array,e),WH=e=>PH(Float64Array,e),GH=e=>PH(Uint8ClampedArray,e),KH=e=>(e.next(),e);function*qH(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof AH?n(t):TH(t)?t:n(t);return yield*KH(function*(t){let n=null;do n=t.next(yield PH(e,n));while(!n.done)}(r[Symbol.iterator]())),new e}const JH=e=>qH(Int8Array,e),YH=e=>qH(Int16Array,e),XH=e=>qH(Int32Array,e),ZH=e=>qH(Uint8Array,e),QH=e=>qH(Uint16Array,e),$H=e=>qH(Uint32Array,e),eU=e=>qH(Float32Array,e),tU=e=>qH(Float64Array,e),nU=e=>qH(Uint8ClampedArray,e);function rU(e,t){return nM(this,arguments,function*(){if(wH(t))return yield tM(yield tM(yield*rM(iM(rU(e,yield tM(t))))));let n=function(e){return nM(this,arguments,function*(){yield yield tM(yield tM(e))})},r=function(e){return nM(this,arguments,function*(){yield tM(yield*rM(iM(KH(function*(e){let t=null;do t=e.next(yield t?.value);while(!t.done)}(e[Symbol.iterator]())))))})},i=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof AH?n(t):TH(t)?r(t):EH(t)?t:n(t);return yield tM(yield*rM(iM(KH(function(t){return nM(this,arguments,function*(){let n=null;do n=yield tM(t.next(yield yield tM(PH(e,n))));while(!n.done)})}(i[Symbol.asyncIterator]()))))),yield tM(new e)})}const iU=e=>rU(Int8Array,e),aU=e=>rU(Int16Array,e),oU=e=>rU(Int32Array,e),sU=e=>rU(Uint8Array,e),cU=e=>rU(Uint16Array,e),lU=e=>rU(Uint32Array,e),uU=e=>rU(Float32Array,e),dU=e=>rU(Float64Array,e),fU=e=>rU(Uint8ClampedArray,e);function pU(e,t,n){if(e!==0){n=n.slice(0,t);for(let t=-1,r=n.length;++t0)do if(e[n]!==t[n])return!1;while(++nCU});const SU=void 0;function CU(e){if(e===null)return`null`;if(e===SU)return`undefined`;switch(typeof e){case`number`:return`${e}`;case`bigint`:return`${e}`;case`string`:return`"${e}"`}return typeof e[Symbol.toPrimitive]==`function`?e[Symbol.toPrimitive](`string`):ArrayBuffer.isView(e)?e instanceof BigInt64Array||e instanceof BigUint64Array?`[${[...e].map(e=>CU(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function wU(e){if(typeof e==`bigint`&&(e<-(2**53-1)||e>2**53-1))throw TypeError(`${e} is not safe to convert to a number.`);return Number(e)}function TU(e,t){return wU(e/t)+wU(e%t)/wU(t)}var EU={};St(EU,{BN:()=>RU,bigNumToBigInt:()=>IU,bigNumToNumber:()=>PU,bigNumToString:()=>FU,isArrowBigNumSymbol:()=>DU});const DU=Symbol.for(`isArrowBigNum`);function OU(e,...t){return t.length===0?Object.setPrototypeOf(PH(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}OU.prototype[DU]=!0,OU.prototype.toJSON=function(){return`"${FU(this)}"`},OU.prototype.valueOf=function(e){return PU(this,e)},OU.prototype.toString=function(){return FU(this)},OU.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return PU(this);case`string`:return FU(this);case`default`:return IU(this)}return FU(this)};function kU(...e){return OU.apply(this,e)}function AU(...e){return OU.apply(this,e)}function jU(...e){return OU.apply(this,e)}Object.setPrototypeOf(kU.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(AU.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(jU.prototype,Object.create(Uint32Array.prototype)),Object.assign(kU.prototype,OU.prototype,{constructor:kU,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(AU.prototype,OU.prototype,{constructor:AU,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(jU.prototype,OU.prototype,{constructor:jU,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const MU=BigInt(4294967296)*BigInt(4294967296),NU=MU-BigInt(1);function PU(e,t){let{buffer:n,byteOffset:r,byteLength:i,signed:a}=e,o=new BigUint64Array(n,r,i/8),s=a&&o.at(-1)&BigInt(1)<0){let e=BigInt(`1`.padEnd(t+1,`0`)),n=c/e,r=s?-(c%e):c%e,i=wU(n),a=`${r}`.padStart(t,`0`),o=s&&i===0?`-`:``;return+`${o}${i}.${a}`}return wU(c)}function FU(e){if(e.byteLength===8){let t=new e.BigIntArray(e.buffer,e.byteOffset,1);return`${t[0]}`}if(!e.signed)return LU(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=new Int16Array([t.at(-1)])[0];if(n>=0)return LU(e);t=t.slice();let r=1;for(let e=0;e(e.children=null,e.ArrayType=Array,e.OffsetArrayType=Int32Array,e[Symbol.toStringTag]=`DataType`))(sW.prototype);var cW=class extends sW{constructor(){super(X.Null)}toString(){return`Null`}};BU=Symbol.toStringTag,cW[BU]=(e=>e[Symbol.toStringTag]=`Null`)(cW.prototype);var lW=class extends sW{constructor(e,t){super(X.Int),this.isSigned=e,this.bitWidth=t}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 Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?`I`:`Ui`}nt${this.bitWidth}`}};VU=Symbol.toStringTag,lW[VU]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(lW.prototype);var uW=class extends lW{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},dW=class extends lW{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},fW=class extends lW{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},pW=class extends lW{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},mW=class extends lW{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},hW=class extends lW{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},gW=class extends lW{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},_W=class extends lW{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(uW.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(dW.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(fW.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(pW.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(mW.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(hW.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(gW.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(_W.prototype,`ArrayType`,{value:BigUint64Array});var vW=class extends sW{constructor(e){super(X.Float),this.precision=e}get ArrayType(){switch(this.precision){case gU.HALF:return Uint16Array;case gU.SINGLE:return Float32Array;case gU.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};HU=Symbol.toStringTag,vW[HU]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(vW.prototype);var yW=class extends vW{constructor(){super(gU.HALF)}},bW=class extends vW{constructor(){super(gU.SINGLE)}},xW=class extends vW{constructor(){super(gU.DOUBLE)}};Object.defineProperty(yW.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(bW.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(xW.prototype,`ArrayType`,{value:Float64Array});var SW=class extends sW{constructor(){super(X.Binary)}toString(){return`Binary`}};UU=Symbol.toStringTag,SW[UU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(SW.prototype);var CW=class extends sW{constructor(){super(X.LargeBinary)}toString(){return`LargeBinary`}};WU=Symbol.toStringTag,CW[WU]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(CW.prototype);var wW=class extends sW{constructor(){super(X.Utf8)}toString(){return`Utf8`}};GU=Symbol.toStringTag,wW[GU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(wW.prototype);var TW=class extends sW{constructor(){super(X.LargeUtf8)}toString(){return`LargeUtf8`}};KU=Symbol.toStringTag,TW[KU]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(TW.prototype);var EW=class extends sW{constructor(){super(X.Bool)}toString(){return`Bool`}};qU=Symbol.toStringTag,EW[qU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(EW.prototype);var DW=class extends sW{constructor(e,t,n=128){super(X.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};JU=Symbol.toStringTag,DW[JU]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(DW.prototype);var OW=class extends sW{constructor(e){super(X.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${_U[this.unit]}>`}get ArrayType(){return this.unit===_U.DAY?Int32Array:BigInt64Array}};YU=Symbol.toStringTag,OW[YU]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(OW.prototype);var kW=class extends sW{constructor(e,t){super(X.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${vU[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};XU=Symbol.toStringTag,kW[XU]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(kW.prototype);var AW=class extends sW{constructor(e,t){super(X.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${vU[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};ZU=Symbol.toStringTag,AW[ZU]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(AW.prototype);var jW=class extends sW{constructor(e){super(X.Interval),this.unit=e}toString(){return`Interval<${yU[this.unit]}>`}};QU=Symbol.toStringTag,jW[QU]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(jW.prototype);var MW=class extends sW{constructor(e){super(X.Duration),this.unit=e}toString(){return`Duration<${vU[this.unit]}>`}};$U=Symbol.toStringTag,MW[$U]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(MW.prototype);var NW=class extends sW{constructor(e){super(X.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};eW=Symbol.toStringTag,NW[eW]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(NW.prototype);var PW=class extends sW{constructor(e){super(X.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};tW=Symbol.toStringTag,PW[tW]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(PW.prototype);var FW=class extends sW{constructor(e,t,n){super(X.Union),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((e,t,n)=>(e[t]=n)&&e||e,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(` | `)}>`}};nW=Symbol.toStringTag,FW[nW]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(FW.prototype);var IW=class extends sW{constructor(e){super(X.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};rW=Symbol.toStringTag,IW[rW]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(IW.prototype);var LW=class extends sW{constructor(e,t){super(X.FixedSizeList),this.listSize=e,this.children=[t]}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}>`}};iW=Symbol.toStringTag,LW[iW]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(LW.prototype);var RW=class extends sW{constructor(e,t=!1){var n,r,i;if(super(X.Map),this.children=[e],this.keysSorted=t,e&&(e.name=`entries`,(n=e?.type)?.children)){let t=(r=e?.type)?.children[0];t&&(t.name=`key`);let n=(i=e?.type)?.children[1];n&&(n.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(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};aW=Symbol.toStringTag,RW[aW]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(RW.prototype);const zW=(e=>()=>++e)(-1);var BW=class extends sW{constructor(e,t,n,r){super(X.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?zW():wU(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};oW=Symbol.toStringTag,BW[oW]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(BW.prototype);function VW(e){let t=e;switch(e.typeId){case X.Decimal:return e.bitWidth/32;case X.Interval:return t.unit===yU.MONTH_DAY_NANO?4:1+t.unit;case X.FixedSizeList:return t.listSize;case X.FixedSizeBinary:return t.byteWidth;default:return 1}}var HW=class{visitMany(e,...t){return e.map((e,n)=>this.visit(e,...t.map(e=>e[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return UW(this,e,t)}getVisitFnByTypeId(e,t=!0){return WW(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};function UW(e,t,n=!0){return typeof t==`number`?WW(e,t,n):typeof t==`string`&&t in X?WW(e,X[t],n):t&&t instanceof sW?WW(e,GW(t),n):t?.type&&t.type instanceof sW?WW(e,GW(t.type),n):WW(e,X.NONE,n)}function WW(e,t,n=!0){let r=null;switch(t){case X.Null:r=e.visitNull;break;case X.Bool:r=e.visitBool;break;case X.Int:r=e.visitInt;break;case X.Int8:r=e.visitInt8||e.visitInt;break;case X.Int16:r=e.visitInt16||e.visitInt;break;case X.Int32:r=e.visitInt32||e.visitInt;break;case X.Int64:r=e.visitInt64||e.visitInt;break;case X.Uint8:r=e.visitUint8||e.visitInt;break;case X.Uint16:r=e.visitUint16||e.visitInt;break;case X.Uint32:r=e.visitUint32||e.visitInt;break;case X.Uint64:r=e.visitUint64||e.visitInt;break;case X.Float:r=e.visitFloat;break;case X.Float16:r=e.visitFloat16||e.visitFloat;break;case X.Float32:r=e.visitFloat32||e.visitFloat;break;case X.Float64:r=e.visitFloat64||e.visitFloat;break;case X.Utf8:r=e.visitUtf8;break;case X.LargeUtf8:r=e.visitLargeUtf8;break;case X.Binary:r=e.visitBinary;break;case X.LargeBinary:r=e.visitLargeBinary;break;case X.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case X.Date:r=e.visitDate;break;case X.DateDay:r=e.visitDateDay||e.visitDate;break;case X.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case X.Timestamp:r=e.visitTimestamp;break;case X.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case X.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case X.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case X.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case X.Time:r=e.visitTime;break;case X.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case X.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case X.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case X.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case X.Decimal:r=e.visitDecimal;break;case X.List:r=e.visitList;break;case X.Struct:r=e.visitStruct;break;case X.Union:r=e.visitUnion;break;case X.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case X.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case X.Dictionary:r=e.visitDictionary;break;case X.Interval:r=e.visitInterval;break;case X.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case X.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case X.IntervalMonthDayNano:r=e.visitIntervalMonthDayNano||e.visitInterval;break;case X.Duration:r=e.visitDuration;break;case X.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case X.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case X.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case X.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case X.FixedSizeList:r=e.visitFixedSizeList;break;case X.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${X[t]}'`)}function GW(e){switch(e.typeId){case X.Null:return X.Null;case X.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?X.Int8:X.Uint8;case 16:return n?X.Int16:X.Uint16;case 32:return n?X.Int32:X.Uint32;case 64:return n?X.Int64:X.Uint64}return X.Int}case X.Float:switch(e.precision){case gU.HALF:return X.Float16;case gU.SINGLE:return X.Float32;case gU.DOUBLE:return X.Float64}return X.Float;case X.Binary:return X.Binary;case X.LargeBinary:return X.LargeBinary;case X.Utf8:return X.Utf8;case X.LargeUtf8:return X.LargeUtf8;case X.Bool:return X.Bool;case X.Decimal:return X.Decimal;case X.Time:switch(e.unit){case vU.SECOND:return X.TimeSecond;case vU.MILLISECOND:return X.TimeMillisecond;case vU.MICROSECOND:return X.TimeMicrosecond;case vU.NANOSECOND:return X.TimeNanosecond}return X.Time;case X.Timestamp:switch(e.unit){case vU.SECOND:return X.TimestampSecond;case vU.MILLISECOND:return X.TimestampMillisecond;case vU.MICROSECOND:return X.TimestampMicrosecond;case vU.NANOSECOND:return X.TimestampNanosecond}return X.Timestamp;case X.Date:switch(e.unit){case _U.DAY:return X.DateDay;case _U.MILLISECOND:return X.DateMillisecond}return X.Date;case X.Interval:switch(e.unit){case yU.DAY_TIME:return X.IntervalDayTime;case yU.YEAR_MONTH:return X.IntervalYearMonth;case yU.MONTH_DAY_NANO:return X.IntervalMonthDayNano}return X.Interval;case X.Duration:switch(e.unit){case vU.SECOND:return X.DurationSecond;case vU.MILLISECOND:return X.DurationMillisecond;case vU.MICROSECOND:return X.DurationMicrosecond;case vU.NANOSECOND:return X.DurationNanosecond}return X.Duration;case X.Map:return X.Map;case X.List:return X.List;case X.Struct:return X.Struct;case X.Union:switch(e.mode){case hU.Dense:return X.DenseUnion;case hU.Sparse:return X.SparseUnion}return X.Union;case X.FixedSizeBinary:return X.FixedSizeBinary;case X.FixedSizeList:return X.FixedSizeList;case X.Dictionary:return X.Dictionary}throw Error(`Unrecognized type '${X[e.typeId]}'`)}HW.prototype.visitInt8=null,HW.prototype.visitInt16=null,HW.prototype.visitInt32=null,HW.prototype.visitInt64=null,HW.prototype.visitUint8=null,HW.prototype.visitUint16=null,HW.prototype.visitUint32=null,HW.prototype.visitUint64=null,HW.prototype.visitFloat16=null,HW.prototype.visitFloat32=null,HW.prototype.visitFloat64=null,HW.prototype.visitDateDay=null,HW.prototype.visitDateMillisecond=null,HW.prototype.visitTimestampSecond=null,HW.prototype.visitTimestampMillisecond=null,HW.prototype.visitTimestampMicrosecond=null,HW.prototype.visitTimestampNanosecond=null,HW.prototype.visitTimeSecond=null,HW.prototype.visitTimeMillisecond=null,HW.prototype.visitTimeMicrosecond=null,HW.prototype.visitTimeNanosecond=null,HW.prototype.visitDenseUnion=null,HW.prototype.visitSparseUnion=null,HW.prototype.visitIntervalDayTime=null,HW.prototype.visitIntervalYearMonth=null,HW.prototype.visitIntervalMonthDayNano=null,HW.prototype.visitDuration=null,HW.prototype.visitDurationSecond=null,HW.prototype.visitDurationMillisecond=null,HW.prototype.visitDurationMicrosecond=null,HW.prototype.visitDurationNanosecond=null;var KW={};St(KW,{float64ToUint16:()=>XW,uint16ToFloat64:()=>YW});const qW=new Float64Array(1),JW=new Uint32Array(qW.buffer);function YW(e){let t=(e&31744)>>10,n=(e&1023)/1024,r=(-1)**((e&32768)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*2**(t-15)*(1+n)}function XW(e){if(e!==e)return 32256;qW[0]=e;let t=(JW[1]&2147483648)>>16&65535,n=JW[1]&2146435072,r=0;return n>=1089470464?JW[0]>0?n=31744:(n=(n&2080374784)>>16,r=(JW[1]&1048575)>>10):n<=1056964608?(r=1048576+(JW[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(JW[1]&1048575)+512>>10),t|n|r&65535}var ZW=class extends HW{};function QW(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const $W=(e,t,n)=>{e[t]=Math.floor(n/864e5)},eG=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},rG=({values:e},t,n)=>{e[t]=n},iG=({values:e},t,n)=>{e[t]=XW(n)},aG=(e,t,n)=>{switch(e.type.precision){case gU.HALF:return iG(e,t,n);case gU.SINGLE:case gU.DOUBLE:return rG(e,t,n)}},oG=({values:e},t,n)=>{$W(e,t,n.valueOf())},sG=({values:e},t,n)=>{e[t]=BigInt(n)},cG=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},lG=({values:e,valueOffsets:t},n,r)=>eG(e,t,n,r),uG=({values:e,valueOffsets:t},n,r)=>eG(e,t,n,xH(r)),dG=(e,t,n)=>{e.type.unit===_U.DAY?oG(e,t,n):sG(e,t,n)},fG=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},pG=({values:e},t,n)=>{e[t]=BigInt(n)},mG=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},hG=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},gG=(e,t,n)=>{switch(e.type.unit){case vU.SECOND:return fG(e,t,n);case vU.MILLISECOND:return pG(e,t,n);case vU.MICROSECOND:return mG(e,t,n);case vU.NANOSECOND:return hG(e,t,n)}},_G=({values:e},t,n)=>{e[t]=n},vG=({values:e},t,n)=>{e[t]=n},yG=({values:e},t,n)=>{e[t]=n},bG=({values:e},t,n)=>{e[t]=n},xG=(e,t,n)=>{switch(e.type.unit){case vU.SECOND:return _G(e,t,n);case vU.MILLISECOND:return vG(e,t,n);case vU.MICROSECOND:return yG(e,t,n);case vU.NANOSECOND:return bG(e,t,n)}},SG=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},CG=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=WG.getVisitFn(r);if(Array.isArray(n))for(let e=-1,o=i[t],s=i[t+1];o{let r=e.children[0],{valueOffsets:i}=e,a=WG.getVisitFn(r),{[t]:o,[t+1]:s}=i,c=n instanceof Map?n.entries():Object.entries(n);for(let e of c)if(a(r,o,e),++o>=s)break},TG=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),EG=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),DG=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),OG=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),kG=(e,t,n)=>{let r=e.type.children.map(e=>WG.getVisitFn(e.type)),i=n instanceof Map?DG(t,n):n instanceof qq?EG(t,n):Array.isArray(n)?TG(t,n):OG(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},AG=(e,t,n)=>{e.type.mode===hU.Dense?jG(e,t,n):MG(e,t,n)},jG=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];WG.visit(i,e.valueOffsets[t],n)},MG=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];WG.visit(i,t,n)},NG=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},PG=(e,t,n)=>{switch(e.type.unit){case yU.YEAR_MONTH:return IG(e,t,n);case yU.DAY_TIME:return FG(e,t,n);case yU.MONTH_DAY_NANO:return LG(e,t,n)}},FG=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},IG=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},LG=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},RG=({values:e},t,n)=>{e[t]=n},zG=({values:e},t,n)=>{e[t]=n},BG=({values:e},t,n)=>{e[t]=n},VG=({values:e},t,n)=>{e[t]=n},HG=(e,t,n)=>{switch(e.type.unit){case vU.SECOND:return RG(e,t,n);case vU.MILLISECOND:return zG(e,t,n);case vU.MICROSECOND:return BG(e,t,n);case vU.NANOSECOND:return VG(e,t,n)}},UG=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=WG.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${CU(e)}: ${CU(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new JG(this[GG],this[KG])}},JG=class{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return ee.name)}has(e,t){return e[GG].type.children.some(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(e[GG].type.children.some(e=>e.name===t))return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[GG].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=HK.visit(e[GG].children[n],e[KG]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[GG].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(WG.visit(e[GG].children[r],e[KG],n),Reflect.set(e,t,n))}};const XG=new YG;var ZG=class extends HW{};function QG(e){return(t,n)=>t.getValid(n)?e(t,n):null}const $G=(e,t)=>864e5*e[t],eK=(e,t)=>null,tK=(e,t,n)=>{if(n+1>=t.length)return null;let r=wU(t[n]),i=wU(t[n+1]);return e.subarray(r,i)},nK=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<$G(e,t),iK=({values:e},t)=>wU(e[t]),aK=({stride:e,values:t},n)=>t[e*n],oK=({stride:e,values:t},n)=>YW(t[e*n]),sK=({values:e},t)=>e[t],cK=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),lK=({values:e,valueOffsets:t},n)=>tK(e,t,n),uK=({values:e,valueOffsets:t},n)=>{let r=tK(e,t,n);return r===null?null:yH(r)},dK=({values:e},t)=>e[t],fK=({type:e,values:t},n)=>e.precision===gU.HALF?YW(t[n]):t[n],pK=(e,t)=>e.type.unit===_U.DAY?rK(e,t):iK(e,t),mK=({values:e},t)=>1e3*wU(e[t]),hK=({values:e},t)=>wU(e[t]),gK=({values:e},t)=>TU(e[t],BigInt(1e3)),_K=({values:e},t)=>TU(e[t],BigInt(1e6)),vK=(e,t)=>{switch(e.type.unit){case vU.SECOND:return mK(e,t);case vU.MILLISECOND:return hK(e,t);case vU.MICROSECOND:return gK(e,t);case vU.NANOSECOND:return _K(e,t)}},yK=({values:e},t)=>e[t],bK=({values:e},t)=>e[t],xK=({values:e},t)=>e[t],SK=({values:e},t)=>e[t],CK=(e,t)=>{switch(e.type.unit){case vU.SECOND:return yK(e,t);case vU.MILLISECOND:return bK(e,t);case vU.MICROSECOND:return xK(e,t);case vU.NANOSECOND:return SK(e,t)}},wK=({values:e,stride:t},n)=>RU.decimal(e.subarray(t*n,t*(n+1))),TK=(e,t)=>{let{valueOffsets:n,stride:r,children:i}=e,{[t*r]:a,[t*r+1]:o}=n,s=i[0],c=s.slice(a,o-a);return new qq([c])},EK=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new qK(o.slice(i,a-i))},DK=(e,t)=>new qG(e,t),OK=(e,t)=>e.type.mode===hU.Dense?kK(e,t):AK(e,t),kK=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return HK.visit(r,e.valueOffsets[t])},AK=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return HK.visit(r,t)},jK=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},MK=(e,t)=>e.type.unit===yU.MONTH_DAY_NANO?FK(e,t):e.type.unit===yU.DAY_TIME?NK(e,t):PK(e,t),NK=({values:e},t)=>e.subarray(2*t,2*(t+1)),PK=({values:e},t)=>{let n=e[t],r=new Int32Array(2);return r[0]=Math.trunc(n/12),r[1]=Math.trunc(n%12),r},FK=({values:e},t)=>e.subarray(4*t,4*(t+1)),IK=({values:e},t)=>e[t],LK=({values:e},t)=>e[t],RK=({values:e},t)=>e[t],zK=({values:e},t)=>e[t],BK=(e,t)=>{switch(e.type.unit){case vU.SECOND:return IK(e,t);case vU.MILLISECOND:return LK(e,t);case vU.MICROSECOND:return RK(e,t);case vU.NANOSECOND:return zK(e,t)}},VK=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new qq([a])};ZG.prototype.visitNull=QG(eK),ZG.prototype.visitBool=QG(nK),ZG.prototype.visitInt=QG(dK),ZG.prototype.visitInt8=QG(aK),ZG.prototype.visitInt16=QG(aK),ZG.prototype.visitInt32=QG(aK),ZG.prototype.visitInt64=QG(sK),ZG.prototype.visitUint8=QG(aK),ZG.prototype.visitUint16=QG(aK),ZG.prototype.visitUint32=QG(aK),ZG.prototype.visitUint64=QG(sK),ZG.prototype.visitFloat=QG(fK),ZG.prototype.visitFloat16=QG(oK),ZG.prototype.visitFloat32=QG(aK),ZG.prototype.visitFloat64=QG(aK),ZG.prototype.visitUtf8=QG(uK),ZG.prototype.visitLargeUtf8=QG(uK),ZG.prototype.visitBinary=QG(lK),ZG.prototype.visitLargeBinary=QG(lK),ZG.prototype.visitFixedSizeBinary=QG(cK),ZG.prototype.visitDate=QG(pK),ZG.prototype.visitDateDay=QG(rK),ZG.prototype.visitDateMillisecond=QG(iK),ZG.prototype.visitTimestamp=QG(vK),ZG.prototype.visitTimestampSecond=QG(mK),ZG.prototype.visitTimestampMillisecond=QG(hK),ZG.prototype.visitTimestampMicrosecond=QG(gK),ZG.prototype.visitTimestampNanosecond=QG(_K),ZG.prototype.visitTime=QG(CK),ZG.prototype.visitTimeSecond=QG(yK),ZG.prototype.visitTimeMillisecond=QG(bK),ZG.prototype.visitTimeMicrosecond=QG(xK),ZG.prototype.visitTimeNanosecond=QG(SK),ZG.prototype.visitDecimal=QG(wK),ZG.prototype.visitList=QG(TK),ZG.prototype.visitStruct=QG(DK),ZG.prototype.visitUnion=QG(OK),ZG.prototype.visitDenseUnion=QG(kK),ZG.prototype.visitSparseUnion=QG(AK),ZG.prototype.visitDictionary=QG(jK),ZG.prototype.visitInterval=QG(MK),ZG.prototype.visitIntervalDayTime=QG(NK),ZG.prototype.visitIntervalYearMonth=QG(PK),ZG.prototype.visitIntervalMonthDayNano=QG(FK),ZG.prototype.visitDuration=QG(BK),ZG.prototype.visitDurationSecond=QG(IK),ZG.prototype.visitDurationMillisecond=QG(LK),ZG.prototype.visitDurationMicrosecond=QG(RK),ZG.prototype.visitDurationNanosecond=QG(zK),ZG.prototype.visitFixedSizeList=QG(VK),ZG.prototype.visitMap=QG(EK);const HK=new ZG,UK=Symbol.for(`keys`),WK=Symbol.for(`vals`),GK=Symbol.for(`kKeysAsStrings`),KK=Symbol.for(`_kKeysAsStrings`);var qK=class{constructor(e){return this[UK]=new qq([e.children[0]]).memoize(),this[WK]=e.children[1],new Proxy(this,new YK)}get[GK](){return this[KK]||(this[KK]=Array.from(this[UK].toArray(),String))}[Symbol.iterator](){return new JK(this[UK],this[WK])}get size(){return this[UK].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[UK],t=this[WK],n={};for(let r=-1,i=e.length;++r`${CU(e)}: ${CU(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},JK=class{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),HK.visit(this.vals,e)]})}},YK=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[GK]}has(e,t){return e[GK].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[GK].indexOf(t);if(n!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[GK].indexOf(t);if(n!==-1){let r=HK.visit(Reflect.get(e,WK),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[GK].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(WG.visit(Reflect.get(e,WK),r,n),Reflect.set(e,t,n))}};Object.defineProperties(qK.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[UK]:{writable:!0,enumerable:!1,configurable:!1,value:null},[WK]:{writable:!0,enumerable:!1,configurable:!1,value:null},[KK]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var XK={};St(XK,{clampRange:()=>QK,createElementComparator:()=>tq,wrapIndex:()=>$K});let ZK;function QK(e,t,n,r){let{length:i=0}=e,a=typeof t==`number`?t:0,o=typeof n==`number`?n:i;return a<0&&(a=(a%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),r?r(e,a,o):[a,o]}const $K=(e,t)=>e<0?t+e:e,eq=e=>e!==e;function tq(e){let t=typeof e;if(t!==`object`||e===null)return eq(e)?eq:t=>t===e;if(e instanceof Date){let t=e.valueOf();return e=>e instanceof Date?e.valueOf()===t:!1}return ArrayBuffer.isView(e)?t=>t?mU(e,t):!1:e instanceof Map?rq(e):Array.isArray(e)?nq(e):e instanceof qq?iq(e):aq(e,!0)}function nq(e){let t=[];for(let n=-1,r=e.length;++n!1;let r=[];for(let t=-1,i=n.length;++t{if(!n||typeof n!=`object`)return!1;switch(n.constructor){case Array:return sq(e,n);case Map:return lq(e,n,n.keys());case qK:case qG:case Object:case void 0:return lq(e,n,t||Object.keys(n))}return n instanceof qq?cq(e,n):!1}}function sq(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++rgq,getBit:()=>fq,getBool:()=>dq,packBools:()=>hq,popcnt_array:()=>vq,popcnt_bit_range:()=>_q,popcnt_uint32:()=>yq,setBool:()=>pq,truncateBitmap:()=>mq});function dq(e,t,n,r){return(n&1<>r}function pq(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):hq(new gq(n,e,t,null,dq)).subarray(0,r)),i}return n}function hq(e){let t=[],n=0,r=0,i=0;for(let a of e)a&&(i|=1<0)&&(t[n++]=i);let a=new Uint8Array(t.length+7&-8);return a.set(t),a}var gq=class{constructor(e,t,n,r,i){this.bytes=e,this.length=n,this.context=r,this.get=i,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8==0?0:8-t%8);return _q(e,t,i)+_q(e,r,n)+vq(e,i>>3,r-i>>3)}function vq(e,t,n){let r=0,i=Math.trunc(t),a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=n===void 0?e.byteLength:i+n;for(;o-i>=4;)r+=yq(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=yq(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=yq(a.getUint8(i)),i+=1;return r}function yq(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const bq=-1;var xq=class e{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){let{type:e}=this;return sW.isSparseUnion(e)||sW.isDenseUnion(e)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{valueOffsets:t,values:n,nullBitmap:r,typeIds:i}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.children.reduce((e,t)=>e+t.byteLength,e)}get nullCount(){if(sW.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=bq&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-_q(t,this.offset,this.offset+this.length)),e}constructor(t,n,r,i,a,o=[],s){this.type=t,this.children=o,this.dictionary=s,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let c;a instanceof e?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=VW(t),a&&((c=a[0])&&(this.valueOffsets=c),(c=a[1])&&(this.values=c),(c=a[2])&&(this.nullBitmap=c),(c=a[3])&&(this.typeIds=c)))}getValid(e){let{type:t}=this;if(sW.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===hU.Dense?this.valueOffsets[e]:e;return r.getValid(i)}if(this.nullable&&this.nullCount>0){let t=this.offset+e,n=this.nullBitmap[t>>3];return(n&1<>3;(!r||r.byteLength<=c)&&(r=new Uint8Array((i+a+63&-64)>>3).fill(255),this.nullCount>0?(r.set(mq(i,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:r})):Object.assign(this,{nullBitmap:r,_nullCount:0}));let l=r[c];n=(l&s)!==0,r[c]=t?l|s:l&~s}return n!==!!t&&(this._nullCount=this.nullCount+(t?-1:1)),t}clone(t=this.type,n=this.offset,r=this.length,i=this._nullCount,a=this,o=this.children){return new e(t,n,r,i,a,o,this.dictionary)}slice(e,t){let{stride:n,typeId:r,children:i}=this,a=(this._nullCount===0)-1,o=r===16?n:1,s=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,a,s,i.length===0||this.valueOffsets?i:this._sliceChildren(i,o*e,o*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===X.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:n}=this,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<0&&r.set(mq(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[bU.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}_sliceBuffers(e,t,n,r){let i,{buffers:a}=this;return(i=a[bU.TYPE])&&(a[bU.TYPE]=i.subarray(e,e+t)),(i=a[bU.OFFSET])&&(a[bU.OFFSET]=i.subarray(e,e+t+1))||(i=a[bU.DATA])&&(a[bU.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};xq.prototype.children=Object.freeze([]);var Sq=class e extends HW{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new xq(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=zH(e.data),i=zH(e.nullBitmap),a=LH(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xq(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=zH(e.data),i=zH(e.nullBitmap),a=RH(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xq(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=zH(e.data),i=zH(e.nullBitmap),a=LH(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xq(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=zH(e.data),i=zH(e.nullBitmap),a=RH(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xq(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=zH(e.nullBitmap),a=LH(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xq(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=zH(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=PH(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(sW.isSparseUnion(t))return new xq(t,n,a,o,[void 0,void 0,void 0,i],r);let s=LH(e.valueOffsets);return new xq(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=zH(t.nullBitmap),a=PH(n.indices.ArrayType,t.data),{dictionary:o=new qq([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new xq(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length/VW(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=zH(e.nullBitmap),i=PH(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xq(t,n,a,o,[void 0,i,r])}visitFixedSizeList(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.valueType})}=t,a=zH(t.nullBitmap),{length:o=i.length/VW(n),nullCount:s=t.nullBitmap?-1:0}=t;return new xq(n,r,o,s,[void 0,void 0,a],[i])}visitMap(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.childType})}=t,a=zH(t.nullBitmap),o=LH(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new xq(n,r,s,c,[o,void 0,a],[i])}};const Cq=new Sq;var wq=class{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndexe.nullable)}function Eq(e){return e.reduce((e,t)=>e+t.nullCount,0)}function Dq(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function Oq(e,t,n,r){let i=[];for(let a=-1,o=e.length;++a=r)break;if(n>=s+c)continue;if(s>=n&&s+c<=r){i.push(o);continue}let l=Math.max(0,n-s),u=Math.min(r-s,c);i.push(o.slice(l,u-l))}return i.length===0&&i.push(e[0].slice(0,0)),i}function kq(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function Iq(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new gq(n,e.offset+(t||0),e.length,n,dq)){if(!i)return r;++r}return-1}function Lq(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case X.Union:break;case X.Dictionary:break;default:return Iq(e,n)}let r=HK.getVisitFn(e),i=tq(t);for(let t=(n||0)-1,a=e.length;++t{let n=e.data[t];return n.values.subarray(0,n.length)[Symbol.iterator]()});let n=0;return new wq(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new Hq(a)})}var Hq=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof xq)))throw TypeError(`Vector constructor expects an Array of Data instances.`);let o=(n=a[0])?.type;switch(a.length){case 0:this._offsets=[0];break;case 1:{let{get:e,set:t,indexOf:n}=Gq[o.typeId],r=a[0];this.isValid=e=>Aq(r,e),this.get=t=>e(r,t),this.set=(e,n)=>t(r,e,n),this.indexOf=e=>n(r,e),this._offsets=[0,r.length];break}default:Object.setPrototypeOf(this,Kq[o.typeId]),this._offsets=Dq(a);break}this.data=a,this.type=o,this.stride=VW(o),this.numChildren=(i=(r=o.children)?.length)??0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,t)=>e+t.byteLength,0)}get nullable(){return Tq(this.data)}get nullCount(){return Eq(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${X[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get($K(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return Uq.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(QK(this,t,n,({data:e,_offsets:t},n,r)=>Oq(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case X.Int:case X.Float:case X.Decimal:case X.Time:case X.Timestamp:switch(t.length){case 0:return new i;case 1:return t[0].values.subarray(0,n*r);default:return t.reduce((e,{values:t,length:n})=>(e.array.set(t.subarray(0,n*r),e.offset),e.offset+=n*r,e),{array:new i(n*r),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(`,`)}]`}getChild(e){var t;return this.getChildAt((t=this.type.children)?.findIndex(t=>t.name===e))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return sW.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(sW.isDictionary(this.type)){let t=new Jq(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new Jq(this)}unmemoize(){if(sW.isDictionary(this.type)&&this.isMemoized){let t=this.data[0].dictionary.unmemoize(),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return this}};Wq=Symbol.toStringTag,qq[Wq]=(e=>{e.type=sW.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;let t=Object.keys(X).map(e=>X[e]).filter(e=>typeof e==`number`&&e!==X.NONE);for(let n of t){let t=HK.getVisitFnByTypeId(n),r=WG.getVisitFnByTypeId(n),i=zq.getVisitFnByTypeId(n);Gq[n]={get:t,set:r,indexOf:i},Kq[n]=Object.create(e,{isValid:{value:jq(Aq)},get:{value:jq(HK.getVisitFnByTypeId(n))},set:{value:Mq(WG.getVisitFnByTypeId(n))},indexOf:{value:Nq(zq.getVisitFnByTypeId(n))}})}return`Vector`})(qq.prototype);var Jq=class e extends qq{constructor(t){super(t.data);let n=this.get,r=this.set,i=this.slice,a=Array(this.length);Object.defineProperty(this,`get`,{value(e){let t=a[e];if(t!==void 0)return t;let r=n.call(this,e);return a[e]=r,r}}),Object.defineProperty(this,`set`,{value(e,t){r.call(this,e,t),a[e]=t}}),Object.defineProperty(this,`slice`,{value:(t,n)=>new e(i.call(this,t,n))}),Object.defineProperty(this,`isMemoized`,{value:!0}),Object.defineProperty(this,`unmemoize`,{value:()=>new qq(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},Yq={};St(Yq,{BaseInt64:()=>eJ,Int128:()=>rJ,Int64:()=>nJ,Uint64:()=>tJ});const Xq=65536;function Zq(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const Qq=8,$q=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];var eJ=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),r=t[3]*n[3];this.buffer[0]=r&65535;let i=r>>>16;return r=t[2]*n[3],i+=r,r=t[3]*n[2]>>>0,i+=r,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]>>0&&++t[1],t[1]>>0&&++t[2],t[2]>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${Zq(this.buffer[3])} ${Zq(this.buffer[2])} ${Zq(this.buffer[1])} ${Zq(this.buffer[0])}`}static multiply(t,n){let r=new e(new Uint32Array(t.buffer));return r.times(n)}static add(t,n){let r=new e(new Uint32Array(t.buffer));return r.plus(n)}static from(t,n=new Uint32Array(4)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(4)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(4)){let r=t.startsWith(`-`),i=t.length,a=new e(n);for(let n=r?1:0;naJ,toIntervalDayTimeObjects:()=>sJ,toIntervalMonthDayNanoInt32Array:()=>oJ,toIntervalMonthDayNanoObjects:()=>cJ});function aJ(e){var t,n;let r=e.length,i=new Int32Array(r*2);for(let a=0,o=0;a>BigInt(32))):o+=2}return i}function sJ(e){let t=e.length,n=Array(t/2);for(let r=0,i=0;r>>0);r[a++]={months:e[i],days:e[i+1],nanoseconds:t?`${n}`:n}}return r}var lJ=class extends HW{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>this.compareFields(e,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};function uJ(e,t){return t instanceof e.constructor}function dJ(e,t){return e===t||uJ(e,t)}function fJ(e,t){return e===t||uJ(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function pJ(e,t){return e===t||uJ(e,t)&&e.precision===t.precision}function mJ(e,t){return e===t||uJ(e,t)&&e.byteWidth===t.byteWidth}function hJ(e,t){return e===t||uJ(e,t)&&e.unit===t.unit}function gJ(e,t){return e===t||uJ(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function _J(e,t){return e===t||uJ(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function vJ(e,t){return e===t||uJ(e,t)&&e.children.length===t.children.length&&EJ.compareManyFields(e.children,t.children)}function yJ(e,t){return e===t||uJ(e,t)&&e.children.length===t.children.length&&EJ.compareManyFields(e.children,t.children)}function bJ(e,t){return e===t||uJ(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&EJ.compareManyFields(e.children,t.children)}function xJ(e,t){return e===t||uJ(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&EJ.visit(e.indices,t.indices)&&EJ.visit(e.dictionary,t.dictionary)}function SJ(e,t){return e===t||uJ(e,t)&&e.unit===t.unit}function CJ(e,t){return e===t||uJ(e,t)&&e.unit===t.unit}function wJ(e,t){return e===t||uJ(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&EJ.compareManyFields(e.children,t.children)}function TJ(e,t){return e===t||uJ(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&EJ.compareManyFields(e.children,t.children)}lJ.prototype.visitNull=dJ,lJ.prototype.visitBool=dJ,lJ.prototype.visitInt=fJ,lJ.prototype.visitInt8=fJ,lJ.prototype.visitInt16=fJ,lJ.prototype.visitInt32=fJ,lJ.prototype.visitInt64=fJ,lJ.prototype.visitUint8=fJ,lJ.prototype.visitUint16=fJ,lJ.prototype.visitUint32=fJ,lJ.prototype.visitUint64=fJ,lJ.prototype.visitFloat=pJ,lJ.prototype.visitFloat16=pJ,lJ.prototype.visitFloat32=pJ,lJ.prototype.visitFloat64=pJ,lJ.prototype.visitUtf8=dJ,lJ.prototype.visitLargeUtf8=dJ,lJ.prototype.visitBinary=dJ,lJ.prototype.visitLargeBinary=dJ,lJ.prototype.visitFixedSizeBinary=mJ,lJ.prototype.visitDate=hJ,lJ.prototype.visitDateDay=hJ,lJ.prototype.visitDateMillisecond=hJ,lJ.prototype.visitTimestamp=gJ,lJ.prototype.visitTimestampSecond=gJ,lJ.prototype.visitTimestampMillisecond=gJ,lJ.prototype.visitTimestampMicrosecond=gJ,lJ.prototype.visitTimestampNanosecond=gJ,lJ.prototype.visitTime=_J,lJ.prototype.visitTimeSecond=_J,lJ.prototype.visitTimeMillisecond=_J,lJ.prototype.visitTimeMicrosecond=_J,lJ.prototype.visitTimeNanosecond=_J,lJ.prototype.visitDecimal=dJ,lJ.prototype.visitList=vJ,lJ.prototype.visitStruct=yJ,lJ.prototype.visitUnion=bJ,lJ.prototype.visitDenseUnion=bJ,lJ.prototype.visitSparseUnion=bJ,lJ.prototype.visitDictionary=xJ,lJ.prototype.visitInterval=SJ,lJ.prototype.visitIntervalDayTime=SJ,lJ.prototype.visitIntervalYearMonth=SJ,lJ.prototype.visitIntervalMonthDayNano=SJ,lJ.prototype.visitDuration=CJ,lJ.prototype.visitDurationSecond=CJ,lJ.prototype.visitDurationMillisecond=CJ,lJ.prototype.visitDurationMicrosecond=CJ,lJ.prototype.visitDurationNanosecond=CJ,lJ.prototype.visitFixedSizeList=wJ,lJ.prototype.visitMap=TJ;const EJ=new lJ;function DJ(e,t){return EJ.compareSchemas(e,t)}function OJ(e,t){return EJ.compareFields(e,t)}function kJ(e,t){return EJ.visit(e,t)}const AJ=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},EU),Yq),uq),KW),kH),XK),xU),iJ),{compareSchemas:DJ,compareFields:OJ,compareTypes:kJ}),jJ=365.2425,MJ=10**8*24*60*60*1e3,NJ=6048e5,PJ=864e5,FJ=3600,IJ=FJ*24,LJ=IJ*7,RJ=IJ*jJ,zJ=RJ/12,BJ=zJ*3,VJ=Symbol.for(`constructDateFrom`);function HJ(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&VJ in e?e[VJ](t):e instanceof Date?new e.constructor(t):new Date(t)}function UJ(e,t){return HJ(t||e,e)}let WJ={};function GJ(){return WJ}function KJ(e,t){var n,r;let i=GJ(),a=t?.weekStartsOn??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.weekStartsOn)??i.weekStartsOn??((r=i.locale)==null||(r=r.options)==null?void 0:r.weekStartsOn)??0,o=UJ(e,t?.in),s=o.getDay(),c=(s=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function YJ(e){let t=UJ(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function XJ(e,...t){let n=HJ.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function ZJ(e,t){let n=UJ(e,t?.in);return n.setHours(0,0,0,0),n}function QJ(e,t,n){let[r,i]=XJ(n?.in,e,t),a=ZJ(r),o=ZJ(i),s=+a-YJ(a),c=+o-YJ(o);return Math.round((s-c)/PJ)}function $J(e,t){let n=JJ(e,t),r=HJ(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),qJ(r)}function eY(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function tY(e){return!(!eY(e)&&typeof e!=`number`||isNaN(+UJ(e)))}function nY(e,t){let n=UJ(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const rY={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`}},iY=(e,t,n)=>{let r,i=rY[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function aY(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}const oY={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},sY={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},cY={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},lY={date:aY({formats:oY,defaultWidth:`full`}),time:aY({formats:sY,defaultWidth:`full`}),dateTime:aY({formats:cY,defaultWidth:`full`})},uY={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},dY=(e,t,n,r)=>uY[e];function fY(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const pY={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},mY={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},hY={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`]},gY={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`]},_Y={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`}},vY={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`}},yY=(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},bY={ordinalNumber:yY,era:fY({values:pY,defaultWidth:`wide`}),quarter:fY({values:mY,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:fY({values:hY,defaultWidth:`wide`}),day:fY({values:gY,defaultWidth:`wide`}),dayPeriod:fY({values:_Y,defaultWidth:`wide`,formattingValues:vY,defaultFormattingWidth:`wide`})};function xY(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?CY(s,e=>e.test(o)):SY(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function SY(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function CY(e,t){for(let n=0;n{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}const TY=/^(\d+)(th|st|nd|rd)?/i,EY=/\d+/i,DY={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},OY={any:[/^b/i,/^(a|c)/i]},kY={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},AY={any:[/1/i,/2/i,/3/i,/4/i]},jY={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},MY={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]},NY={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},PY={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]},FY={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},IY={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}},LY={ordinalNumber:wY({matchPattern:TY,parsePattern:EY,valueCallback:e=>parseInt(e,10)}),era:xY({matchPatterns:DY,defaultMatchWidth:`wide`,parsePatterns:OY,defaultParseWidth:`any`}),quarter:xY({matchPatterns:kY,defaultMatchWidth:`wide`,parsePatterns:AY,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:xY({matchPatterns:jY,defaultMatchWidth:`wide`,parsePatterns:MY,defaultParseWidth:`any`}),day:xY({matchPatterns:NY,defaultMatchWidth:`wide`,parsePatterns:PY,defaultParseWidth:`any`}),dayPeriod:xY({matchPatterns:FY,defaultMatchWidth:`any`,parsePatterns:IY,defaultParseWidth:`any`})},RY={code:`en-US`,formatDistance:iY,formatLong:lY,formatRelative:dY,localize:bY,match:LY,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zY(e,t){let n=UJ(e,t?.in),r=QJ(n,nY(n)),i=r+1;return i}function BY(e,t){let n=UJ(e,t?.in),r=qJ(n)-+$J(n);return Math.round(r/NJ)+1}function VY(e,t){var n,r;let i=UJ(e,t?.in),a=i.getFullYear(),o=GJ(),s=t?.firstWeekContainsDate??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.firstWeekContainsDate)??o.firstWeekContainsDate??((r=o.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??1,c=HJ(t?.in||e,0);c.setFullYear(a+1,0,s),c.setHours(0,0,0,0);let l=KJ(c,t),u=HJ(t?.in||e,0);u.setFullYear(a,0,s),u.setHours(0,0,0,0);let d=KJ(u,t);return+i>=+l?a+1:+i>=+d?a:a-1}function HY(e,t){var n,r;let i=GJ(),a=t?.firstWeekContainsDate??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.firstWeekContainsDate)??i.firstWeekContainsDate??((r=i.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??1,o=VY(e,t),s=HJ(t?.in||e,0);s.setFullYear(o,0,a),s.setHours(0,0,0,0);let c=KJ(s,t);return c}function UY(e,t){let n=UJ(e,t?.in),r=KJ(n,t)-+HY(n,t);return Math.round(r/NJ)+1}function WY(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString().padStart(t,`0`);return n+r}const GY={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return WY(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):WY(n+1,2)},d(e,t){return WY(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];case`aaaa`:default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return WY(e.getHours()%12||12,t.length)},H(e,t){return WY(e.getHours(),t.length)},m(e,t){return WY(e.getMinutes(),t.length)},s(e,t){return WY(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*10**(n-3));return WY(i,t.length)}},KY={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},qY={G:function(e,t,n){let r=e.getFullYear()>0?1:0;switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});case`GGGG`:default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return GY.y(e,t)},Y:function(e,t,n,r){let i=VY(e,r),a=i>0?i:1-i;if(t===`YY`){let e=a%100;return WY(e,2)}return t===`Yo`?n.ordinalNumber(a,{unit:`year`}):WY(a,t.length)},R:function(e,t){let n=JJ(e);return WY(n,t.length)},u:function(e,t){let n=e.getFullYear();return WY(n,t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return WY(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});case`QQQQ`:default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return WY(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});case`qqqq`:default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return GY.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});case`MMMM`:default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return WY(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});case`LLLL`:default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=UY(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):WY(i,t.length)},I:function(e,t,n){let r=BY(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):WY(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):GY.d(e,t)},D:function(e,t,n){let r=zY(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):WY(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});case`EEEE`:default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return WY(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});case`eeee`:default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return WY(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});case`cccc`:default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return WY(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});case`iiii`:default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours(),i=r/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`aaaa`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?KY.noon:r===0?KY.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`bbbb`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?KY.evening:r>=12?KY.afternoon:r>=4?KY.morning:KY.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`BBBB`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return GY.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):GY.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):WY(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):WY(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):GY.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):GY.s(e,t)},S:function(e,t){return GY.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return YY(r);case`XXXX`:case`XX`:return XY(r);case`XXXXX`:case`XXX`:default:return XY(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return YY(r);case`xxxx`:case`xx`:return XY(r);case`xxxxx`:case`xxx`:default:return XY(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+JY(r,`:`);case`OOOO`:default:return`GMT`+XY(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+JY(r,`:`);case`zzzz`:default:return`GMT`+XY(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return WY(r,t.length)},T:function(e,t,n){return WY(+e,t.length)}};function JY(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+WY(a,2)}function YY(e,t){if(e%60==0){let t=e>0?`-`:`+`;return t+WY(Math.abs(e)/60,2)}return XY(e,t)}function XY(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=WY(Math.trunc(r/60),2),a=WY(r%60,2);return n+i+t+a}const ZY=(e,t)=>{switch(e){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`})}},QY=(e,t)=>{switch(e){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`})}},$Y=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return ZY(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;case`PPPP`:default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,ZY(r,t)).replace(`{{time}}`,QY(i,t))},eX={p:QY,P:$Y},tX=/^D+$/,nX=/^Y+$/,rX=[`D`,`DD`,`YY`,`YYYY`];function iX(e){return tX.test(e)}function aX(e){return nX.test(e)}function oX(e,t,n){let r=sX(e,t,n);if(console.warn(r),rX.includes(e))throw RangeError(r)}function sX(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const cX=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lX=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,uX=/^'([^]*?)'?$/,dX=/''/g,fX=/[a-zA-Z]/;function pX(e,t,n){var r,i,a,o;let s=GJ(),c=n?.locale??s.locale??RY,l=n?.firstWeekContainsDate??(n==null||(r=n.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??s.firstWeekContainsDate??((i=s.locale)==null||(i=i.options)==null?void 0:i.firstWeekContainsDate)??1,u=n?.weekStartsOn??(n==null||(a=n.locale)==null||(a=a.options)==null?void 0:a.weekStartsOn)??s.weekStartsOn??((o=s.locale)==null||(o=o.options)==null?void 0:o.weekStartsOn)??0,d=UJ(e,n?.in);if(!tY(d))throw RangeError(`Invalid time value`);let f=t.match(lX).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=eX[t];return n(e,c.formatLong)}return e}).join(``).match(cX).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:mX(e)};if(qY[t])return{isToken:!0,value:e};if(t.match(fX))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});c.localize.preprocessor&&(f=c.localize.preprocessor(d,f));let p={firstWeekContainsDate:l,weekStartsOn:u,locale:c};return f.map(r=>{if(!r.isToken)return r.value;let i=r.value;(!n?.useAdditionalWeekYearTokens&&aX(i)||!n?.useAdditionalDayOfYearTokens&&iX(i))&&oX(i,t,String(e));let a=qY[i[0]];return a(d,i,c.localize,p)}).join(``)}function mX(e){let t=e.match(uX);return t?t[1].replace(dX,`'`):e}function hX(e,t){return UJ(e*1e3,t?.in)}function gX(e,t){let n=_X(t)?new t(0):HJ(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function _X(e){var t;return typeof e==`function`&&(t=e.prototype)?.constructor===e}function vX(e,t){if(t===void 0)return e.trimEnd();let n=e.length;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n>0&&e[n-1]===t;)n--;break;case`object`:for(;n>0&&t.includes(e[n-1]);)n--}return e.substring(0,n)}function yX(e){return e==null}function bX(e){return e!=null}async function xX(){if(typeof window<`u`&&window!==null)return`browser`;try{let e=await Dt(()=>import(`./__vite-browser-external-CFsuT-Qx.js`).then(Tt(1)),__vite__mapDeps([0,1,2]));return e!==void 0&&e.versions!=null&&e.versions.node!=null?`node`:`unknown`}catch{return`unknown`}}function SX(e){return yX(e)?!1:sW.isInt(e.type)&&!OX(e)||CX(e)}function CX(e){return yX(e)?!1:sW.isInt(e.type)&&e.type.isSigned===!1}function wX(e){return yX(e)?!1:sW.isFloat(e.type)??!1}function TX(e){return yX(e)?!1:sW.isDecimal(e.type)}function EX(e){return yX(e)?!1:sW.isBool(e.type)}function DX(e){return yX(e)?!1:sW.isDuration(e.type)}function OX(e){return yX(e)?!1:sW.isInt(e.type)&&e.metadata.get(`ARROW:extension:name`)===`period`}function kX(e){return yX(e)?!1:sW.isTimestamp(e.type)}function AX(e){return yX(e)?!1:sW.isDate(e.type)}function jX(e){return yX(e)?!1:sW.isTime(e.type)}function MX(e){return yX(e)?!1:sW.isList(e.type)||sW.isFixedSizeList(e.type)}function NX(e){return yX(e)?!1:sW.isStruct(e.type)||sW.isMap(e.type)}function PX(e){return yX(e)?!1:sW.isStruct(e.type)&&e.metadata.get(`ARROW:extension:name`)===`interval`||sW.isInterval(e.type)}const FX=new Date(1970,0,1);function IX(e,t){let n;if(t===vU.MILLISECOND)n=1e3;else if(t===vU.MICROSECOND)n=1e3*1e3;else if(t===vU.NANOSECOND)n=1e3*1e3*1e3;else return Number(e);return typeof e==`bigint`&&!Number.isSafeInteger(Number(e))?Number(e/BigInt(n)):Number(e)/n}function LX(e,t){var n;let r=IX(e,(t==null||(n=t.type)==null?void 0:n.unit)??vU.SECOND);return hX(r)}function RX(e,t){let n=LX(e,t);return pX(n,n.getMilliseconds()===0?`HH:mm:ss`:`HH:mm:ss.SSS`)}function zX(e){let t=`yyyy-MM-dd`;return e instanceof Date||typeof e==`number`&&Number.isFinite(e)?pX(e,t):(console.warn(`Unsupported date value: ${e}`),String(e))}function BX(e,t){var n;if(!(e instanceof Date||typeof e==`number`&&Number.isFinite(e)))return console.warn(`Unsupported datetime value: ${e}`),null;let r,i=t==null||(n=t.type)==null?void 0:n.timezone;return r=i?new dH(e,i):new dH(e),gX(r,Date)}function VX(e,t){var n;let r=(t==null||(n=t.type)==null?void 0:n.scale)||0,i=AJ.bigNumToString(new AJ.BN(e)).padStart(r,`0`);if(r===0)return i;let a=``;i.startsWith(`-`)&&(a=`-`,i=i.slice(1));let o=i.slice(0,-r)||`0`,s=vX(i.slice(-r),`0`)||``;return`${a}${o}${s?`.${s}`:``}`}const HX=new Intl.NumberFormat(`en-US`,{style:`decimal`,maximumFractionDigits:4,minimumFractionDigits:4,useGrouping:!0});function UX(e){let t=e[0],n=e[1],r=[];return t!==0&&r.push(`${t} year${t>1?`s`:``}`),n!==0&&r.push(`${n} month${n>1?`s`:``}`),r.length?r.join(` `):`0 months`}function WX(e,t){if(sW.isInterval(t?.type))return UX(e);let n=t&&t.metadata.get(`ARROW:extension:name`);if(n&&n===`pandas.interval`){var r,i;let n=JSON.parse(t.metadata.get(`ARROW:extension:metadata`)),{closed:a}=n,o=e.toJSON(),s=a===`both`||a===`left`?`[`:`(`,c=a===`both`||a===`right`?`]`:`)`,l=KX(o.left,(r=t.type)==null||(r=r.children)==null?void 0:r[0]),u=KX(o.right,(i=t.type)==null||(i=i.children)==null?void 0:i[1]);return`${s+l}, ${u+c}`}return String(e)}function GX(e,t){return t?.type instanceof PW?JSON.parse(JSON.stringify(e,(e,t)=>{if(bX(t))return typeof t==`bigint`?Number(t):t})):JSON.parse(JSON.stringify(e,(e,t)=>typeof t==`bigint`?Number(t):t))}function KX(e,t){if(yX(e))return null;let n=e instanceof Date||Number.isFinite(e);if(n&&AX(t))return zX(e);if(typeof e==`bigint`&&jX(t))return RX(Number(e),t);if(n&&kX(t))return BX(e,t);if(OX(t))throw Error(`Period type is not supported yet`);if(PX(t))return WX(e,t);if(DX(t))throw Error(`Duration type is not supported yet`);return TX(t)?VX(e,t):wX(t)&&Number.isFinite(e)||SX(t)?e:NX(t)||MX(t)?GX(e,t):EX(t)?!!e:String(e)}function qX(e){let t=(e.toArray()||[]).map(e=>e.toJSON())||[],n=t.map(t=>(e.schema.fields.forEach(e=>t[e.name]=KX(t[e.name],e)),t));return n}let JX=function(e){return e.ORIGIN_PRIVATE_FS=`origin-private-fs`,e.NODE_FS=`node-fs`,e}({});async function YX(e){let t=Pt(e,{logger:!1}),n,r,i=await xX();if(i===`browser`){if(t.bundles===void 0){let{getBundles:e}=await Dt(async()=>{let{getBundles:e}=await import(`./default-browser-vwqgKA0M.js`);return{getBundles:e}},[]);t.bundles=await e()}r=await rH(await t.bundles),n=new Worker(r.mainWorker)}else if(i===`node`){if(t.bundles===void 0){let{getBundles:e}=await Dt(async()=>{let{getBundles:e}=await import(`./default-node-DFUtCPbV.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]));t.bundles=await e()}r=await rH(await t.bundles);let e=r.mainWorker;e.startsWith(`/@fs/`)&&(e=e.replace(`/@fs/`,`file://`));let i=await Dt(()=>import(`./browser-CMSJHaBF.js`),[]);n=new i.default(e,{type:`module`})}else throw Error(`Unsupported environment: ${i}`);let a;a=t.logger===!0?new xV:t.logger===!1?new bV:t.logger;let o=new MV(a,n);if(await o.instantiate(r.mainModule,r.pthreadWorker),t.storage)switch(t.storage.type){case JX.ORIGIN_PRIVATE_FS:try{let e=t.storage.path;e.startsWith(`/`)&&(e=e.slice(1)),await o.open({path:`opfs://${e}`,accessMode:t.storage.accessMode})}catch(e){throw await o.terminate(),await n.terminate(),e}break;case JX.NODE_FS:try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(e){throw await o.terminate(),await n.terminate(),e}break}let s=await o.connect();async function c(e,t=[]){if(!t||t.length===0){let t=await s.query(e);return{_results:t,_schema:t.schema,columns:t.schema.fields,rows:qX(t)}}let n=await s.prepare(e),r=await n.query(...t);return n.close(),{_results:r,_schema:r.schema,columns:r.schema.fields,rows:qX(r)}}return{worker:n,db:o,conn:s,query:async(e,t=[])=>c(e,t).then(e=>e.rows),queryWithColumns:async(e,t=[])=>c(e,t),close:async()=>{await s.close(),await o.terminate(),await n.terminate()}}}async function XX(e,t){await(await e).conn.send(`BEGIN TRANSACTION`);try{let n=await t(e);return await(await e).conn.send(`COMMIT`),n}catch(t){throw await(await e).conn.send(`ROLLBACK`),t}}async function ZX(e,t,n){await(await e).conn.send(`SAVEPOINT ${t}`);try{let r=await n(e);return await(await e).conn.send(`RELEASE SAVEPOINT ${t}`),r}catch(n){throw await(await e).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),n}}const Z=Symbol.for(`drizzle:entityKind`),QX=Symbol.for(`drizzle:hasOwnEntityKind`);function Q(e,t){if(!e||typeof e!=`object`)return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,Z))throw 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 n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(Z in n&&n[Z]===t[Z])return!0;n=Object.getPrototypeOf(n)}return!1}var $X=(yr=class{constructor(t,n){e.defineProperty(this,`name`,void 0),e.defineProperty(this,`keyAsName`,void 0),e.defineProperty(this,`primary`,void 0),e.defineProperty(this,`notNull`,void 0),e.defineProperty(this,`default`,void 0),e.defineProperty(this,`defaultFn`,void 0),e.defineProperty(this,`onUpdateFn`,void 0),e.defineProperty(this,`hasDefault`,void 0),e.defineProperty(this,`isUnique`,void 0),e.defineProperty(this,`uniqueName`,void 0),e.defineProperty(this,`uniqueType`,void 0),e.defineProperty(this,`dataType`,void 0),e.defineProperty(this,`columnType`,void 0),e.defineProperty(this,`enumValues`,void 0),e.defineProperty(this,`generated`,void 0),e.defineProperty(this,`generatedIdentity`,void 0),e.defineProperty(this,`config`,void 0),this.table=t,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!==`byDefault`}},e.defineProperty(yr,Z,`Column`),yr),eZ=(br=class{constructor(t,n,r){e.defineProperty(this,`config`,void 0),e.defineProperty(this,`$default`,this.$defaultFn),e.defineProperty(this,`$onUpdate`,this.$onUpdateFn),this.config={name:t,keyAsName:t===``,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:n,columnType:r,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(e){return this.config.default=e,this.config.hasDefault=!0,this}$defaultFn(e){return this.config.defaultFn=e,this.config.hasDefault=!0,this}$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===``&&(this.config.name=e)}},e.defineProperty(br,Z,`ColumnBuilder`),br);const tZ=Symbol.for(`drizzle:Name`);var nZ=(xr=class{constructor(t,n){e.defineProperty(this,`reference`,void 0),e.defineProperty(this,`_onUpdate`,`no action`),e.defineProperty(this,`_onDelete`,`no action`),this.reference=()=>{let{name:e,columns:n,foreignColumns:r}=t();return{name:e,columns:n,foreignTable:r[0].table,foreignColumns:r}},n&&(this._onUpdate=n.onUpdate,this._onDelete=n.onDelete)}onUpdate(e){return this._onUpdate=e===void 0?`no action`:e,this}onDelete(e){return this._onDelete=e===void 0?`no action`:e,this}build(e){return new rZ(e,this)}},e.defineProperty(xr,Z,`PgForeignKeyBuilder`),xr),rZ=(Sr=class{constructor(t,n){e.defineProperty(this,`reference`,void 0),e.defineProperty(this,`onUpdate`,void 0),e.defineProperty(this,`onDelete`,void 0),this.table=t,this.reference=n.reference,this.onUpdate=n._onUpdate,this.onDelete=n._onDelete}getName(){let{name:e,columns:t,foreignColumns:n}=this.reference(),r=t.map(e=>e.name),i=n.map(e=>e.name),a=[this.table[tZ],...r,n[0].table[tZ],...i];return e??`${a.join(`_`)}_fk`}},e.defineProperty(Sr,Z,`PgForeignKey`),Sr);function iZ(e,...t){return e(...t)}function aZ(e,t){return`${e[tZ]}_${t.join(`_`)}_unique`}var oZ=(Cr=class{constructor(t,n){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`nullsNotDistinctConfig`,!1),this.name=n,this.columns=t}nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(e){return new cZ(e,this.columns,this.nullsNotDistinctConfig,this.name)}},e.defineProperty(Cr,Z,`PgUniqueConstraintBuilder`),Cr),sZ=(wr=class{constructor(t){e.defineProperty(this,`name`,void 0),this.name=t}on(...e){return new oZ(e,this.name)}},e.defineProperty(wr,Z,`PgUniqueOnConstraintBuilder`),wr),cZ=(Tr=class{constructor(t,n,r,i){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),e.defineProperty(this,`nullsNotDistinct`,!1),this.table=t,this.columns=n,this.name=i??aZ(this.table,this.columns.map(e=>e.name)),this.nullsNotDistinct=r}getName(){return this.name}},e.defineProperty(Tr,Z,`PgUniqueConstraint`),Tr);function lZ(e,t,n){for(let r=t;rArray.isArray(e)?fZ(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var pZ=(Er=class extends eZ{constructor(...t){super(...t),e.defineProperty(this,`foreignKeyConfigs`,[])}array(e){return new _Z(this.config.name,this,e)}references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e,t){return this.config.isUnique=!0,this.config.uniqueName=e,this.config.uniqueType=t?.nulls,this}generatedAlwaysAs(e){return this.config.generated={as:e,type:`always`,mode:`stored`},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,actions:r})=>iZ((n,r)=>{let i=new nZ(()=>{let t=n();return{columns:[e],foreignColumns:[t]}});return r.onUpdate&&i.onUpdate(r.onUpdate),r.onDelete&&i.onDelete(r.onDelete),i.build(t)},n,r))}buildExtraConfigColumn(e){return new hZ(e,this.config)}},e.defineProperty(Er,Z,`PgColumnBuilder`),Er),mZ=(Dr=class extends $X{constructor(e,t){t.uniqueName||=aZ(e,[t.name]),super(e,t),this.table=e}},e.defineProperty(Dr,Z,`PgColumn`),Dr),hZ=(Or=class extends mZ{constructor(...t){super(...t),e.defineProperty(this,`indexConfig`,{order:this.config.order??`asc`,nulls:this.config.nulls??`last`,opClass:this.config.opClass}),e.defineProperty(this,`defaultConfig`,{order:`asc`,nulls:`last`,opClass:void 0})}getSQLType(){return this.getSQLType()}asc(){return this.indexConfig.order=`asc`,this}desc(){return this.indexConfig.order=`desc`,this}nullsFirst(){return this.indexConfig.nulls=`first`,this}nullsLast(){return this.indexConfig.nulls=`last`,this}op(e){return this.indexConfig.opClass=e,this}},e.defineProperty(Or,Z,`ExtraConfigColumn`),Or),gZ=(kr=class{constructor(t,n,r,i){e.defineProperty(this,`name`,void 0),e.defineProperty(this,`keyAsName`,void 0),e.defineProperty(this,`type`,void 0),e.defineProperty(this,`indexConfig`,void 0),this.name=t,this.keyAsName=n,this.type=r,this.indexConfig=i}},e.defineProperty(kr,Z,`IndexedColumn`),kr),_Z=(Ar=class extends pZ{constructor(e,t,n){super(e,`array`,`PgArray`),this.config.baseBuilder=t,this.config.size=n}build(e){let t=this.config.baseBuilder.build(e);return new vZ(e,this.config,t)}},e.defineProperty(Ar,Z,`PgArrayBuilder`),Ar),vZ=(jr=class t extends mZ{constructor(t,n,r,i){super(t,n),e.defineProperty(this,`size`,void 0),this.baseColumn=r,this.range=i,this.size=n.size}getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==`number`?this.size:``}]`}mapFromDriverValue(e){return typeof e==`string`&&(e=dZ(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(e,n=!1){let r=e.map(e=>e===null?null:Q(this.baseColumn,t)?this.baseColumn.mapToDriverValue(e,!0):this.baseColumn.mapToDriverValue(e));return n?r:fZ(r)}},e.defineProperty(jr,Z,`PgArray`),jr),yZ=(Mr=class extends pZ{constructor(e,t){super(e,`string`,`PgEnumObjectColumn`),this.config.enum=t}build(e){return new bZ(e,this.config)}},e.defineProperty(Mr,Z,`PgEnumObjectColumnBuilder`),Mr),bZ=(Nr=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`enum`,void 0),e.defineProperty(this,`enumValues`,this.config.enum.enumValues),this.enum=n.enum}getSQLType(){return this.enum.enumName}},e.defineProperty(Nr,Z,`PgEnumObjectColumn`),Nr);const xZ=Symbol.for(`drizzle:isPgEnum`);function SZ(e){return!!e&&typeof e==`function`&&xZ in e&&e[xZ]===!0}var CZ=(Pr=class extends pZ{constructor(e,t){super(e,`string`,`PgEnumColumn`),this.config.enum=t}build(e){return new wZ(e,this.config)}},e.defineProperty(Pr,Z,`PgEnumColumnBuilder`),Pr),wZ=(Fr=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`enum`,this.config.enum),e.defineProperty(this,`enumValues`,this.config.enum.enumValues),this.enum=n.enum}getSQLType(){return this.enum.enumName}},e.defineProperty(Fr,Z,`PgEnumColumn`),Fr),TZ=(Ir=class{constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},e.defineProperty(Ir,Z,`Subquery`),Ir),EZ=(Lr=class extends TZ{},e.defineProperty(Lr,Z,`WithSubquery`),Lr),DZ=`0.44.2`;let OZ,kZ;const AZ={startActiveSpan(e,t){return OZ?(kZ||=OZ.trace.getTracer(`drizzle-orm`,DZ),iZ((n,r)=>r.startActiveSpan(e,e=>{try{return t(e)}catch(t){throw e.setStatus({code:n.SpanStatusCode.ERROR,message:t instanceof Error?t.message:`Unknown error`}),t}finally{e.end()}}),OZ,kZ)):t()}},jZ=Symbol.for(`drizzle:ViewBaseConfig`),MZ=Symbol.for(`drizzle:Schema`),NZ=Symbol.for(`drizzle:Columns`),PZ=Symbol.for(`drizzle:ExtraConfigColumns`),FZ=Symbol.for(`drizzle:OriginalName`),IZ=Symbol.for(`drizzle:BaseName`),LZ=Symbol.for(`drizzle:IsAlias`),RZ=Symbol.for(`drizzle:ExtraConfigBuilder`),zZ=Symbol.for(`drizzle:IsDrizzleTable`);var BZ=(Rr=class{constructor(t,n,r){e.defineProperty(this,tZ,void 0),e.defineProperty(this,FZ,void 0),e.defineProperty(this,MZ,void 0),e.defineProperty(this,NZ,void 0),e.defineProperty(this,PZ,void 0),e.defineProperty(this,IZ,void 0),e.defineProperty(this,LZ,!1),e.defineProperty(this,zZ,!0),e.defineProperty(this,RZ,void 0),this[tZ]=this[FZ]=t,this[MZ]=n,this[IZ]=r}},e.defineProperty(Rr,Z,`Table`),e.defineProperty(Rr,`Symbol`,{Name:tZ,Schema:MZ,OriginalName:FZ,Columns:NZ,ExtraConfigColumns:PZ,BaseName:IZ,IsAlias:LZ,ExtraConfigBuilder:RZ}),Rr);function VZ(e){return e[tZ]}function HZ(e){return`${e[MZ]??`public`}.${e[tZ]}`}var UZ=(zr=class{},e.defineProperty(zr,Z,`FakePrimitiveParam`),zr);function WZ(e){return e!=null&&typeof e.getSQL==`function`}function GZ(e){let t={sql:``,params:[]};for(let r of e){var n;t.sql+=r.sql,t.params.push(...r.params),(n=r.typings)?.length&&(t.typings||=[],t.typings.push(...r.typings))}return t}var KZ=(Br=class{constructor(t){e.defineProperty(this,`value`,void 0),this.value=Array.isArray(t)?t:[t]}getSQL(){return new qZ([this])}},e.defineProperty(Br,Z,`StringChunk`),Br),qZ=(Vr=class t{constructor(t){e.defineProperty(this,`decoder`,XZ),e.defineProperty(this,`shouldInlineParams`,!1),e.defineProperty(this,`usedTables`,[]),this.queryChunks=t;for(let e of t)if(Q(e,BZ)){let t=e[BZ.Symbol.Schema];this.usedTables.push(t===void 0?e[BZ.Symbol.Name]:t+`.`+e[BZ.Symbol.Name])}}append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return AZ.startActiveSpan(`drizzle.buildSQL`,t=>{let n=this.buildQueryFromSourceParams(this.queryChunks,e);return t?.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(e,n){let r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:i,escapeName:a,escapeParam:o,prepareTyping:s,inlineParams:c,paramStartIndex:l}=r;return GZ(e.map(e=>{if(Q(e,KZ))return{sql:e.value.join(``),params:[]};if(Q(e,JZ))return{sql:a(e.value),params:[]};if(e===void 0)return{sql:``,params:[]};if(Array.isArray(e)){let t=[new KZ(`(`)];for(let[n,r]of e.entries())t.push(r),ne},ZZ={mapToDriverValue:e=>e},QZ={...XZ,...ZZ};var $Z=(Ur=class{constructor(t,n=ZZ){e.defineProperty(this,`brand`,void 0),this.value=t,this.encoder=n}getSQL(){return new qZ([this])}},e.defineProperty(Ur,Z,`Param`),Ur);function $(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new KZ(e[0]));for(let[r,i]of t.entries())n.push(i,new KZ(e[r+1]));return new qZ(n)}(e=>{function t(){return new qZ([])}e.empty=t;function n(e){return new qZ(e)}e.fromList=n;function r(e){return new qZ([new KZ(e)])}e.raw=r;function i(e,t){let n=[];for(let[r,i]of e.entries())r>0&&t!==void 0&&n.push(t),n.push(i);return new qZ(n)}e.join=i;function a(e){return new JZ(e)}e.identifier=a;function o(e){return new eQ(e)}e.placeholder=o;function s(e,t){return new $Z(e,t)}e.param=s})($||={}),(t=>{class n{constructor(t,n){e.defineProperty(this,`isSelectionField`,!1),this.sql=t,this.fieldAlias=n}getSQL(){return this.sql}clone(){return new n(this.sql,this.fieldAlias)}}e.defineProperty(n,Z,`SQL.Aliased`),t.Aliased=n})(qZ||={});var eQ=(Wr=class{constructor(e){this.name=e}getSQL(){return new qZ([this])}},e.defineProperty(Wr,Z,`Placeholder`),Wr);function tQ(e,t){return e.map(e=>{if(Q(e,eQ)){if(!(e.name in t))throw Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(Q(e,$Z)&&Q(e.value,eQ)){if(!(e.value.name in t))throw Error(`No value for placeholder "${e.value.name}" was provided`);return e.encoder.mapToDriverValue(t[e.value.name])}return e})}const nQ=Symbol.for(`drizzle:IsDrizzleView`);var rQ=(Gr=class{constructor({name:t,schema:n,selectedFields:r,query:i}){e.defineProperty(this,jZ,void 0),e.defineProperty(this,nQ,!0),this[jZ]={name:t,originalName:t,schema:n,selectedFields:r,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new qZ([this])}},e.defineProperty(Gr,Z,`View`),Gr);$X.prototype.getSQL=function(){return new qZ([this])},BZ.prototype.getSQL=function(){return new qZ([this])},TZ.prototype.getSQL=function(){return new qZ([this])};var iQ=(Kr=class{constructor(e){this.table=e}get(e,t){return t===`table`?this.table:e[t]}},e.defineProperty(Kr,Z,`ColumnAliasProxyHandler`),Kr),aQ=(qr=class{constructor(e,t){this.alias=e,this.replaceOriginalName=t}get(e,t){if(t===BZ.Symbol.IsAlias)return!0;if(t===BZ.Symbol.Name||this.replaceOriginalName&&t===BZ.Symbol.OriginalName)return this.alias;if(t===jZ)return{...e[jZ],name:this.alias,isAlias:!0};if(t===BZ.Symbol.Columns){let t=e[BZ.Symbol.Columns];if(!t)return t;let n={};return Object.keys(t).map(r=>{n[r]=new Proxy(t[r],new iQ(new Proxy(e,this)))}),n}let n=e[t];return Q(n,$X)?new Proxy(n,new iQ(new Proxy(e,this))):n}},e.defineProperty(qr,Z,`TableAliasProxyHandler`),qr),oQ=(Jr=class{constructor(e){this.alias=e}get(e,t){return t===`sourceTable`?sQ(e.sourceTable,this.alias):e[t]}},e.defineProperty(Jr,Z,`RelationTableAliasProxyHandler`),Jr);function sQ(e,t){return new Proxy(e,new aQ(t,!1))}function cQ(e,t){return new Proxy(e,new iQ(new Proxy(e.table,new aQ(t,!1))))}function lQ(e,t){return new qZ.Aliased(uQ(e.sql,t),e.fieldAlias)}function uQ(e,t){return $.join(e.queryChunks.map(e=>Q(e,$X)?cQ(e,t):Q(e,qZ)?uQ(e,t):Q(e,qZ.Aliased)?lQ(e,t):e))}var dQ=(Yr=class extends Error{constructor({message:e,cause:t}){super(e),this.name=`DrizzleError`,this.cause=t}},e.defineProperty(Yr,Z,`DrizzleError`),Yr),fQ=(Xr=class extends dQ{constructor(){super({message:`Rollback`})}},e.defineProperty(Xr,Z,`TransactionRollbackError`),Xr),pQ=(Zr=class{write(e){console.log(e)}},e.defineProperty(Zr,Z,`ConsoleLogWriter`),Zr),mQ=(Qr=class{constructor(t){e.defineProperty(this,`writer`,void 0),this.writer=t?.writer??new pQ}logQuery(e,t){let n=t.map(e=>{try{return JSON.stringify(e)}catch{return String(e)}}),r=n.length?` -- params: [${n.join(`, `)}]`:``;this.writer.write(`Query: ${e}${r}`)}},e.defineProperty(Qr,Z,`DefaultLogger`),Qr),hQ=($r=class{logQuery(){}},e.defineProperty($r,Z,`NoopLogger`),$r),gQ=(oa=Symbol.toStringTag,ei=class{constructor(){e.defineProperty(this,oa,`QueryPromise`)}catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}then(e,t){return this.execute().then(e,t)}},e.defineProperty(ei,Z,`QueryPromise`),ei);function _Q(e,t){return Object.entries(e).reduce((e,[n,r])=>{if(typeof n!=`string`)return e;let i=t?[...t,n]:[n];return Q(r,$X)||Q(r,qZ)||Q(r,qZ.Aliased)?e.push({path:i,field:r}):Q(r,BZ)?e.push(..._Q(r[BZ.Symbol.Columns],i)):e.push(..._Q(r,i)),e},[])}function vQ(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let[e,t]of n.entries())if(t!==r[e])return!1;return!0}function yQ(e,t){let n=Object.entries(t).filter(([,e])=>e!==void 0).map(([t,n])=>Q(n,qZ)||Q(n,$X)?[t,n]:[t,new $Z(n,e[BZ.Symbol.Columns][t])]);if(n.length===0)throw Error(`No values to set`);return Object.fromEntries(n)}function bQ(e,t){for(let n of t)for(let t of Object.getOwnPropertyNames(n.prototype)){if(t===`constructor`)continue;Object.defineProperty(e.prototype,t,Object.getOwnPropertyDescriptor(n.prototype,t)||Object.create(null))}}function xQ(e){return e[BZ.Symbol.Columns]}function SQ(e){return Q(e,TZ)?e._.alias:Q(e,rQ)?e[jZ].name:Q(e,qZ)?void 0:e[BZ.Symbol.IsAlias]?e[BZ.Symbol.Name]:e[BZ.Symbol.BaseName]}function CQ(e){if(typeof e!=`object`||!e||e.constructor.name!==`Object`)return!1;if(`logger`in e){let t=typeof e.logger;return!(t!==`boolean`&&(t!==`object`||typeof e.logger.logQuery!=`function`)&&t!==`undefined`)}if(`schema`in e){let t=typeof e.schema;return!(t!==`object`&&t!==`undefined`)}if(`casing`in e){let t=typeof e.casing;return!(t!==`string`&&t!==`undefined`)}if(`mode`in e)return!(e.mode!==`default`||e.mode!==`planetscale`||e.mode!==void 0);if(`connection`in e){let t=typeof e.connection;return!(t!==`string`&&t!==`object`&&t!==`undefined`)}if(`client`in e){let t=typeof e.client;return!(t!==`object`&&t!==`function`&&t!==`undefined`)}return Object.keys(e).length===0}var wQ=(ti=class extends pZ{defaultNow(){return this.default($`now()`)}},e.defineProperty(ti,Z,`PgDateColumnBaseBuilder`),ti),TQ=(ni=class extends wQ{constructor(e){super(e,`date`,`PgDate`)}build(e){return new EQ(e,this.config)}},e.defineProperty(ni,Z,`PgDateBuilder`),ni),EQ=(ri=class extends mZ{getSQLType(){return`date`}mapFromDriverValue(e){return new Date(e)}mapToDriverValue(e){return e.toISOString()}},e.defineProperty(ri,Z,`PgDate`),ri),DQ=(ii=class extends wQ{constructor(e){super(e,`string`,`PgDateString`)}build(e){return new OQ(e,this.config)}},e.defineProperty(ii,Z,`PgDateStringBuilder`),ii),OQ=(ai=class extends mZ{getSQLType(){return`date`}},e.defineProperty(ai,Z,`PgDateString`),ai),kQ=(oi=class extends pZ{constructor(e){super(e,`json`,`PgJson`)}build(e){return new AQ(e,this.config)}},e.defineProperty(oi,Z,`PgJsonBuilder`),oi),AQ=(si=class extends mZ{constructor(e,t){super(e,t)}getSQLType(){return`json`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}},e.defineProperty(si,Z,`PgJson`),si),jQ=(ci=class extends pZ{constructor(e){super(e,`json`,`PgJsonb`)}build(e){return new MQ(e,this.config)}},e.defineProperty(ci,Z,`PgJsonbBuilder`),ci),MQ=(li=class extends mZ{constructor(e,t){super(e,t)}getSQLType(){return`jsonb`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}},e.defineProperty(li,Z,`PgJsonb`),li),NQ=(ui=class extends pZ{constructor(e,t,n){super(e,`string`,`PgNumeric`),this.config.precision=t,this.config.scale=n}build(e){return new PQ(e,this.config)}},e.defineProperty(ui,Z,`PgNumericBuilder`),ui),PQ=(di=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),this.precision=n.precision,this.scale=n.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})`}},e.defineProperty(di,Z,`PgNumeric`),di),FQ=(fi=class extends pZ{constructor(e,t,n){super(e,`number`,`PgNumericNumber`),this.config.precision=t,this.config.scale=n}build(e){return new IQ(e,this.config)}},e.defineProperty(fi,Z,`PgNumericNumberBuilder`),fi),IQ=(pi=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),e.defineProperty(this,`mapToDriverValue`,String),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(e){return typeof e==`number`?e:Number(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},e.defineProperty(pi,Z,`PgNumericNumber`),pi),LQ=(mi=class extends pZ{constructor(e,t,n){super(e,`bigint`,`PgNumericBigInt`),this.config.precision=t,this.config.scale=n}build(e){return new RQ(e,this.config)}},e.defineProperty(mi,Z,`PgNumericBigIntBuilder`),mi),RQ=(hi=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),e.defineProperty(this,`mapFromDriverValue`,BigInt),e.defineProperty(this,`mapToDriverValue`,String),this.precision=n.precision,this.scale=n.scale}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},e.defineProperty(hi,Z,`PgNumericBigInt`),hi),zQ=(gi=class extends wQ{constructor(e,t,n){super(e,`string`,`PgTime`),this.withTimezone=t,this.precision=n,this.config.withTimezone=t,this.config.precision=n}build(e){return new BQ(e,this.config)}},e.defineProperty(gi,Z,`PgTimeBuilder`),gi),BQ=(_i=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`time${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(_i,Z,`PgTime`),_i),VQ=(vi=class extends wQ{constructor(e,t,n){super(e,`date`,`PgTimestamp`),this.config.withTimezone=t,this.config.precision=n}build(e){return new HQ(e,this.config)}},e.defineProperty(vi,Z,`PgTimestampBuilder`),vi),HQ=(yi=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`mapFromDriverValue`,e=>new Date(this.withTimezone?e:e+`+0000`)),e.defineProperty(this,`mapToDriverValue`,e=>e.toISOString()),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:` (${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(yi,Z,`PgTimestamp`),yi),UQ=(bi=class extends wQ{constructor(e,t,n){super(e,`string`,`PgTimestampString`),this.config.withTimezone=t,this.config.precision=n}build(e){return new WQ(e,this.config)}},e.defineProperty(bi,Z,`PgTimestampStringBuilder`),bi),WQ=(xi=class extends mZ{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(xi,Z,`PgTimestampString`),xi),GQ=(Si=class extends pZ{constructor(e){super(e,`string`,`PgUUID`)}defaultRandom(){return this.default($`gen_random_uuid()`)}build(e){return new KQ(e,this.config)}},e.defineProperty(Si,Z,`PgUUIDBuilder`),Si),KQ=(Ci=class extends mZ{getSQLType(){return`uuid`}},e.defineProperty(Ci,Z,`PgUUID`),Ci);const qQ=Symbol.for(`drizzle:PgInlineForeignKeys`),JQ=Symbol.for(`drizzle:EnableRLS`);var YQ=(sa=BZ.Symbol.ExtraConfigBuilder,ca=BZ.Symbol.ExtraConfigColumns,wi=class extends BZ{constructor(...t){super(...t),e.defineProperty(this,qQ,[]),e.defineProperty(this,JQ,!1),e.defineProperty(this,sa,void 0),e.defineProperty(this,ca,{})}},e.defineProperty(wi,Z,`PgTable`),e.defineProperty(wi,`Symbol`,Object.assign({},BZ.Symbol,{InlineForeignKeys:qQ,EnableRLS:JQ})),wi),XQ=(Ti=class{constructor(t,n){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),this.columns=t,this.name=n}build(e){return new ZQ(e,this.columns,this.name)}},e.defineProperty(Ti,Z,`PgPrimaryKeyBuilder`),Ti),ZQ=(Ei=class{constructor(t,n,r){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),this.table=t,this.columns=n,this.name=r}getName(){return this.name??`${this.table[YQ.Symbol.Name]}_${this.columns.map(e=>e.name).join(`_`)}_pk`}},e.defineProperty(Ei,Z,`PgPrimaryKey`),Ei);function QQ(e,t){return YZ(t)&&!WZ(e)&&!Q(e,$Z)&&!Q(e,eQ)&&!Q(e,$X)&&!Q(e,BZ)&&!Q(e,rQ)?new $Z(e,t):e}const $Q=(e,t)=>$`${e} = ${QQ(t,e)}`,e$=(e,t)=>$`${e} <> ${QQ(t,e)}`;function t$(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new qZ(t):new qZ([new KZ(`(`),$.join(t,new KZ(` and `)),new KZ(`)`)])}function n$(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new qZ(t):new qZ([new KZ(`(`),$.join(t,new KZ(` or `)),new KZ(`)`)])}function r$(e){return $`not ${e}`}const i$=(e,t)=>$`${e} > ${QQ(t,e)}`,a$=(e,t)=>$`${e} >= ${QQ(t,e)}`,o$=(e,t)=>$`${e} < ${QQ(t,e)}`,s$=(e,t)=>$`${e} <= ${QQ(t,e)}`;function c$(e,t){return Array.isArray(t)?t.length===0?$`false`:$`${e} in ${t.map(t=>QQ(t,e))}`:$`${e} in ${QQ(t,e)}`}function l$(e,t){return Array.isArray(t)?t.length===0?$`true`:$`${e} not in ${t.map(t=>QQ(t,e))}`:$`${e} not in ${QQ(t,e)}`}function u$(e){return $`${e} is null`}function d$(e){return $`${e} is not null`}function f$(e){return $`exists ${e}`}function p$(e){return $`not exists ${e}`}function m$(e,t,n){return $`${e} between ${QQ(t,e)} and ${QQ(n,e)}`}function h$(e,t,n){return $`${e} not between ${QQ(t,e)} and ${QQ(n,e)}`}function g$(e,t){return $`${e} like ${t}`}function _$(e,t){return $`${e} not like ${t}`}function v$(e,t){return $`${e} ilike ${t}`}function y$(e,t){return $`${e} not ilike ${t}`}function b$(e){return $`${e} asc`}function x$(e){return $`${e} desc`}var S$=(Di=class{constructor(t,n,r){e.defineProperty(this,`referencedTableName`,void 0),e.defineProperty(this,`fieldName`,void 0),this.sourceTable=t,this.referencedTable=n,this.relationName=r,this.referencedTableName=n[BZ.Symbol.Name]}},e.defineProperty(Di,Z,`Relation`),Di),C$=(Oi=class{constructor(e,t){this.table=e,this.config=t}},e.defineProperty(Oi,Z,`Relations`),Oi),w$=(ki=class e extends S${constructor(e,t,n,r){super(e,t,n?.relationName),this.config=n,this.isNullable=r}withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config,this.isNullable);return n.fieldName=t,n}},e.defineProperty(ki,Z,`One`),ki),T$=(Ai=class e extends S${constructor(e,t,n){super(e,t,n?.relationName),this.config=n}withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config);return n.fieldName=t,n}},e.defineProperty(Ai,Z,`Many`),Ai);function E$(){return{and:t$,between:m$,eq:$Q,exists:f$,gt:i$,gte:a$,ilike:v$,inArray:c$,isNull:u$,isNotNull:d$,like:g$,lt:o$,lte:s$,ne:e$,not:r$,notBetween:h$,notExists:p$,notLike:_$,notIlike:y$,notInArray:l$,or:n$,sql:$}}function D$(){return{sql:$,asc:b$,desc:x$}}function O$(e,t){Object.keys(e).length===1&&`default`in e&&!Q(e.default,BZ)&&(e=e.default);let n={},r={},i={};for(let[o,s]of Object.entries(e))if(Q(s,BZ)){var a;let e=HZ(s),t=r[e];n[e]=o,i[o]={tsName:o,dbName:s[BZ.Symbol.Name],schema:s[BZ.Symbol.Schema],columns:s[BZ.Symbol.Columns],relations:t?.relations??{},primaryKey:t?.primaryKey??[]};for(let e of Object.values(s[BZ.Symbol.Columns]))e.primary&&i[o].primaryKey.push(e);let c=(a=s[BZ.Symbol.ExtraConfigBuilder])?.call(s,s[BZ.Symbol.ExtraConfigColumns]);if(c)for(let e of Object.values(c))Q(e,XQ)&&i[o].primaryKey.push(...e.columns)}else if(Q(s,C$)){let e=HZ(s.table),a=n[e],o=s.config(t(s.table)),c;for(let[t,n]of Object.entries(o))if(a){let e=i[a];e.relations[t]=n,c&&e.primaryKey.push(...c)}else e in r||(r[e]={relations:{},primaryKey:c}),r[e].relations[t]=n}return{tables:i,tableNamesMap:n}}function k$(e){return function(t,n){return new w$(e,t,n,n?.fields.reduce((e,t)=>e&&t.notNull,!0)??!1)}}function A$(e){return function(t,n){return new T$(e,t,n)}}function j$(e,t,n){if(Q(n,w$)&&n.config)return{fields:n.config.fields,references:n.config.references};let r=t[HZ(n.referencedTable)];if(!r)throw Error(`Table "${n.referencedTable[BZ.Symbol.Name]}" not found in schema`);let i=e[r];if(!i)throw Error(`Table "${r}" not found in schema`);let a=n.sourceTable,o=t[HZ(a)];if(!o)throw Error(`Table "${a[BZ.Symbol.Name]}" not found in schema`);let s=[];for(let e of Object.values(i.relations))(n.relationName&&n!==e&&e.relationName===n.relationName||!n.relationName&&e.referencedTable===n.sourceTable)&&s.push(e);if(s.length>1)throw n.relationName?Error(`There are multiple relations with name "${n.relationName}" in table "${r}"`):Error(`There are multiple relations between "${r}" and "${n.sourceTable[BZ.Symbol.Name]}". Please specify relation name`);if(s[0]&&Q(s[0],w$)&&s[0].config)return{fields:s[0].config.references,references:s[0].config.fields};throw Error(`There is not enough information to infer relation "${o}.${n.fieldName}"`)}function M$(e){return{one:k$(e),many:A$(e)}}function N$(e,t,n,r,i=e=>e){let a={};for(let[o,s]of r.entries())if(s.isJson){let r=t.relations[s.tsKey],c=n[o],l=typeof c==`string`?JSON.parse(c):c;a[s.tsKey]=Q(r,w$)?l&&N$(e,e[s.relationTableTsKey],l,s.selection,i):l.map(t=>N$(e,e[s.relationTableTsKey],t,s.selection,i))}else{let e=i(n[o]),t=s.field,r;r=Q(t,$X)?t:Q(t,qZ)?t.decoder:t.sql.decoder,a[s.tsKey]=e===null?null:r.mapFromDriverValue(e)}return a}var P$=(ji=class t{constructor(t){e.defineProperty(this,`config`,void 0),this.config={...t}}get(e,n){if(n===`_`)return{...e._,selectedFields:new Proxy(e._.selectedFields,this)};if(n===jZ)return{...e[jZ],selectedFields:new Proxy(e[jZ].selectedFields,this)};if(typeof n==`symbol`)return e[n];let r=Q(e,TZ)?e._.selectedFields:Q(e,rQ)?e[jZ].selectedFields:e,i=r[n];if(Q(i,qZ.Aliased)){if(this.config.sqlAliasedBehavior===`sql`&&!i.isSelectionField)return i.sql;let e=i.clone();return e.isSelectionField=!0,e}if(Q(i,qZ)){if(this.config.sqlBehavior===`sql`)return i;throw Error(`You tried to reference "${n}" 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 Q(i,$X)?this.config.alias?new Proxy(i,new iQ(new Proxy(i.table,new aQ(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!=`object`||!i?i:new Proxy(i,new t(this.config))}},e.defineProperty(ji,Z,`SelectionProxyHandler`),ji);function F$(e){let t=e.replace(/['\u2019]/g,``).match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[];return t.map(e=>e.toLowerCase()).join(`_`)}function I$(e){let t=e.replace(/['\u2019]/g,``).match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[];return t.reduce((e,t,n)=>{let r=n===0?t.toLowerCase():`${t[0].toUpperCase()}${t.slice(1)}`;return e+r},``)}function L$(e){return e}var R$=(Mi=class{constructor(t){e.defineProperty(this,`cache`,{}),e.defineProperty(this,`cachedTables`,{}),e.defineProperty(this,`convert`,void 0),this.convert=t===`snake_case`?F$:t===`camelCase`?I$:L$}getColumnCasing(e){if(!e.keyAsName)return e.name;let t=e.table[BZ.Symbol.Schema]??`public`,n=e.table[BZ.Symbol.OriginalName],r=`${t}.${n}.${e.name}`;return this.cache[r]||this.cacheTable(e.table),this.cache[r]}cacheTable(e){let t=e[BZ.Symbol.Schema]??`public`,n=e[BZ.Symbol.OriginalName],r=`${t}.${n}`;if(!this.cachedTables[r]){for(let t of Object.values(e[BZ.Symbol.Columns])){let e=`${r}.${t.name}`;this.cache[e]=this.convert(t.name)}this.cachedTables[r]=!0}}clearCache(){this.cache={},this.cachedTables={}}},e.defineProperty(Mi,Z,`CasingCache`),Mi),z$=(Ni=class extends rQ{},e.defineProperty(Ni,Z,`PgViewBase`),Ni),B$=(Pi=class{constructor(t){e.defineProperty(this,`casing`,void 0),this.casing=new R$(t?.casing)}async migrate(e,t,n){let r=typeof n==`string`?`__drizzle_migrations`:n.migrationsTable??`__drizzle_migrations`,i=typeof n==`string`?`drizzle`:n.migrationsSchema??`drizzle`,a=$` CREATE TABLE IF NOT EXISTS ${$.identifier(i)}.${$.identifier(r)} ( id SERIAL PRIMARY KEY, hash text NOT NULL, created_at bigint ) `;await t.execute($`CREATE SCHEMA IF NOT EXISTS ${$.identifier(i)}`),await t.execute(a);let o=await t.all($`select id, hash, created_at from ${$.identifier(i)}.${$.identifier(r)} order by created_at desc limit 1`),s=o[0];await t.transaction(async t=>{for await(let n of e)if(!s||Number(s.created_at){var r;return t[e]!==void 0||(r=n[e])?.onUpdateFn!==void 0}),i=r.length;return $.join(r.flatMap((e,r)=>{let a=n[e],o=t[e]??$.param(a.onUpdateFn(),a),s=$`${$.identifier(this.casing.getColumnCasing(a))} = ${o}`;return r{let i=[];if(Q(e,qZ.Aliased)&&e.isSelectionField)i.push($.identifier(e.fieldAlias));else if(Q(e,qZ.Aliased)||Q(e,qZ)){let n=Q(e,qZ.Aliased)?e.sql:e;t?i.push(new qZ(n.queryChunks.map(e=>Q(e,mZ)?$.identifier(this.casing.getColumnCasing(e)):e))):i.push(n),Q(e,qZ.Aliased)&&i.push($` as ${$.identifier(e.fieldAlias)}`)}else Q(e,$X)&&(t?i.push($.identifier(this.casing.getColumnCasing(e))):i.push(e));return ro?.some(({alias:t})=>t===(e[BZ.Symbol.IsAlias]?VZ(e):e[BZ.Symbol.BaseName])))(e.field.table)){let t=VZ(e.field.table);throw Error(`Your "${e.path.join(`->`)}" field references a column "${t}"."${e.field.name}", but the table "${t}" is not part of the query! Did you forget to join it?`)}let h=!o||o.length===0,g=this.buildWithCTE(e),_;f&&(_=f===!0?$` distinct`:$` distinct on (${$.join(f.on,$`, `)})`);let v=this.buildSelection(m,{isSingleTable:h}),y=this.buildFromTable(a),b=this.buildJoins(o),x=r?$` where ${r}`:void 0,S=i?$` having ${i}`:void 0,C;s&&s.length>0&&(C=$` order by ${$.join(s,$`, `)}`);let w;c&&c.length>0&&(w=$` group by ${$.join(c,$`, `)}`);let T=typeof l==`object`||typeof l==`number`&&l>=0?$` limit ${l}`:void 0,E=u?$` offset ${u}`:void 0,D=$.empty();if(d){let e=$` for ${$.raw(d.strength)}`;d.config.of&&e.append($` of ${$.join(Array.isArray(d.config.of)?d.config.of:[d.config.of],$`, `)}`),d.config.noWait?e.append($` nowait`):d.config.skipLocked&&e.append($` skip locked`),D.append(e)}let O=$`${g}select${_} ${v} from ${y}${b}${x}${w}${S}${C}${T}${E}${D}`;return p.length>0?this.buildSetOperations(O,p):O}buildSetOperations(e,t){let[n,...r]=t;if(!n)throw Error(`Cannot pass undefined values to any set operator`);return r.length===0?this.buildSetOperationQuery({leftSelect:e,setOperator:n}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:e,setOperator:n}),r)}buildSetOperationQuery({leftSelect:e,setOperator:{type:t,isAll:n,rightSelect:r,limit:i,orderBy:a,offset:o}}){let s=$`(${e.getSQL()}) `,c=$`(${r.getSQL()})`,l;if(a&&a.length>0){let e=[];for(let t of a)if(Q(t,mZ))e.push($.identifier(t.name));else if(Q(t,qZ)){for(let e=0;e=0?$` limit ${i}`:void 0,d=$.raw(`${t} ${n?`all `:``}`),f=o?$` offset ${o}`:void 0;return $`${s}${d}${c}${l}${u}${f}`}buildInsertQuery({table:e,values:t,onConflict:n,returning:r,withList:i,select:a,overridingSystemValue_:o}){let s=[],c=e[BZ.Symbol.Columns],l=Object.entries(c).filter(([e,t])=>!t.shouldDisableInsert()),u=l.map(([,e])=>$.identifier(this.casing.getColumnCasing(e)));if(a){let e=t;Q(e,qZ)?s.push(e):s.push(e.getSQL())}else{let e=t;s.push($.raw(`values `));for(let[t,n]of e.entries()){let r=[];for(let[e,t]of l){let i=n[e];if(i===void 0||Q(i,$Z)&&i.value===void 0)if(t.defaultFn!==void 0){let e=t.defaultFn(),n=Q(e,qZ)?e:$.param(e,t);r.push(n)}else if(!t.default&&t.onUpdateFn!==void 0){let e=t.onUpdateFn(),n=Q(e,qZ)?e:$.param(e,t);r.push(n)}else r.push($`default`);else r.push(i)}s.push(r),t({dbKey:t.name,tsKey:e,field:cQ(t,o),relationTableTsKey:void 0,isJson:!1,selection:[]}))}else{let r=Object.fromEntries(Object.entries(i.columns).map(([e,t])=>[e,cQ(t,o)]));if(a.where){let e=typeof a.where==`function`?a.where(r,E$()):a.where;p=e&&uQ(e,o)}let s=[],c=[];if(a.columns){let e=!1;for(let[t,n]of Object.entries(a.columns)){if(n===void 0)continue;t in i.columns&&(!e&&n===!0&&(e=!0),c.push(t))}c.length>0&&(c=e?c.filter(e=>{var t;return(t=a.columns)?.[e]===!0}):Object.keys(i.columns).filter(e=>!c.includes(e)))}else c=Object.keys(i.columns);for(let e of c){let t=i.columns[e];s.push({tsKey:e,value:t})}let h=[];a.with&&(h=Object.entries(a.with).filter(e=>!!e[1]).map(([e,t])=>({tsKey:e,queryConfig:t,relation:i.relations[e]})));let g;if(a.extras){g=typeof a.extras==`function`?a.extras(r,{sql:$}):a.extras;for(let[e,t]of Object.entries(g))s.push({tsKey:e,value:lQ(t,o)})}for(let{tsKey:e,value:t}of s)l.push({dbKey:Q(t,qZ.Aliased)?t.fieldAlias:i.columns[e].name,tsKey:e,field:Q(t,$X)?cQ(t,o):t,relationTableTsKey:void 0,isJson:!1,selection:[]});let _=typeof a.orderBy==`function`?a.orderBy(r,D$()):a.orderBy??[];Array.isArray(_)||(_=[_]),f=_.map(e=>Q(e,$X)?cQ(e,o):uQ(e,o)),u=a.limit,d=a.offset;for(let{tsKey:r,queryConfig:i,relation:a}of h){let s=j$(t,n,a),c=HZ(a.referencedTable),u=n[c],d=`${o}_${r}`,f=t$(...s.fields.map((e,t)=>$Q(cQ(s.references[t],d),cQ(e,o)))),p=this.buildRelationalQueryWithoutPK({fullSchema:e,schema:t,tableNamesMap:n,table:e[u],tableConfig:t[u],queryConfig:Q(a,w$)?i===!0?{limit:1}:{...i,limit:1}:i,tableAlias:d,joinOn:f,nestedQueryRelation:a}),h=$`${$.identifier(d)}.${$.identifier(`data`)}`.as(r);m.push({on:$`true`,table:new TZ(p.sql,{},d),alias:d,joinType:`left`,lateral:!0}),l.push({dbKey:r,tsKey:r,field:h,relationTableTsKey:u,isJson:!0,selection:p.selection})}}if(l.length===0)throw new dQ({message:`No fields selected for table "${i.tsName}" ("${o}")`});let h;if(p=t$(c,p),s){let e=$`json_build_array(${$.join(l.map(({field:e,tsKey:t,isJson:n})=>n?$`${$.identifier(`${o}_${t}`)}.${$.identifier(`data`)}`:Q(e,qZ.Aliased)?e.sql:e),$`, `)})`;Q(s,T$)&&(e=$`coalesce(json_agg(${e}${f.length>0?$` order by ${$.join(f,$`, `)}`:void 0}), '[]'::json)`);let t=[{dbKey:`data`,tsKey:`data`,field:e.as(`data`),isJson:!0,relationTableTsKey:i.tsName,selection:l}],n=u!==void 0||d!==void 0||f.length>0;n?(h=this.buildSelectQuery({table:sQ(r,o),fields:{},fieldsFlat:[{path:[],field:$.raw(`*`)}],where:p,limit:u,offset:d,orderBy:f,setOperators:[]}),p=void 0,u=void 0,d=void 0,f=[]):h=sQ(r,o),h=this.buildSelectQuery({table:Q(h,YQ)?h:new TZ(h,{},o),fields:{},fieldsFlat:t.map(({field:e})=>({path:[],field:Q(e,$X)?cQ(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]})}else h=this.buildSelectQuery({table:sQ(r,o),fields:{},fieldsFlat:l.map(({field:e})=>({path:[],field:Q(e,$X)?cQ(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]});return{tableTsKey:i.tsName,sql:h,selection:l}}},e.defineProperty(Pi,Z,`PgDialect`),Pi),V$=(Fi=class{getSelectedFields(){return this._.selectedFields}},e.defineProperty(Fi,Z,`TypedQueryBuilder`),Fi),H$=(Ii=class{constructor(t){e.defineProperty(this,`fields`,void 0),e.defineProperty(this,`session`,void 0),e.defineProperty(this,`dialect`,void 0),e.defineProperty(this,`withList`,[]),e.defineProperty(this,`distinct`,void 0),e.defineProperty(this,`authToken`,void 0),this.fields=t.fields,this.session=t.session,this.dialect=t.dialect,t.withList&&(this.withList=t.withList),this.distinct=t.distinct}setToken(e){return this.authToken=e,this}from(e){let t=!!this.fields,n=e,r;return r=this.fields?this.fields:Q(n,TZ)?Object.fromEntries(Object.keys(n._.selectedFields).map(e=>[e,n[e]])):Q(n,z$)?n[jZ].selectedFields:Q(n,qZ)?{}:xQ(n),new W$({table:n,fields:r,isPartialSelect:t,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}},e.defineProperty(Ii,Z,`PgSelectBuilder`),Ii),U$=(Li=class extends V${constructor({table:t,fields:n,isPartialSelect:r,session:i,dialect:a,withList:o,distinct:s}){super(),e.defineProperty(this,`_`,void 0),e.defineProperty(this,`config`,void 0),e.defineProperty(this,`joinsNotNullableMap`,void 0),e.defineProperty(this,`tableName`,void 0),e.defineProperty(this,`isPartialSelect`,void 0),e.defineProperty(this,`session`,void 0),e.defineProperty(this,`dialect`,void 0),e.defineProperty(this,`cacheConfig`,void 0),e.defineProperty(this,`usedTables`,new Set),e.defineProperty(this,`leftJoin`,this.createJoin(`left`,!1)),e.defineProperty(this,`leftJoinLateral`,this.createJoin(`left`,!0)),e.defineProperty(this,`rightJoin`,this.createJoin(`right`,!1)),e.defineProperty(this,`innerJoin`,this.createJoin(`inner`,!1)),e.defineProperty(this,`innerJoinLateral`,this.createJoin(`inner`,!0)),e.defineProperty(this,`fullJoin`,this.createJoin(`full`,!1)),e.defineProperty(this,`crossJoin`,this.createJoin(`cross`,!1)),e.defineProperty(this,`crossJoinLateral`,this.createJoin(`cross`,!0)),e.defineProperty(this,`union`,this.createSetOperator(`union`,!1)),e.defineProperty(this,`unionAll`,this.createSetOperator(`union`,!0)),e.defineProperty(this,`intersect`,this.createSetOperator(`intersect`,!1)),e.defineProperty(this,`intersectAll`,this.createSetOperator(`intersect`,!0)),e.defineProperty(this,`except`,this.createSetOperator(`except`,!1)),e.defineProperty(this,`exceptAll`,this.createSetOperator(`except`,!0)),this.config={withList:o,table:t,fields:{...n},distinct:s,setOperators:[]},this.isPartialSelect=r,this.session=i,this.dialect=a,this._={selectedFields:n,config:this.config},this.tableName=SQ(t),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{};for(let e of e1(t))this.usedTables.add(e)}getUsedTables(){return[...this.usedTables]}createJoin(e,t){return(n,r)=>{var i;let a=this.tableName,o=SQ(n);for(let e of e1(n))this.usedTables.add(e);if(typeof o==`string`&&(i=this.config.joins)?.some(e=>e.alias===o))throw Error(`Alias "${o}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof a==`string`&&(this.config.fields={[a]:this.config.fields}),typeof o==`string`&&!Q(n,qZ))){let e=Q(n,TZ)?n._.selectedFields:Q(n,rQ)?n[jZ].selectedFields:n[BZ.Symbol.Columns];this.config.fields[o]=e}if(typeof r==`function`&&(r=r(new Proxy(this.config.fields,new P$({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:r,table:n,joinType:e,alias:o,lateral:t}),typeof o==`string`)switch(e){case`left`:this.joinsNotNullableMap[o]=!1;break;case`right`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[o]=!0;break;case`cross`:case`inner`:this.joinsNotNullableMap[o]=!0;break;case`full`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[o]=!1;break}return this}}createSetOperator(e,t){return n=>{let r=typeof n==`function`?n(K$()):n;if(!vQ(this.getSelectedFields(),r.getSelectedFields()))throw 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:t,rightSelect:r}),this}}addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new P$({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.where=e,this}having(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new P$({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]==`function`){let t=e[0](new Proxy(this.config.fields,new P$({sqlAliasedBehavior:`alias`,sqlBehavior:`sql`})));this.config.groupBy=Array.isArray(t)?t:[t]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]==`function`){let t=e[0](new Proxy(this.config.fields,new P$({sqlAliasedBehavior:`alias`,sqlBehavior:`sql`}))),n=Array.isArray(t)?t:[t];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=n:this.config.orderBy=n}else{let t=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=t:this.config.orderBy=t}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,t={}){return this.config.lockingClause={strength:e,config:t},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}as(e){let t=[];if(t.push(...e1(this.config.table)),this.config.joins)for(let e of this.config.joins)t.push(...e1(e.table));return new Proxy(new TZ(this.getSQL(),this.config.fields,e,!1,[...new Set(t)]),new P$({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`}))}getSelectedFields(){return new Proxy(this.config.fields,new P$({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}},e.defineProperty(Li,Z,`PgSelectQueryBuilder`),Li),W$=(Ri=class extends U${constructor(...t){super(...t),e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`execute`,e=>AZ.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken)))}_prepare(e){let{session:t,config:n,dialect:r,joinsNotNullableMap:i,authToken:a,cacheConfig:o,usedTables:s}=this;if(!t)throw Error(`Cannot execute a query on a query builder. Please use a database instance instead.`);let{fields:c}=n;return AZ.startActiveSpan(`drizzle.prepareQuery`,()=>{let n=_Q(c),l=t.prepareQuery(r.sqlToQuery(this.getSQL()),n,e,!0,void 0,{type:`select`,tables:[...s]},o);return l.joinsNotNullableMap=i,l.setToken(a)})}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}},e.defineProperty(Ri,Z,`PgSelect`),Ri);bQ(W$,[gQ]);function G$(e,t){return(n,r,...i)=>{let a=[r,...i].map(n=>({type:e,isAll:t,rightSelect:n}));for(let e of a)if(!vQ(n.getSelectedFields(),e.rightSelect.getSelectedFields()))throw Error(`Set operator error (union / intersect / except): selected fields are not the same or are in a different order`);return n.addSetOperators(a)}}const K$=()=>({union:q$,unionAll:J$,intersect:Y$,intersectAll:X$,except:Z$,exceptAll:Q$}),q$=G$(`union`,!1),J$=G$(`union`,!0),Y$=G$(`intersect`,!1),X$=G$(`intersect`,!0),Z$=G$(`except`,!1),Q$=G$(`except`,!0);var $$=(zi=class{constructor(t){e.defineProperty(this,`dialect`,void 0),e.defineProperty(this,`dialectConfig`,void 0),e.defineProperty(this,`$with`,(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(n)),new Proxy(new EZ(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new P$({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}}),this.dialect=Q(t,B$)?t:void 0,this.dialectConfig=Q(t,B$)?void 0:t}with(...e){let t=this;function n(n){return new H$({fields:n??void 0,session:void 0,dialect:t.getDialect(),withList:e})}function r(e){return new H$({fields:e??void 0,session:void 0,dialect:t.getDialect(),distinct:!0})}function i(e,n){return new H$({fields:n??void 0,session:void 0,dialect:t.getDialect(),distinct:{on:e}})}return{select:n,selectDistinct:r,selectDistinctOn:i}}select(e){return new H$({fields:e??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(e){return new H$({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(e,t){return new H$({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:e}})}getDialect(){return this.dialect||=new B$(this.dialectConfig),this.dialect}},e.defineProperty(zi,Z,`PgQueryBuilder`),zi);function e1(e){return Q(e,YQ)?[e[MZ]?`${e[MZ]}.${e[BZ.Symbol.BaseName]}`:e[BZ.Symbol.BaseName]]:Q(e,TZ)?e._.usedTables??[]:Q(e,qZ)?e.usedTables??[]:[]}var t1=(Bi=class extends gQ{constructor(t,n,r,i){super(),e.defineProperty(this,`config`,void 0),e.defineProperty(this,`cacheConfig`,void 0),e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`execute`,e=>AZ.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))),this.session=n,this.dialect=r,this.config={table:t,withList:i}}where(e){return this.config.where=e,this}returning(e=this.config.table[BZ.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=_Q(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return AZ.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`delete`,tables:e1(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 P$({alias:VZ(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},e.defineProperty(Bi,Z,`PgDelete`),Bi),n1=(Vi=class{constructor(t,n,r,i,a){e.defineProperty(this,`authToken`,void 0),this.table=t,this.session=n,this.dialect=r,this.withList=i,this.overridingSystemValue_=a}setToken(e){return this.authToken=e,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values(e){if(e=Array.isArray(e)?e:[e],e.length===0)throw Error(`values() must be called with at least one value`);let t=e.map(e=>{let t={},n=this.table[BZ.Symbol.Columns];for(let r of Object.keys(e)){let i=e[r];t[r]=Q(i,qZ)?i:new $Z(i,n[r])}return t});return new r1(this.table,t,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(e){let t=typeof e==`function`?e(new $$):e;if(!Q(t,qZ)&&!vQ(this.table[NZ],t._.selectedFields))throw Error(`Insert select error: selected fields are not the same or are in a different order compared to the table definition`);return new r1(this.table,t,this.session,this.dialect,this.withList,!0)}},e.defineProperty(Vi,Z,`PgInsertBuilder`),Vi),r1=(Hi=class extends gQ{constructor(t,n,r,i,a,o,s){super(),e.defineProperty(this,`config`,void 0),e.defineProperty(this,`cacheConfig`,void 0),e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`execute`,e=>AZ.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))),this.session=r,this.dialect=i,this.config={table:t,values:n,withList:a,select:o,overridingSystemValue_:s}}returning(e=this.config.table[BZ.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=_Q(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=$`do nothing`;else{let t=``;t=Array.isArray(e.target)?e.target.map(e=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(e))).join(`,`):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target));let n=e.where?$` where ${e.where}`:void 0;this.config.onConflict=$`(${$.raw(t)})${n} do nothing`}return this}onConflictDoUpdate(e){if(e.where&&(e.targetWhere||e.setWhere))throw Error(`You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.`);let t=e.where?$` where ${e.where}`:void 0,n=e.targetWhere?$` where ${e.targetWhere}`:void 0,r=e.setWhere?$` where ${e.setWhere}`:void 0,i=this.dialect.buildUpdateSet(this.config.table,yQ(this.config.table,e.set)),a=``;return a=Array.isArray(e.target)?e.target.map(e=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(e))).join(`,`):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target)),this.config.onConflict=$`(${$.raw(a)})${n} do update set ${i}${t}${r}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return AZ.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`insert`,tables:e1(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 P$({alias:VZ(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},e.defineProperty(Hi,Z,`PgInsert`),Hi),i1=(Ui=class extends gQ{constructor(t,n,r){super(),e.defineProperty(this,`config`,void 0),e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`execute`,e=>AZ.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))),this.session=n,this.dialect=r,this.config={view:t}}concurrently(){if(this.config.withNoData!==void 0)throw Error(`Cannot use concurrently and withNoData together`);return this.config.concurrently=!0,this}withNoData(){if(this.config.concurrently!==void 0)throw Error(`Cannot use concurrently and withNoData together`);return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return AZ.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}},e.defineProperty(Ui,Z,`PgRefreshMaterializedView`),Ui),a1=(Wi=class{constructor(t,n,r,i){e.defineProperty(this,`authToken`,void 0),this.table=t,this.session=n,this.dialect=r,this.withList=i}setToken(e){return this.authToken=e,this}set(e){return new o1(this.table,yQ(this.table,e),this.session,this.dialect,this.withList).setToken(this.authToken)}},e.defineProperty(Wi,Z,`PgUpdateBuilder`),Wi),o1=(Gi=class extends gQ{constructor(t,n,r,i,a){super(),e.defineProperty(this,`config`,void 0),e.defineProperty(this,`tableName`,void 0),e.defineProperty(this,`joinsNotNullableMap`,void 0),e.defineProperty(this,`cacheConfig`,void 0),e.defineProperty(this,`leftJoin`,this.createJoin(`left`)),e.defineProperty(this,`rightJoin`,this.createJoin(`right`)),e.defineProperty(this,`innerJoin`,this.createJoin(`inner`)),e.defineProperty(this,`fullJoin`,this.createJoin(`full`)),e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`execute`,e=>this._prepare().execute(e,this.authToken)),this.session=r,this.dialect=i,this.config={set:n,table:t,withList:a,joins:[]},this.tableName=SQ(t),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{}}from(e){let t=e,n=SQ(t);return typeof n==`string`&&(this.joinsNotNullableMap[n]=!0),this.config.from=t,this}getTableLikeFields(e){return Q(e,YQ)?e[BZ.Symbol.Columns]:Q(e,TZ)?e._.selectedFields:e[jZ].selectedFields}createJoin(e){return(t,n)=>{let r=SQ(t);if(typeof r==`string`&&this.config.joins.some(e=>e.alias===r))throw Error(`Alias "${r}" is already used in this query`);if(typeof n==`function`){let e=this.config.from&&!Q(this.config.from,qZ)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[BZ.Symbol.Columns],new P$({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})),e&&new Proxy(e,new P$({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))}if(this.config.joins.push({on:n,table:t,joinType:e,alias:r}),typeof r==`string`)switch(e){case`left`:this.joinsNotNullableMap[r]=!1;break;case`right`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[r]=!0;break;case`inner`:this.joinsNotNullableMap[r]=!0;break;case`full`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[r]=!1;break}return this}}where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[BZ.Symbol.Columns]),this.config.from)){let t=SQ(this.config.from);if(typeof t==`string`&&this.config.from&&!Q(this.config.from,qZ)){let n=this.getTableLikeFields(this.config.from);e[t]=n}for(let t of this.config.joins){let n=SQ(t.table);if(typeof n==`string`&&!Q(t.table,qZ)){let r=this.getTableLikeFields(t.table);e[n]=r}}}return this.config.returningFields=e,this.config.returning=_Q(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){let t=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`insert`,tables:e1(this.config.table)},this.cacheConfig);return t.joinsNotNullableMap=this.joinsNotNullableMap,t}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new P$({alias:VZ(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},e.defineProperty(Gi,Z,`PgUpdate`),Gi),s1=(la=Symbol.toStringTag,Ki=class t extends qZ{constructor(n){super(t.buildEmbeddedCount(n.source,n.filters).queryChunks),e.defineProperty(this,`sql`,void 0),e.defineProperty(this,`token`,void 0),e.defineProperty(this,la,`PgCountBuilder`),e.defineProperty(this,`session`,void 0),this.params=n,this.mapWith(Number),this.session=n.session,this.sql=t.buildCount(n.source,n.filters)}static buildEmbeddedCount(e,t){return $`(select count(*) from ${e}${$.raw(` where `).if(t)}${t})`}static buildCount(e,t){return $`select count(*) as count from ${e}${$.raw(` where `).if(t)}${t};`}setToken(e){return this.token=e,this}then(e,t){return Promise.resolve(this.session.count(this.sql,this.token)).then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}},e.defineProperty(Ki,Z,`PgCountBuilder`),Ki),c1=(qi=class{constructor(e,t,n,r,i,a,o){this.fullSchema=e,this.schema=t,this.tableNamesMap=n,this.table=r,this.tableConfig=i,this.dialect=a,this.session=o}findMany(e){return new l1(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},`many`)}findFirst(e){return new l1(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},`first`)}},e.defineProperty(qi,Z,`PgRelationalQueryBuilder`),qi),l1=(Ji=class extends gQ{constructor(t,n,r,i,a,o,s,c,l){super(),e.defineProperty(this,`authToken`,void 0),this.fullSchema=t,this.schema=n,this.tableNamesMap=r,this.table=i,this.tableConfig=a,this.dialect=o,this.session=s,this.config=c,this.mode=l}_prepare(e){return AZ.startActiveSpan(`drizzle.prepareQuery`,()=>{let{query:t,builtQuery:n}=this._toSQL();return this.session.prepareQuery(n,void 0,e,!0,(e,n)=>{let r=e.map(e=>N$(this.schema,this.tableConfig,e,t.selection,n));return this.mode===`first`?r[0]:r})})}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(){let e=this._getQuery(),t=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:t}}toSQL(){return this._toSQL().builtQuery}setToken(e){return this.authToken=e,this}execute(){return AZ.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(void 0,this.authToken))}},e.defineProperty(Ji,Z,`PgRelationalQuery`),Ji),u1=(Yi=class extends gQ{constructor(e,t,n,r){super(),this.execute=e,this.sql=t,this.query=n,this.mapBatchResult=r}getSQL(){return this.sql}getQuery(){return this.query}mapResult(e,t){return t?this.mapBatchResult(e):e}_prepare(){return this}isResponseInArrayMode(){return!1}},e.defineProperty(Yi,Z,`PgRaw`),Yi),d1=(Xi=class{constructor(t,n,r){if(e.defineProperty(this,`query`,void 0),e.defineProperty(this,`$with`,(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(new $$(n.dialect))),new Proxy(new EZ(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new P$({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}}),e.defineProperty(this,`$cache`,void 0),e.defineProperty(this,`authToken`,void 0),this.dialect=t,this.session=n,this._=r?{schema:r.schema,fullSchema:r.fullSchema,tableNamesMap:r.tableNamesMap,session:n}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:n},this.query={},this._.schema)for(let[e,i]of Object.entries(this._.schema))this.query[e]=new c1(r.fullSchema,this._.schema,this._.tableNamesMap,r.fullSchema[e],i,t,n);this.$cache={invalidate:async e=>{}}}$count(e,t){return new s1({source:e,filters:t,session:this.session})}with(...e){let t=this;function n(n){return new H$({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e})}function r(n){return new H$({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:!0})}function i(n,r){return new H$({fields:r??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:{on:n}})}function a(n){return new a1(n,t.session,t.dialect,e)}function o(n){return new n1(n,t.session,t.dialect,e)}function s(n){return new t1(n,t.session,t.dialect,e)}return{select:n,selectDistinct:r,selectDistinctOn:i,update:a,insert:o,delete:s}}select(e){return new H$({fields:e??void 0,session:this.session,dialect:this.dialect})}selectDistinct(e){return new H$({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(e,t){return new H$({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:{on:e}})}update(e){return new a1(e,this.session,this.dialect)}insert(e){return new n1(e,this.session,this.dialect)}delete(e){return new t1(e,this.session,this.dialect)}refreshMaterializedView(e){return new i1(e,this.session,this.dialect)}execute(e){let t=typeof e==`string`?$.raw(e):e.getSQL(),n=this.dialect.sqlToQuery(t),r=this.session.prepareQuery(n,void 0,void 0,!1);return new u1(()=>r.execute(void 0,this.authToken),t,n,e=>r.mapResult(e,!0))}transaction(e,t){return this.session.transaction(e,t)}},e.defineProperty(Xi,Z,`PgDatabase`),Xi),f1=(Zi=class{},e.defineProperty(Zi,Z,`Cache`),Zi),p1=(Qi=class extends f1{strategy(){return`all`}async get(e){}async put(e,t,n,r){}async onMutate(e){}},e.defineProperty(Qi,Z,`NoopCache`),Qi);async function m1(e,t){let n=`${e}-${JSON.stringify(t)}`,r=new TextEncoder,i=r.encode(n),a=await crypto.subtle.digest(`SHA-256`,i),o=[...new Uint8Array(a)],s=o.map(e=>e.toString(16).padStart(2,`0`)).join(``);return s}var h1=class e extends Error{constructor(t,n,r){super(`Failed query: ${t} -params: ${n}`),this.query=t,this.params=n,this.cause=r,Error.captureStackTrace(this,e),r&&(this.cause=r)}},g1=($i=class{constructor(t,n,r,i){var a;e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`joinsNotNullableMap`,void 0),this.query=t,this.cache=n,this.queryMetadata=r,this.cacheConfig=i,n&&n.strategy()===`all`&&i===void 0&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),(a=this.cacheConfig)?.enable||(this.cacheConfig=void 0)}getQuery(){return this.query}mapResult(e,t){return e}setToken(e){return this.authToken=e,this}async queryWithCache(e,t,n){if(this.cache===void 0||Q(this.cache,p1)||this.queryMetadata===void 0)try{return await n()}catch(n){throw new h1(e,t,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await n()}catch(n){throw new h1(e,t,n)}if((this.queryMetadata.type===`insert`||this.queryMetadata.type===`update`||this.queryMetadata.type===`delete`)&&this.queryMetadata.tables.length>0)try{let[e]=await Promise.all([n(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return e}catch(n){throw new h1(e,t,n)}if(!this.cacheConfig)try{return await n()}catch(n){throw new h1(e,t,n)}if(this.queryMetadata.type===`select`){let r=await this.cache.get(this.cacheConfig.tag??await m1(e,t),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(r===void 0){let r;try{r=await n()}catch(n){throw new h1(e,t,n)}return await this.cache.put(this.cacheConfig.tag??await m1(e,t),r,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),r}return r}try{return await n()}catch(n){throw new h1(e,t,n)}}},e.defineProperty($i,Z,`PgPreparedQuery`),$i),_1=(ea=class{constructor(e){this.dialect=e}execute(e,t){return AZ.startActiveSpan(`drizzle.operation`,()=>{let n=AZ.startActiveSpan(`drizzle.prepareQuery`,()=>this.prepareQuery(this.dialect.sqlToQuery(e),void 0,void 0,!1));return n.setToken(t).execute(void 0,t)})}all(e){return this.prepareQuery(this.dialect.sqlToQuery(e),void 0,void 0,!1).all()}async count(e,t){let n=await this.execute(e,t);return Number(n[0].count)}},e.defineProperty(ea,Z,`PgSession`),ea),v1=(ta=class extends d1{constructor(e,t,n,r=0){super(e,t,n),this.schema=n,this.nestedIndex=r}rollback(){throw new fQ}getTransactionConfigSQL(e){let t=[];return e.isolationLevel&&t.push(`isolation level ${e.isolationLevel}`),e.accessMode&&t.push(e.accessMode),typeof e.deferrable==`boolean`&&t.push(e.deferrable?`deferrable`:`not deferrable`),$.raw(t.join(` `))}setTransaction(e){return this.session.execute($`set transaction ${this.getTransactionConfigSQL(e)}`)}},e.defineProperty(ta,Z,`PgTransaction`),ta);function y1(e){return typeof e==`string`&&/^true$/i.test(e)}function b1(e){let t={scheme:`duckdb-wasm:`},n=new URL(e);if(!n.protocol.startsWith(`duckdb-wasm:`))throw Error(`Expected scheme to be "duckdb-wasm:" but got "${n.protocol}"`);n.searchParams.get(`bundles`)===`import-url`&&(t.bundles=`import-url`);let r=n.searchParams.get(`logger`);r&&y1(r)&&(t.logger=!0);let i=n.searchParams.get(`storage`);switch(i){case JX.ORIGIN_PRIVATE_FS:{n.host.length>0&&console.warn(`Host "${n.host}" will be ignored while using Origin Private FS`);let e=n.searchParams.get(`write`);t.storage={type:JX.ORIGIN_PRIVATE_FS,path:n.pathname.startsWith(`/`)?n.pathname.slice(1):n.pathname,...e&&y1(e)&&{accessMode:mV.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var x1=(na=class extends g1{constructor(e,t,n,r,i,a){super({sql:t,params:n}),this.client=e,this.queryString=t,this.params=n,this.logger=r,this.fields=i,this.customResultMapper=a}async execute(e={}){let t=tQ(this.params,e);this.logger.logQuery(this.queryString,t);let{fields:n,queryString:r,client:i,customResultMapper:a}=this,o=await i;return o.query(r,t)}async all(e={}){let t=tQ(this.params,e);this.logger.logQuery(this.queryString,t);let n=await this.client;return n.query(this.queryString,t)}},e.defineProperty(na,Z,`DuckDBWasmPreparedQuery`),na),S1=(ra=class t extends _1{constructor(t,n,r,i={}){super(n),e.defineProperty(this,`logger`,void 0),this.client=t,this.schema=r,this.options=i,this.logger=i.logger??new hQ}prepareQuery(e,t,n,r,i){return new x1(this.client,e.sql,e.params,this.logger,t,i)}async query(e,t){this.logger.logQuery(e,t);let n=await this.client;return n.query(e,t)}async queryObjects(e,t){this.logger.logQuery(e,t);let n=await this.client;return n.query(e,t)}transaction(e,n){return XX(this.client,async r=>{let i=new t(r,this.dialect,this.schema,this.options),a=new C1(this.dialect,i,this.schema);return n&&await a.setTransaction(n),e(a)})}},e.defineProperty(ra,Z,`DuckDBWasmSession`),ra),C1=(ia=class t extends v1{constructor(t,n,r,i=0){super(t,n,r,i),e.defineProperty(this,`dialect`,void 0),e.defineProperty(this,`session`,void 0),this.dialect=t,this.session=n}async transaction(e){return ZX(this.session.client,``,async n=>{let r=new S1(n,this.dialect,this.schema,this.session.options),i=new t(this.dialect,r,this.schema);return e(i)})}},e.defineProperty(ia,Z,`DuckDBWasmTransaction`),ia),w1=(aa=class extends d1{},e.defineProperty(aa,Z,`DuckDBWasmDatabase`),aa);function T1(e,t={}){let n=new B$({casing:t.casing}),r;t.logger===!0?r=new mQ:t.logger!==!1&&(r=t.logger);let i;if(t.schema){let e=O$(t.schema,M$);i={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new S1(e,n,i,{logger:r}),o=new w1(n,a,i);return o.$client=e,o}function E1(e,t){let n=b1(e),r;if(n.bundles===`import-url`){let e=async()=>{let e=await xX();switch(e){case`browser`:return(await Dt(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-browser-D6kI1pk-.js`);return{getImportUrlBundles:e}},__vite__mapDeps([4,5,6]))).getImportUrlBundles();case`node`:return await(await Dt(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-node-CDn8y3R9.js`);return{getImportUrlBundles:e}},__vite__mapDeps([7,6]))).getImportUrlBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}else{let e=async()=>{let e=await xX();switch(e){case`browser`:return(await Dt(async()=>{let{getBundles:e}=await import(`./default-browser-vwqgKA0M.js`);return{getBundles:e}},[])).getBundles();case`node`:return await(await Dt(async()=>{let{getBundles:e}=await import(`./default-node-EA9BojRq.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]))).getBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}return T1(YX({bundles:r,logger:n.logger?new xV:void 0,storage:n.storage}),t)}function D1(...e){if(typeof e[0]==`string`)return E1(e[0],e[1]);if(CQ(e[0])){let{connection:t,client:n,...r}=e[0];if(n)return T1(n,r);if(typeof t==`string`)return E1(t,r);if(t===void 0)throw Error(`connection option is required`);return T1(YX({bundles:t.bundles,logger:t.logger,storage:t.storage}),r)}return T1(e[0],e[1])}(function(e){function t(e){return T1({options:{parsers:{},serializers:{}}},e)}e.mock=t})(D1||={});const O1={relative:``},k1={"h-full":``,"w-full":``},A1={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`},j1={bg:`primary-50`,"rounded-xl":``,"px-10":``,"py-6":``},M1=[`innerHTML`];var N1=H({__name:`Stage`,props:{paused:{type:Boolean,default:!1},focusAt:null},setup(e){let t=W(),n=W(),{stageView:r}=pn(Dn()),{mouthOpenSize:i}=pn(Gn()),{audioContext:a,calculateVolume:o}=Hn(),{onBeforeMessageComposed:s,onBeforeSend:c,onTokenLiteral:l,onTokenSpecial:u,onStreamEnd:d,streamingMessage:f,onAssistantResponseEnd:p}=Un(),{process:m}=gr(),h=Wn(),g=W(),_=W(!1),v=W(!1),y=vr({handlers:[e=>new Promise(t=>{let n=a.createBufferSource();n.buffer=e.data.audioBuffer,n.connect(a.destination),n.connect(g.value),_.value=!0,n.start(0),n.onended=()=>{_.value=!1,t()}})]}),b=Kn(),{ssmlEnabled:x,activeSpeechProvider:S,activeSpeechModel:C,activeSpeechVoice:w,pitch:T}=pn(b);async function E(e){try{if(!S.value){console.warn(`No active speech provider configured`);return}if(!w.value){console.warn(`No active speech voice configured`);return}let t=h.getProviderInstance(S.value);if(!t){console.error(`Failed to initialize speech provider`);return}let n=h.getProviderConfig(S.value),r=x.value?b.generateSSML(e.data,w.value,{...n,pitch:T.value}):e.data,i=await Vn({...t.speech(C.value,n),input:r,voice:w.value.id}),o=await a.decodeAudioData(i);await y.add({audioBuffer:o,text:e.data})}catch(e){console.error(`Speech generation failed:`,e)}}let D=vr({handlers:[E]});D.on(`add`,e=>{console.debug(`ttsQueue added`,e)});let O=or(D),{live2dCurrentMotion:k}=pn(Dn()),A=vr({handlers:[async e=>{if(r.value===`3d`){let t=$n[e.data];if(!t)return;await n.value.setExpression(t)}else r.value===`2d`&&(k.value={group:Qn[e.data]})}]}),j=ar(A);j.onHandlerEvent(`emotion`,e=>{console.debug(`emotion detected`,e)});let M=ir();M.onHandlerEvent(`delay`,e=>{console.debug(`delay detected`,e)});function N(){requestAnimationFrame(N),_.value&&(i.value=o(g.value,`linear`))}function ee(){v.value||(N(),a.resume(),v.value=!0)}function P(){g.value||=a.createAnalyser()}return s(async()=>{P(),ee()}),c(async()=>{k.value={group:er}}),l(async e=>{await O.add(e)}),u(async e=>{await M.add(e),await j.add(e)}),d(async()=>{await M.add(rr)}),p(async e=>{}),tn(()=>{v.value=!1}),$t(async()=>{t.value=D1({connection:{bundles:Bn()}}),await t.value.execute(`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(t,a)=>(U(),V(`div`,O1,[B(`div`,k1,[G(r)===`2d`?(U(),At(cx,{key:0,"focus-at":e.focusAt,"mouth-open-size":G(i),"min-w":`50% 0)try{let[e]=await Promise.all([n(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return e}catch(n){throw new h1(e,t,n)}if(!this.cacheConfig)try{return await n()}catch(n){throw new h1(e,t,n)}if(this.queryMetadata.type===`select`){let r=await this.cache.get(this.cacheConfig.tag??await m1(e,t),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(r===void 0){let r;try{r=await n()}catch(n){throw new h1(e,t,n)}return await this.cache.put(this.cacheConfig.tag??await m1(e,t),r,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),r}return r}try{return await n()}catch(n){throw new h1(e,t,n)}}},e.defineProperty($i,Z,`PgPreparedQuery`),$i),_1=(ea=class{constructor(e){this.dialect=e}execute(e,t){return AZ.startActiveSpan(`drizzle.operation`,()=>{let n=AZ.startActiveSpan(`drizzle.prepareQuery`,()=>this.prepareQuery(this.dialect.sqlToQuery(e),void 0,void 0,!1));return n.setToken(t).execute(void 0,t)})}all(e){return this.prepareQuery(this.dialect.sqlToQuery(e),void 0,void 0,!1).all()}async count(e,t){let n=await this.execute(e,t);return Number(n[0].count)}},e.defineProperty(ea,Z,`PgSession`),ea),v1=(ta=class extends d1{constructor(e,t,n,r=0){super(e,t,n),this.schema=n,this.nestedIndex=r}rollback(){throw new fQ}getTransactionConfigSQL(e){let t=[];return e.isolationLevel&&t.push(`isolation level ${e.isolationLevel}`),e.accessMode&&t.push(e.accessMode),typeof e.deferrable==`boolean`&&t.push(e.deferrable?`deferrable`:`not deferrable`),$.raw(t.join(` `))}setTransaction(e){return this.session.execute($`set transaction ${this.getTransactionConfigSQL(e)}`)}},e.defineProperty(ta,Z,`PgTransaction`),ta);function y1(e){return typeof e==`string`&&/^true$/i.test(e)}function b1(e){let t={scheme:`duckdb-wasm:`},n=new URL(e);if(!n.protocol.startsWith(`duckdb-wasm:`))throw Error(`Expected scheme to be "duckdb-wasm:" but got "${n.protocol}"`);n.searchParams.get(`bundles`)===`import-url`&&(t.bundles=`import-url`);let r=n.searchParams.get(`logger`);r&&y1(r)&&(t.logger=!0);let i=n.searchParams.get(`storage`);switch(i){case JX.ORIGIN_PRIVATE_FS:{n.host.length>0&&console.warn(`Host "${n.host}" will be ignored while using Origin Private FS`);let e=n.searchParams.get(`write`);t.storage={type:JX.ORIGIN_PRIVATE_FS,path:n.pathname.startsWith(`/`)?n.pathname.slice(1):n.pathname,...e&&y1(e)&&{accessMode:mV.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var x1=(na=class extends g1{constructor(e,t,n,r,i,a){super({sql:t,params:n}),this.client=e,this.queryString=t,this.params=n,this.logger=r,this.fields=i,this.customResultMapper=a}async execute(e={}){let t=tQ(this.params,e);this.logger.logQuery(this.queryString,t);let{fields:n,queryString:r,client:i,customResultMapper:a}=this,o=await i;return o.query(r,t)}async all(e={}){let t=tQ(this.params,e);this.logger.logQuery(this.queryString,t);let n=await this.client;return n.query(this.queryString,t)}},e.defineProperty(na,Z,`DuckDBWasmPreparedQuery`),na),S1=(ra=class t extends _1{constructor(t,n,r,i={}){super(n),e.defineProperty(this,`logger`,void 0),this.client=t,this.schema=r,this.options=i,this.logger=i.logger??new hQ}prepareQuery(e,t,n,r,i){return new x1(this.client,e.sql,e.params,this.logger,t,i)}async query(e,t){this.logger.logQuery(e,t);let n=await this.client;return n.query(e,t)}async queryObjects(e,t){this.logger.logQuery(e,t);let n=await this.client;return n.query(e,t)}transaction(e,n){return XX(this.client,async r=>{let i=new t(r,this.dialect,this.schema,this.options),a=new C1(this.dialect,i,this.schema);return n&&await a.setTransaction(n),e(a)})}},e.defineProperty(ra,Z,`DuckDBWasmSession`),ra),C1=(ia=class t extends v1{constructor(t,n,r,i=0){super(t,n,r,i),e.defineProperty(this,`dialect`,void 0),e.defineProperty(this,`session`,void 0),this.dialect=t,this.session=n}async transaction(e){return ZX(this.session.client,``,async n=>{let r=new S1(n,this.dialect,this.schema,this.session.options),i=new t(this.dialect,r,this.schema);return e(i)})}},e.defineProperty(ia,Z,`DuckDBWasmTransaction`),ia),w1=(aa=class extends d1{},e.defineProperty(aa,Z,`DuckDBWasmDatabase`),aa);function T1(e,t={}){let n=new B$({casing:t.casing}),r;t.logger===!0?r=new mQ:t.logger!==!1&&(r=t.logger);let i;if(t.schema){let e=O$(t.schema,M$);i={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new S1(e,n,i,{logger:r}),o=new w1(n,a,i);return o.$client=e,o}function E1(e,t){let n=b1(e),r;if(n.bundles===`import-url`){let e=async()=>{let e=await xX();switch(e){case`browser`:return(await Dt(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-browser-D6kI1pk-.js`);return{getImportUrlBundles:e}},__vite__mapDeps([4,5,6]))).getImportUrlBundles();case`node`:return await(await Dt(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-node-CDn8y3R9.js`);return{getImportUrlBundles:e}},__vite__mapDeps([7,6]))).getImportUrlBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}else{let e=async()=>{let e=await xX();switch(e){case`browser`:return(await Dt(async()=>{let{getBundles:e}=await import(`./default-browser-vwqgKA0M.js`);return{getBundles:e}},[])).getBundles();case`node`:return await(await Dt(async()=>{let{getBundles:e}=await import(`./default-node-DFUtCPbV.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]))).getBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}return T1(YX({bundles:r,logger:n.logger?new xV:void 0,storage:n.storage}),t)}function D1(...e){if(typeof e[0]==`string`)return E1(e[0],e[1]);if(CQ(e[0])){let{connection:t,client:n,...r}=e[0];if(n)return T1(n,r);if(typeof t==`string`)return E1(t,r);if(t===void 0)throw Error(`connection option is required`);return T1(YX({bundles:t.bundles,logger:t.logger,storage:t.storage}),r)}return T1(e[0],e[1])}(function(e){function t(e){return T1({options:{parsers:{},serializers:{}}},e)}e.mock=t})(D1||={});const O1={relative:``},k1={"h-full":``,"w-full":``},A1={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`},j1={bg:`primary-50`,"rounded-xl":``,"px-10":``,"py-6":``},M1=[`innerHTML`];var N1=H({__name:`Stage`,props:{paused:{type:Boolean,default:!1},focusAt:null},setup(e){let t=W(),n=W(),{stageView:r}=pn(Dn()),{mouthOpenSize:i}=pn(Gn()),{audioContext:a,calculateVolume:o}=Hn(),{onBeforeMessageComposed:s,onBeforeSend:c,onTokenLiteral:l,onTokenSpecial:u,onStreamEnd:d,streamingMessage:f,onAssistantResponseEnd:p}=Un(),{process:m}=gr(),h=Wn(),g=W(),_=W(!1),v=W(!1),y=vr({handlers:[e=>new Promise(t=>{let n=a.createBufferSource();n.buffer=e.data.audioBuffer,n.connect(a.destination),n.connect(g.value),_.value=!0,n.start(0),n.onended=()=>{_.value=!1,t()}})]}),b=Kn(),{ssmlEnabled:x,activeSpeechProvider:S,activeSpeechModel:C,activeSpeechVoice:w,pitch:T}=pn(b);async function E(e){try{if(!S.value){console.warn(`No active speech provider configured`);return}if(!w.value){console.warn(`No active speech voice configured`);return}let t=h.getProviderInstance(S.value);if(!t){console.error(`Failed to initialize speech provider`);return}let n=h.getProviderConfig(S.value),r=x.value?b.generateSSML(e.data,w.value,{...n,pitch:T.value}):e.data,i=await Vn({...t.speech(C.value,n),input:r,voice:w.value.id}),o=await a.decodeAudioData(i);await y.add({audioBuffer:o,text:e.data})}catch(e){console.error(`Speech generation failed:`,e)}}let D=vr({handlers:[E]});D.on(`add`,e=>{console.debug(`ttsQueue added`,e)});let O=or(D),{live2dCurrentMotion:k}=pn(Dn()),A=vr({handlers:[async e=>{if(r.value===`3d`){let t=$n[e.data];if(!t)return;await n.value.setExpression(t)}else r.value===`2d`&&(k.value={group:Qn[e.data]})}]}),j=ar(A);j.onHandlerEvent(`emotion`,e=>{console.debug(`emotion detected`,e)});let M=ir();M.onHandlerEvent(`delay`,e=>{console.debug(`delay detected`,e)});function N(){requestAnimationFrame(N),_.value&&(i.value=o(g.value,`linear`))}function ee(){v.value||(N(),a.resume(),v.value=!0)}function P(){g.value||=a.createAnalyser()}return s(async()=>{P(),ee()}),c(async()=>{k.value={group:er}}),l(async e=>{await O.add(e)}),u(async e=>{await M.add(e),await j.add(e)}),d(async()=>{await M.add(rr)}),p(async e=>{}),tn(()=>{v.value=!1}),$t(async()=>{t.value=D1({connection:{bundles:Bn()}}),await t.value.execute(`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(t,a)=>(U(),V(`div`,O1,[B(`div`,k1,[G(r)===`2d`?(U(),At(cx,{key:0,"focus-at":e.focusAt,"mouth-open-size":G(i),"min-w":`50% value!=null&&Object.getPrototypeOf(value)===Object.prototype,merge=(defaults,user)=>{let merged={...defaults};if(!user)return merged;for(let[key$1,value]of Object.entries(user)){if(value===void 0)continue;if(isPlainObject$2(merged[key$1])&&isPlainObject$2(value)){merged[key$1]=merge(merged[key$1],value);continue}merged[key$1]=value}return merged};var States=function(States$1){return States$1.Literal=`literal`,States$1.Special=`special`,States$1}(States||{});function peek(array,index$1,offset){return index$1+offset<0||index$1+offset>=array.length-1?``:array[index$1+offset]}function useLlmmarkerParser(options){let state=States.Literal,buffer=``;return{async consume(textPart){for(let i=0;i`?(current+=peek(textPart,i,1),newState=States.Literal,i++):current===`<`?newState=States.Special:current===`>`&&(newState=States.Literal),state===States.Literal&&newState===States.Special){if(buffer!==``){var _options$onLiteral;await(_options$onLiteral=options.onLiteral)?.call(options,buffer),buffer=``}}else if(state===States.Special&&newState===States.Literal&&buffer!==``){var _options$onSpecial;buffer+=current,await(_options$onSpecial=options.onSpecial)?.call(options,buffer),buffer=``}if(state===States.Literal&&newState===States.Literal){var _options$onLiteral2;await(_options$onLiteral2=options.onLiteral)?.call(options,current),buffer=``}else state===States.Special&&newState===States.Literal?buffer=``:buffer+=current;state=newState}},async end(){if(buffer!==``){var _options$onLiteral3,_options$onSpecial2;state===States.Literal?await(_options$onLiteral3=options.onLiteral)?.call(options,buffer):buffer.endsWith(`|>`)&&await(_options$onSpecial2=options.onSpecial)?.call(options,buffer)}}}}const htmlVoidElements=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`];var Schema=class{constructor(property,normal,space$1){this.normal=normal,this.property=property,space$1&&(this.space=space$1)}};Schema.prototype.normal={},Schema.prototype.property={},Schema.prototype.space=void 0;function merge$1(definitions,space$1){let property={},normal={};for(let definition$1 of definitions)Object.assign(property,definition$1.property),Object.assign(normal,definition$1.normal);return new Schema(property,normal,space$1)}function normalize$1(value){return value.toLowerCase()}var Info=class{constructor(property,attribute){this.attribute=attribute,this.property=property}};Info.prototype.attribute=``,Info.prototype.booleanish=!1,Info.prototype.boolean=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.commaSeparated=!1,Info.prototype.defined=!1,Info.prototype.mustUseProperty=!1,Info.prototype.number=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.property=``,Info.prototype.spaceSeparated=!1,Info.prototype.space=void 0;var types_exports={};__export(types_exports,{boolean:()=>boolean,booleanish:()=>booleanish,commaOrSpaceSeparated:()=>commaOrSpaceSeparated,commaSeparated:()=>commaSeparated,number:()=>number,overloadedBoolean:()=>overloadedBoolean,spaceSeparated:()=>spaceSeparated});let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const checks=Object.keys(types_exports);var DefinedInfo=class extends Info{constructor(property,attribute,mask,space$1){let index$1=-1;if(super(property,attribute),mark(this,`space`,space$1),typeof mask==`number`)for(;++index$14&&normal.slice(0,4)===`data`&&valid.test(value)){if(value.charAt(4)===`-`){let rest=value.slice(5).replace(dash,camelcase);property=`data`+rest.charAt(0).toUpperCase()+rest.slice(1)}else{let rest=value.slice(4);if(!dash.test(rest)){let dashes=rest.replace(cap,kebab);dashes.charAt(0)!==`-`&&(dashes=`-`+dashes),value=`data`+dashes}}Type=DefinedInfo}return new Type(property,value)}function kebab($0){return`-`+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()}const html$1=merge$1([aria,html$4,xlink,xmlns,xml],`html`),svg=merge$1([aria,svg$1,xlink,xmlns,xml],`svg`),own$5={}.hasOwnProperty;function zwitch(key$1,options){let settings=options||{};function one$2(value,...parameters){let fn=one$2.invalid,handlers$1=one$2.handlers;if(value&&own$5.call(value,key$1)){let id=String(value[key$1]);fn=own$5.call(handlers$1,id)?handlers$1[id]:one$2.unknown}if(fn)return fn.call(this,value,...parameters)}return one$2.handlers=settings.handlers||{},one$2.invalid=settings.invalid,one$2.unknown=settings.unknown,one$2}const defaultSubsetRegex=/["&'<>`]/g,surrogatePairsRegex=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,controlCharactersRegex=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,regexEscapeRegex=/[|\\{}()[\]^$+*?.]/g,subsetToRegexCache=new WeakMap;function core(value,options){if(value=value.replace(options.subset?charactersToExpressionCached(options.subset):defaultSubsetRegex,basic),options.subset||options.escapeOnly)return value;return value.replace(surrogatePairsRegex,surrogate).replace(controlCharactersRegex,basic);function surrogate(pair,index$1,all$2){return options.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all$2.charCodeAt(index$1+2),options)}function basic(character,index$1,all$2){return options.format(character.charCodeAt(0),all$2.charCodeAt(index$1+1),options)}}function charactersToExpressionCached(subset){let cached=subsetToRegexCache.get(subset);return cached||(cached=charactersToExpression(subset),subsetToRegexCache.set(subset,cached)),cached}function charactersToExpression(subset){let groups=[],index$1=-1;for(;++index$1`,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:`€`},dangerous=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],own$4={}.hasOwnProperty,characters={};let key;for(key in characterEntitiesHtml4)own$4.call(characterEntitiesHtml4,key)&&(characters[characterEntitiesHtml4[key]]=key);const notAlphanumericRegex=/[^\dA-Za-z]/;function toNamed(code$1,next,omit,attribute){let character=String.fromCharCode(code$1);if(own$4.call(characters,character)){let name$1=characters[character],value=`&`+name$1;return omit&&characterEntitiesLegacy.includes(name$1)&&!dangerous.includes(name$1)&&(!attribute||next&&next!==61&¬AlphanumericRegex.test(String.fromCharCode(next)))?value:value+`;`}return``}function formatSmart(code$1,next,options){let numeric=toHexadecimal(code$1,next,options.omitOptionalSemicolons),named;if((options.useNamedReferences||options.useShortestReferences)&&(named=toNamed(code$1,next,options.omitOptionalSemicolons,options.attribute)),(options.useShortestReferences||!named)&&options.useShortestReferences){let decimal=toDecimal(code$1,next,options.omitOptionalSemicolons);decimal.length|^->||--!>|`],commentEntitySubset=[`<`,`>`];function comment(node$1,_1,_2,state){return state.settings.bogusComments?``:``;function encode($0){return stringifyEntities($0,Object.assign({},state.settings.characterReferences,{subset:commentEntitySubset}))}}function doctype(_1,_2,_3,state){return``}function ccount(value,character){let source=String(value);if(typeof character!=`string`)throw TypeError(`Expected character`);let count=0,index$1=source.indexOf(character);for(;index$1!==-1;)count++,index$1=source.indexOf(character,index$1+character.length);return count}function stringify(values,options){let settings=options||{},input=values[values.length-1]===``?[...values,``]:values;return input.join((settings.padRight?` `:``)+`,`+(settings.padLeft===!1?``:` `)).trim()}function stringify$1(values){return values.join(` `).trim()}const re=/[ \t\n\f\r]/g;function whitespace(thing){return typeof thing==`object`?thing.type===`text`?empty$1(thing.value):!1:empty$1(thing)}function empty$1(value){return value.replace(re,``)===``}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(increment$1){return sibling;function sibling(parent,index$1,includeWhitespace){let siblings$1=parent?parent.children:emptyChildren$1,offset=(index$1||0)+increment$1,next=siblings$1[offset];if(!includeWhitespace)for(;next&&whitespace(next);)offset+=increment$1,next=siblings$1[offset];return next}}const own$3={}.hasOwnProperty;function omission(handlers$1){return omit;function omit(node$1,index$1,parent){return own$3.call(handlers$1,node$1.tagName)&&handlers$1[node$1.tagName](node$1,index$1,parent)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd,dt,head:headOrColgroupOrCaption,html:html$3,li,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr});function headOrColgroupOrCaption(_,index$1,parent){let next=siblingAfter(parent,index$1,!0);return!next||next.type!==`comment`&&!(next.type===`text`&&whitespace(next.value.charAt(0)))}function html$3(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function body$1(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function p(_,index$1,parent){let next=siblingAfter(parent,index$1);return next?next.type===`element`&&(next.tagName===`address`||next.tagName===`article`||next.tagName===`aside`||next.tagName===`blockquote`||next.tagName===`details`||next.tagName===`div`||next.tagName===`dl`||next.tagName===`fieldset`||next.tagName===`figcaption`||next.tagName===`figure`||next.tagName===`footer`||next.tagName===`form`||next.tagName===`h1`||next.tagName===`h2`||next.tagName===`h3`||next.tagName===`h4`||next.tagName===`h5`||next.tagName===`h6`||next.tagName===`header`||next.tagName===`hgroup`||next.tagName===`hr`||next.tagName===`main`||next.tagName===`menu`||next.tagName===`nav`||next.tagName===`ol`||next.tagName===`p`||next.tagName===`pre`||next.tagName===`section`||next.tagName===`table`||next.tagName===`ul`):!parent||!(parent.type===`element`&&(parent.tagName===`a`||parent.tagName===`audio`||parent.tagName===`del`||parent.tagName===`ins`||parent.tagName===`map`||parent.tagName===`noscript`||parent.tagName===`video`))}function li(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`li`}function dt(_,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`))}function dd(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`)}function rubyElement(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`rp`||next.tagName===`rt`)}function optgroup(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`optgroup`}function option(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`option`||next.tagName===`optgroup`)}function thead(_,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`))}function tbody$1(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`)}function tfoot(_,index$1,parent){return!siblingAfter(parent,index$1)}function tr(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`tr`}function cells(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`td`||next.tagName===`th`)}const opening=omission({body,colgroup,head,html:html$2,tbody});function html$2(node$1){let head$1=siblingAfter(node$1,-1);return!head$1||head$1.type!==`comment`}function head(node$1){let seen=new Set;for(let child$1 of node$1.children)if(child$1.type===`element`&&(child$1.tagName===`base`||child$1.tagName===`title`)){if(seen.has(child$1.tagName))return!1;seen.add(child$1.tagName)}let child=node$1.children[0];return!child||child.type===`element`}function body(node$1){let head$1=siblingAfter(node$1,-1,!0);return!head$1||head$1.type!==`comment`&&!(head$1.type===`text`&&whitespace(head$1.value.charAt(0)))&&!(head$1.type===`element`&&(head$1.tagName===`meta`||head$1.tagName===`link`||head$1.tagName===`script`||head$1.tagName===`style`||head$1.tagName===`template`))}function colgroup(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1,!0);return parent&&previous$1&&previous$1.type===`element`&&previous$1.tagName===`colgroup`&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`col`)}function tbody(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1);return parent&&previous$1&&previous$1.type===`element`&&(previous$1.tagName===`thead`||previous$1.tagName===`tbody`)&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`tr`)}const constants={name:[[` +import{AnimationClip,AxesHelper,BackSide,Bone,Box3,BufferAttribute,BufferGeometry,ClampToEdgeWrapping,Color,ColorManagement,DirectionalLight,DoubleSide,DynamicDrawUsage,Euler,FileLoader,FrontSide,GLBufferAttribute,Group,ImageBitmapLoader,ImageLoader,InstancedBufferAttribute,InstancedMesh,InterleavedBuffer,InterleavedBufferAttribute,Interpolant,InterpolateDiscrete,InterpolateLinear,Line,LineBasicMaterial,LineLoop,LineSegments,LinearFilter,LinearMipmapLinearFilter,LinearMipmapNearestFilter,LinearSRGBColorSpace,Loader,LoaderUtils,Material,MathUtils,Matrix3,Matrix4,Mesh,MeshBasicMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MirroredRepeatWrapping,NearestFilter,NearestMipmapLinearFilter,NearestMipmapNearestFilter,NumberKeyframeTrack,Object3D,OrthographicCamera,PerspectiveCamera,PointLight,Points,PointsMaterial,PropertyBinding,Quaternion,QuaternionKeyframeTrack,REVISION,RepeatWrapping,SRGBColorSpace,ShaderMaterial,Skeleton,SkinnedMesh,Sphere,SpotLight,TangentSpaceNormalMap,Texture,TextureLoader,TriangleFanDrawMode,TriangleStripDrawMode,TrianglesDrawMode,UniformsLib,UniformsUtils,Vector2,Vector3,VectorKeyframeTrack,__commonJSMin,__esmMin,__export,__toCommonJS,__toESM,onUnmounted,ref,toRef,tryOnMounted,unref,usePermission,useWebWorker,watch}from"./index-C-t5bjx6.js";const DEG2RAD=Math.PI/180,RAD2DEG$1=180/Math.PI;function lerp(x,y,t){return(1-t)*x+t*y}function randFloat(low,high){return low+Math.random()*(high-low)}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 i=1;ivalue!=null&&Object.getPrototypeOf(value)===Object.prototype,merge=(defaults,user)=>{let merged={...defaults};if(!user)return merged;for(let[key$1,value]of Object.entries(user)){if(value===void 0)continue;if(isPlainObject$2(merged[key$1])&&isPlainObject$2(value)){merged[key$1]=merge(merged[key$1],value);continue}merged[key$1]=value}return merged};var States=function(States$1){return States$1.Literal=`literal`,States$1.Special=`special`,States$1}(States||{});function peek(array,index$1,offset){return index$1+offset<0||index$1+offset>=array.length-1?``:array[index$1+offset]}function useLlmmarkerParser(options){let state=States.Literal,buffer=``;return{async consume(textPart){for(let i=0;i`?(current+=peek(textPart,i,1),newState=States.Literal,i++):current===`<`?newState=States.Special:current===`>`&&(newState=States.Literal),state===States.Literal&&newState===States.Special){if(buffer!==``){var _options$onLiteral;await(_options$onLiteral=options.onLiteral)?.call(options,buffer),buffer=``}}else if(state===States.Special&&newState===States.Literal&&buffer!==``){var _options$onSpecial;buffer+=current,await(_options$onSpecial=options.onSpecial)?.call(options,buffer),buffer=``}if(state===States.Literal&&newState===States.Literal){var _options$onLiteral2;await(_options$onLiteral2=options.onLiteral)?.call(options,current),buffer=``}else state===States.Special&&newState===States.Literal?buffer=``:buffer+=current;state=newState}},async end(){if(buffer!==``){var _options$onLiteral3,_options$onSpecial2;state===States.Literal?await(_options$onLiteral3=options.onLiteral)?.call(options,buffer):buffer.endsWith(`|>`)&&await(_options$onSpecial2=options.onSpecial)?.call(options,buffer)}}}}const htmlVoidElements=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`];var Schema=class{constructor(property,normal,space$1){this.normal=normal,this.property=property,space$1&&(this.space=space$1)}};Schema.prototype.normal={},Schema.prototype.property={},Schema.prototype.space=void 0;function merge$1(definitions,space$1){let property={},normal={};for(let definition$1 of definitions)Object.assign(property,definition$1.property),Object.assign(normal,definition$1.normal);return new Schema(property,normal,space$1)}function normalize$1(value){return value.toLowerCase()}var Info=class{constructor(property,attribute){this.attribute=attribute,this.property=property}};Info.prototype.attribute=``,Info.prototype.booleanish=!1,Info.prototype.boolean=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.commaSeparated=!1,Info.prototype.defined=!1,Info.prototype.mustUseProperty=!1,Info.prototype.number=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.property=``,Info.prototype.spaceSeparated=!1,Info.prototype.space=void 0;var types_exports={};__export(types_exports,{boolean:()=>boolean,booleanish:()=>booleanish,commaOrSpaceSeparated:()=>commaOrSpaceSeparated,commaSeparated:()=>commaSeparated,number:()=>number,overloadedBoolean:()=>overloadedBoolean,spaceSeparated:()=>spaceSeparated});let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const checks=Object.keys(types_exports);var DefinedInfo=class extends Info{constructor(property,attribute,mask,space$1){let index$1=-1;if(super(property,attribute),mark(this,`space`,space$1),typeof mask==`number`)for(;++index$14&&normal.slice(0,4)===`data`&&valid.test(value)){if(value.charAt(4)===`-`){let rest=value.slice(5).replace(dash,camelcase);property=`data`+rest.charAt(0).toUpperCase()+rest.slice(1)}else{let rest=value.slice(4);if(!dash.test(rest)){let dashes=rest.replace(cap,kebab);dashes.charAt(0)!==`-`&&(dashes=`-`+dashes),value=`data`+dashes}}Type=DefinedInfo}return new Type(property,value)}function kebab($0){return`-`+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()}const html$1=merge$1([aria,html$4,xlink,xmlns,xml],`html`),svg=merge$1([aria,svg$1,xlink,xmlns,xml],`svg`),own$5={}.hasOwnProperty;function zwitch(key$1,options){let settings=options||{};function one$2(value,...parameters){let fn=one$2.invalid,handlers$1=one$2.handlers;if(value&&own$5.call(value,key$1)){let id=String(value[key$1]);fn=own$5.call(handlers$1,id)?handlers$1[id]:one$2.unknown}if(fn)return fn.call(this,value,...parameters)}return one$2.handlers=settings.handlers||{},one$2.invalid=settings.invalid,one$2.unknown=settings.unknown,one$2}const defaultSubsetRegex=/["&'<>`]/g,surrogatePairsRegex=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,controlCharactersRegex=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,regexEscapeRegex=/[|\\{}()[\]^$+*?.]/g,subsetToRegexCache=new WeakMap;function core(value,options){if(value=value.replace(options.subset?charactersToExpressionCached(options.subset):defaultSubsetRegex,basic),options.subset||options.escapeOnly)return value;return value.replace(surrogatePairsRegex,surrogate).replace(controlCharactersRegex,basic);function surrogate(pair,index$1,all$2){return options.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all$2.charCodeAt(index$1+2),options)}function basic(character,index$1,all$2){return options.format(character.charCodeAt(0),all$2.charCodeAt(index$1+1),options)}}function charactersToExpressionCached(subset){let cached=subsetToRegexCache.get(subset);return cached||(cached=charactersToExpression(subset),subsetToRegexCache.set(subset,cached)),cached}function charactersToExpression(subset){let groups=[],index$1=-1;for(;++index$1`,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:`€`},dangerous=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],own$4={}.hasOwnProperty,characters={};let key;for(key in characterEntitiesHtml4)own$4.call(characterEntitiesHtml4,key)&&(characters[characterEntitiesHtml4[key]]=key);const notAlphanumericRegex=/[^\dA-Za-z]/;function toNamed(code$1,next,omit,attribute){let character=String.fromCharCode(code$1);if(own$4.call(characters,character)){let name$1=characters[character],value=`&`+name$1;return omit&&characterEntitiesLegacy.includes(name$1)&&!dangerous.includes(name$1)&&(!attribute||next&&next!==61&¬AlphanumericRegex.test(String.fromCharCode(next)))?value:value+`;`}return``}function formatSmart(code$1,next,options){let numeric=toHexadecimal(code$1,next,options.omitOptionalSemicolons),named;if((options.useNamedReferences||options.useShortestReferences)&&(named=toNamed(code$1,next,options.omitOptionalSemicolons,options.attribute)),(options.useShortestReferences||!named)&&options.useShortestReferences){let decimal=toDecimal(code$1,next,options.omitOptionalSemicolons);decimal.length|^->||--!>|`],commentEntitySubset=[`<`,`>`];function comment(node$1,_1,_2,state){return state.settings.bogusComments?``:``;function encode($0){return stringifyEntities($0,Object.assign({},state.settings.characterReferences,{subset:commentEntitySubset}))}}function doctype(_1,_2,_3,state){return``}function ccount(value,character){let source=String(value);if(typeof character!=`string`)throw TypeError(`Expected character`);let count=0,index$1=source.indexOf(character);for(;index$1!==-1;)count++,index$1=source.indexOf(character,index$1+character.length);return count}function stringify(values,options){let settings=options||{},input=values[values.length-1]===``?[...values,``]:values;return input.join((settings.padRight?` `:``)+`,`+(settings.padLeft===!1?``:` `)).trim()}function stringify$1(values){return values.join(` `).trim()}const re=/[ \t\n\f\r]/g;function whitespace(thing){return typeof thing==`object`?thing.type===`text`?empty$1(thing.value):!1:empty$1(thing)}function empty$1(value){return value.replace(re,``)===``}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(increment$1){return sibling;function sibling(parent,index$1,includeWhitespace){let siblings$1=parent?parent.children:emptyChildren$1,offset=(index$1||0)+increment$1,next=siblings$1[offset];if(!includeWhitespace)for(;next&&whitespace(next);)offset+=increment$1,next=siblings$1[offset];return next}}const own$3={}.hasOwnProperty;function omission(handlers$1){return omit;function omit(node$1,index$1,parent){return own$3.call(handlers$1,node$1.tagName)&&handlers$1[node$1.tagName](node$1,index$1,parent)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd,dt,head:headOrColgroupOrCaption,html:html$3,li,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr});function headOrColgroupOrCaption(_,index$1,parent){let next=siblingAfter(parent,index$1,!0);return!next||next.type!==`comment`&&!(next.type===`text`&&whitespace(next.value.charAt(0)))}function html$3(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function body$1(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function p(_,index$1,parent){let next=siblingAfter(parent,index$1);return next?next.type===`element`&&(next.tagName===`address`||next.tagName===`article`||next.tagName===`aside`||next.tagName===`blockquote`||next.tagName===`details`||next.tagName===`div`||next.tagName===`dl`||next.tagName===`fieldset`||next.tagName===`figcaption`||next.tagName===`figure`||next.tagName===`footer`||next.tagName===`form`||next.tagName===`h1`||next.tagName===`h2`||next.tagName===`h3`||next.tagName===`h4`||next.tagName===`h5`||next.tagName===`h6`||next.tagName===`header`||next.tagName===`hgroup`||next.tagName===`hr`||next.tagName===`main`||next.tagName===`menu`||next.tagName===`nav`||next.tagName===`ol`||next.tagName===`p`||next.tagName===`pre`||next.tagName===`section`||next.tagName===`table`||next.tagName===`ul`):!parent||!(parent.type===`element`&&(parent.tagName===`a`||parent.tagName===`audio`||parent.tagName===`del`||parent.tagName===`ins`||parent.tagName===`map`||parent.tagName===`noscript`||parent.tagName===`video`))}function li(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`li`}function dt(_,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`))}function dd(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`)}function rubyElement(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`rp`||next.tagName===`rt`)}function optgroup(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`optgroup`}function option(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`option`||next.tagName===`optgroup`)}function thead(_,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`))}function tbody$1(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`)}function tfoot(_,index$1,parent){return!siblingAfter(parent,index$1)}function tr(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`tr`}function cells(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`td`||next.tagName===`th`)}const opening=omission({body,colgroup,head,html:html$2,tbody});function html$2(node$1){let head$1=siblingAfter(node$1,-1);return!head$1||head$1.type!==`comment`}function head(node$1){let seen=new Set;for(let child$1 of node$1.children)if(child$1.type===`element`&&(child$1.tagName===`base`||child$1.tagName===`title`)){if(seen.has(child$1.tagName))return!1;seen.add(child$1.tagName)}let child=node$1.children[0];return!child||child.type===`element`}function body(node$1){let head$1=siblingAfter(node$1,-1,!0);return!head$1||head$1.type!==`comment`&&!(head$1.type===`text`&&whitespace(head$1.value.charAt(0)))&&!(head$1.type===`element`&&(head$1.tagName===`meta`||head$1.tagName===`link`||head$1.tagName===`script`||head$1.tagName===`style`||head$1.tagName===`template`))}function colgroup(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1,!0);return parent&&previous$1&&previous$1.type===`element`&&previous$1.tagName===`colgroup`&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`col`)}function tbody(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1);return parent&&previous$1&&previous$1.type===`element`&&(previous$1.tagName===`thead`||previous$1.tagName===`tbody`)&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`tr`)}const constants={name:[[` \f\r &/=>`.split(``),` \f\r "&'/=>\``.split(``)],[`\0 \f\r "&'/<=>`.split(``),`\0 diff --git a/assets/consciousness-kAj-ksUV.js b/assets/consciousness-CEAWA4LX.js similarity index 94% rename from assets/consciousness-kAj-ksUV.js rename to assets/consciousness-CEAWA4LX.js index 1a9020f27153f177da5950142ef61eda14f36b25..55cf0f9d78411c4b918b8a27cbf5f29ca44392f2 100644 --- a/assets/consciousness-kAj-ksUV.js +++ b/assets/consciousness-CEAWA4LX.js @@ -1 +1 @@ -import{Fragment as e,RouterLink as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as ee,defineComponent as o,isRef as s,onMounted as c,openBlock as l,renderList as te,resolveDirective as ne,storeToRefs as u,toDisplayString as d,unref as f,useI18n as re,vModelText as ie,withCtx as ae,withDirectives as p}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useConsciousnessStore as oe,useProvidersStore as se}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{RadioCardManySelect_default as ce,RadioCardSimple_default as le}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as m}from"./route-block--T8TG4is.js";const h={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},g={flex:`~ col gap-4`},_={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},v={text:`neutral-400 dark:neutral-400`},y={"max-w-full":``},b={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},x={key:1},S={key:0},C={flex:`~ col gap-4`},w={class:`text-lg md:text-2xl`},T={text:`neutral-400 dark:neutral-400`},E={key:0,class:`flex items-center justify-center py-4`},D={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`},O={class:`flex flex-col`},k={class:`font-medium`},A={class:`text-sm text-red-600 dark:text-red-400`},j={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`},M={class:`flex flex-col`},N={class:`font-medium`},P={class:`text-sm text-amber-600 dark:text-amber-400`},ue={key:1},F={flex:`~ col gap-4`},I={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},L={text:`neutral-400 dark:neutral-500`},R={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`},z={class:`flex flex-col`},B={class:`font-medium`},V={class:`text-sm text-primary-600 dark:text-primary-400`},H={class:`mt-2`},U={class:`mb-1 block text-sm font-medium`},de=[`placeholder`],fe={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":``};var W=o({__name:`consciousness`,setup(o){let m=se(),W=oe(),{configuredChatProvidersMetadata:G}=u(m),{activeProvider:K,activeModel:q,customModelName:pe,modelSearchQuery:J,supportsModelListing:Y,providerModels:X,isLoadingActiveProviderModels:Z,activeProviderModelError:Q}=u(W),{t:$}=re();c(async()=>{await W.loadModelsForProvider(K.value)});function me(e){pe.value=e}return(o,c)=>{let u=ne(`motion`);return l(),a(e,null,[n(`div`,h,[n(`div`,null,[n(`div`,g,[n(`div`,null,[n(`h2`,_,d(f($)(`settings.pages.providers.title`)),1),n(`div`,v,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),n(`div`,y,[f(G).length>0?(l(),a(`fieldset`,b,[(l(!0),a(e,null,te(f(G),e=>(l(),r(f(le),{id:e.id,key:e.id,modelValue:f(K),"onUpdate:modelValue":c[0]||=e=>s(K)?K.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(l(),a(`div`,x,[ee(f(t),{class:`flex items-center gap-3 rounded-lg p-4`,border:`2 dashed neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-800`,transition:`colors duration-200 ease-in-out`,to:`/settings/providers`},{default:ae(()=>c[4]||=[n(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No Providers Configured`),n(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),n(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[4]})]))])])]),f(K)&&f(Y)?(l(),a(`div`,S,[n(`div`,C,[n(`div`,null,[n(`h2`,w,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,T,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),f(Z)?(l(),a(`div`,E,[c[5]||=n(`div`,{class:`mr-2 animate-spin`},[n(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):f(Q)?(l(),a(`div`,D,[c[6]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,O,[n(`span`,k,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),n(`span`,A,d(f(Q)),1)])])):f(X).length===0&&!f(Z)?(l(),a(`div`,j,[c[7]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,M,[n(`span`,N,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),n(`span`,P,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):f(X).length>0?(l(),r(f(ce),{key:3,modelValue:f(q),"onUpdate:modelValue":c[1]||=e=>s(q)?q.value=e:null,"search-query":f(J),"onUpdate:searchQuery":c[2]||=e=>s(J)?J.value=e:null,items:f(X).sort((e,t)=>e.id===f(q)?-1:t.id===f(q)?1:0),searchable:!0,"search-placeholder":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:f(J)}),"search-results-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":me},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`])):i(``,!0)])])):f(K)&&!f(Y)?(l(),a(`div`,ue,[n(`div`,F,[n(`div`,null,[n(`h2`,I,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,L,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),n(`div`,R,[c[8]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),n(`div`,z,[n(`span`,B,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),n(`span`,V,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),n(`div`,H,[n(`label`,U,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),p(n(`input`,{"onUpdate:modelValue":c[3]||=e=>s(q)?q.value=e: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:f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,de),[[ie,f(q)]])])])])):i(``,!0)]),p((l(),a(`div`,fe,c[9]||=[n(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof m==`function`&&m(W);var G=W;export{G as default}; \ No newline at end of file +import{Fragment as e,RouterLink as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as ee,defineComponent as o,isRef as s,onMounted as c,openBlock as l,renderList as te,resolveDirective as ne,storeToRefs as u,toDisplayString as d,unref as f,useI18n as re,vModelText as ie,withCtx as ae,withDirectives as p}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useConsciousnessStore as oe,useProvidersStore as se}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{RadioCardManySelect_default as ce,RadioCardSimple_default as le}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as m}from"./route-block--T8TG4is.js";const h={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},g={flex:`~ col gap-4`},_={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},v={text:`neutral-400 dark:neutral-400`},y={"max-w-full":``},b={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},x={key:1},S={key:0},C={flex:`~ col gap-4`},w={class:`text-lg md:text-2xl`},T={text:`neutral-400 dark:neutral-400`},E={key:0,class:`flex items-center justify-center py-4`},D={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`},O={class:`flex flex-col`},k={class:`font-medium`},A={class:`text-sm text-red-600 dark:text-red-400`},j={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`},M={class:`flex flex-col`},N={class:`font-medium`},P={class:`text-sm text-amber-600 dark:text-amber-400`},ue={key:1},F={flex:`~ col gap-4`},I={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},L={text:`neutral-400 dark:neutral-500`},R={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`},z={class:`flex flex-col`},B={class:`font-medium`},V={class:`text-sm text-primary-600 dark:text-primary-400`},H={class:`mt-2`},U={class:`mb-1 block text-sm font-medium`},de=[`placeholder`],fe={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":``};var W=o({__name:`consciousness`,setup(o){let m=se(),W=oe(),{configuredChatProvidersMetadata:G}=u(m),{activeProvider:K,activeModel:q,customModelName:pe,modelSearchQuery:J,supportsModelListing:Y,providerModels:X,isLoadingActiveProviderModels:Z,activeProviderModelError:Q}=u(W),{t:$}=re();c(async()=>{await W.loadModelsForProvider(K.value)});function me(e){pe.value=e}return(o,c)=>{let u=ne(`motion`);return l(),a(e,null,[n(`div`,h,[n(`div`,null,[n(`div`,g,[n(`div`,null,[n(`h2`,_,d(f($)(`settings.pages.providers.title`)),1),n(`div`,v,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),n(`div`,y,[f(G).length>0?(l(),a(`fieldset`,b,[(l(!0),a(e,null,te(f(G),e=>(l(),r(f(le),{id:e.id,key:e.id,modelValue:f(K),"onUpdate:modelValue":c[0]||=e=>s(K)?K.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(l(),a(`div`,x,[ee(f(t),{class:`flex items-center gap-3 rounded-lg p-4`,border:`2 dashed neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-800`,transition:`colors duration-200 ease-in-out`,to:`/settings/providers`},{default:ae(()=>c[4]||=[n(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No Providers Configured`),n(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),n(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[4]})]))])])]),f(K)&&f(Y)?(l(),a(`div`,S,[n(`div`,C,[n(`div`,null,[n(`h2`,w,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,T,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),f(Z)?(l(),a(`div`,E,[c[5]||=n(`div`,{class:`mr-2 animate-spin`},[n(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):f(Q)?(l(),a(`div`,D,[c[6]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,O,[n(`span`,k,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),n(`span`,A,d(f(Q)),1)])])):f(X).length===0&&!f(Z)?(l(),a(`div`,j,[c[7]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,M,[n(`span`,N,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),n(`span`,P,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):f(X).length>0?(l(),r(f(ce),{key:3,modelValue:f(q),"onUpdate:modelValue":c[1]||=e=>s(q)?q.value=e:null,"search-query":f(J),"onUpdate:searchQuery":c[2]||=e=>s(J)?J.value=e:null,items:f(X).sort((e,t)=>e.id===f(q)?-1:t.id===f(q)?1:0),searchable:!0,"search-placeholder":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:f(J)}),"search-results-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":me},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`])):i(``,!0)])])):f(K)&&!f(Y)?(l(),a(`div`,ue,[n(`div`,F,[n(`div`,null,[n(`h2`,I,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,L,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),n(`div`,R,[c[8]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),n(`div`,z,[n(`span`,B,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),n(`span`,V,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),n(`div`,H,[n(`label`,U,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),p(n(`input`,{"onUpdate:modelValue":c[3]||=e=>s(q)?q.value=e: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:f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,de),[[ie,f(q)]])])])])):i(``,!0)]),p((l(),a(`div`,fe,c[9]||=[n(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof m==`function`&&m(W);var G=W;export{G as default}; \ No newline at end of file diff --git a/assets/deepseek-p_9m2h9g.js b/assets/deepseek-BnI8cEci.js similarity index 82% rename from assets/deepseek-p_9m2h9g.js rename to assets/deepseek-BnI8cEci.js index e27db4b9e0f901472e2888a5a2a8c1e0dd1bf0d8..74e125faa23dbc1518ccaa18de387efc825bedc6 100644 --- a/assets/deepseek-p_9m2h9g.js +++ b/assets/deepseek-BnI8cEci.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`deepseek`;var x=r({__name:`deepseek`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.deepseek.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`deepseek`;var x=r({__name:`deepseek`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.deepseek.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/default-DK2eGkeE.js b/assets/default-C1ln69hW.js similarity index 82% rename from assets/default-DK2eGkeE.js rename to assets/default-C1ln69hW.js index ed746d00f81c4d7fd2375326549a41f065e672a2..8c50d05ded9d235b83fd55c97eb9fb22720cc4f0 100644 --- a/assets/default-DK2eGkeE.js +++ b/assets/default-C1ln69hW.js @@ -1 +1 @@ -import{RouterView as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,unref as o}from"./index-Dor8PgzM.js";import{HeaderLink_default as s}from"./HeaderLink-BN-EJFUu.js";const c={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)`},"h-full":``},l={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},u={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"mx-auto":``,"h-full":``,"max-w-screen-xl":``};var d=i({__name:`default`,setup(i){return(i,d)=>(a(),n(`div`,c,[t(`div`,l,[r(s)]),t(`div`,u,[r(o(e))])]))}}),f=d;export{f as default}; \ No newline at end of file +import{RouterView as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,unref as o}from"./index-C-t5bjx6.js";import{HeaderLink_default as s}from"./HeaderLink-CyWWkOPU.js";const c={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)`},"h-full":``},l={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},u={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"mx-auto":``,"h-full":``,"max-w-screen-xl":``};var d=i({__name:`default`,setup(i){return(i,d)=>(a(),n(`div`,c,[t(`div`,l,[r(s)]),t(`div`,u,[r(o(e))])]))}}),f=d;export{f as default}; \ No newline at end of file diff --git a/assets/default-node-EA9BojRq.js b/assets/default-node-DFUtCPbV.js similarity index 64% rename from assets/default-node-EA9BojRq.js rename to assets/default-node-DFUtCPbV.js index 0f715647d3b941d53a2909f9e18546a953535bb6..939f65df5da1186bfbc45708dca58a21c47e579a 100644 --- a/assets/default-node-EA9BojRq.js +++ b/assets/default-node-DFUtCPbV.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-z9j0cN3P.js","assets/index-Dor8PgzM.js","assets/index-BtJ4BQCK.css"])))=>i.map(i=>d[i]); -import{__toDynamicImportESM as e,__vitePreload as t}from"./index-Dor8PgzM.js";async function n(){let{createRequire:n}=await t(async()=>{let{createRequire:t}=await import(`./__vite-browser-external-z9j0cN3P.js`).then(e(1));return{createRequire:t}},__vite__mapDeps([0,1,2])),{dirname:r,resolve:i}=await t(async()=>{let{dirname:t,resolve:n}=await import(`./__vite-browser-external-z9j0cN3P.js`).then(e(1));return{dirname:t,resolve:n}},__vite__mapDeps([0,1,2])),a=n(import.meta.url),o=r(a.resolve(`@duckdb/duckdb-wasm`));return{mvp:{mainModule:i(o,`./duckdb-mvp.wasm`),mainWorker:i(o,`./duckdb-node-mvp.worker.cjs`)},eh:{mainModule:i(o,`./duckdb-eh.wasm`),mainWorker:i(o,`./duckdb-node-eh.worker.cjs`)}}}export{n as getBundles}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-CFsuT-Qx.js","assets/index-C-t5bjx6.js","assets/index-BtJ4BQCK.css"])))=>i.map(i=>d[i]); +import{__toDynamicImportESM as e,__vitePreload as t}from"./index-C-t5bjx6.js";async function n(){let{createRequire:n}=await t(async()=>{let{createRequire:t}=await import(`./__vite-browser-external-CFsuT-Qx.js`).then(e(1));return{createRequire:t}},__vite__mapDeps([0,1,2])),{dirname:r,resolve:i}=await t(async()=>{let{dirname:t,resolve:n}=await import(`./__vite-browser-external-CFsuT-Qx.js`).then(e(1));return{dirname:t,resolve:n}},__vite__mapDeps([0,1,2])),a=n(import.meta.url),o=r(a.resolve(`@duckdb/duckdb-wasm`));return{mvp:{mainModule:i(o,`./duckdb-mvp.wasm`),mainWorker:i(o,`./duckdb-node-mvp.worker.cjs`)},eh:{mainModule:i(o,`./duckdb-eh.wasm`),mainWorker:i(o,`./duckdb-node-eh.worker.cjs`)}}}export{n as getBundles}; \ No newline at end of file diff --git a/assets/delays-CenmsVvX.js b/assets/delays-CLOrklec.js similarity index 81% rename from assets/delays-CenmsVvX.js rename to assets/delays-CLOrklec.js index a10a8cfbc125979d26b4eba8edde10ecb6190d83..2e20eb0c23281cee9658cde551420db34eb89d46 100644 --- a/assets/delays-CenmsVvX.js +++ b/assets/delays-CLOrklec.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-Dor8PgzM.js";import"./src-BnFQ5wFr.js";import"./Basic-CbvQnFR9.js";import{Textarea_default as u}from"./Textarea-D5jZ5rL5.js";import{llmInferenceEndToken as d,useDelayMessageQueue as f}from"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";const p={flex:``,"flex-col":``,"gap-2":``,"p-2":``},m={flex:``,"flex-row":``,"gap-2":``},h={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},g={"w-full":``,flex:``,"flex-row":``,"gap-4":``},_={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var y=i({__name:`delays`,setup(i){let y=o(``),b=o([]),x=o([]),S=o(!1),C=f();C.onHandlerEvent(`delay`,e=>{x.value.push(e)});function w(){S.value=!0;let e=y.value.split(``);for(let t of e)C.add(t);C.add(d),y.value=``,S.value=!1}return(i,o)=>(a(),n(`div`,p,[t(`div`,m,[r(l(u),{modelValue:y.value,"onUpdate:modelValue":o[0]||=e=>y.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:w},null,8,[`modelValue`]),t(`button`,h,c(S.value?`Processing...`:`Send`),1)]),t(`div`,g,[t(`div`,_,[o[1]||=t(`h3`,{"font-normal":``},` Emotion Message `,-1),(a(!0),n(e,null,s(b.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))]),t(`div`,v,[o[2]||=t(`h3`,{"font-normal":``},` Delays `,-1),(a(!0),n(e,null,s(x.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-C-t5bjx6.js";import"./src-B9Iy8991.js";import"./Basic-DnBqne8U.js";import{Textarea_default as u}from"./Textarea-SRGnauY5.js";import{llmInferenceEndToken as d,useDelayMessageQueue as f}from"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";const p={flex:``,"flex-col":``,"gap-2":``,"p-2":``},m={flex:``,"flex-row":``,"gap-2":``},h={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},g={"w-full":``,flex:``,"flex-row":``,"gap-4":``},_={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var y=i({__name:`delays`,setup(i){let y=o(``),b=o([]),x=o([]),S=o(!1),C=f();C.onHandlerEvent(`delay`,e=>{x.value.push(e)});function w(){S.value=!0;let e=y.value.split(``);for(let t of e)C.add(t);C.add(d),y.value=``,S.value=!1}return(i,o)=>(a(),n(`div`,p,[t(`div`,m,[r(l(u),{modelValue:y.value,"onUpdate:modelValue":o[0]||=e=>y.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:w},null,8,[`modelValue`]),t(`button`,h,c(S.value?`Processing...`:`Send`),1)]),t(`div`,g,[t(`div`,_,[o[1]||=t(`h3`,{"font-normal":``},` Emotion Message `,-1),(a(!0),n(e,null,s(b.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))]),t(`div`,v,[o[2]||=t(`h3`,{"font-normal":``},` Delays `,-1),(a(!0),n(e,null,s(x.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/developer-D6LGtcCU.js b/assets/developer-CPJ4sT27.js similarity index 89% rename from assets/developer-D6LGtcCU.js rename to assets/developer-CPJ4sT27.js index 7c53f9dc6921b6325431287cbcc3e3be6d61429e..1375ed948bb93115bc67ef118d875c44cd776d70 100644 --- a/assets/developer-D6LGtcCU.js +++ b/assets/developer-CPJ4sT27.js @@ -1 +1 @@ -import{Fragment as e,Transition as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,mergeModels as c,normalizeClass as l,openBlock as u,resolveDirective as d,toDisplayString as f,unref as p,useModel as m,useSettings as h,vModelCheckbox as g,withCtx as _,withDirectives as v}from"./index-Dor8PgzM.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b={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`},x=[`aria-checked`],S={key:0,text:`sm neutral-500`};var C=s({__name:`CheckBar`,props:c({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let s=m(e,`modelValue`);return(c,d)=>(u(),i(`label`,b,[v(n(`input`,{"onUpdate:modelValue":d[0]||=e=>s.value=e,"aria-checked":s.value,type:`checkbox`,hidden:``},null,8,x),[[g,s.value]]),n(`div`,null,[a(f(c.$t(e.text))+` `,1),e.description?(u(),i(`div`,S,f(c.$t(e.description)),1)):r(``,!0)]),o(t,{name:`slide-away`,mode:`out-in`},{default:_(()=>[s.value?(u(),i(`div`,{key:0,class:l(e.iconOn),transition:`all ease-in-out duration-250`},null,2)):(u(),i(`div`,{key:1,class:l(e.iconOff),transition:`all ease-in-out duration-250`},null,2))]),_:1})]))}}),w=C;const T={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":``};var E=s({__name:`developer`,setup(t){let r=h();return(t,a)=>{let s=d(`motion`);return u(),i(e,null,[v(o(w,{modelValue:p(r).disableTransitions,"onUpdate:modelValue":a[0]||=e=>p(r).disableTransitions=e,"mb-2":``,"icon-on":`i-solar:people-nearby-bold-duotone`,"icon-off":`i-solar:running-2-line-duotone`,text:`settings.animations.stage-transitions.title`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:440,delay:19*50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[s]]),v(o(w,{modelValue:p(r).usePageSpecificTransitions,"onUpdate:modelValue":a[1]||=e=>p(r).usePageSpecificTransitions=e,disabled:p(r).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:450,delay:20*50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[s]]),v((u(),i(`div`,T,a[2]||=[n(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[s]])],64)}}});typeof y==`function`&&y(E);var D=E;export{D as default}; \ No newline at end of file +import{Fragment as e,Transition as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,mergeModels as c,normalizeClass as l,openBlock as u,resolveDirective as d,toDisplayString as f,unref as p,useModel as m,useSettings as h,vModelCheckbox as g,withCtx as _,withDirectives as v}from"./index-C-t5bjx6.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b={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`},x=[`aria-checked`],S={key:0,text:`sm neutral-500`};var C=s({__name:`CheckBar`,props:c({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let s=m(e,`modelValue`);return(c,d)=>(u(),i(`label`,b,[v(n(`input`,{"onUpdate:modelValue":d[0]||=e=>s.value=e,"aria-checked":s.value,type:`checkbox`,hidden:``},null,8,x),[[g,s.value]]),n(`div`,null,[a(f(c.$t(e.text))+` `,1),e.description?(u(),i(`div`,S,f(c.$t(e.description)),1)):r(``,!0)]),o(t,{name:`slide-away`,mode:`out-in`},{default:_(()=>[s.value?(u(),i(`div`,{key:0,class:l(e.iconOn),transition:`all ease-in-out duration-250`},null,2)):(u(),i(`div`,{key:1,class:l(e.iconOff),transition:`all ease-in-out duration-250`},null,2))]),_:1})]))}}),w=C;const T={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":``};var E=s({__name:`developer`,setup(t){let r=h();return(t,a)=>{let s=d(`motion`);return u(),i(e,null,[v(o(w,{modelValue:p(r).disableTransitions,"onUpdate:modelValue":a[0]||=e=>p(r).disableTransitions=e,"mb-2":``,"icon-on":`i-solar:people-nearby-bold-duotone`,"icon-off":`i-solar:running-2-line-duotone`,text:`settings.animations.stage-transitions.title`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:440,delay:19*50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[s]]),v(o(w,{modelValue:p(r).usePageSpecificTransitions,"onUpdate:modelValue":a[1]||=e=>p(r).usePageSpecificTransitions=e,disabled:p(r).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:450,delay:20*50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[s]]),v((u(),i(`div`,T,a[2]||=[n(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[s]])],64)}}});typeof y==`function`&&y(E);var D=E;export{D as default}; \ No newline at end of file diff --git a/assets/dist-B8MUgAeh.js b/assets/dist-BeDGrW0v.js similarity index 99% rename from assets/dist-B8MUgAeh.js rename to assets/dist-BeDGrW0v.js index 3506d84099ae113284fb7deca5d4069d68767753..a64f77bf403b2d07b7d3f9772b9d194a6c084699 100644 --- a/assets/dist-B8MUgAeh.js +++ b/assets/dist-BeDGrW0v.js @@ -1,4 +1,4 @@ -import{Comment as e,Fragment as t,Teleport as n,camelize as r,cloneVNode as i,computed as a,createBaseVNode as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createTextVNode as u,createVNode as d,customRef as f,defineComponent as p,effectScope as m,getCurrentInstance as h,getCurrentScope as g,guardReactiveProps as _,h as v,inject as y,isRef as b,markRaw as x,mergeDefaults as S,mergeProps as C,nextTick as w,normalizeProps as T,normalizeStyle as E,onBeforeMount as D,onBeforeUnmount as O,onBeforeUpdate as k,onMounted as A,onScopeDispose as j,onUnmounted as M,onUpdated as N,openBlock as P,provide as F,reactive as I,readonly as ee,ref as L,renderList as te,renderSlot as R,resolveDynamicComponent as ne,shallowReadonly as re,shallowRef as ie,toDisplayString as ae,toHandlerKey as oe,toHandlers as se,toRaw as ce,toRef as le,toRefs as z,triggerRef as ue,unref as B,useId as de,useSlots as fe,vModelSelect as pe,vShow as me,watch as V,watchEffect as H,watchPostEffect as he,watchSyncEffect as ge,withCtx as U,withDirectives as _e,withKeys as W,withModifiers as G}from"./index-Dor8PgzM.js";import{arrow as ve,computePosition as ye,createCoords as be,flip as xe,floor as Se,hide as Ce,limitShift as we,max as Te,min as Ee,offset as De,rectToClientRect as Oe,round as ke,shift as Ae,size as je}from"./src-BnFQ5wFr.js";function Me(){return typeof window<`u`}function Ne(e){return Ie(e)?(e.nodeName||``).toLowerCase():`#document`}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fe(e){var t;return(t=(Ie(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ie(e){return Me()?e instanceof Node||e instanceof Pe(e).Node:!1}function Le(e){return Me()?e instanceof Element||e instanceof Pe(e).Element:!1}function Re(e){return Me()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function ze(e){return!Me()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function Be(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function Ve(e){return[`table`,`td`,`th`].includes(Ne(e))}function He(e){return[`:popover-open`,`:modal`].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ue(e){let t=Ge(),n=Le(e)?qe(e):e;return[`transform`,`translate`,`scale`,`rotate`,`perspective`].some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`].some(e=>(n.willChange||``).includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>(n.contain||``).includes(e))}function We(e){let t=Ye(e);for(;Re(t)&&!Ke(t);){if(Ue(t))return t;if(He(t))return null;t=Ye(t)}return null}function Ge(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}function Ke(e){return[`html`,`body`,`#document`].includes(Ne(e))}function qe(e){return Pe(e).getComputedStyle(e)}function Je(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ye(e){if(Ne(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ze(e)&&e.host||Fe(e);return ze(t)?t.host:t}function Xe(e){let t=Ye(e);return Ke(t)?e.ownerDocument?e.ownerDocument.body:e.body:Re(t)&&Be(t)?t:Xe(t)}function Ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let i=Xe(e),a=i===(r=e.ownerDocument)?.body,o=Pe(i);if(a){let e=Qe(o);return t.concat(o,o.visualViewport||[],Be(i)?i:[],e&&n?Ze(e):[])}return t.concat(i,Ze(i,[],n))}function Qe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $e(e){let t=qe(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Re(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ke(n)!==a||ke(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function et(e){return Le(e)?e:e.contextElement}function tt(e){let t=et(e);if(!Re(t))return be(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$e(t),o=(a?ke(n.width):n.width)/r,s=(a?ke(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const nt=be(0);function rt(e){let t=Pe(e);return!Ge()||!t.visualViewport?nt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function it(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function at(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=et(e),o=be(1);t&&(r?Le(r)&&(o=tt(r)):o=tt(e));let s=it(a,n,r)?rt(a):be(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Pe(a),t=r&&Le(r)?Pe(r):r,n=e,i=Qe(n);for(;i&&r&&t!==n;){let e=tt(i),t=i.getBoundingClientRect(),r=qe(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Pe(i),i=Qe(n)}}return Oe({width:u,height:d,x:c,y:l})}function ot(e,t){let n=Je(e).scrollLeft;return t?t.left+n:at(Fe(e)).left+n}function st(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:ot(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function ct(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Fe(r),s=t?He(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=be(1),u=be(0),d=Re(r);if((d||!d&&!a)&&((Ne(r)!==`body`||Be(o))&&(c=Je(r)),Re(r))){let e=at(r);l=tt(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?st(o,c,!0):be(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function lt(e){return Array.from(e.getClientRects())}function ut(e){let t=Fe(e),n=Je(e),r=e.ownerDocument.body,i=Te(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Te(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ot(e),s=-n.scrollTop;return qe(r).direction===`rtl`&&(o+=Te(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function dt(e,t){let n=Pe(e),r=Fe(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ge();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function ft(e,t){let n=at(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Re(e)?tt(e):be(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,l=r*a.y;return{width:o,height:s,x:c,y:l}}function pt(e,t,n){let r;if(t===`viewport`)r=dt(e,n);else if(t===`document`)r=ut(Fe(e));else if(Le(t))r=ft(t,n);else{let n=rt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Oe(r)}function mt(e,t){let n=Ye(e);return n===t||!Le(n)||Ke(n)?!1:qe(n).position===`fixed`||mt(n,t)}function ht(e,t){let n=t.get(e);if(n)return n;let r=Ze(e,[],!1).filter(e=>Le(e)&&Ne(e)!==`body`),i=null,a=qe(e).position===`fixed`,o=a?Ye(e):e;for(;Le(o)&&!Ke(o);){let t=qe(o),n=Ue(o);!n&&t.position===`fixed`&&(i=null);let s=a?!n&&!i:!n&&t.position===`static`&&!!i&&[`absolute`,`fixed`].includes(i.position)||Be(o)&&!n&&mt(e,o);s?r=r.filter(e=>e!==o):i=t,o=Ye(o)}return t.set(e,r),r}function gt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=n===`clippingAncestors`?He(t)?[]:ht(t,this._c):[].concat(n),o=[...a,r],s=o[0],c=o.reduce((e,n)=>{let r=pt(t,n,i);return e.top=Te(r.top,e.top),e.right=Ee(r.right,e.right),e.bottom=Ee(r.bottom,e.bottom),e.left=Te(r.left,e.left),e},pt(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function _t(e){let{width:t,height:n}=$e(e);return{width:t,height:n}}function vt(e,t,n){let r=Re(t),i=Fe(t),a=n===`fixed`,o=at(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=be(0);if(r||!r&&!a)if((Ne(t)!==`body`||Be(i))&&(s=Je(t)),r){let e=at(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=ot(i));let l=i&&!r&&!a?st(i,s):be(0),u=o.left+s.scrollLeft-c.x-l.x,d=o.top+s.scrollTop-c.y-l.y;return{x:u,y:d,width:o.width,height:o.height}}function yt(e){return qe(e).position===`static`}function bt(e,t){if(!Re(e)||qe(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Fe(e)===n&&(n=n.ownerDocument.body),n}function xt(e,t){let n=Pe(e);if(He(e))return n;if(!Re(e)){let t=Ye(e);for(;t&&!Ke(t);){if(Le(t)&&!yt(t))return t;t=Ye(t)}return n}let r=bt(e,t);for(;r&&Ve(r)&&yt(r);)r=bt(r,t);return r&&Ke(r)&&yt(r)&&!Ue(r)?n:r||We(e)||n}const St=async function(e){let t=this.getOffsetParent||xt,n=this.getDimensions,r=await n(e.floating);return{reference:vt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ct(e){return qe(e).direction===`rtl`}const wt={convertOffsetParentRelativeRectToViewportRelativeRect:ct,getDocumentElement:Fe,getClippingRect:gt,getOffsetParent:xt,getElementRects:St,getClientRects:lt,getDimensions:_t,getScale:tt,isElement:Le,isRTL:Ct};function Tt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Et(e,t){let n=null,r,i=Fe(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Se(d),h=Se(i.clientWidth-(u+f)),g=Se(i.clientHeight-(d+p)),_=Se(u),v=-m+`px `+-h+`px `+-g+`px `+-_+`px`,y={rootMargin:v,threshold:Te(0,Ee(1,c))||1},b=!0;function x(t){let n=t[0].intersectionRatio;if(n!==c){if(!b)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Tt(l,e.getBoundingClientRect())&&o(),b=!1}try{n=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return o(!0),a}function Dt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=et(e),u=i||a?[...l?Ze(l):[],...Ze(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Et(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?at(e):null;c&&g();function g(){let t=at(e);h&&!Tt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Ot=De,kt=Ae,At=xe,jt=je,Mt=Ce,Nt=ve,Pt=we,Ft=(e,t,n)=>{let r=new Map,i={platform:wt,...n},a={...i.platform,_c:r};return ye(e,t,{...i,platform:a})};function It(e){return typeof e==`object`&&!!e&&`$el`in e}function Lt(e){if(It(e)){let t=e.$el;return Ie(t)&&Ne(t)===`#comment`?null:t}return e}function Rt(e){return typeof e==`function`?e():B(e)}function zt(e){return{name:`arrow`,options:e,fn(t){let n=Lt(Rt(e.element));return n==null?{}:Nt({element:n,padding:e.padding}).fn(t)}}}function Bt(e){if(typeof window>`u`)return 1;let t=e.ownerDocument.defaultView||window;return t.devicePixelRatio||1}function Vt(e,t){let n=Bt(e);return Math.round(t*n)/n}function Ht(e,t,n){n===void 0&&(n={});let r=n.whileElementsMounted,i=a(()=>{var e;return(e=Rt(n.open))??!0}),o=a(()=>Rt(n.middleware)),s=a(()=>{var e;return(e=Rt(n.placement))??`bottom`}),c=a(()=>{var e;return(e=Rt(n.strategy))??`absolute`}),l=a(()=>{var e;return(e=Rt(n.transform))??!0}),u=a(()=>Lt(e.value)),d=a(()=>Lt(t.value)),f=L(0),p=L(0),m=L(c.value),h=L(s.value),_=ie({}),v=L(!1),y=a(()=>{let e={position:m.value,left:`0`,top:`0`};if(!d.value)return e;let t=Vt(d.value,f.value),n=Vt(d.value,p.value);return l.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...Bt(d.value)>=1.5&&{willChange:`transform`}}:{position:m.value,left:t+`px`,top:n+`px`}}),b;function x(){if(u.value==null||d.value==null)return;let e=i.value;Ft(u.value,d.value,{middleware:o.value,placement:s.value,strategy:c.value}).then(t=>{f.value=t.x,p.value=t.y,m.value=t.strategy,h.value=t.placement,_.value=t.middlewareData,v.value=e!==!1})}function S(){typeof b==`function`&&(b(),b=void 0)}function C(){if(S(),r===void 0){x();return}if(u.value!=null&&d.value!=null){b=r(u.value,d.value,x);return}}function w(){i.value||(v.value=!1)}return V([o,s,c,i],x,{flush:`sync`}),V([u,d],C,{flush:`sync`}),V(i,w,{flush:`sync`}),g()&&j(S),{x:re(f),y:re(p),strategy:re(m),placement:re(h),middlewareData:re(_),isPositioned:re(v),floatingStyles:y,update:x}}function Ut(e,t){return e-t*Math.floor(e/t)}const Wt=1721426;function Gt(e,t,n,r){t=qt(e,t);let i=t-1,a=-2;return n<=2?a=0:Kt(t)&&(a=-1),Wt-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function Kt(e){return e%4==0&&(e%100!=0||e%400==0)}function qt(e,t){return e===`BC`?1-t:t}function Jt(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}const Yt={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};var Xt=class{fromJulianDay(e){let t=e,n=t-Wt,r=Math.floor(n/146097),i=Ut(n,146097),a=Math.floor(i/36524),o=Ut(i,36524),s=Math.floor(o/1461),c=Ut(o,1461),l=Math.floor(c/365),u=r*400+a*100+s*4+l+(a!==4&&l!==4?1:0),[d,f]=Jt(u),p=t-Gt(d,f,1,1),m=2;t0&&t===pn())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Cn(e,t),c=bn(n,r,i,a,o,s,0);return c-Math.floor(e/1e3)*1e3}const Sn=new Map;function Cn(e,t){let n=Sn.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Sn.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}const wn=864e5;function Tn(e,t,n,r){let i=n===r?[n]:[n,r];return i.filter(n=>En(e,t,n))}function En(e,t,n){let r=Cn(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function Dn(e,t,n=`compatible`){let r=jn(e);if(t===`UTC`)return yn(r);if(t===pn()&&n===`compatible`){r=Mn(r,new Xt);let e=new Date,t=qt(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=yn(r),a=xn(i-wn,t),o=xn(i+wn,t),s=Tn(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function On(e,t,n=`compatible`){return new Date(Dn(e,t,n))}function kn(e,t){let n=xn(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new yr(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function An(e){return new hr(e.calendar,e.era,e.year,e.month,e.day)}function jn(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new _r(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function Mn(e,t){if(nn(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,Hn(r),r}function Nn(e,t,n){if(e instanceof yr)return e.timeZone===t?e:Fn(e,t);let r=Dn(e,t,n);return kn(r,t)}function Pn(e){let t=yn(e)-e.offset;return new Date(t)}function Fn(e,t){let n=yn(e)-e.offset;return Mn(kn(n,t),e.calendar)}const In=36e5;function Ln(e,t){let n=e.copy(),r=`hour`in n?Xn(n,t):0;Rn(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,zn(n),Vn(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,Bn(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,o;let e=(a=(o=n.calendar).isInverseEra)?.call(o,n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Rn(e,t){var n,r;(n=(r=e.calendar).isInverseEra)?.call(r,e)&&(t=-t),e.year+=t}function zn(e){for(;e.month<1;)Rn(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Rn(e,1)}function Bn(e){for(;e.day<1;)e.month--,zn(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,zn(e)}function Vn(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Hn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Vn(e)}function Un(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function Wn(e,t){return Ln(e,Un(t))}function Gn(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Hn(n),n}function Kn(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),Jn(n),n}function qn(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Yn(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Yn(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Yn(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Yn(e.hour,24),t}function Jn(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Yn(e,t){let n=e%t;return n<0&&(n+=t),n}function Xn(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,qn(e)}function Zn(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=$n(a,n,0,t.length-1,r?.round),i.era=t[a],Hn(i);break}case`year`:var a,o;(a=(o=i.calendar).isInverseEra)?.call(o,i)&&(n=-n),i.year=$n(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=$n(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=$n(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Hn(i),i}function Qn(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=$n(t,n,a,o,r?.round);break}case`minute`:i.minute=$n(e.minute,n,0,59,r?.round);break;case`second`:i.second=$n(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=$n(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function $n(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function er(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let r=Ln(jn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=Dn(r,e.timeZone)}else n=yn(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=kn(n,e.timeZone);return Mn(r,e.calendar)}function tr(e,t){return er(e,Un(t))}function nr(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=jn(e),o=Mn(Kn(a,{hour:t}),new Xt),s=[Dn(o,e.timeZone,`earlier`),Dn(o,e.timeZone,`later`)].filter(t=>kn(t,e.timeZone).day===o.day)[0],c=Mn(Kn(a,{hour:i}),new Xt),l=[Dn(c,e.timeZone,`earlier`),Dn(c,e.timeZone,`later`)].filter(t=>kn(t,e.timeZone).day===c.day).pop(),u=yn(e)-e.offset,d=Math.floor(u/In),f=u%In;return u=$n(d,n,Math.floor(s/In),Math.floor(l/In),r?.round)*In+f,Mn(kn(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return Qn(e,t,n,r);case`era`:case`year`:case`month`:case`day`:{let i=Zn(jn(e),t,n,r),a=Dn(i,e.timeZone);return Mn(kn(a,e.timeZone),e.calendar)}default:throw Error(`Unsupported field `+t)}}function rr(e,t,n){let r=jn(e),i=Kn(Gn(r,t),t);if(i.compare(r)===0)return e;let a=Dn(i,e.timeZone,n);return Mn(kn(a,e.timeZone),e.calendar)}const ir=[`hours`,`minutes`,`seconds`],ar=[`years`,`months`,`weeks`,`days`,...ir];function or(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function sr(e){let t=Mn(e,new Xt),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function cr(e){return`${sr(e)}T${or(e)}`}function lr(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`}function ur(e){return`${cr(e)}${lr(e.offset)}[${e.timeZone}]`}function dr(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function fr(e,t,n){dr(e,t),t.set(e,n)}function pr(e){let t=typeof e[0]==`object`?e.shift():new Xt,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var mr=new WeakMap,hr=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return Ln(this,e)}subtract(e){return Wn(this,e)}set(e){return Gn(this,e)}cycle(e,t,n){return Zn(this,e,t,n)}toDate(e){return On(this,e)}toString(){return sr(this)}compare(e){return ln(this,e)}constructor(...e){fr(this,mr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,Hn(this)}},gr=new WeakMap,_r=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ln(this,e)}subtract(e){return Wn(this,e)}set(e){return Gn(Kn(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return Zn(this,e,t,n);default:return Qn(this,e,t,n)}}toDate(e,t){return On(this,e,t)}toString(){return cr(this)}compare(e){let t=ln(this,e);return t===0?un(this,jn(e)):t}constructor(...e){fr(this,gr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Hn(this)}},vr=new WeakMap,yr=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return er(this,e)}subtract(e){return tr(this,e)}set(e,t){return rr(this,e,t)}cycle(e,t,n){return nr(this,e,t,n)}toDate(){return Pn(this)}toString(){return ur(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Nn(e,this.timeZone).toDate().getTime()}constructor(...e){fr(this,vr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Hn(this)}};const br=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],xr=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Sr=[1867,1911,1925,1988,2018],Cr=[`meiji`,`taisho`,`showa`,`heisei`,`reiwa`];function wr(e){let t=br.findIndex(([t,n,r])=>e.year=0){let[,n,r]=br[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return Cr}getYearsInEra(e){let t=Cr.indexOf(e.era),n=br[t],r=br[t+1];if(r==null)return 9999-n[0]+1;let i=r[0]-n[0];return(e.month0?[`minguo`,t]:[`before_minguo`,1-t]}var Pr=class extends Xt{fromJulianDay(e){let t=super.fromJulianDay(e),n=qt(t.era,t.year),[r,i]=Nr(n);return new hr(this,r,i,t.month,t.day)}toJulianDay(e){return super.toJulianDay(Fr(e))}getEras(){return[`before_minguo`,`minguo`]}balanceDate(e){let[t,n]=Nr(Mr(e));e.era=t,e.year=n}isInverseEra(e){return e.era===`before_minguo`}getDaysInMonth(e){return super.getDaysInMonth(Fr(e))}getYearsInEra(e){return e.era===`before_minguo`?9999:9999-jr}constructor(...e){super(...e),this.identifier=`roc`}};function Fr(e){let[t,n]=Jt(Mr(e));return new hr(t,n,e.month,e.day)}const Ir=1948320,Lr=[0,31,62,93,124,155,186,216,246,276,306,336];var Rr=class{fromJulianDay(e){let t=e-Ir,n=1+Math.floor((33*t+3)/12053),r=365*(n-1)+Math.floor((8*n+21)/33),i=t-r,a=i<216?Math.floor(i/31):Math.floor((i-6)/30),o=i-Lr[a]+1;return new hr(this,n,a+1,o)}toJulianDay(e){let t=Ir-1+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=Lr[e.month-1],t+=e.day,t}getMonthsInYear(){return 12}getDaysInMonth(e){if(e.month<=6)return 31;if(e.month<=11)return 30;let t=Ut(25*e.year+11,33)<8;return t?30:29}getEras(){return[`AP`]}getYearsInEra(){return 9377}constructor(){this.identifier=`persian`}};const zr=78,Br=80;var Vr=class extends Xt{fromJulianDay(e){let t=super.fromJulianDay(e),n=t.year-zr,r=e-Gt(t.era,t.year,1,1),i;r=8&&(a+=(e.month-7)*30),a+=e.day-1,a)}getDaysInMonth(e){return e.month===1&&Kt(e.year+zr)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return[`saka`]}balanceDate(){}constructor(...e){super(...e),this.identifier=`indian`}};const Hr=1948440,Ur=1948439,Wr=1300,Gr=1600,Kr=460322;function qr(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function Jr(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+qr(t,r,1,1)))/29.5)+1),a=n-qr(t,r,i,1)+1;return new hr(e,r,i,a)}function Yr(e){return(14+11*e)%30<11}var Xr=class{fromJulianDay(e){return Jr(this,Hr,e)}toJulianDay(e){return qr(Hr,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return e.month===12&&Yr(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return Yr(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return[`AH`]}constructor(){this.identifier=`islamic-civil`}},Zr=class extends Xr{fromJulianDay(e){return Jr(this,Ur,e)}toJulianDay(e){return qr(Ur,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier=`islamic-tbla`}};const Qr=`qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=`;let $r,ei;function ti(e){return Kr+ei[e-Wr]}function ni(e,t){let n=e-Wr,r=1<<11-(t-1);return($r[n]&r)===0?29:30}function ri(e,t){let n=ti(e);for(let r=1;rr)return super.fromJulianDay(e);{let e=Wr-1,n=1,r=1;for(;r>0;){e++,r=t-ti(e)+1;let i=ii(e);if(r===i){n=12;break}else if(rt;)r-=t,n++,t=ni(e,n);break}}return new hr(this,e,n,t-ri(e,n)+1)}}toJulianDay(e){return e.yearGr?super.toJulianDay(e):Hr+ri(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.yearGr?super.getDaysInMonth(e):ni(e.year,e.month)}getDaysInYear(e){return e.yearGr?super.getDaysInYear(e):ii(e.year)}constructor(){if(super(),this.identifier=`islamic-umalqura`,$r||=new Uint16Array(Uint8Array.from(atob(Qr),e=>e.charCodeAt(0)).buffer),!ei){ei=new Uint32Array(Gr-Wr+1);let e=0;for(let t=Wr;t<=Gr;t++){ei[t-Wr]=e;for(let n=1;n<=12;n++)e+=ni(t,n)}}}};const oi=347997,si=1080,ci=24*si,li=29,ui=12*si+793,di=li*ci+ui;function fi(e){return Ut(e*7+1,19)<7}function pi(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return Ut(3*(r+1),7)<3&&(r+=1),r}function mi(e){let t=pi(e-1),n=pi(e),r=pi(e+1);return r-n===356?2:n-t===382?1:0}function hi(e){return pi(e)+mi(e)}function gi(e){return hi(e+1)-hi(e)}function _i(e){let t=gi(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function vi(e,t){if(t>=6&&!fi(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=_i(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?fi(e)?30:0:30}var yi=class{fromJulianDay(e){let t=e-oi,n=t*ci/di,r=Math.floor((19*n+234)/235)+1,i=hi(r),a=Math.floor(t-i);for(;a<1;)r--,i=hi(r),a=Math.floor(t-i);let o=1,s=0;for(;s6?e.month--:!fi(t.year)&&fi(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier=`hebrew`}};const bi=1723856,xi=1824665,Si=5500;function Ci(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function wi(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Ci(e,n,1,1))/30),i=t+1-Ci(e,n,r,1);return[n,r,i]}function Ti(e){return Math.floor(e%4/3)}function Ei(e,t){return t%13==0?Ti(e)+5:30}var Di=class{fromJulianDay(e){let[t,n,r]=wi(bi,e),i=`AM`;return t<=0&&(i=`AA`,t+=Si),new hr(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`AA`&&(t-=Si),Ci(bi,t,e.month,e.day)}getDaysInMonth(e){return Ei(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+Ti(e.year)}getYearsInEra(e){return e.era===`AA`?9999:9991}getEras(){return[`AA`,`AM`]}constructor(){this.identifier=`ethiopic`}},Oi=class extends Di{fromJulianDay(e){let[t,n,r]=wi(bi,e);return t+=Si,new hr(this,`AA`,t,n,r)}getEras(){return[`AA`]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier=`ethioaa`}},ki=class extends Di{fromJulianDay(e){let[t,n,r]=wi(xi,e),i=`CE`;return t<=0&&(i=`BCE`,t=1-t),new hr(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`BCE`&&(t=1-t),Ci(xi,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return e.era===`BCE`&&(t=1-t),Ei(t,e.month)}isInverseEra(e){return e.era===`BCE`}balanceDate(e){e.year<=0&&(e.era=e.era===`BCE`?`CE`:`BCE`,e.year=1-e.year)}getEras(){return[`BCE`,`CE`]}getYearsInEra(e){return e.era===`BCE`?9999:9715}constructor(...e){super(...e),this.identifier=`coptic`}};function Ai(e){switch(e){case`buddhist`:return new kr;case`ethiopic`:return new Di;case`ethioaa`:return new Oi;case`coptic`:return new ki;case`hebrew`:return new yi;case`indian`:return new Vr;case`islamic-civil`:return new Xr;case`islamic-tbla`:return new Zr;case`islamic-umalqura`:return new ai;case`japanese`:return new Er;case`persian`:return new Rr;case`roc`:return new Pr;case`gregory`:default:return new Xt}}let ji=new Map;var Mi=class{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return Ri()&&(this.resolvedHourCycle||=zi(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}constructor(e,t={}){this.formatter=Pi(e,t),this.options=t}};const Ni={true:{ja:`h11`},false:{}};function Pi(e,t={}){if(typeof t.hour12==`boolean`&&Ii()){t={...t};let n=Ni[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}let Bi=new Map,Vi=!1;try{Vi=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}let Hi=!1;try{Hi=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}const Ui={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}};var Wi=class{format(e){let t=``;if(t=!Vi&&this.options.signDisplay!=null?Ki(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!Hi){var n;let{unit:e,unitDisplay:r=`short`,locale:i}=this.resolvedOptions();if(!e)return t;let a=(n=Ui[e])?.[r];t+=a[i]||a.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Vi&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Hi&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Gi(e,t),this.options=t}};function Gi(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!Hi){var r;let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!(r=Ui[e])?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let i=e+(t?Object.entries(t).sort((e,t)=>e[0]0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`);let a=t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r);return a}else return e.format(n)}}const qi=RegExp(`^.*\\(.*\\).*$`),Ji=[`latn`,`arab`,`hanidec`,`deva`,`beng`];var Yi=class{parse(e){return Zi(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return Zi(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return Zi(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}};const Xi=new Map;function Zi(e,t,n){let r=Qi(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of Ji)if(i!==r.options.numberingSystem){let r=Qi(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function Qi(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style===`percent`){var r,i;let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min(((r=this.options.minimumFractionDigits)??0)+2,20),maximumFractionDigits:Math.min(((i=this.options.maximumFractionDigits)??0)+2,20)};return new Yi(this.locale,e).parse(new Wi(this.locale,e).format(n))}return this.options.currencySign===`accounting`&&qi.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=e.replace(`,`,this.symbols.decimal),e=e.replace(`،`,this.symbols.decimal)),this.symbols.group&&(e=ra(e,`.`,this.symbols.group))),this.options.locale===`fr-FR`&&(e=ra(e,`.`,` `)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=ra(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}constructor(e,t={}){this.locale=e,this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=na(e,this.formatter,this.options,t);var n,r;this.options.style===`percent`&&(((n=this.options.minimumFractionDigits)??0)>18||((r=this.options.maximumFractionDigits)??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}};const ea=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),ta=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function na(e,t,n,r){var i,a,o,s;let c=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`}),l=c.formatToParts(-10000.111),u=c.formatToParts(10000.111),d=ta.map(e=>c.formatToParts(e));var f;let p=(f=(i=l.find(e=>e.type===`minusSign`))?.value)??`-`,m=(a=u.find(e=>e.type===`plusSign`))?.value;!m&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(m=`+`);let h=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001),g=(o=h.find(e=>e.type===`decimal`))?.value,_=(s=l.find(e=>e.type===`group`))?.value,v=l.filter(e=>!ea.has(e.type)).map(e=>ia(e.value)),y=d.flatMap(e=>e.filter(e=>!ea.has(e.type)).map(e=>ia(e.value))),b=[...new Set([...v,...y])].sort((e,t)=>t.length-e.length),x=b.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${b.join(`|`)}|[\\p{White_Space}]`,`gu`),S=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),C=new Map(S.map((e,t)=>[e,t])),w=RegExp(`[${S.join(``)}]`,`g`),T=e=>String(C.get(e));return{minusSign:p,plusSign:m,decimal:g,group:_,literals:x,numeral:w,index:T}}function ra(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function ia(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function aa(e,t){let n=[];for(let r=0;r0}function pa(e,t){return e.compare(t)<=0}function ma(e,t){return e.compare(t)>=0}function ha(e,t,n){return ma(e,t)&&pa(e,n)}function ga(e,t,n){return fa(e,t)&&da(e,n)}function _a(e,t,n){let r=on(e,n);return t>r?e.subtract({days:r+7-t}):t===r?e:e.subtract({days:r-t})}function va(e,t,n){let r=on(e,n),i=t===0?6:t-1;return r===i?e:r>i?e.add({days:7-r+i}):e.add({days:i-r})}function ya(e,t,n,r){if(n===void 0&&r===void 0)return!0;let i=e.add({days:1});if(r!=null&&r(i)||n!=null&&n(i))return!1;let a=t;for(;i.compare(a)<0;)if(i=i.add({days:1}),r!=null&&r(i)||n!=null&&n(i))return!1;return!0}function ba(e,t){let n=[],r=e.add({days:1}),i=t;for(;r.compare(i)<0;)n.push(r),r=r.add({days:1});return n}function xa(e){let{dateObj:t,weekStartsOn:n,fixedWeeks:r,locale:i}=e,a=ua(t),o=Array.from({length:a},(e,n)=>t.set({day:n+1})),s=mn(t),c=hn(t),l=_a(s,n,i),u=va(c,n,i),d=ba(l.subtract({days:1}),s),f=ba(c,u.add({days:1})),p=d.length+o.length+f.length;if(r&&p<42){let e=42-p,n=f[f.length-1];n||=hn(t);let r=Array.from({length:e},(e,t)=>{let r=t+1;return n.add({days:r})});f.push(...r)}let m=d.concat(o,f),h=aa(m,7);return{value:t,cells:m,rows:h}}function Sa(e){let{numberOfMonths:t,dateObj:n,...r}=e,i=[];if(!t||t===1)return i.push(xa({...r,dateObj:n})),i;i.push(xa({...r,dateObj:n}));for(let e=1;e{let n=y(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},e=>(F(r,e),e)]}function Ca(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function wa(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function Ta(e,t){let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>=0?r.length-i:0;if(a>0){let e=10**a;n=Math.round(n*e)/e}return n}function Ea(e,t,n,r){t=Number(t),n=Number(n);let i=(e-(Number.isNaN(t)?0:t))%r,a=Ta(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return Number.isNaN(t)?!Number.isNaN(n)&&a>n&&(a=Math.floor(Ta(n/r,r))*r):an&&(a=t+Math.floor(Ta((n-t)/r,r))*r),a=Ta(a,r),a}function Da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Oa=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n};const ka=Da(Oa);function Aa(e,t){if(e.length!==t.length)return!1;for(let n=0;nka(e,t)),i=e.findIndex(e=>ka(e,n));if(r===-1||i===-1)return[];let[a,o]=[r,i].sort((e,t)=>e-t);return e.slice(a,o+1)}const Ma=typeof document<`u`;function Na(e){return e==null}function Pa(e){let{defaultValue:t,defaultPlaceholder:n,granularity:r=`day`,locale:i=`en`}=e;if(Array.isArray(t)&&t.length)return t.at(-1).copy();if(t&&!Array.isArray(t))return t.copy();if(n)return n.copy();let a=new Date,o=a.getFullYear(),s=a.getMonth()+1,c=a.getDate(),l=[`hour`,`minute`,`second`],u=new Mi(i),d=Ai(u.resolvedOptions().calendar);return l.includes(r??`day`)?Mn(new _r(o,s,c,0,0,0),d):Mn(new hr(o,s,c),d)}const Fa=`ach.af.am.an.ar.ast.az.be.bg.bn.br.bs.ca.cak.ckb.cs.cy.da.de.dsb.el.en.eo.es.et.eu.fa.ff.fi.fr.fy.ga.gd.gl.he.hr.hsb.hu.ia.id.it.ja.ka.kk.kn.ko.lb.lo.lt.lv.meh.ml.ms.nl.nn.no.oc.pl.pt.rm.ro.ru.sc.scn.sk.sl.sr.sv.szl.tg.th.tr.uk.zh-CN.zh-TW`.split(`.`),Ia=[`year`,`month`,`day`],La={ach:{year:`mwaka`,month:`dwe`,day:`nino`},af:{year:`jjjj`,month:`mm`,day:`dd`},am:{year:`ዓዓዓዓ`,month:`ሚሜ`,day:`ቀቀ`},an:{year:`aaaa`,month:`mm`,day:`dd`},ar:{year:`سنة`,month:`شهر`,day:`يوم`},ast:{year:`aaaa`,month:`mm`,day:`dd`},az:{year:`iiii`,month:`aa`,day:`gg`},be:{year:`гггг`,month:`мм`,day:`дд`},bg:{year:`гггг`,month:`мм`,day:`дд`},bn:{year:`yyyy`,month:`মিমি`,day:`dd`},br:{year:`bbbb`,month:`mm`,day:`dd`},bs:{year:`gggg`,month:`mm`,day:`dd`},ca:{year:`aaaa`,month:`mm`,day:`dd`},cak:{year:`jjjj`,month:`ii`,day:`q'q'`},ckb:{year:`ساڵ`,month:`مانگ`,day:`ڕۆژ`},cs:{year:`rrrr`,month:`mm`,day:`dd`},cy:{year:`bbbb`,month:`mm`,day:`dd`},da:{year:`åååå`,month:`mm`,day:`dd`},de:{year:`jjjj`,month:`mm`,day:`tt`},dsb:{year:`llll`,month:`mm`,day:`źź`},el:{year:`εεεε`,month:`μμ`,day:`ηη`},en:{year:`yyyy`,month:`mm`,day:`dd`},eo:{year:`jjjj`,month:`mm`,day:`tt`},es:{year:`aaaa`,month:`mm`,day:`dd`},et:{year:`aaaa`,month:`kk`,day:`pp`},eu:{year:`uuuu`,month:`hh`,day:`ee`},fa:{year:`سال`,month:`ماه`,day:`روز`},ff:{year:`hhhh`,month:`ll`,day:`ññ`},fi:{year:`vvvv`,month:`kk`,day:`pp`},fr:{year:`aaaa`,month:`mm`,day:`jj`},fy:{year:`jjjj`,month:`mm`,day:`dd`},ga:{year:`bbbb`,month:`mm`,day:`ll`},gd:{year:`bbbb`,month:`mm`,day:`ll`},gl:{year:`aaaa`,month:`mm`,day:`dd`},he:{year:`שנה`,month:`חודש`,day:`יום`},hr:{year:`gggg`,month:`mm`,day:`dd`},hsb:{year:`llll`,month:`mm`,day:`dd`},hu:{year:`éééé`,month:`hh`,day:`nn`},ia:{year:`aaaa`,month:`mm`,day:`dd`},id:{year:`tttt`,month:`bb`,day:`hh`},it:{year:`aaaa`,month:`mm`,day:`gg`},ja:{year:` 年 `,month:`月`,day:`日`},ka:{year:`წწწწ`,month:`თთ`,day:`რრ`},kk:{year:`жжжж`,month:`аа`,day:`кк`},kn:{year:`ವವವವ`,month:`ಮಿಮೀ`,day:`ದಿದಿ`},ko:{year:`연도`,month:`월`,day:`일`},lb:{year:`jjjj`,month:`mm`,day:`dd`},lo:{year:`ປປປປ`,month:`ດດ`,day:`ວວ`},lt:{year:`mmmm`,month:`mm`,day:`dd`},lv:{year:`gggg`,month:`mm`,day:`dd`},meh:{year:`aaaa`,month:`mm`,day:`dd`},ml:{year:`വർഷം`,month:`മാസം`,day:`തീയതി`},ms:{year:`tttt`,month:`mm`,day:`hh`},nl:{year:`jjjj`,month:`mm`,day:`dd`},nn:{year:`åååå`,month:`mm`,day:`dd`},no:{year:`åååå`,month:`mm`,day:`dd`},oc:{year:`aaaa`,month:`mm`,day:`jj`},pl:{year:`rrrr`,month:`mm`,day:`dd`},pt:{year:`aaaa`,month:`mm`,day:`dd`},rm:{year:`oooo`,month:`mm`,day:`dd`},ro:{year:`aaaa`,month:`ll`,day:`zz`},ru:{year:`гггг`,month:`мм`,day:`дд`},sc:{year:`aaaa`,month:`mm`,day:`dd`},scn:{year:`aaaa`,month:`mm`,day:`jj`},sk:{year:`rrrr`,month:`mm`,day:`dd`},sl:{year:`llll`,month:`mm`,day:`dd`},sr:{year:`гггг`,month:`мм`,day:`дд`},sv:{year:`åååå`,month:`mm`,day:`dd`},szl:{year:`rrrr`,month:`mm`,day:`dd`},tg:{year:`сссс`,month:`мм`,day:`рр`},th:{year:`ปปปป`,month:`ดด`,day:`วว`},tr:{year:`yyyy`,month:`aa`,day:`gg`},uk:{year:`рррр`,month:`мм`,day:`дд`},"zh-CN":{year:`年`,month:`月`,day:`日`},"zh-TW":{year:`年`,month:`月`,day:`日`}};function Ra(e){if(Ba(e))return La[e];{let t=Wa(e);return Ba(t)?La[t]:La.en}}function za(e,t,n){return Va(e)?Ra(n)[e]:Ua(e)?t:Ha(e)?`––`:``}function Ba(e){return Fa.includes(e)}function Va(e){return Ia.includes(e)}function Ha(e){return e===`hour`||e===`minute`||e===`second`}function Ua(e){return e===`era`||e===`dayPeriod`}function Wa(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}const Ga=[`day`,`month`,`year`],Ka=[`hour`,`minute`,`second`,`dayPeriod`],qa=[...Ga,...Ka];function Ja(e){return Ga.includes(e)}function Ya(e){return qa.includes(e)}function Xa(e,t){let n={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`,hourCycle:t===24?`h24`:void 0,hour12:t===24?!1:void 0};return e===`day`&&(delete n.second,delete n.hour,delete n.minute,delete n.timeZoneName),e===`hour`&&(delete n.minute,delete n.second),e===`minute`&&delete n.second,n}function Za(e){let t=e.querySelector(`[data-selected]`);if(t)return t.focus();let n=e.querySelector(`[data-today]`);if(n)return n.focus();let r=e.querySelector(`[data-radix-vue-calendar-day]`);if(r)return r.focus()}function Qa(e,t){var n;let r=ie();return H(()=>{r.value=e()},{...t,flush:(n=void 0,`sync`)}),ee(r)}function $a(e,t){let n,r,i,a=L(!0),o=()=>{a.value=!0,i()};V(e,o,{flush:`sync`});let s=typeof t==`function`?t:t.get,c=typeof t==`function`?void 0:t.set,l=f((e,t)=>(r=e,i=t,{get(){return a.value&&(n=s(),a.value=!1),r(),n},set(e){c?.(e)}}));return Object.isExtensible(l)&&(l.trigger=o),l}function eo(e){return g()?(j(e),!0):!1}function to(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return eo(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t)))}}function no(e){let t=!1,n,r=m(!0);return(...i)=>(t||(n=r.run(()=>e(...i)),t=!0),n)}function ro(e){let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return(...a)=>(t+=1,n||(r=m(!0),n=r.run(()=>e(...a))),eo(i),n)}function io(e){return typeof e==`function`?e():B(e)}function ao(e){if(!b(e))return I(e);let t=new Proxy({},{get(t,n,r){return B(Reflect.get(e.value,n,r))},set(t,n,r){return b(e.value[n])&&!b(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return I(t)}function oo(e){return ao(a(e))}const so=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const co=e=>typeof e<`u`,lo=e=>e!=null,uo=Object.prototype.toString,fo=e=>uo.call(e)===`[object Object]`,po=()=>{},mo=ho();function ho(){var e,t;return so&&(e=window==null?void 0:window.navigator)?.userAgent&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(t=window==null?void 0:window.navigator)?.maxTouchPoints>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function go(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function _o(e,t={}){let n,r,i=po,a=e=>{clearTimeout(e),i(),i=po};return o=>{let s=io(e),c=io(t.maxWait);return n&&a(n),s<=0||c!==void 0&&c<=0?(r&&(a(r),r=null),Promise.resolve(o())):new Promise((e,l)=>{i=t.rejectOnCancel?l:e,c&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,e(o())},c)),n=setTimeout(()=>{r&&a(r),r=null,e(o())},s)})}}function vo(e){return h()}function yo(e,t=1e4){return f((n,r)=>{let i=io(e),a,o=()=>setTimeout(()=>{i=io(e),r()},io(t));return eo(()=>{clearTimeout(a)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(a),a=o()}}})}function bo(e,t=200,n={}){return go(_o(t,n),e)}function xo(e,t){vo()&&O(e,t)}function So(e,t=!0,n){vo()?A(e,n):t?e():w(e)}function Co(e,t,n={}){let{immediate:r=!0}=n,i=L(!1),a=null;function o(){a&&(clearTimeout(a),a=null)}function s(){i.value=!1,o()}function c(...n){o(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=null,e(...n)},io(t))}return r&&(i.value=!0,so&&c()),eo(s),{isPending:ee(i),start:c,stop:s}}function wo(e=1e3,t={}){let{controls:n=!1,callback:r}=t,i=Co(r??po,e,t),o=a(()=>!i.isPending.value);return n?{ready:o,...i}:o}function To(e,t,n){let r=V(e,(...e)=>(w(()=>r()),t(...e)),n);return r}function Eo(e){var t;let n=io(e);return(t=n?.$el)??n}const Do=so?window:void 0;function Oo(...e){let t,n,r,i;if(typeof e[0]==`string`||Array.isArray(e[0])?([n,r,i]=e,t=Do):[t,n,r,i]=e,!t)return po;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);let a=[],o=()=>{a.forEach(e=>e()),a.length=0},s=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),c=V(()=>[Eo(t),io(i)],([e,t])=>{if(o(),!e)return;let i=fo(t)?{...t}:t;a.push(...n.flatMap(t=>r.map(n=>s(e,t,n,i))))},{immediate:!0,flush:`post`}),l=()=>{c(),o()};return eo(l),l}function ko(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ao(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=Do,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=ko(t);return Oo(i,a,e=>{e.repeat&&io(s)||c(e)&&n(e)},o)}function jo(){let e=L(!1),t=h();return t&&A(()=>{e.value=!0},t),e}function Mo(e){let t=jo();return a(()=>(t.value,!!e()))}function No(e,t,n={}){let{window:r=Do,...i}=n,o,s=Mo(()=>r&&`MutationObserver`in r),c=()=>{o&&(o.disconnect(),o=void 0)},l=a(()=>{let t=io(e),n=(Array.isArray(t)?t:[t]).map(Eo).filter(lo);return new Set(n)}),u=V(()=>l.value,e=>{c(),s.value&&e.size&&(o=new MutationObserver(t),e.forEach(e=>o.observe(e,i)))},{immediate:!0,flush:`post`}),d=()=>o?.takeRecords(),f=()=>{c(),u()};return eo(f),{isSupported:s,stop:f,takeRecords:d}}function Po(e={}){var t;let{window:n=Do,deep:r=!0,triggerOnRemoval:i=!1}=e,a=(t=e.document)??n?.document,o=()=>{var e;let t=a?.activeElement;if(r)for(;t!=null&&t.shadowRoot;)t=(e=t?.shadowRoot)?.activeElement;return t},s=L(),c=()=>{s.value=o()};return n&&(Oo(n,`blur`,e=>{e.relatedTarget===null&&c()},!0),Oo(n,`focus`,c,!0)),i&&No(a,e=>{e.filter(e=>e.removedNodes.length).map(e=>Array.from(e.removedNodes)).flat().forEach(e=>{e===s.value&&c()})},{childList:!0,subtree:!0}),c(),s}function Fo(e,t={}){let{immediate:n=!0,fpsLimit:r=void 0,window:i=Do}=t,a=L(!1),o=r?1e3/r:null,s=0,c=null;function l(t){if(!a.value||!i)return;s||=t;let n=t-s;if(o&&nnull,()=>t.proxy.$el);return N(n.trigger),A(n.trigger),n}function Ro(e,t,n={}){let{window:r=Do,...i}=n,o,s=Mo(()=>r&&`ResizeObserver`in r),c=()=>{o&&(o.disconnect(),o=void 0)},l=a(()=>Array.isArray(e)?e.map(e=>Eo(e)):[Eo(e)]),u=V(l,e=>{if(c(),s.value&&r){o=new ResizeObserver(t);for(let t of e)t&&o.observe(t,i)}},{immediate:!0,flush:`post`}),d=()=>{c(),u()};return eo(d),{isSupported:s,stop:d}}function zo(e,t={}){let n=Po(t),r=a(()=>Eo(e));return{focused:a(()=>r.value&&n.value?r.value.contains(n.value):!1)}}function Bo(e=Lo()){let t=ie(),n=()=>{let n=Eo(e);n&&(t.value=n.parentElement)};return So(n),V(()=>io(e),n),t}function q(e,t,n,r={}){var i,o,s;let{clone:c=!1,passive:l=!1,eventName:u,deep:d=!1,defaultValue:f,shouldEmit:p}=r,m=h(),g=n||m?.emit||(i=m?.$emit)?.bind(m)||(s=(o=m?.proxy)?.$emit)?.bind(m?.proxy),_=u;t||=`modelValue`,_||=`update:${t.toString()}`;let v=e=>c?typeof c==`function`?c(e):Io(e):e,y=()=>co(e[t])?v(e[t]):f,b=e=>{p?p(e)&&g(_,e):g(_,e)};if(l){let n=y(),r=L(n),i=!1;return V(()=>e[t],e=>{i||(i=!0,r.value=v(e),w(()=>i=!1))}),V(r,n=>{!i&&(n!==e[t]||d)&&b(n)},{deep:d}),r}else return a({get(){return y()},set(e){b(e)}})}function Vo(e){return e?e.flatMap(e=>e.type===t?Vo(e.children):[e]):[]}function J(){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}const Ho=[`INPUT`,`TEXTAREA`];function Uo(e,t,n,r={}){if(!t||r.enableIgnoredElement&&Ho.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-radix-vue-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=Wo(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function Wo(e,t,n,r=e.length){if(--r===0)return null;let i=e.indexOf(t),a=n.goForward?i+1:i-1;if(!n.loop&&(a<0||a>=e.length))return null;let o=(a+e.length)%e.length,s=e[o];return s?s.hasAttribute(`disabled`)&&s.getAttribute(`disabled`)!==`false`?Wo(e,s,n,r):s:null}function Go(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Ko(e,t,n=`.`,r){if(!Go(t))return Ko(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Go(a)&&Go(i[t])?i[t]=Ko(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function qo(e){return(...t)=>t.reduce((t,n)=>Ko(t,n,``,e),{})}const Jo=qo(),[Yo,Xo]=K(`ConfigProvider`),Zo=p({inheritAttrs:!1,__name:`ConfigProvider`,props:{dir:{default:`ltr`},scrollBody:{type:[Boolean,Object],default:!0},nonce:{default:void 0},useId:{type:Function,default:void 0}},setup(e){let t=e,{dir:n,scrollBody:r,nonce:i}=z(t);return Xo({dir:n,scrollBody:r,nonce:i,useId:t.useId}),(e,t)=>R(e.$slots,`default`)}});let Qo=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,$o=(e=21)=>{let t=``,n=e;for(;n--;)t+=Qo[Math.random()*64|0];return t};const es=ro(()=>{let e=L(new Map),t=L(),n=a(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=Yo({scrollBody:L(!0)}),i=null,o=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.body.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,mo&&i?.(),t.value=void 0};return V(n,(e,n)=>{var a;if(!so)return;if(!e){n&&o();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=(a=r.scrollBody)!=null&&a.value?typeof r.scrollBody.value==`object`?Jo({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.body.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),mo&&(i=Oo(document,`touchmove`,e=>rs(e),{passive:!1})),w(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})},{immediate:!0,flush:`sync`}),e});function ts(e){let t=$o(6),n=es();n.value.set(t,e??!1);let r=a({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return xo(()=>{n.value.delete(t)}),r}function ns(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}const os=`data-radix-vue-collection-item`;function ss(e,t=os){let n=e??Symbol();return{createCollection:e=>{let r=L([]);function i(){let n=Eo(e);return n?r.value=Array.from(n.querySelectorAll(`[${t}]:not([data-disabled])`)):r.value=[]}return k(()=>{r.value=[]}),A(i),N(i),V(()=>e?.value,i,{immediate:!0}),F(n,r),r},injectCollection:()=>y(n,L([]))}}function cs(e){let t=L(e);function n(){return t.value}function r(e){t.value=e}function i(e,n){return new Mi(t.value,n).format(e)}function a(e,t=!0){return la(e)&&t?i(oa(e),{dateStyle:`long`,timeStyle:`long`}):i(oa(e),{dateStyle:`long`})}function o(e,n={}){return new Mi(t.value,{month:`long`,year:`numeric`,...n}).format(e)}function s(e,n={}){return new Mi(t.value,{month:`long`,...n}).format(e)}function c(){let e=cn(pn());return[1,2,3,4,5,6,7,8,9,10,11,12].map(t=>({label:s(oa(e.set({month:t}))),value:t}))}function l(e,n={}){return new Mi(t.value,{year:`numeric`,...n}).format(e)}function u(e,n){return ca(e)?new Mi(t.value,{...n,timeZone:e.timeZone}).formatToParts(oa(e)):new Mi(t.value,n).formatToParts(oa(e))}function d(e,n=`narrow`){return new Mi(t.value,{weekday:n}).format(e)}function f(e){var n;return(n=new Mi(t.value,{hour:`numeric`,minute:`numeric`}).formatToParts(e).find(e=>e.type===`dayPeriod`))?.value===`PM`?`PM`:`AM`}let p={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`};function m(e,t,n={}){let r={...p,...n},i=u(e,r).find(e=>e.type===t);return i?i.value:``}return{setLocale:r,getLocale:n,fullMonth:s,fullYear:l,fullMonthAndYear:o,toParts:u,custom:i,part:m,dayPeriod:f,selectedDate:a,dayOfWeek:d,getMonths:c}}function Y(e){let t=Yo({dir:L(`ltr`)});return a(()=>{var n;return e?.value||(n=t.dir)?.value||`ltr`})}function ls(e){let t=h(),n=t?.type.emits,i={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{i[oe(r(t))]=(...n)=>e(t,...n)}),i}let us=0;function ds(){H(e=>{if(!so)return;let t=document.querySelectorAll(`[data-radix-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??fs()),document.body.insertAdjacentElement(`beforeend`,t[1]??fs()),us++,e(()=>{us===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),us--})})}function fs(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function ps(e){return a(()=>{var t;return io(e)?!!((t=Eo(e))!=null&&t.closest(`form`)):!0})}function ms(e){let t=h(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),i=le(e);return a(()=>{let e={},a=t?.vnode.props??{};return Object.keys(a).forEach(t=>{e[r(t)]=a[t]}),Object.keys({...n,...e}).reduce((e,t)=>(i.value[t]!==void 0&&(e[t]=i.value[t]),e),{})})}function hs(e,t){let n=ms(e),r=t?ls(t):{};return a(()=>({...n.value,...r}))}function X(){let e=h(),t=L(),n=a(()=>{var e,n;return[`#text`,`#comment`].includes((e=t.value)?.$el.nodeName)?(n=t.value)?.$el.nextElementSibling:Eo(t)}),r=Object.assign({},e.exposed),i={};for(let t in e.props)Object.defineProperty(i,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function o(n){t.value=n,n&&(Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),e.exposed=i)}return{forwardRef:o,currentRef:t,currentElement:n}}function gs(e,t){let n=yo(!1,300),r=L(null),i=to();function a(){r.value=null,n.value=!1}function o(e,t){let i=e.currentTarget,a={x:e.clientX,y:e.clientY},o=_s(a,i.getBoundingClientRect()),s=vs(a,o),c=ys(t.getBoundingClientRect()),l=xs([...s,...c]);r.value=l,n.value=!0}return H(n=>{if(e.value&&t.value){let r=e=>o(e,t.value),i=t=>o(t,e.value);e.value.addEventListener(`pointerleave`,r),t.value.addEventListener(`pointerleave`,i),n(()=>{var n,a;(n=e.value)==null||n.removeEventListener(`pointerleave`,r),(a=t.value)==null||a.removeEventListener(`pointerleave`,i)})}}),H(n=>{var o;if(r.value){let s=n=>{var o,s;if(!r.value)return;let c=n.target,l={x:n.clientX,y:n.clientY},u=(o=e.value)?.contains(c)||(s=t.value)?.contains(c),d=!bs(l,r.value),f=!!c.closest(`[data-grace-area-trigger]`);u?a():(d||f)&&(a(),i.trigger())};(o=e.value)==null||o.ownerDocument.addEventListener(`pointermove`,s),n(()=>{var t;return(t=e.value)?.ownerDocument.removeEventListener(`pointermove`,s)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function _s(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function vs(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ys(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function bs(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;er!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function xs(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y?1:0),Ss(t)}function Ss(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Cs=function(e){if(typeof document>`u`)return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ws=new WeakMap,Ts=new WeakMap,Es={},Ds=0,Os=function(e){return e&&(e.host||Os(e.parentNode))},ks=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Os(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},As=function(e,t,n,r){var i=ks(t,Array.isArray(e)?e:[e]);Es[n]||(Es[n]=new WeakMap);var a=Es[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(ws.get(e)||0)+1,l=(a.get(e)||0)+1;ws.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ts.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ds++,function(){o.forEach(function(e){var t=ws.get(e)-1,i=a.get(e)-1;ws.set(e,t),a.set(e,i),t||(Ts.has(e)||e.removeAttribute(r),Ts.delete(e)),i||e.removeAttribute(n)}),Ds--,Ds||(ws=new WeakMap,ws=new WeakMap,Ts=new WeakMap,Es={})}},js=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=Cs(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live]`))),As(r,i,n,`aria-hidden`)):function(){return null}};function Ms(e){let t;V(()=>Eo(e),e=>{e?t=js(e):t&&t()}),M(()=>{t&&t()})}let Ns=0;function Z(e,t=`radix`){if(e)return e;let n=Yo({useId:void 0});return de?`${t}-${de()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++Ns}`}function Ps(e,t){let n=L(),r=(r,i)=>{if(t.multiple&&Array.isArray(e.value))if(t.selectionBehavior===`replace`)e.value=[r],n.value=r;else{let t=e.value.findIndex(e=>i(e));t===-1?e.value.push(r):e.value.splice(t,1)}else t.selectionBehavior===`replace`?e.value={...r}:!Array.isArray(e.value)&&i(e.value)?e.value=void 0:e.value={...r};return e.value};function i(r,i,a,o){var s;if(!(n!=null&&n.value)||!t.multiple||!Array.isArray(e.value))return;let c=(s=a().filter(e=>e.ref.dataset.disabled!==``).find(e=>e.ref===i))?.value;if(!c)return;let l=null;switch(r){case`prev`:case`next`:l=ja(o,n.value,c);break;case`first`:l=ja(o,n.value,o?.[0]);break;case`last`:l=ja(o,n.value,o?.[o.length-1]);break}e.value=l}return{firstValue:n,onSelectItem:r,handleMultipleReplace:i}}function Fs(e){let t=L(),n=a(()=>{var e;return(e=t.value)?.width??0}),r=a(()=>{var e;return(e=t.value)?.height??0});return A(()=>{let n=Eo(e);if(n){t.value={width:n.offsetWidth,height:n.offsetHeight};let e=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}});return e.observe(n,{box:`border-box`}),()=>e.unobserve(n)}else t.value=void 0}),{width:n,height:r}}function Is(e,t){let n=L(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}const Ls=`data-item-text`;function Rs(e){let t=yo(``,1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(!(e!=null&&e.value)&&!r)return;t.value+=n;let i=e?.value??r,a=J(),o=i.map(e=>{var t;return{ref:e,textValue:(t=(e.querySelector(`[${Ls}]`)??e).textContent)?.trim()??``}}),s=o.find(e=>e.ref===a),c=o.map(e=>e.textValue),l=Bs(c,t.value,s?.textValue),u=o.find(e=>e.textValue===l);return u&&u.ref.focus(),u?.ref},resetTypeahead:()=>{t.value=``}}}function zs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bs(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=zs(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Vs(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}const Hs=p({name:`PrimitiveSlot`,inheritAttrs:!1,setup(t,{attrs:n,slots:r}){return()=>{var t,a;if(!r.default)return null;let o=Vo(r.default()),s=o.findIndex(t=>t.type!==e);if(s===-1)return o;let c=o[s];(t=c.props)==null||delete t.ref;let l=c.props?C(n,c.props):n;n.class&&(a=c.props)!=null&&a.class&&delete c.props.class;let u=i(c,l);for(let e in l)e.startsWith(`on`)&&(u.props||={},u.props[e]=l[e]);return o.length===1?u:(o[s]=u,o)}}}),Q=p({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&[`area`,`img`,`input`].includes(r)?()=>v(r,t):r===`template`?()=>v(Hs,t,{default:n.default}):()=>v(e.as,t,{default:n.default})}});function Us(){let e=L(),t=a(()=>{var t,n;return[`#text`,`#comment`].includes((t=e.value)?.$el.nodeName)?(n=e.value)?.$el.nextElementSibling:Eo(e)});return{primitiveElement:e,currentElement:t}}const[Ws,Gs]=K(`CollapsibleRoot`),Ks=p({__name:`CollapsibleRoot`,props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:open`],setup(e,{expose:t,emit:n}){let r=e,i=q(r,`open`,n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),a=q(r,`disabled`);return Gs({contentId:``,disabled:a,open:i,onOpenToggle:()=>{i.value=!i.value}}),t({open:i}),X(),(e,t)=>(P(),s(B(Q),{as:e.as,"as-child":r.asChild,"data-state":B(i)?`open`:`closed`,"data-disabled":B(a)?``:void 0},{default:U(()=>[R(e.$slots,`default`,{open:B(i)})]),_:3},8,[`as`,`as-child`,`data-state`,`data-disabled`]))}}),qs=p({__name:`CollapsibleTrigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(e){let t=e;X();let n=Ws();return(e,r)=>{var i,a;return P(),s(B(Q),{type:e.as===`button`?`button`:void 0,as:e.as,"as-child":t.asChild,"aria-controls":B(n).contentId,"aria-expanded":B(n).open.value,"data-state":B(n).open.value?`open`:`closed`,"data-disabled":(i=B(n).disabled)!=null&&i.value?``:void 0,disabled:(a=B(n).disabled)?.value,onClick:B(n).onOpenToggle},{default:U(()=>[R(e.$slots,`default`)]),_:3},8,[`type`,`as`,`as-child`,`aria-controls`,`aria-expanded`,`data-state`,`data-disabled`,`disabled`,`onClick`])}}});function Js(e,t){var n;let r=L({}),i=L(`none`),o=L(e),s=e.value?`mounted`:`unmounted`,c,l=(n=t.value)?.ownerDocument.defaultView??Do,{state:u,dispatch:d}=Is(s,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),f=e=>{var n;if(so){let r=new CustomEvent(e,{bubbles:!1,cancelable:!1});(n=t.value)==null||n.dispatchEvent(r)}};V(e,async(e,n)=>{var a;let o=n!==e;if(await w(),o){let o=i.value,s=Ys(t.value);e?(d(`MOUNT`),f(`enter`),s===`none`&&f(`after-enter`)):s===`none`||(a=r.value)?.display===`none`?(d(`UNMOUNT`),f(`leave`),f(`after-leave`)):n&&o!==s?(d(`ANIMATION_OUT`),f(`leave`)):(d(`UNMOUNT`),f(`after-leave`))}},{immediate:!0});let p=e=>{let n=Ys(t.value),r=n.includes(e.animationName),i=u.value===`mounted`?`enter`:`leave`;if(e.target===t.value&&r&&(f(`after-${i}`),d(`ANIMATION_END`),!o.value)){let e=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,c=l?.setTimeout(()=>{var n;(n=t.value)?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=e)})}e.target===t.value&&n===`none`&&d(`ANIMATION_END`)},m=e=>{e.target===t.value&&(i.value=Ys(t.value))},h=V(t,(e,t)=>{e?(r.value=getComputedStyle(e),e.addEventListener(`animationstart`,m),e.addEventListener(`animationcancel`,p),e.addEventListener(`animationend`,p)):(d(`ANIMATION_END`),c!==void 0&&l?.clearTimeout(c),t?.removeEventListener(`animationstart`,m),t?.removeEventListener(`animationcancel`,p),t?.removeEventListener(`animationend`,p))},{immediate:!0}),g=V(u,()=>{let e=Ys(t.value);i.value=u.value===`mounted`?e:`none`});return M(()=>{h(),g()}),{isPresent:a(()=>[`mounted`,`unmountSuspended`].includes(u.value))}}function Ys(e){return e&&getComputedStyle(e).animationName||`none`}const Xs=p({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var r;let{present:i,forceMount:a}=z(e),o=L(),{isPresent:s}=Js(i,o);n({present:s});let c=t.default({present:s});c=Vo(c||[]);let l=h();if(c&&c?.length>1){let e=(r=l?.parent)!=null&&r.type.name?`<${l.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${e}\` 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(e=>` - ${e}`).join(` +import{Comment as e,Fragment as t,Teleport as n,camelize as r,cloneVNode as i,computed as a,createBaseVNode as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createTextVNode as u,createVNode as d,customRef as f,defineComponent as p,effectScope as m,getCurrentInstance as h,getCurrentScope as g,guardReactiveProps as _,h as v,inject as y,isRef as b,markRaw as x,mergeDefaults as S,mergeProps as C,nextTick as w,normalizeProps as T,normalizeStyle as E,onBeforeMount as D,onBeforeUnmount as O,onBeforeUpdate as k,onMounted as A,onScopeDispose as j,onUnmounted as M,onUpdated as N,openBlock as P,provide as F,reactive as I,readonly as ee,ref as L,renderList as te,renderSlot as R,resolveDynamicComponent as ne,shallowReadonly as re,shallowRef as ie,toDisplayString as ae,toHandlerKey as oe,toHandlers as se,toRaw as ce,toRef as le,toRefs as z,triggerRef as ue,unref as B,useId as de,useSlots as fe,vModelSelect as pe,vShow as me,watch as V,watchEffect as H,watchPostEffect as he,watchSyncEffect as ge,withCtx as U,withDirectives as _e,withKeys as W,withModifiers as G}from"./index-C-t5bjx6.js";import{arrow as ve,computePosition as ye,createCoords as be,flip as xe,floor as Se,hide as Ce,limitShift as we,max as Te,min as Ee,offset as De,rectToClientRect as Oe,round as ke,shift as Ae,size as je}from"./src-B9Iy8991.js";function Me(){return typeof window<`u`}function Ne(e){return Ie(e)?(e.nodeName||``).toLowerCase():`#document`}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fe(e){var t;return(t=(Ie(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ie(e){return Me()?e instanceof Node||e instanceof Pe(e).Node:!1}function Le(e){return Me()?e instanceof Element||e instanceof Pe(e).Element:!1}function Re(e){return Me()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function ze(e){return!Me()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function Be(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function Ve(e){return[`table`,`td`,`th`].includes(Ne(e))}function He(e){return[`:popover-open`,`:modal`].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ue(e){let t=Ge(),n=Le(e)?qe(e):e;return[`transform`,`translate`,`scale`,`rotate`,`perspective`].some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`].some(e=>(n.willChange||``).includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>(n.contain||``).includes(e))}function We(e){let t=Ye(e);for(;Re(t)&&!Ke(t);){if(Ue(t))return t;if(He(t))return null;t=Ye(t)}return null}function Ge(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}function Ke(e){return[`html`,`body`,`#document`].includes(Ne(e))}function qe(e){return Pe(e).getComputedStyle(e)}function Je(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ye(e){if(Ne(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ze(e)&&e.host||Fe(e);return ze(t)?t.host:t}function Xe(e){let t=Ye(e);return Ke(t)?e.ownerDocument?e.ownerDocument.body:e.body:Re(t)&&Be(t)?t:Xe(t)}function Ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let i=Xe(e),a=i===(r=e.ownerDocument)?.body,o=Pe(i);if(a){let e=Qe(o);return t.concat(o,o.visualViewport||[],Be(i)?i:[],e&&n?Ze(e):[])}return t.concat(i,Ze(i,[],n))}function Qe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $e(e){let t=qe(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Re(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ke(n)!==a||ke(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function et(e){return Le(e)?e:e.contextElement}function tt(e){let t=et(e);if(!Re(t))return be(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$e(t),o=(a?ke(n.width):n.width)/r,s=(a?ke(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const nt=be(0);function rt(e){let t=Pe(e);return!Ge()||!t.visualViewport?nt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function it(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function at(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=et(e),o=be(1);t&&(r?Le(r)&&(o=tt(r)):o=tt(e));let s=it(a,n,r)?rt(a):be(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Pe(a),t=r&&Le(r)?Pe(r):r,n=e,i=Qe(n);for(;i&&r&&t!==n;){let e=tt(i),t=i.getBoundingClientRect(),r=qe(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Pe(i),i=Qe(n)}}return Oe({width:u,height:d,x:c,y:l})}function ot(e,t){let n=Je(e).scrollLeft;return t?t.left+n:at(Fe(e)).left+n}function st(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:ot(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function ct(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Fe(r),s=t?He(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=be(1),u=be(0),d=Re(r);if((d||!d&&!a)&&((Ne(r)!==`body`||Be(o))&&(c=Je(r)),Re(r))){let e=at(r);l=tt(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?st(o,c,!0):be(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function lt(e){return Array.from(e.getClientRects())}function ut(e){let t=Fe(e),n=Je(e),r=e.ownerDocument.body,i=Te(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Te(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ot(e),s=-n.scrollTop;return qe(r).direction===`rtl`&&(o+=Te(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function dt(e,t){let n=Pe(e),r=Fe(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ge();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function ft(e,t){let n=at(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Re(e)?tt(e):be(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,l=r*a.y;return{width:o,height:s,x:c,y:l}}function pt(e,t,n){let r;if(t===`viewport`)r=dt(e,n);else if(t===`document`)r=ut(Fe(e));else if(Le(t))r=ft(t,n);else{let n=rt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Oe(r)}function mt(e,t){let n=Ye(e);return n===t||!Le(n)||Ke(n)?!1:qe(n).position===`fixed`||mt(n,t)}function ht(e,t){let n=t.get(e);if(n)return n;let r=Ze(e,[],!1).filter(e=>Le(e)&&Ne(e)!==`body`),i=null,a=qe(e).position===`fixed`,o=a?Ye(e):e;for(;Le(o)&&!Ke(o);){let t=qe(o),n=Ue(o);!n&&t.position===`fixed`&&(i=null);let s=a?!n&&!i:!n&&t.position===`static`&&!!i&&[`absolute`,`fixed`].includes(i.position)||Be(o)&&!n&&mt(e,o);s?r=r.filter(e=>e!==o):i=t,o=Ye(o)}return t.set(e,r),r}function gt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=n===`clippingAncestors`?He(t)?[]:ht(t,this._c):[].concat(n),o=[...a,r],s=o[0],c=o.reduce((e,n)=>{let r=pt(t,n,i);return e.top=Te(r.top,e.top),e.right=Ee(r.right,e.right),e.bottom=Ee(r.bottom,e.bottom),e.left=Te(r.left,e.left),e},pt(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function _t(e){let{width:t,height:n}=$e(e);return{width:t,height:n}}function vt(e,t,n){let r=Re(t),i=Fe(t),a=n===`fixed`,o=at(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=be(0);if(r||!r&&!a)if((Ne(t)!==`body`||Be(i))&&(s=Je(t)),r){let e=at(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=ot(i));let l=i&&!r&&!a?st(i,s):be(0),u=o.left+s.scrollLeft-c.x-l.x,d=o.top+s.scrollTop-c.y-l.y;return{x:u,y:d,width:o.width,height:o.height}}function yt(e){return qe(e).position===`static`}function bt(e,t){if(!Re(e)||qe(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Fe(e)===n&&(n=n.ownerDocument.body),n}function xt(e,t){let n=Pe(e);if(He(e))return n;if(!Re(e)){let t=Ye(e);for(;t&&!Ke(t);){if(Le(t)&&!yt(t))return t;t=Ye(t)}return n}let r=bt(e,t);for(;r&&Ve(r)&&yt(r);)r=bt(r,t);return r&&Ke(r)&&yt(r)&&!Ue(r)?n:r||We(e)||n}const St=async function(e){let t=this.getOffsetParent||xt,n=this.getDimensions,r=await n(e.floating);return{reference:vt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ct(e){return qe(e).direction===`rtl`}const wt={convertOffsetParentRelativeRectToViewportRelativeRect:ct,getDocumentElement:Fe,getClippingRect:gt,getOffsetParent:xt,getElementRects:St,getClientRects:lt,getDimensions:_t,getScale:tt,isElement:Le,isRTL:Ct};function Tt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Et(e,t){let n=null,r,i=Fe(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Se(d),h=Se(i.clientWidth-(u+f)),g=Se(i.clientHeight-(d+p)),_=Se(u),v=-m+`px `+-h+`px `+-g+`px `+-_+`px`,y={rootMargin:v,threshold:Te(0,Ee(1,c))||1},b=!0;function x(t){let n=t[0].intersectionRatio;if(n!==c){if(!b)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Tt(l,e.getBoundingClientRect())&&o(),b=!1}try{n=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return o(!0),a}function Dt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=et(e),u=i||a?[...l?Ze(l):[],...Ze(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Et(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?at(e):null;c&&g();function g(){let t=at(e);h&&!Tt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Ot=De,kt=Ae,At=xe,jt=je,Mt=Ce,Nt=ve,Pt=we,Ft=(e,t,n)=>{let r=new Map,i={platform:wt,...n},a={...i.platform,_c:r};return ye(e,t,{...i,platform:a})};function It(e){return typeof e==`object`&&!!e&&`$el`in e}function Lt(e){if(It(e)){let t=e.$el;return Ie(t)&&Ne(t)===`#comment`?null:t}return e}function Rt(e){return typeof e==`function`?e():B(e)}function zt(e){return{name:`arrow`,options:e,fn(t){let n=Lt(Rt(e.element));return n==null?{}:Nt({element:n,padding:e.padding}).fn(t)}}}function Bt(e){if(typeof window>`u`)return 1;let t=e.ownerDocument.defaultView||window;return t.devicePixelRatio||1}function Vt(e,t){let n=Bt(e);return Math.round(t*n)/n}function Ht(e,t,n){n===void 0&&(n={});let r=n.whileElementsMounted,i=a(()=>{var e;return(e=Rt(n.open))??!0}),o=a(()=>Rt(n.middleware)),s=a(()=>{var e;return(e=Rt(n.placement))??`bottom`}),c=a(()=>{var e;return(e=Rt(n.strategy))??`absolute`}),l=a(()=>{var e;return(e=Rt(n.transform))??!0}),u=a(()=>Lt(e.value)),d=a(()=>Lt(t.value)),f=L(0),p=L(0),m=L(c.value),h=L(s.value),_=ie({}),v=L(!1),y=a(()=>{let e={position:m.value,left:`0`,top:`0`};if(!d.value)return e;let t=Vt(d.value,f.value),n=Vt(d.value,p.value);return l.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...Bt(d.value)>=1.5&&{willChange:`transform`}}:{position:m.value,left:t+`px`,top:n+`px`}}),b;function x(){if(u.value==null||d.value==null)return;let e=i.value;Ft(u.value,d.value,{middleware:o.value,placement:s.value,strategy:c.value}).then(t=>{f.value=t.x,p.value=t.y,m.value=t.strategy,h.value=t.placement,_.value=t.middlewareData,v.value=e!==!1})}function S(){typeof b==`function`&&(b(),b=void 0)}function C(){if(S(),r===void 0){x();return}if(u.value!=null&&d.value!=null){b=r(u.value,d.value,x);return}}function w(){i.value||(v.value=!1)}return V([o,s,c,i],x,{flush:`sync`}),V([u,d],C,{flush:`sync`}),V(i,w,{flush:`sync`}),g()&&j(S),{x:re(f),y:re(p),strategy:re(m),placement:re(h),middlewareData:re(_),isPositioned:re(v),floatingStyles:y,update:x}}function Ut(e,t){return e-t*Math.floor(e/t)}const Wt=1721426;function Gt(e,t,n,r){t=qt(e,t);let i=t-1,a=-2;return n<=2?a=0:Kt(t)&&(a=-1),Wt-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function Kt(e){return e%4==0&&(e%100!=0||e%400==0)}function qt(e,t){return e===`BC`?1-t:t}function Jt(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}const Yt={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};var Xt=class{fromJulianDay(e){let t=e,n=t-Wt,r=Math.floor(n/146097),i=Ut(n,146097),a=Math.floor(i/36524),o=Ut(i,36524),s=Math.floor(o/1461),c=Ut(o,1461),l=Math.floor(c/365),u=r*400+a*100+s*4+l+(a!==4&&l!==4?1:0),[d,f]=Jt(u),p=t-Gt(d,f,1,1),m=2;t0&&t===pn())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Cn(e,t),c=bn(n,r,i,a,o,s,0);return c-Math.floor(e/1e3)*1e3}const Sn=new Map;function Cn(e,t){let n=Sn.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Sn.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}const wn=864e5;function Tn(e,t,n,r){let i=n===r?[n]:[n,r];return i.filter(n=>En(e,t,n))}function En(e,t,n){let r=Cn(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function Dn(e,t,n=`compatible`){let r=jn(e);if(t===`UTC`)return yn(r);if(t===pn()&&n===`compatible`){r=Mn(r,new Xt);let e=new Date,t=qt(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=yn(r),a=xn(i-wn,t),o=xn(i+wn,t),s=Tn(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function On(e,t,n=`compatible`){return new Date(Dn(e,t,n))}function kn(e,t){let n=xn(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new yr(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function An(e){return new hr(e.calendar,e.era,e.year,e.month,e.day)}function jn(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new _r(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function Mn(e,t){if(nn(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,Hn(r),r}function Nn(e,t,n){if(e instanceof yr)return e.timeZone===t?e:Fn(e,t);let r=Dn(e,t,n);return kn(r,t)}function Pn(e){let t=yn(e)-e.offset;return new Date(t)}function Fn(e,t){let n=yn(e)-e.offset;return Mn(kn(n,t),e.calendar)}const In=36e5;function Ln(e,t){let n=e.copy(),r=`hour`in n?Xn(n,t):0;Rn(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,zn(n),Vn(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,Bn(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,o;let e=(a=(o=n.calendar).isInverseEra)?.call(o,n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Rn(e,t){var n,r;(n=(r=e.calendar).isInverseEra)?.call(r,e)&&(t=-t),e.year+=t}function zn(e){for(;e.month<1;)Rn(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Rn(e,1)}function Bn(e){for(;e.day<1;)e.month--,zn(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,zn(e)}function Vn(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Hn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Vn(e)}function Un(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function Wn(e,t){return Ln(e,Un(t))}function Gn(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Hn(n),n}function Kn(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),Jn(n),n}function qn(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Yn(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Yn(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Yn(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Yn(e.hour,24),t}function Jn(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Yn(e,t){let n=e%t;return n<0&&(n+=t),n}function Xn(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,qn(e)}function Zn(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=$n(a,n,0,t.length-1,r?.round),i.era=t[a],Hn(i);break}case`year`:var a,o;(a=(o=i.calendar).isInverseEra)?.call(o,i)&&(n=-n),i.year=$n(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=$n(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=$n(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Hn(i),i}function Qn(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=$n(t,n,a,o,r?.round);break}case`minute`:i.minute=$n(e.minute,n,0,59,r?.round);break;case`second`:i.second=$n(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=$n(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function $n(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function er(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let r=Ln(jn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=Dn(r,e.timeZone)}else n=yn(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=kn(n,e.timeZone);return Mn(r,e.calendar)}function tr(e,t){return er(e,Un(t))}function nr(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=jn(e),o=Mn(Kn(a,{hour:t}),new Xt),s=[Dn(o,e.timeZone,`earlier`),Dn(o,e.timeZone,`later`)].filter(t=>kn(t,e.timeZone).day===o.day)[0],c=Mn(Kn(a,{hour:i}),new Xt),l=[Dn(c,e.timeZone,`earlier`),Dn(c,e.timeZone,`later`)].filter(t=>kn(t,e.timeZone).day===c.day).pop(),u=yn(e)-e.offset,d=Math.floor(u/In),f=u%In;return u=$n(d,n,Math.floor(s/In),Math.floor(l/In),r?.round)*In+f,Mn(kn(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return Qn(e,t,n,r);case`era`:case`year`:case`month`:case`day`:{let i=Zn(jn(e),t,n,r),a=Dn(i,e.timeZone);return Mn(kn(a,e.timeZone),e.calendar)}default:throw Error(`Unsupported field `+t)}}function rr(e,t,n){let r=jn(e),i=Kn(Gn(r,t),t);if(i.compare(r)===0)return e;let a=Dn(i,e.timeZone,n);return Mn(kn(a,e.timeZone),e.calendar)}const ir=[`hours`,`minutes`,`seconds`],ar=[`years`,`months`,`weeks`,`days`,...ir];function or(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function sr(e){let t=Mn(e,new Xt),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function cr(e){return`${sr(e)}T${or(e)}`}function lr(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`}function ur(e){return`${cr(e)}${lr(e.offset)}[${e.timeZone}]`}function dr(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function fr(e,t,n){dr(e,t),t.set(e,n)}function pr(e){let t=typeof e[0]==`object`?e.shift():new Xt,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var mr=new WeakMap,hr=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return Ln(this,e)}subtract(e){return Wn(this,e)}set(e){return Gn(this,e)}cycle(e,t,n){return Zn(this,e,t,n)}toDate(e){return On(this,e)}toString(){return sr(this)}compare(e){return ln(this,e)}constructor(...e){fr(this,mr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,Hn(this)}},gr=new WeakMap,_r=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ln(this,e)}subtract(e){return Wn(this,e)}set(e){return Gn(Kn(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return Zn(this,e,t,n);default:return Qn(this,e,t,n)}}toDate(e,t){return On(this,e,t)}toString(){return cr(this)}compare(e){let t=ln(this,e);return t===0?un(this,jn(e)):t}constructor(...e){fr(this,gr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Hn(this)}},vr=new WeakMap,yr=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return er(this,e)}subtract(e){return tr(this,e)}set(e,t){return rr(this,e,t)}cycle(e,t,n){return nr(this,e,t,n)}toDate(){return Pn(this)}toString(){return ur(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Nn(e,this.timeZone).toDate().getTime()}constructor(...e){fr(this,vr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Hn(this)}};const br=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],xr=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Sr=[1867,1911,1925,1988,2018],Cr=[`meiji`,`taisho`,`showa`,`heisei`,`reiwa`];function wr(e){let t=br.findIndex(([t,n,r])=>e.year=0){let[,n,r]=br[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return Cr}getYearsInEra(e){let t=Cr.indexOf(e.era),n=br[t],r=br[t+1];if(r==null)return 9999-n[0]+1;let i=r[0]-n[0];return(e.month0?[`minguo`,t]:[`before_minguo`,1-t]}var Pr=class extends Xt{fromJulianDay(e){let t=super.fromJulianDay(e),n=qt(t.era,t.year),[r,i]=Nr(n);return new hr(this,r,i,t.month,t.day)}toJulianDay(e){return super.toJulianDay(Fr(e))}getEras(){return[`before_minguo`,`minguo`]}balanceDate(e){let[t,n]=Nr(Mr(e));e.era=t,e.year=n}isInverseEra(e){return e.era===`before_minguo`}getDaysInMonth(e){return super.getDaysInMonth(Fr(e))}getYearsInEra(e){return e.era===`before_minguo`?9999:9999-jr}constructor(...e){super(...e),this.identifier=`roc`}};function Fr(e){let[t,n]=Jt(Mr(e));return new hr(t,n,e.month,e.day)}const Ir=1948320,Lr=[0,31,62,93,124,155,186,216,246,276,306,336];var Rr=class{fromJulianDay(e){let t=e-Ir,n=1+Math.floor((33*t+3)/12053),r=365*(n-1)+Math.floor((8*n+21)/33),i=t-r,a=i<216?Math.floor(i/31):Math.floor((i-6)/30),o=i-Lr[a]+1;return new hr(this,n,a+1,o)}toJulianDay(e){let t=Ir-1+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=Lr[e.month-1],t+=e.day,t}getMonthsInYear(){return 12}getDaysInMonth(e){if(e.month<=6)return 31;if(e.month<=11)return 30;let t=Ut(25*e.year+11,33)<8;return t?30:29}getEras(){return[`AP`]}getYearsInEra(){return 9377}constructor(){this.identifier=`persian`}};const zr=78,Br=80;var Vr=class extends Xt{fromJulianDay(e){let t=super.fromJulianDay(e),n=t.year-zr,r=e-Gt(t.era,t.year,1,1),i;r=8&&(a+=(e.month-7)*30),a+=e.day-1,a)}getDaysInMonth(e){return e.month===1&&Kt(e.year+zr)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return[`saka`]}balanceDate(){}constructor(...e){super(...e),this.identifier=`indian`}};const Hr=1948440,Ur=1948439,Wr=1300,Gr=1600,Kr=460322;function qr(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function Jr(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+qr(t,r,1,1)))/29.5)+1),a=n-qr(t,r,i,1)+1;return new hr(e,r,i,a)}function Yr(e){return(14+11*e)%30<11}var Xr=class{fromJulianDay(e){return Jr(this,Hr,e)}toJulianDay(e){return qr(Hr,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return e.month===12&&Yr(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return Yr(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return[`AH`]}constructor(){this.identifier=`islamic-civil`}},Zr=class extends Xr{fromJulianDay(e){return Jr(this,Ur,e)}toJulianDay(e){return qr(Ur,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier=`islamic-tbla`}};const Qr=`qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=`;let $r,ei;function ti(e){return Kr+ei[e-Wr]}function ni(e,t){let n=e-Wr,r=1<<11-(t-1);return($r[n]&r)===0?29:30}function ri(e,t){let n=ti(e);for(let r=1;rr)return super.fromJulianDay(e);{let e=Wr-1,n=1,r=1;for(;r>0;){e++,r=t-ti(e)+1;let i=ii(e);if(r===i){n=12;break}else if(rt;)r-=t,n++,t=ni(e,n);break}}return new hr(this,e,n,t-ri(e,n)+1)}}toJulianDay(e){return e.yearGr?super.toJulianDay(e):Hr+ri(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.yearGr?super.getDaysInMonth(e):ni(e.year,e.month)}getDaysInYear(e){return e.yearGr?super.getDaysInYear(e):ii(e.year)}constructor(){if(super(),this.identifier=`islamic-umalqura`,$r||=new Uint16Array(Uint8Array.from(atob(Qr),e=>e.charCodeAt(0)).buffer),!ei){ei=new Uint32Array(Gr-Wr+1);let e=0;for(let t=Wr;t<=Gr;t++){ei[t-Wr]=e;for(let n=1;n<=12;n++)e+=ni(t,n)}}}};const oi=347997,si=1080,ci=24*si,li=29,ui=12*si+793,di=li*ci+ui;function fi(e){return Ut(e*7+1,19)<7}function pi(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return Ut(3*(r+1),7)<3&&(r+=1),r}function mi(e){let t=pi(e-1),n=pi(e),r=pi(e+1);return r-n===356?2:n-t===382?1:0}function hi(e){return pi(e)+mi(e)}function gi(e){return hi(e+1)-hi(e)}function _i(e){let t=gi(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function vi(e,t){if(t>=6&&!fi(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=_i(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?fi(e)?30:0:30}var yi=class{fromJulianDay(e){let t=e-oi,n=t*ci/di,r=Math.floor((19*n+234)/235)+1,i=hi(r),a=Math.floor(t-i);for(;a<1;)r--,i=hi(r),a=Math.floor(t-i);let o=1,s=0;for(;s6?e.month--:!fi(t.year)&&fi(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier=`hebrew`}};const bi=1723856,xi=1824665,Si=5500;function Ci(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function wi(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Ci(e,n,1,1))/30),i=t+1-Ci(e,n,r,1);return[n,r,i]}function Ti(e){return Math.floor(e%4/3)}function Ei(e,t){return t%13==0?Ti(e)+5:30}var Di=class{fromJulianDay(e){let[t,n,r]=wi(bi,e),i=`AM`;return t<=0&&(i=`AA`,t+=Si),new hr(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`AA`&&(t-=Si),Ci(bi,t,e.month,e.day)}getDaysInMonth(e){return Ei(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+Ti(e.year)}getYearsInEra(e){return e.era===`AA`?9999:9991}getEras(){return[`AA`,`AM`]}constructor(){this.identifier=`ethiopic`}},Oi=class extends Di{fromJulianDay(e){let[t,n,r]=wi(bi,e);return t+=Si,new hr(this,`AA`,t,n,r)}getEras(){return[`AA`]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier=`ethioaa`}},ki=class extends Di{fromJulianDay(e){let[t,n,r]=wi(xi,e),i=`CE`;return t<=0&&(i=`BCE`,t=1-t),new hr(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`BCE`&&(t=1-t),Ci(xi,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return e.era===`BCE`&&(t=1-t),Ei(t,e.month)}isInverseEra(e){return e.era===`BCE`}balanceDate(e){e.year<=0&&(e.era=e.era===`BCE`?`CE`:`BCE`,e.year=1-e.year)}getEras(){return[`BCE`,`CE`]}getYearsInEra(e){return e.era===`BCE`?9999:9715}constructor(...e){super(...e),this.identifier=`coptic`}};function Ai(e){switch(e){case`buddhist`:return new kr;case`ethiopic`:return new Di;case`ethioaa`:return new Oi;case`coptic`:return new ki;case`hebrew`:return new yi;case`indian`:return new Vr;case`islamic-civil`:return new Xr;case`islamic-tbla`:return new Zr;case`islamic-umalqura`:return new ai;case`japanese`:return new Er;case`persian`:return new Rr;case`roc`:return new Pr;case`gregory`:default:return new Xt}}let ji=new Map;var Mi=class{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return Ri()&&(this.resolvedHourCycle||=zi(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}constructor(e,t={}){this.formatter=Pi(e,t),this.options=t}};const Ni={true:{ja:`h11`},false:{}};function Pi(e,t={}){if(typeof t.hour12==`boolean`&&Ii()){t={...t};let n=Ni[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}let Bi=new Map,Vi=!1;try{Vi=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}let Hi=!1;try{Hi=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}const Ui={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}};var Wi=class{format(e){let t=``;if(t=!Vi&&this.options.signDisplay!=null?Ki(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!Hi){var n;let{unit:e,unitDisplay:r=`short`,locale:i}=this.resolvedOptions();if(!e)return t;let a=(n=Ui[e])?.[r];t+=a[i]||a.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Vi&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Hi&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Gi(e,t),this.options=t}};function Gi(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!Hi){var r;let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!(r=Ui[e])?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let i=e+(t?Object.entries(t).sort((e,t)=>e[0]0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`);let a=t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r);return a}else return e.format(n)}}const qi=RegExp(`^.*\\(.*\\).*$`),Ji=[`latn`,`arab`,`hanidec`,`deva`,`beng`];var Yi=class{parse(e){return Zi(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return Zi(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return Zi(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}};const Xi=new Map;function Zi(e,t,n){let r=Qi(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of Ji)if(i!==r.options.numberingSystem){let r=Qi(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function Qi(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style===`percent`){var r,i;let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min(((r=this.options.minimumFractionDigits)??0)+2,20),maximumFractionDigits:Math.min(((i=this.options.maximumFractionDigits)??0)+2,20)};return new Yi(this.locale,e).parse(new Wi(this.locale,e).format(n))}return this.options.currencySign===`accounting`&&qi.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=e.replace(`,`,this.symbols.decimal),e=e.replace(`،`,this.symbols.decimal)),this.symbols.group&&(e=ra(e,`.`,this.symbols.group))),this.options.locale===`fr-FR`&&(e=ra(e,`.`,` `)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=ra(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}constructor(e,t={}){this.locale=e,this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=na(e,this.formatter,this.options,t);var n,r;this.options.style===`percent`&&(((n=this.options.minimumFractionDigits)??0)>18||((r=this.options.maximumFractionDigits)??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}};const ea=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),ta=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function na(e,t,n,r){var i,a,o,s;let c=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`}),l=c.formatToParts(-10000.111),u=c.formatToParts(10000.111),d=ta.map(e=>c.formatToParts(e));var f;let p=(f=(i=l.find(e=>e.type===`minusSign`))?.value)??`-`,m=(a=u.find(e=>e.type===`plusSign`))?.value;!m&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(m=`+`);let h=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001),g=(o=h.find(e=>e.type===`decimal`))?.value,_=(s=l.find(e=>e.type===`group`))?.value,v=l.filter(e=>!ea.has(e.type)).map(e=>ia(e.value)),y=d.flatMap(e=>e.filter(e=>!ea.has(e.type)).map(e=>ia(e.value))),b=[...new Set([...v,...y])].sort((e,t)=>t.length-e.length),x=b.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${b.join(`|`)}|[\\p{White_Space}]`,`gu`),S=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),C=new Map(S.map((e,t)=>[e,t])),w=RegExp(`[${S.join(``)}]`,`g`),T=e=>String(C.get(e));return{minusSign:p,plusSign:m,decimal:g,group:_,literals:x,numeral:w,index:T}}function ra(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function ia(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function aa(e,t){let n=[];for(let r=0;r0}function pa(e,t){return e.compare(t)<=0}function ma(e,t){return e.compare(t)>=0}function ha(e,t,n){return ma(e,t)&&pa(e,n)}function ga(e,t,n){return fa(e,t)&&da(e,n)}function _a(e,t,n){let r=on(e,n);return t>r?e.subtract({days:r+7-t}):t===r?e:e.subtract({days:r-t})}function va(e,t,n){let r=on(e,n),i=t===0?6:t-1;return r===i?e:r>i?e.add({days:7-r+i}):e.add({days:i-r})}function ya(e,t,n,r){if(n===void 0&&r===void 0)return!0;let i=e.add({days:1});if(r!=null&&r(i)||n!=null&&n(i))return!1;let a=t;for(;i.compare(a)<0;)if(i=i.add({days:1}),r!=null&&r(i)||n!=null&&n(i))return!1;return!0}function ba(e,t){let n=[],r=e.add({days:1}),i=t;for(;r.compare(i)<0;)n.push(r),r=r.add({days:1});return n}function xa(e){let{dateObj:t,weekStartsOn:n,fixedWeeks:r,locale:i}=e,a=ua(t),o=Array.from({length:a},(e,n)=>t.set({day:n+1})),s=mn(t),c=hn(t),l=_a(s,n,i),u=va(c,n,i),d=ba(l.subtract({days:1}),s),f=ba(c,u.add({days:1})),p=d.length+o.length+f.length;if(r&&p<42){let e=42-p,n=f[f.length-1];n||=hn(t);let r=Array.from({length:e},(e,t)=>{let r=t+1;return n.add({days:r})});f.push(...r)}let m=d.concat(o,f),h=aa(m,7);return{value:t,cells:m,rows:h}}function Sa(e){let{numberOfMonths:t,dateObj:n,...r}=e,i=[];if(!t||t===1)return i.push(xa({...r,dateObj:n})),i;i.push(xa({...r,dateObj:n}));for(let e=1;e{let n=y(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},e=>(F(r,e),e)]}function Ca(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function wa(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function Ta(e,t){let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>=0?r.length-i:0;if(a>0){let e=10**a;n=Math.round(n*e)/e}return n}function Ea(e,t,n,r){t=Number(t),n=Number(n);let i=(e-(Number.isNaN(t)?0:t))%r,a=Ta(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return Number.isNaN(t)?!Number.isNaN(n)&&a>n&&(a=Math.floor(Ta(n/r,r))*r):an&&(a=t+Math.floor(Ta((n-t)/r,r))*r),a=Ta(a,r),a}function Da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Oa=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n};const ka=Da(Oa);function Aa(e,t){if(e.length!==t.length)return!1;for(let n=0;nka(e,t)),i=e.findIndex(e=>ka(e,n));if(r===-1||i===-1)return[];let[a,o]=[r,i].sort((e,t)=>e-t);return e.slice(a,o+1)}const Ma=typeof document<`u`;function Na(e){return e==null}function Pa(e){let{defaultValue:t,defaultPlaceholder:n,granularity:r=`day`,locale:i=`en`}=e;if(Array.isArray(t)&&t.length)return t.at(-1).copy();if(t&&!Array.isArray(t))return t.copy();if(n)return n.copy();let a=new Date,o=a.getFullYear(),s=a.getMonth()+1,c=a.getDate(),l=[`hour`,`minute`,`second`],u=new Mi(i),d=Ai(u.resolvedOptions().calendar);return l.includes(r??`day`)?Mn(new _r(o,s,c,0,0,0),d):Mn(new hr(o,s,c),d)}const Fa=`ach.af.am.an.ar.ast.az.be.bg.bn.br.bs.ca.cak.ckb.cs.cy.da.de.dsb.el.en.eo.es.et.eu.fa.ff.fi.fr.fy.ga.gd.gl.he.hr.hsb.hu.ia.id.it.ja.ka.kk.kn.ko.lb.lo.lt.lv.meh.ml.ms.nl.nn.no.oc.pl.pt.rm.ro.ru.sc.scn.sk.sl.sr.sv.szl.tg.th.tr.uk.zh-CN.zh-TW`.split(`.`),Ia=[`year`,`month`,`day`],La={ach:{year:`mwaka`,month:`dwe`,day:`nino`},af:{year:`jjjj`,month:`mm`,day:`dd`},am:{year:`ዓዓዓዓ`,month:`ሚሜ`,day:`ቀቀ`},an:{year:`aaaa`,month:`mm`,day:`dd`},ar:{year:`سنة`,month:`شهر`,day:`يوم`},ast:{year:`aaaa`,month:`mm`,day:`dd`},az:{year:`iiii`,month:`aa`,day:`gg`},be:{year:`гггг`,month:`мм`,day:`дд`},bg:{year:`гггг`,month:`мм`,day:`дд`},bn:{year:`yyyy`,month:`মিমি`,day:`dd`},br:{year:`bbbb`,month:`mm`,day:`dd`},bs:{year:`gggg`,month:`mm`,day:`dd`},ca:{year:`aaaa`,month:`mm`,day:`dd`},cak:{year:`jjjj`,month:`ii`,day:`q'q'`},ckb:{year:`ساڵ`,month:`مانگ`,day:`ڕۆژ`},cs:{year:`rrrr`,month:`mm`,day:`dd`},cy:{year:`bbbb`,month:`mm`,day:`dd`},da:{year:`åååå`,month:`mm`,day:`dd`},de:{year:`jjjj`,month:`mm`,day:`tt`},dsb:{year:`llll`,month:`mm`,day:`źź`},el:{year:`εεεε`,month:`μμ`,day:`ηη`},en:{year:`yyyy`,month:`mm`,day:`dd`},eo:{year:`jjjj`,month:`mm`,day:`tt`},es:{year:`aaaa`,month:`mm`,day:`dd`},et:{year:`aaaa`,month:`kk`,day:`pp`},eu:{year:`uuuu`,month:`hh`,day:`ee`},fa:{year:`سال`,month:`ماه`,day:`روز`},ff:{year:`hhhh`,month:`ll`,day:`ññ`},fi:{year:`vvvv`,month:`kk`,day:`pp`},fr:{year:`aaaa`,month:`mm`,day:`jj`},fy:{year:`jjjj`,month:`mm`,day:`dd`},ga:{year:`bbbb`,month:`mm`,day:`ll`},gd:{year:`bbbb`,month:`mm`,day:`ll`},gl:{year:`aaaa`,month:`mm`,day:`dd`},he:{year:`שנה`,month:`חודש`,day:`יום`},hr:{year:`gggg`,month:`mm`,day:`dd`},hsb:{year:`llll`,month:`mm`,day:`dd`},hu:{year:`éééé`,month:`hh`,day:`nn`},ia:{year:`aaaa`,month:`mm`,day:`dd`},id:{year:`tttt`,month:`bb`,day:`hh`},it:{year:`aaaa`,month:`mm`,day:`gg`},ja:{year:` 年 `,month:`月`,day:`日`},ka:{year:`წწწწ`,month:`თთ`,day:`რრ`},kk:{year:`жжжж`,month:`аа`,day:`кк`},kn:{year:`ವವವವ`,month:`ಮಿಮೀ`,day:`ದಿದಿ`},ko:{year:`연도`,month:`월`,day:`일`},lb:{year:`jjjj`,month:`mm`,day:`dd`},lo:{year:`ປປປປ`,month:`ດດ`,day:`ວວ`},lt:{year:`mmmm`,month:`mm`,day:`dd`},lv:{year:`gggg`,month:`mm`,day:`dd`},meh:{year:`aaaa`,month:`mm`,day:`dd`},ml:{year:`വർഷം`,month:`മാസം`,day:`തീയതി`},ms:{year:`tttt`,month:`mm`,day:`hh`},nl:{year:`jjjj`,month:`mm`,day:`dd`},nn:{year:`åååå`,month:`mm`,day:`dd`},no:{year:`åååå`,month:`mm`,day:`dd`},oc:{year:`aaaa`,month:`mm`,day:`jj`},pl:{year:`rrrr`,month:`mm`,day:`dd`},pt:{year:`aaaa`,month:`mm`,day:`dd`},rm:{year:`oooo`,month:`mm`,day:`dd`},ro:{year:`aaaa`,month:`ll`,day:`zz`},ru:{year:`гггг`,month:`мм`,day:`дд`},sc:{year:`aaaa`,month:`mm`,day:`dd`},scn:{year:`aaaa`,month:`mm`,day:`jj`},sk:{year:`rrrr`,month:`mm`,day:`dd`},sl:{year:`llll`,month:`mm`,day:`dd`},sr:{year:`гггг`,month:`мм`,day:`дд`},sv:{year:`åååå`,month:`mm`,day:`dd`},szl:{year:`rrrr`,month:`mm`,day:`dd`},tg:{year:`сссс`,month:`мм`,day:`рр`},th:{year:`ปปปป`,month:`ดด`,day:`วว`},tr:{year:`yyyy`,month:`aa`,day:`gg`},uk:{year:`рррр`,month:`мм`,day:`дд`},"zh-CN":{year:`年`,month:`月`,day:`日`},"zh-TW":{year:`年`,month:`月`,day:`日`}};function Ra(e){if(Ba(e))return La[e];{let t=Wa(e);return Ba(t)?La[t]:La.en}}function za(e,t,n){return Va(e)?Ra(n)[e]:Ua(e)?t:Ha(e)?`––`:``}function Ba(e){return Fa.includes(e)}function Va(e){return Ia.includes(e)}function Ha(e){return e===`hour`||e===`minute`||e===`second`}function Ua(e){return e===`era`||e===`dayPeriod`}function Wa(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}const Ga=[`day`,`month`,`year`],Ka=[`hour`,`minute`,`second`,`dayPeriod`],qa=[...Ga,...Ka];function Ja(e){return Ga.includes(e)}function Ya(e){return qa.includes(e)}function Xa(e,t){let n={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`,hourCycle:t===24?`h24`:void 0,hour12:t===24?!1:void 0};return e===`day`&&(delete n.second,delete n.hour,delete n.minute,delete n.timeZoneName),e===`hour`&&(delete n.minute,delete n.second),e===`minute`&&delete n.second,n}function Za(e){let t=e.querySelector(`[data-selected]`);if(t)return t.focus();let n=e.querySelector(`[data-today]`);if(n)return n.focus();let r=e.querySelector(`[data-radix-vue-calendar-day]`);if(r)return r.focus()}function Qa(e,t){var n;let r=ie();return H(()=>{r.value=e()},{...t,flush:(n=void 0,`sync`)}),ee(r)}function $a(e,t){let n,r,i,a=L(!0),o=()=>{a.value=!0,i()};V(e,o,{flush:`sync`});let s=typeof t==`function`?t:t.get,c=typeof t==`function`?void 0:t.set,l=f((e,t)=>(r=e,i=t,{get(){return a.value&&(n=s(),a.value=!1),r(),n},set(e){c?.(e)}}));return Object.isExtensible(l)&&(l.trigger=o),l}function eo(e){return g()?(j(e),!0):!1}function to(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return eo(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t)))}}function no(e){let t=!1,n,r=m(!0);return(...i)=>(t||(n=r.run(()=>e(...i)),t=!0),n)}function ro(e){let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return(...a)=>(t+=1,n||(r=m(!0),n=r.run(()=>e(...a))),eo(i),n)}function io(e){return typeof e==`function`?e():B(e)}function ao(e){if(!b(e))return I(e);let t=new Proxy({},{get(t,n,r){return B(Reflect.get(e.value,n,r))},set(t,n,r){return b(e.value[n])&&!b(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return I(t)}function oo(e){return ao(a(e))}const so=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const co=e=>typeof e<`u`,lo=e=>e!=null,uo=Object.prototype.toString,fo=e=>uo.call(e)===`[object Object]`,po=()=>{},mo=ho();function ho(){var e,t;return so&&(e=window==null?void 0:window.navigator)?.userAgent&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(t=window==null?void 0:window.navigator)?.maxTouchPoints>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function go(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function _o(e,t={}){let n,r,i=po,a=e=>{clearTimeout(e),i(),i=po};return o=>{let s=io(e),c=io(t.maxWait);return n&&a(n),s<=0||c!==void 0&&c<=0?(r&&(a(r),r=null),Promise.resolve(o())):new Promise((e,l)=>{i=t.rejectOnCancel?l:e,c&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,e(o())},c)),n=setTimeout(()=>{r&&a(r),r=null,e(o())},s)})}}function vo(e){return h()}function yo(e,t=1e4){return f((n,r)=>{let i=io(e),a,o=()=>setTimeout(()=>{i=io(e),r()},io(t));return eo(()=>{clearTimeout(a)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(a),a=o()}}})}function bo(e,t=200,n={}){return go(_o(t,n),e)}function xo(e,t){vo()&&O(e,t)}function So(e,t=!0,n){vo()?A(e,n):t?e():w(e)}function Co(e,t,n={}){let{immediate:r=!0}=n,i=L(!1),a=null;function o(){a&&(clearTimeout(a),a=null)}function s(){i.value=!1,o()}function c(...n){o(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=null,e(...n)},io(t))}return r&&(i.value=!0,so&&c()),eo(s),{isPending:ee(i),start:c,stop:s}}function wo(e=1e3,t={}){let{controls:n=!1,callback:r}=t,i=Co(r??po,e,t),o=a(()=>!i.isPending.value);return n?{ready:o,...i}:o}function To(e,t,n){let r=V(e,(...e)=>(w(()=>r()),t(...e)),n);return r}function Eo(e){var t;let n=io(e);return(t=n?.$el)??n}const Do=so?window:void 0;function Oo(...e){let t,n,r,i;if(typeof e[0]==`string`||Array.isArray(e[0])?([n,r,i]=e,t=Do):[t,n,r,i]=e,!t)return po;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);let a=[],o=()=>{a.forEach(e=>e()),a.length=0},s=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),c=V(()=>[Eo(t),io(i)],([e,t])=>{if(o(),!e)return;let i=fo(t)?{...t}:t;a.push(...n.flatMap(t=>r.map(n=>s(e,t,n,i))))},{immediate:!0,flush:`post`}),l=()=>{c(),o()};return eo(l),l}function ko(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ao(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=Do,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=ko(t);return Oo(i,a,e=>{e.repeat&&io(s)||c(e)&&n(e)},o)}function jo(){let e=L(!1),t=h();return t&&A(()=>{e.value=!0},t),e}function Mo(e){let t=jo();return a(()=>(t.value,!!e()))}function No(e,t,n={}){let{window:r=Do,...i}=n,o,s=Mo(()=>r&&`MutationObserver`in r),c=()=>{o&&(o.disconnect(),o=void 0)},l=a(()=>{let t=io(e),n=(Array.isArray(t)?t:[t]).map(Eo).filter(lo);return new Set(n)}),u=V(()=>l.value,e=>{c(),s.value&&e.size&&(o=new MutationObserver(t),e.forEach(e=>o.observe(e,i)))},{immediate:!0,flush:`post`}),d=()=>o?.takeRecords(),f=()=>{c(),u()};return eo(f),{isSupported:s,stop:f,takeRecords:d}}function Po(e={}){var t;let{window:n=Do,deep:r=!0,triggerOnRemoval:i=!1}=e,a=(t=e.document)??n?.document,o=()=>{var e;let t=a?.activeElement;if(r)for(;t!=null&&t.shadowRoot;)t=(e=t?.shadowRoot)?.activeElement;return t},s=L(),c=()=>{s.value=o()};return n&&(Oo(n,`blur`,e=>{e.relatedTarget===null&&c()},!0),Oo(n,`focus`,c,!0)),i&&No(a,e=>{e.filter(e=>e.removedNodes.length).map(e=>Array.from(e.removedNodes)).flat().forEach(e=>{e===s.value&&c()})},{childList:!0,subtree:!0}),c(),s}function Fo(e,t={}){let{immediate:n=!0,fpsLimit:r=void 0,window:i=Do}=t,a=L(!1),o=r?1e3/r:null,s=0,c=null;function l(t){if(!a.value||!i)return;s||=t;let n=t-s;if(o&&nnull,()=>t.proxy.$el);return N(n.trigger),A(n.trigger),n}function Ro(e,t,n={}){let{window:r=Do,...i}=n,o,s=Mo(()=>r&&`ResizeObserver`in r),c=()=>{o&&(o.disconnect(),o=void 0)},l=a(()=>Array.isArray(e)?e.map(e=>Eo(e)):[Eo(e)]),u=V(l,e=>{if(c(),s.value&&r){o=new ResizeObserver(t);for(let t of e)t&&o.observe(t,i)}},{immediate:!0,flush:`post`}),d=()=>{c(),u()};return eo(d),{isSupported:s,stop:d}}function zo(e,t={}){let n=Po(t),r=a(()=>Eo(e));return{focused:a(()=>r.value&&n.value?r.value.contains(n.value):!1)}}function Bo(e=Lo()){let t=ie(),n=()=>{let n=Eo(e);n&&(t.value=n.parentElement)};return So(n),V(()=>io(e),n),t}function q(e,t,n,r={}){var i,o,s;let{clone:c=!1,passive:l=!1,eventName:u,deep:d=!1,defaultValue:f,shouldEmit:p}=r,m=h(),g=n||m?.emit||(i=m?.$emit)?.bind(m)||(s=(o=m?.proxy)?.$emit)?.bind(m?.proxy),_=u;t||=`modelValue`,_||=`update:${t.toString()}`;let v=e=>c?typeof c==`function`?c(e):Io(e):e,y=()=>co(e[t])?v(e[t]):f,b=e=>{p?p(e)&&g(_,e):g(_,e)};if(l){let n=y(),r=L(n),i=!1;return V(()=>e[t],e=>{i||(i=!0,r.value=v(e),w(()=>i=!1))}),V(r,n=>{!i&&(n!==e[t]||d)&&b(n)},{deep:d}),r}else return a({get(){return y()},set(e){b(e)}})}function Vo(e){return e?e.flatMap(e=>e.type===t?Vo(e.children):[e]):[]}function J(){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}const Ho=[`INPUT`,`TEXTAREA`];function Uo(e,t,n,r={}){if(!t||r.enableIgnoredElement&&Ho.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-radix-vue-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=Wo(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function Wo(e,t,n,r=e.length){if(--r===0)return null;let i=e.indexOf(t),a=n.goForward?i+1:i-1;if(!n.loop&&(a<0||a>=e.length))return null;let o=(a+e.length)%e.length,s=e[o];return s?s.hasAttribute(`disabled`)&&s.getAttribute(`disabled`)!==`false`?Wo(e,s,n,r):s:null}function Go(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Ko(e,t,n=`.`,r){if(!Go(t))return Ko(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Go(a)&&Go(i[t])?i[t]=Ko(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function qo(e){return(...t)=>t.reduce((t,n)=>Ko(t,n,``,e),{})}const Jo=qo(),[Yo,Xo]=K(`ConfigProvider`),Zo=p({inheritAttrs:!1,__name:`ConfigProvider`,props:{dir:{default:`ltr`},scrollBody:{type:[Boolean,Object],default:!0},nonce:{default:void 0},useId:{type:Function,default:void 0}},setup(e){let t=e,{dir:n,scrollBody:r,nonce:i}=z(t);return Xo({dir:n,scrollBody:r,nonce:i,useId:t.useId}),(e,t)=>R(e.$slots,`default`)}});let Qo=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,$o=(e=21)=>{let t=``,n=e;for(;n--;)t+=Qo[Math.random()*64|0];return t};const es=ro(()=>{let e=L(new Map),t=L(),n=a(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=Yo({scrollBody:L(!0)}),i=null,o=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.body.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,mo&&i?.(),t.value=void 0};return V(n,(e,n)=>{var a;if(!so)return;if(!e){n&&o();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=(a=r.scrollBody)!=null&&a.value?typeof r.scrollBody.value==`object`?Jo({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.body.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),mo&&(i=Oo(document,`touchmove`,e=>rs(e),{passive:!1})),w(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})},{immediate:!0,flush:`sync`}),e});function ts(e){let t=$o(6),n=es();n.value.set(t,e??!1);let r=a({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return xo(()=>{n.value.delete(t)}),r}function ns(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}const os=`data-radix-vue-collection-item`;function ss(e,t=os){let n=e??Symbol();return{createCollection:e=>{let r=L([]);function i(){let n=Eo(e);return n?r.value=Array.from(n.querySelectorAll(`[${t}]:not([data-disabled])`)):r.value=[]}return k(()=>{r.value=[]}),A(i),N(i),V(()=>e?.value,i,{immediate:!0}),F(n,r),r},injectCollection:()=>y(n,L([]))}}function cs(e){let t=L(e);function n(){return t.value}function r(e){t.value=e}function i(e,n){return new Mi(t.value,n).format(e)}function a(e,t=!0){return la(e)&&t?i(oa(e),{dateStyle:`long`,timeStyle:`long`}):i(oa(e),{dateStyle:`long`})}function o(e,n={}){return new Mi(t.value,{month:`long`,year:`numeric`,...n}).format(e)}function s(e,n={}){return new Mi(t.value,{month:`long`,...n}).format(e)}function c(){let e=cn(pn());return[1,2,3,4,5,6,7,8,9,10,11,12].map(t=>({label:s(oa(e.set({month:t}))),value:t}))}function l(e,n={}){return new Mi(t.value,{year:`numeric`,...n}).format(e)}function u(e,n){return ca(e)?new Mi(t.value,{...n,timeZone:e.timeZone}).formatToParts(oa(e)):new Mi(t.value,n).formatToParts(oa(e))}function d(e,n=`narrow`){return new Mi(t.value,{weekday:n}).format(e)}function f(e){var n;return(n=new Mi(t.value,{hour:`numeric`,minute:`numeric`}).formatToParts(e).find(e=>e.type===`dayPeriod`))?.value===`PM`?`PM`:`AM`}let p={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`};function m(e,t,n={}){let r={...p,...n},i=u(e,r).find(e=>e.type===t);return i?i.value:``}return{setLocale:r,getLocale:n,fullMonth:s,fullYear:l,fullMonthAndYear:o,toParts:u,custom:i,part:m,dayPeriod:f,selectedDate:a,dayOfWeek:d,getMonths:c}}function Y(e){let t=Yo({dir:L(`ltr`)});return a(()=>{var n;return e?.value||(n=t.dir)?.value||`ltr`})}function ls(e){let t=h(),n=t?.type.emits,i={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{i[oe(r(t))]=(...n)=>e(t,...n)}),i}let us=0;function ds(){H(e=>{if(!so)return;let t=document.querySelectorAll(`[data-radix-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??fs()),document.body.insertAdjacentElement(`beforeend`,t[1]??fs()),us++,e(()=>{us===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),us--})})}function fs(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function ps(e){return a(()=>{var t;return io(e)?!!((t=Eo(e))!=null&&t.closest(`form`)):!0})}function ms(e){let t=h(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),i=le(e);return a(()=>{let e={},a=t?.vnode.props??{};return Object.keys(a).forEach(t=>{e[r(t)]=a[t]}),Object.keys({...n,...e}).reduce((e,t)=>(i.value[t]!==void 0&&(e[t]=i.value[t]),e),{})})}function hs(e,t){let n=ms(e),r=t?ls(t):{};return a(()=>({...n.value,...r}))}function X(){let e=h(),t=L(),n=a(()=>{var e,n;return[`#text`,`#comment`].includes((e=t.value)?.$el.nodeName)?(n=t.value)?.$el.nextElementSibling:Eo(t)}),r=Object.assign({},e.exposed),i={};for(let t in e.props)Object.defineProperty(i,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function o(n){t.value=n,n&&(Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),e.exposed=i)}return{forwardRef:o,currentRef:t,currentElement:n}}function gs(e,t){let n=yo(!1,300),r=L(null),i=to();function a(){r.value=null,n.value=!1}function o(e,t){let i=e.currentTarget,a={x:e.clientX,y:e.clientY},o=_s(a,i.getBoundingClientRect()),s=vs(a,o),c=ys(t.getBoundingClientRect()),l=xs([...s,...c]);r.value=l,n.value=!0}return H(n=>{if(e.value&&t.value){let r=e=>o(e,t.value),i=t=>o(t,e.value);e.value.addEventListener(`pointerleave`,r),t.value.addEventListener(`pointerleave`,i),n(()=>{var n,a;(n=e.value)==null||n.removeEventListener(`pointerleave`,r),(a=t.value)==null||a.removeEventListener(`pointerleave`,i)})}}),H(n=>{var o;if(r.value){let s=n=>{var o,s;if(!r.value)return;let c=n.target,l={x:n.clientX,y:n.clientY},u=(o=e.value)?.contains(c)||(s=t.value)?.contains(c),d=!bs(l,r.value),f=!!c.closest(`[data-grace-area-trigger]`);u?a():(d||f)&&(a(),i.trigger())};(o=e.value)==null||o.ownerDocument.addEventListener(`pointermove`,s),n(()=>{var t;return(t=e.value)?.ownerDocument.removeEventListener(`pointermove`,s)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function _s(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function vs(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ys(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function bs(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;er!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function xs(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y?1:0),Ss(t)}function Ss(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Cs=function(e){if(typeof document>`u`)return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ws=new WeakMap,Ts=new WeakMap,Es={},Ds=0,Os=function(e){return e&&(e.host||Os(e.parentNode))},ks=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Os(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},As=function(e,t,n,r){var i=ks(t,Array.isArray(e)?e:[e]);Es[n]||(Es[n]=new WeakMap);var a=Es[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(ws.get(e)||0)+1,l=(a.get(e)||0)+1;ws.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ts.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ds++,function(){o.forEach(function(e){var t=ws.get(e)-1,i=a.get(e)-1;ws.set(e,t),a.set(e,i),t||(Ts.has(e)||e.removeAttribute(r),Ts.delete(e)),i||e.removeAttribute(n)}),Ds--,Ds||(ws=new WeakMap,ws=new WeakMap,Ts=new WeakMap,Es={})}},js=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=Cs(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live]`))),As(r,i,n,`aria-hidden`)):function(){return null}};function Ms(e){let t;V(()=>Eo(e),e=>{e?t=js(e):t&&t()}),M(()=>{t&&t()})}let Ns=0;function Z(e,t=`radix`){if(e)return e;let n=Yo({useId:void 0});return de?`${t}-${de()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++Ns}`}function Ps(e,t){let n=L(),r=(r,i)=>{if(t.multiple&&Array.isArray(e.value))if(t.selectionBehavior===`replace`)e.value=[r],n.value=r;else{let t=e.value.findIndex(e=>i(e));t===-1?e.value.push(r):e.value.splice(t,1)}else t.selectionBehavior===`replace`?e.value={...r}:!Array.isArray(e.value)&&i(e.value)?e.value=void 0:e.value={...r};return e.value};function i(r,i,a,o){var s;if(!(n!=null&&n.value)||!t.multiple||!Array.isArray(e.value))return;let c=(s=a().filter(e=>e.ref.dataset.disabled!==``).find(e=>e.ref===i))?.value;if(!c)return;let l=null;switch(r){case`prev`:case`next`:l=ja(o,n.value,c);break;case`first`:l=ja(o,n.value,o?.[0]);break;case`last`:l=ja(o,n.value,o?.[o.length-1]);break}e.value=l}return{firstValue:n,onSelectItem:r,handleMultipleReplace:i}}function Fs(e){let t=L(),n=a(()=>{var e;return(e=t.value)?.width??0}),r=a(()=>{var e;return(e=t.value)?.height??0});return A(()=>{let n=Eo(e);if(n){t.value={width:n.offsetWidth,height:n.offsetHeight};let e=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}});return e.observe(n,{box:`border-box`}),()=>e.unobserve(n)}else t.value=void 0}),{width:n,height:r}}function Is(e,t){let n=L(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}const Ls=`data-item-text`;function Rs(e){let t=yo(``,1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(!(e!=null&&e.value)&&!r)return;t.value+=n;let i=e?.value??r,a=J(),o=i.map(e=>{var t;return{ref:e,textValue:(t=(e.querySelector(`[${Ls}]`)??e).textContent)?.trim()??``}}),s=o.find(e=>e.ref===a),c=o.map(e=>e.textValue),l=Bs(c,t.value,s?.textValue),u=o.find(e=>e.textValue===l);return u&&u.ref.focus(),u?.ref},resetTypeahead:()=>{t.value=``}}}function zs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bs(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=zs(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Vs(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}const Hs=p({name:`PrimitiveSlot`,inheritAttrs:!1,setup(t,{attrs:n,slots:r}){return()=>{var t,a;if(!r.default)return null;let o=Vo(r.default()),s=o.findIndex(t=>t.type!==e);if(s===-1)return o;let c=o[s];(t=c.props)==null||delete t.ref;let l=c.props?C(n,c.props):n;n.class&&(a=c.props)!=null&&a.class&&delete c.props.class;let u=i(c,l);for(let e in l)e.startsWith(`on`)&&(u.props||={},u.props[e]=l[e]);return o.length===1?u:(o[s]=u,o)}}}),Q=p({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&[`area`,`img`,`input`].includes(r)?()=>v(r,t):r===`template`?()=>v(Hs,t,{default:n.default}):()=>v(e.as,t,{default:n.default})}});function Us(){let e=L(),t=a(()=>{var t,n;return[`#text`,`#comment`].includes((t=e.value)?.$el.nodeName)?(n=e.value)?.$el.nextElementSibling:Eo(e)});return{primitiveElement:e,currentElement:t}}const[Ws,Gs]=K(`CollapsibleRoot`),Ks=p({__name:`CollapsibleRoot`,props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:open`],setup(e,{expose:t,emit:n}){let r=e,i=q(r,`open`,n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),a=q(r,`disabled`);return Gs({contentId:``,disabled:a,open:i,onOpenToggle:()=>{i.value=!i.value}}),t({open:i}),X(),(e,t)=>(P(),s(B(Q),{as:e.as,"as-child":r.asChild,"data-state":B(i)?`open`:`closed`,"data-disabled":B(a)?``:void 0},{default:U(()=>[R(e.$slots,`default`,{open:B(i)})]),_:3},8,[`as`,`as-child`,`data-state`,`data-disabled`]))}}),qs=p({__name:`CollapsibleTrigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(e){let t=e;X();let n=Ws();return(e,r)=>{var i,a;return P(),s(B(Q),{type:e.as===`button`?`button`:void 0,as:e.as,"as-child":t.asChild,"aria-controls":B(n).contentId,"aria-expanded":B(n).open.value,"data-state":B(n).open.value?`open`:`closed`,"data-disabled":(i=B(n).disabled)!=null&&i.value?``:void 0,disabled:(a=B(n).disabled)?.value,onClick:B(n).onOpenToggle},{default:U(()=>[R(e.$slots,`default`)]),_:3},8,[`type`,`as`,`as-child`,`aria-controls`,`aria-expanded`,`data-state`,`data-disabled`,`disabled`,`onClick`])}}});function Js(e,t){var n;let r=L({}),i=L(`none`),o=L(e),s=e.value?`mounted`:`unmounted`,c,l=(n=t.value)?.ownerDocument.defaultView??Do,{state:u,dispatch:d}=Is(s,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),f=e=>{var n;if(so){let r=new CustomEvent(e,{bubbles:!1,cancelable:!1});(n=t.value)==null||n.dispatchEvent(r)}};V(e,async(e,n)=>{var a;let o=n!==e;if(await w(),o){let o=i.value,s=Ys(t.value);e?(d(`MOUNT`),f(`enter`),s===`none`&&f(`after-enter`)):s===`none`||(a=r.value)?.display===`none`?(d(`UNMOUNT`),f(`leave`),f(`after-leave`)):n&&o!==s?(d(`ANIMATION_OUT`),f(`leave`)):(d(`UNMOUNT`),f(`after-leave`))}},{immediate:!0});let p=e=>{let n=Ys(t.value),r=n.includes(e.animationName),i=u.value===`mounted`?`enter`:`leave`;if(e.target===t.value&&r&&(f(`after-${i}`),d(`ANIMATION_END`),!o.value)){let e=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,c=l?.setTimeout(()=>{var n;(n=t.value)?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=e)})}e.target===t.value&&n===`none`&&d(`ANIMATION_END`)},m=e=>{e.target===t.value&&(i.value=Ys(t.value))},h=V(t,(e,t)=>{e?(r.value=getComputedStyle(e),e.addEventListener(`animationstart`,m),e.addEventListener(`animationcancel`,p),e.addEventListener(`animationend`,p)):(d(`ANIMATION_END`),c!==void 0&&l?.clearTimeout(c),t?.removeEventListener(`animationstart`,m),t?.removeEventListener(`animationcancel`,p),t?.removeEventListener(`animationend`,p))},{immediate:!0}),g=V(u,()=>{let e=Ys(t.value);i.value=u.value===`mounted`?e:`none`});return M(()=>{h(),g()}),{isPresent:a(()=>[`mounted`,`unmountSuspended`].includes(u.value))}}function Ys(e){return e&&getComputedStyle(e).animationName||`none`}const Xs=p({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var r;let{present:i,forceMount:a}=z(e),o=L(),{isPresent:s}=Js(i,o);n({present:s});let c=t.default({present:s});c=Vo(c||[]);let l=h();if(c&&c?.length>1){let e=(r=l?.parent)!=null&&r.type.name?`<${l.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${e}\` 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(e=>` - ${e}`).join(` `)].join(` `))}return()=>a.value||i.value||s.value?v(t.default({present:s})[0],{ref:e=>{let t=Eo(e);return typeof t?.hasAttribute>`u`||(t!=null&&t.hasAttribute(`data-radix-popper-content-wrapper`)?o.value=t.firstElementChild:o.value=t),t}}):null}}),Zs=p({inheritAttrs:!1,__name:`CollapsibleContent`,props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){let t=e,n=Ws();n.contentId||=Z(void 0,`radix-vue-collapsible-content`);let r=L(),{forwardRef:i,currentElement:o}=X(),l=L(0),u=L(0),f=a(()=>n.open.value),p=L(f.value),m=L();return V(()=>{var e;return[f.value,(e=r.value)?.present]},async()=>{await w();let e=o.value;if(!e)return;m.value=m.value||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();u.value=t.height,l.value=t.width,p.value||(e.style.transitionDuration=m.value.transitionDuration,e.style.animationName=m.value.animationName)},{immediate:!0}),A(()=>{requestAnimationFrame(()=>{p.value=!1})}),(e,a)=>(P(),s(B(Xs),{ref_key:`presentRef`,ref:r,present:e.forceMount||B(n).open.value,"force-mount":!0},{default:U(()=>{var a,o;return[d(B(Q),C(e.$attrs,{id:B(n).contentId,ref:B(i),"as-child":t.asChild,as:e.as,"data-state":B(n).open.value?`open`:`closed`,"data-disabled":(a=B(n).disabled)!=null&&a.value?``:void 0,hidden:!((o=r.value)!=null&&o.present),style:{"--radix-collapsible-content-height":`${u.value}px`,"--radix-collapsible-content-width":`${l.value}px`}}),{default:U(()=>{var t;return[(t=r.value)!=null&&t.present?R(e.$slots,`default`,{key:0}):c(``,!0)]}),_:3},16,[`id`,`as-child`,`as`,`data-state`,`data-disabled`,`hidden`,`style`])]}),_:3},8,[`present`]))}});function Qs({type:e,defaultValue:t,modelValue:n}){let r=n||t;if(Na(e)&&Na(n)&&Na(t))throw Error("Either the `type` or the `value` or `default-value` prop must be defined.");if(n!==void 0&&t!==void 0&&typeof n!=typeof t)throw Error(`Invalid prop \`value\` of value \`${n}\` supplied, should be the same type as the \`defaultValue\` prop, which is \`${t}\`. The \`value\` prop must be: ${e===`single`?`- a string`:e===`multiple`?`- an array of strings`:`- a string diff --git a/assets/effect-WSjEuzC9-B-2N9gqs.js b/assets/effect-WSjEuzC9-CJEidUVY.js similarity index 55% rename from assets/effect-WSjEuzC9-B-2N9gqs.js rename to assets/effect-WSjEuzC9-CJEidUVY.js index a837360ef501e551e6832f09c326165f23dcdc84..9458b8e6feaa10c404564cfafec5c570c9bea3e6 100644 --- a/assets/effect-WSjEuzC9-B-2N9gqs.js +++ b/assets/effect-WSjEuzC9-CJEidUVY.js @@ -1 +1 @@ -import{__vitePreload as e}from"./index-Dor8PgzM.js";import{tryImport as t}from"./index-CISmcbXk-DJz-iwh0.js";const n=async()=>{let{JSONSchema:n}=await t(e(()=>import(`./__vite-optional-peer-dep_effect_xsschema-DJmQZR04.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{__vitePreload as e}from"./index-C-t5bjx6.js";import{tryImport as t}from"./index-CISmcbXk-BKEuzw_9.js";const n=async()=>{let{JSONSchema:n}=await t(e(()=>import(`./__vite-optional-peer-dep_effect_xsschema-DJmQZR04.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/elevenlabs-wE9VDxlm.js b/assets/elevenlabs-DnbB9bTa.js similarity index 89% rename from assets/elevenlabs-wE9VDxlm.js rename to assets/elevenlabs-DnbB9bTa.js index 251d89792d5cc5f0c075adee4d2889b86248f367..dbbc83c83b4b598e0ce83dfeb51dbbc3d1c558ea 100644 --- a/assets/elevenlabs-wE9VDxlm.js +++ b/assets/elevenlabs-DnbB9bTa.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import{FieldCheckbox_default as h,FieldRange_default as g}from"./src-BnFQ5wFr.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=i({__name:`elevenlabs`,setup(i){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=s(0),w=s(1),T=s(0),E=s(0),D=s(.5),O=s(.75),k=s(!1),A=m(),j=p(),{providers:M}=c(j),{t:N}=u(),P=e(()=>{var e;return!!(e=M.value[x])?.apiKey}),F=e(()=>A.availableVoices[x]||[]);async function I(e,t,n){let r=j.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=j.getProviderConfig(x),a=i.model||S;return await A.speech(r,a,e,t,{...i,...y})}return a(async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),d(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),d(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),d(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),d(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),d(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),d(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),d(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),d(M,async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":f(()=>[t(`div`,b,[r(l(g),{modelValue:C.value,"onUpdate:modelValue":i[0]||=e=>C.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(N)(`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`]),r(l(g),{modelValue:w.value,"onUpdate:modelValue":i[1]||=e=>w.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:T.value,"onUpdate:modelValue":i[2]||=e=>T.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(N)(`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`]),r(l(g),{modelValue:E.value,"onUpdate:modelValue":i[3]||=e=>E.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:D.value,"onUpdate:modelValue":i[4]||=e=>D.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:O.value,"onUpdate:modelValue":i[5]||=e=>O.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(h),{modelValue:k.value,"onUpdate:modelValue":i[6]||=e=>k.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:f(()=>[r(l(_),{"available-voices":F.value,"generate-speech":I,"api-key-configured":P.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import{FieldCheckbox_default as h,FieldRange_default as g}from"./src-B9Iy8991.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=i({__name:`elevenlabs`,setup(i){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=s(0),w=s(1),T=s(0),E=s(0),D=s(.5),O=s(.75),k=s(!1),A=m(),j=p(),{providers:M}=c(j),{t:N}=u(),P=e(()=>{var e;return!!(e=M.value[x])?.apiKey}),F=e(()=>A.availableVoices[x]||[]);async function I(e,t,n){let r=j.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=j.getProviderConfig(x),a=i.model||S;return await A.speech(r,a,e,t,{...i,...y})}return a(async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),d(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),d(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),d(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),d(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),d(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),d(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),d(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),d(M,async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":f(()=>[t(`div`,b,[r(l(g),{modelValue:C.value,"onUpdate:modelValue":i[0]||=e=>C.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(N)(`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`]),r(l(g),{modelValue:w.value,"onUpdate:modelValue":i[1]||=e=>w.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:T.value,"onUpdate:modelValue":i[2]||=e=>T.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(N)(`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`]),r(l(g),{modelValue:E.value,"onUpdate:modelValue":i[3]||=e=>E.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:D.value,"onUpdate:modelValue":i[4]||=e=>D.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:O.value,"onUpdate:modelValue":i[5]||=e=>O.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(h),{modelValue:k.value,"onUpdate:modelValue":i[6]||=e=>k.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:f(()=>[r(l(_),{"available-voices":F.value,"generate-speech":I,"api-key-configured":P.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file diff --git a/assets/emotions-BS9jIw56.js b/assets/emotions-nbudrl-b.js similarity index 81% rename from assets/emotions-BS9jIw56.js rename to assets/emotions-nbudrl-b.js index 321ecb9173238e6f073ca8987bee18891a305425..b695fd9860c89fa4a49cef0d0ef585ca6541167e 100644 --- a/assets/emotions-BS9jIw56.js +++ b/assets/emotions-nbudrl-b.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-Dor8PgzM.js";import"./src-BnFQ5wFr.js";import"./Basic-CbvQnFR9.js";import{Textarea_default as u}from"./Textarea-D5jZ5rL5.js";import{llmInferenceEndToken as d,useEmotionsMessageQueue as f}from"./queues-BTBffrrj.js";import"./sleep-CvjNLutj.js";import{useQueue as p}from"./queue-aUPoxb9G.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},y={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var b=i({__name:`emotions`,setup(i){let b=o(``),x=o([]),S=o([]),C=o(!1),w=p({handlers:[async e=>{S.value.push(e.data)}]}),T=f(w);function E(){C.value=!0;let e=b.value.split(``);for(let t of e)T.add(t);T.add(d),b.value=``,C.value=!1}return(i,o)=>(a(),n(`div`,m,[t(`div`,h,[r(l(u),{modelValue:b.value,"onUpdate:modelValue":o[0]||=e=>b.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:E},null,8,[`modelValue`]),t(`button`,g,c(C.value?`Processing...`:`Send`),1)]),t(`div`,_,[t(`div`,v,[o[1]||=t(`h3`,{"font-normal":``},` Messages `,-1),(a(!0),n(e,null,s(x.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))]),t(`div`,y,[o[2]||=t(`h3`,{"font-normal":``},` Emotions `,-1),(a(!0),n(e,null,s(S.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))])])]))}}),x=b;export{x as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-C-t5bjx6.js";import"./src-B9Iy8991.js";import"./Basic-DnBqne8U.js";import{Textarea_default as u}from"./Textarea-SRGnauY5.js";import{llmInferenceEndToken as d,useEmotionsMessageQueue as f}from"./queues-DD1Fxfss.js";import"./sleep-CvjNLutj.js";import{useQueue as p}from"./queue-Bp4D1cP3.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},y={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var b=i({__name:`emotions`,setup(i){let b=o(``),x=o([]),S=o([]),C=o(!1),w=p({handlers:[async e=>{S.value.push(e.data)}]}),T=f(w);function E(){C.value=!0;let e=b.value.split(``);for(let t of e)T.add(t);T.add(d),b.value=``,C.value=!1}return(i,o)=>(a(),n(`div`,m,[t(`div`,h,[r(l(u),{modelValue:b.value,"onUpdate:modelValue":o[0]||=e=>b.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:E},null,8,[`modelValue`]),t(`button`,g,c(C.value?`Processing...`:`Send`),1)]),t(`div`,_,[t(`div`,v,[o[1]||=t(`h3`,{"font-normal":``},` Messages `,-1),(a(!0),n(e,null,s(x.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))]),t(`div`,y,[o[2]||=t(`h3`,{"font-normal":``},` Emotions `,-1),(a(!0),n(e,null,s(S.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))])])]))}}),x=b;export{x as default}; \ No newline at end of file diff --git a/assets/featherless-ai-DQPQketQ.js b/assets/featherless-ai-3KKQQVHb.js similarity index 82% rename from assets/featherless-ai-DQPQketQ.js rename to assets/featherless-ai-3KKQQVHb.js index c5b2ec00c6a6fd9006b484b431e02f27252d8c18..bcc3881ff5482e601b6754442217968bcfa9c7aa 100644 --- a/assets/featherless-ai-DQPQketQ.js +++ b/assets/featherless-ai-3KKQQVHb.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`featherless-ai`;var x=r({__name:`featherless-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.featherless.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`featherless-ai`;var x=r({__name:`featherless-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.featherless.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/filter-message-BialTeOq.js b/assets/filter-message-DFghiITe.js similarity index 87% rename from assets/filter-message-BialTeOq.js rename to assets/filter-message-DFghiITe.js index af32099d45a6a33e3c6e32a9d8bb2bcccf94d016..944d2dbc2d2e31cfc1d486e1e8764f51a490b11b 100644 --- a/assets/filter-message-BialTeOq.js +++ b/assets/filter-message-DFghiITe.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,createVNode as n,defineComponent as r,openBlock as i,ref as a,toDisplayString as o,unref as s}from"./index-Dor8PgzM.js";import"./src-BnFQ5wFr.js";import"./Basic-CbvQnFR9.js";import{Textarea_default as c}from"./Textarea-D5jZ5rL5.js";import{sleep as l}from"./sleep-CvjNLutj.js";const u={flex:``,"flex-col":``,"gap-2":``,"p-2":``},d={flex:``,"flex-row":``,"gap-2":``},f={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},p={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var m=r({__name:`filter-message`,setup(r){let m=a(``),h=a(!1),g=a({content:``});async function _(){h.value=!0;let e=m.value.split(``),t=function(e){return e.Literal=`literal`,e.Special=`special`,e}({}),n=t.Literal,r=``;for(let i of e){await l(50);let e=n;i===`<`?e=t.Special:i===`>`&&(e=t.Literal),n===t.Literal&&e===t.Special&&(g.value.content+=r,r=``),n===t.Special&&e===t.Literal&&(r=``),n===t.Literal&&e===t.Literal&&(g.value.content+=i,r=``),n=e}r&&(g.value.content+=r),m.value=``,h.value=!1}return(r,a)=>(i(),t(`div`,u,[e(`div`,d,[n(s(c),{modelValue:m.value,"onUpdate:modelValue":a[0]||=e=>m.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:_},null,8,[`modelValue`]),e(`button`,f,o(h.value?`Processing...`:`Send`),1)]),e(`div`,p,[a[1]||=e(`h3`,{"font-normal":``},` Streaming Message `,-1),e(`div`,null,o(g.value.content),1)])]))}}),h=m;export{h as default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,createVNode as n,defineComponent as r,openBlock as i,ref as a,toDisplayString as o,unref as s}from"./index-C-t5bjx6.js";import"./src-B9Iy8991.js";import"./Basic-DnBqne8U.js";import{Textarea_default as c}from"./Textarea-SRGnauY5.js";import{sleep as l}from"./sleep-CvjNLutj.js";const u={flex:``,"flex-col":``,"gap-2":``,"p-2":``},d={flex:``,"flex-row":``,"gap-2":``},f={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},p={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var m=r({__name:`filter-message`,setup(r){let m=a(``),h=a(!1),g=a({content:``});async function _(){h.value=!0;let e=m.value.split(``),t=function(e){return e.Literal=`literal`,e.Special=`special`,e}({}),n=t.Literal,r=``;for(let i of e){await l(50);let e=n;i===`<`?e=t.Special:i===`>`&&(e=t.Literal),n===t.Literal&&e===t.Special&&(g.value.content+=r,r=``),n===t.Special&&e===t.Literal&&(r=``),n===t.Literal&&e===t.Literal&&(g.value.content+=i,r=``),n=e}r&&(g.value.content+=r),m.value=``,h.value=!1}return(r,a)=>(i(),t(`div`,u,[e(`div`,d,[n(s(c),{modelValue:m.value,"onUpdate:modelValue":a[0]||=e=>m.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:_},null,8,[`modelValue`]),e(`button`,f,o(h.value?`Processing...`:`Send`),1)]),e(`div`,p,[a[1]||=e(`h3`,{"font-normal":``},` Streaming Message `,-1),e(`div`,null,o(g.value.content),1)])]))}}),h=m;export{h as default}; \ No newline at end of file diff --git a/assets/fireworks-ai-BK1JbfzP.js b/assets/fireworks-ai-CfqA2SqF.js similarity index 82% rename from assets/fireworks-ai-BK1JbfzP.js rename to assets/fireworks-ai-CfqA2SqF.js index a0ec23ee7c6eb24383843f584a7d032c9a83cda6..efb910e36c6f0f4098215fb043a2fd8115904b45 100644 --- a/assets/fireworks-ai-BK1JbfzP.js +++ b/assets/fireworks-ai-CfqA2SqF.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`fireworks-ai`;var x=r({__name:`fireworks-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.fireworks.ai/inference/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`fireworks-ai`;var x=r({__name:`fireworks-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.fireworks.ai/inference/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/general-BvsEaIJQ.js b/assets/general-D0JKvHDV.js similarity index 85% rename from assets/general-BvsEaIJQ.js rename to assets/general-D0JKvHDV.js index ff4e989da5f2c2f454c41ece0b4eea96a233e972..0e1e8c602b36e539009f0574557e1df190363f20 100644 --- a/assets/general-BvsEaIJQ.js +++ b/assets/general-D0JKvHDV.js @@ -1 +1 @@ -import{createBaseVNode as e,createBlock as t,createElementBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,isRef as o,openBlock as s,resolveDirective as c,toDisplayString as l,unref as u,useDark as d,useI18n as f,useSettings as p,withCtx as m,withDirectives as h}from"./index-Dor8PgzM.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import{FieldCheckbox_default as g,FieldSelect_default as _,Option_default as v,Select_default as y}from"./src-BnFQ5wFr.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as b}from"./route-block--T8TG4is.js";const x={"rounded-lg":``,"bg-neutral-50":``,"p-4":``,"dark:bg-neutral-800":``,flex:`~ col gap-4`},S={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":``};var C=a({__name:`general`,setup(a){let b=p(),{t:C,locale:w}=f(),T=d();return(a,d)=>{let f=c(`motion`);return s(),n(`div`,x,[h(i(u(g),{modelValue:u(T),"onUpdate:modelValue":d[0]||=e=>o(T)?T.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:2*50,label:u(C)(`settings.theme.title`),description:u(C)(`settings.theme.description`)},null,8,[`modelValue`,`label`,`description`]),[[f]]),h((s(),t(u(_),{initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:280,delay:3*50,transition:`all ease-in-out duration-250`,label:u(C)(`settings.language.title`),description:u(C)(`settings.language.description`)},{default:m(()=>[i(u(y),{modelValue:u(b).language,"onUpdate:modelValue":d[1]||=e=>u(b).language=e,transition:`all ease-in-out duration-250`,"cursor-pointer":``,"bg-transparent":``,"outline-none":``},{default:m(({value:t})=>[e(`div`,null,l(t?a.$t(`settings.language.${t}`):u(C)(`settings.language.english`)),1)]),options:m(({hide:e})=>[i(u(v),{value:`en`,active:u(w)===`en`,onClick:t=>e()},{default:m(()=>[r(l(a.$t(`settings.language.english`)),1)]),_:2},1032,[`active`,`onClick`]),i(u(v),{value:`zh-Hans`,active:u(w)===`zh-Hans`,onClick:t=>e()},{default:m(()=>[r(l(a.$t(`settings.language.chinese`)),1)]),_:2},1032,[`active`,`onClick`])]),_:1},8,[`modelValue`])]),_:1},8,[`label`,`description`])),[[f]]),h((s(),n(`div`,S,d[2]||=[e(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[f]])])}}});typeof b==`function`&&b(C);var w=C;export{w as default}; \ No newline at end of file +import{createBaseVNode as e,createBlock as t,createElementBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,isRef as o,openBlock as s,resolveDirective as c,toDisplayString as l,unref as u,useDark as d,useI18n as f,useSettings as p,withCtx as m,withDirectives as h}from"./index-C-t5bjx6.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import{FieldCheckbox_default as g,FieldSelect_default as _,Option_default as v,Select_default as y}from"./src-B9Iy8991.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as b}from"./route-block--T8TG4is.js";const x={"rounded-lg":``,"bg-neutral-50":``,"p-4":``,"dark:bg-neutral-800":``,flex:`~ col gap-4`},S={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":``};var C=a({__name:`general`,setup(a){let b=p(),{t:C,locale:w}=f(),T=d();return(a,d)=>{let f=c(`motion`);return s(),n(`div`,x,[h(i(u(g),{modelValue:u(T),"onUpdate:modelValue":d[0]||=e=>o(T)?T.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:2*50,label:u(C)(`settings.theme.title`),description:u(C)(`settings.theme.description`)},null,8,[`modelValue`,`label`,`description`]),[[f]]),h((s(),t(u(_),{initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:280,delay:3*50,transition:`all ease-in-out duration-250`,label:u(C)(`settings.language.title`),description:u(C)(`settings.language.description`)},{default:m(()=>[i(u(y),{modelValue:u(b).language,"onUpdate:modelValue":d[1]||=e=>u(b).language=e,transition:`all ease-in-out duration-250`,"cursor-pointer":``,"bg-transparent":``,"outline-none":``},{default:m(({value:t})=>[e(`div`,null,l(t?a.$t(`settings.language.${t}`):u(C)(`settings.language.english`)),1)]),options:m(({hide:e})=>[i(u(v),{value:`en`,active:u(w)===`en`,onClick:t=>e()},{default:m(()=>[r(l(a.$t(`settings.language.english`)),1)]),_:2},1032,[`active`,`onClick`]),i(u(v),{value:`zh-Hans`,active:u(w)===`zh-Hans`,onClick:t=>e()},{default:m(()=>[r(l(a.$t(`settings.language.chinese`)),1)]),_:2},1032,[`active`,`onClick`])]),_:1},8,[`modelValue`])]),_:1},8,[`label`,`description`])),[[f]]),h((s(),n(`div`,S,d[2]||=[e(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[f]])])}}});typeof b==`function`&&b(C);var w=C;export{w as default}; \ No newline at end of file diff --git a/assets/gesture-circle-dEhSZQp3.js b/assets/gesture-circle-BeGjgvNx.js similarity index 97% rename from assets/gesture-circle-dEhSZQp3.js rename to assets/gesture-circle-BeGjgvNx.js index 2e72cc6fbf3f13111bd7b4e87dd21b50f38b9b63..cf7312c44ea39a3d8e65524e8373c7f550c9c2ed 100644 --- a/assets/gesture-circle-dEhSZQp3.js +++ b/assets/gesture-circle-BeGjgvNx.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createElementBlock as n,defineComponent as r,openBlock as i,ref as a,refDebounced as o,refThrottled as s,toDisplayString as c,unref as l,useElementBounding as u,usePointer as d,useResizeObserver as f,watch as p}from"./index-Dor8PgzM.js";import{route_block_default as m}from"./route-block--T8TG4is.js";const h={relative:``,"h-full":``},g={bg:`neutral-100/50 dark:neutral-900/50`,absolute:``,"inset-0":``,"h-fit":``,"rounded-xl":``,"px-3":``,"py-2":``,"font-mono":``,"shadow-md":``,"backdrop-blur-md":``,grid:`~ cols-[150px_1fr]`},_=6;var v=r({__name:`gesture-circle`,setup(r){let m=a(),v=a(),y=a(),b=a(),{x,y:S}=d({target:y}),C=u(v,{immediate:!0,windowResize:!0}),w=e(()=>({x:x.value,y:S.value}));f(v,e=>{let t=e[0],{width:n,height:r}=t.contentRect;y.value&&(y.value.width=n,y.value.height=r)}),p(v,e=>{var t;if(!e)return;let n=document.createElement(`canvas`);n.width=C.width.value,n.height=C.height.value,n.style.objectFit=`contain`;let r=n.getContext(`2d`);b.value=r,y.value=n,(t=v.value)?.appendChild(n)});let T=s(w,50),E=o(w,50),D=a(E.value),O=a(0),k=a(0),A=a(!1),j=a([]),M=a(!1);return p([x,S],()=>{b.value&&(b.value.beginPath(),b.value.fillStyle=`red`,b.value.arc(x.value,S.value,4,0,2*Math.PI),b.value.closePath(),b.value.fill())}),p(E,()=>{if(M.value=!1,b.value&&b.value.reset(),j.value.length>=_){let e=j.value.reduce((e,t)=>e+t.x,0)/j.value.length,t=j.value.reduce((e,t)=>e+t.y,0)/j.value.length,n=j.value.map(n=>Math.sqrt((n.x-e)**2+(n.y-t)**2)),r=n.reduce((e,t)=>e+t,0)/n.length,i=n.reduce((e,t)=>e+(t-r)**2,0)/n.length,a=Math.sqrt(i);a<20&&(k.value++,M.value=!0)}j.value=[]}),p(T,e=>{j.value.push(e)}),(e,r)=>(i(),n(`div`,{ref_key:`containerRef`,ref:m,"h-full":``},[t(`div`,h,[t(`div`,g,[r[0]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointThrottled: `,-1),t(`div`,null,c(l(T)),1),r[1]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointDebounced: `,-1),t(`div`,null,c(l(E)),1),r[2]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoint: `,-1),t(`div`,null,c(D.value),1),r[3]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` distance: `,-1),t(`div`,null,c(O.value),1),r[4]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` count: `,-1),t(`div`,null,c(k.value),1),r[5]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` show: `,-1),t(`div`,null,c(A.value),1),r[6]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoints: `,-1),t(`div`,null,c(j.value),1),r[7]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` isCircle: `,-1),t(`div`,null,c(M.value),1)]),t(`div`,{ref_key:`canvasContainerRef`,ref:v,"h-full":``,"w-full":``},null,512)])],512))}});typeof m==`function`&&m(v);var y=v;export{y as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createElementBlock as n,defineComponent as r,openBlock as i,ref as a,refDebounced as o,refThrottled as s,toDisplayString as c,unref as l,useElementBounding as u,usePointer as d,useResizeObserver as f,watch as p}from"./index-C-t5bjx6.js";import{route_block_default as m}from"./route-block--T8TG4is.js";const h={relative:``,"h-full":``},g={bg:`neutral-100/50 dark:neutral-900/50`,absolute:``,"inset-0":``,"h-fit":``,"rounded-xl":``,"px-3":``,"py-2":``,"font-mono":``,"shadow-md":``,"backdrop-blur-md":``,grid:`~ cols-[150px_1fr]`},_=6;var v=r({__name:`gesture-circle`,setup(r){let m=a(),v=a(),y=a(),b=a(),{x,y:S}=d({target:y}),C=u(v,{immediate:!0,windowResize:!0}),w=e(()=>({x:x.value,y:S.value}));f(v,e=>{let t=e[0],{width:n,height:r}=t.contentRect;y.value&&(y.value.width=n,y.value.height=r)}),p(v,e=>{var t;if(!e)return;let n=document.createElement(`canvas`);n.width=C.width.value,n.height=C.height.value,n.style.objectFit=`contain`;let r=n.getContext(`2d`);b.value=r,y.value=n,(t=v.value)?.appendChild(n)});let T=s(w,50),E=o(w,50),D=a(E.value),O=a(0),k=a(0),A=a(!1),j=a([]),M=a(!1);return p([x,S],()=>{b.value&&(b.value.beginPath(),b.value.fillStyle=`red`,b.value.arc(x.value,S.value,4,0,2*Math.PI),b.value.closePath(),b.value.fill())}),p(E,()=>{if(M.value=!1,b.value&&b.value.reset(),j.value.length>=_){let e=j.value.reduce((e,t)=>e+t.x,0)/j.value.length,t=j.value.reduce((e,t)=>e+t.y,0)/j.value.length,n=j.value.map(n=>Math.sqrt((n.x-e)**2+(n.y-t)**2)),r=n.reduce((e,t)=>e+t,0)/n.length,i=n.reduce((e,t)=>e+(t-r)**2,0)/n.length,a=Math.sqrt(i);a<20&&(k.value++,M.value=!0)}j.value=[]}),p(T,e=>{j.value.push(e)}),(e,r)=>(i(),n(`div`,{ref_key:`containerRef`,ref:m,"h-full":``},[t(`div`,h,[t(`div`,g,[r[0]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointThrottled: `,-1),t(`div`,null,c(l(T)),1),r[1]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointDebounced: `,-1),t(`div`,null,c(l(E)),1),r[2]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoint: `,-1),t(`div`,null,c(D.value),1),r[3]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` distance: `,-1),t(`div`,null,c(O.value),1),r[4]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` count: `,-1),t(`div`,null,c(k.value),1),r[5]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` show: `,-1),t(`div`,null,c(A.value),1),r[6]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoints: `,-1),t(`div`,null,c(j.value),1),r[7]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` isCircle: `,-1),t(`div`,null,c(M.value),1)]),t(`div`,{ref_key:`canvasContainerRef`,ref:v,"h-full":``,"w-full":``},null,512)])],512))}});typeof m==`function`&&m(v);var y=v;export{y as default}; \ No newline at end of file diff --git a/assets/google-generative-ai-BtzrxrfR.js b/assets/google-generative-ai-BC2Ukvsi.js similarity index 84% rename from assets/google-generative-ai-BtzrxrfR.js rename to assets/google-generative-ai-BC2Ukvsi.js index 93925605f6493625c1094b00109bbf55fbdb9174..f32cb0f1367395ed889caa9e5e64f4c27db22060 100644 --- a/assets/google-generative-ai-BtzrxrfR.js +++ b/assets/google-generative-ai-BC2Ukvsi.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`google-generative-ai`;var x=r({__name:`google-generative-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.anthropic.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://generativelanguage.googleapis.com/v1beta/openai/`}});function D(){C.value[b]={baseUrl:`https://generativelanguage.googleapis.com/v1beta/openai/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`Google | Gemini`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`Google`,placeholder:`GEMINI_API_KEY`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://generativelanguage.googleapis.com/v1beta/openai/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`google-generative-ai`;var x=r({__name:`google-generative-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.anthropic.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://generativelanguage.googleapis.com/v1beta/openai/`}});function D(){C.value[b]={baseUrl:`https://generativelanguage.googleapis.com/v1beta/openai/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`Google | Gemini`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`Google`,placeholder:`GEMINI_API_KEY`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://generativelanguage.googleapis.com/v1beta/openai/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/hearing-8DQaE61m.js b/assets/hearing-C5OHOeCl.js similarity index 96% rename from assets/hearing-8DQaE61m.js rename to assets/hearing-C5OHOeCl.js index 201e04ec464b9ea4863820f31cbc89d9b033f6f9..872f49947e33f66cbb299dc074c7479b47185428 100644 --- a/assets/hearing-8DQaE61m.js +++ b/assets/hearing-C5OHOeCl.js @@ -1 +1 @@ -var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{computed as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createTextVNode as o,createVNode as s,defineComponent as c,nextTick as ee,normalizeClass as te,onMounted as ne,onUnmounted as l,openBlock as u,ref as d,toDisplayString as f,unref as p,useDevicesList as m,watch as h}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import{FieldCheckbox_default as g,FieldRange_default as _,FieldSelect_default as re}from"./src-BnFQ5wFr.js";import{LevelMeter_default as ie,ThresholdMeter_default as v,TimeSeriesChart_default as y}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{__webpack_exports__AutoModel as b,__webpack_exports__Tensor as x}from"./transformers.web-WZURbMoG.js";import{route_block_default as S}from"./route-block--T8TG4is.js";var ae=`/assets/process.worklet-CF6Ao8XG.js`,oe=class{constructor(t,n={}){e.defineProperty(this,`audioContext`,null),e.defineProperty(this,`audioWorkletNode`,null),e.defineProperty(this,`mediaStream`,null),e.defineProperty(this,`sourceNode`,null),e.defineProperty(this,`vad`,void 0),e.defineProperty(this,`workletInitialized`,!1),this.vad=t,this.audioContext=new AudioContext(n.audioContextOptions||{sampleRate:16e3,latencyHint:`interactive`})}async initialize(e){if(!this.audioContext)throw Error(`Audio context not created`);try{this.workletInitialized||(await this.audioContext.audioWorklet.addModule(e),URL.revokeObjectURL(e),this.workletInitialized=!0),this.audioWorkletNode=new AudioWorkletNode(this.audioContext,`vad-processor`),this.audioWorkletNode.port.onmessage=async e=>{let{buffer:t}=e.data;t&&t.length>0&&await this.vad.processAudio(new Float32Array(t))}}catch(e){throw console.error(`Failed to initialize audio worklet:`,e),e}}async startMicrophone(){if(!this.audioContext||!this.audioWorkletNode)throw Error(`Audio system not initialized. Call initialize() first.`);try{this.audioContext.state===`suspended`&&await this.audioContext.resume(),this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,sampleRate:this.audioContext.sampleRate}}),this.sourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.sourceNode.connect(this.audioWorkletNode);let e=this.audioContext.createGain();e.gain.value=0,this.audioWorkletNode.connect(e),e.connect(this.audioContext.destination)}catch(e){throw console.error(`Failed to start microphone:`,e),e}}async stopMicrophone(){var e,t;this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null),this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),(e=this.audioContext)?.suspend(),(t=this.audioWorkletNode)?.disconnect()}stop(){this.sourceNode&&this.audioWorkletNode&&(this.sourceNode.disconnect(),this.audioWorkletNode.disconnect()),this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null),this.audioContext&&this.audioContext.state!==`closed`&&this.audioContext.suspend(),this.sourceNode=null,this.audioWorkletNode=null}dispose(){this.stop(),this.audioContext&&this.audioContext.state!==`closed`&&(this.audioContext.close(),this.audioContext=null),this.workletInitialized=!1}},C=class{constructor(t={}){e.defineProperty(this,`config`,void 0),e.defineProperty(this,`model`,void 0),e.defineProperty(this,`state`,void 0),e.defineProperty(this,`sampleRateTensor`,void 0),e.defineProperty(this,`buffer`,void 0),e.defineProperty(this,`bufferPointer`,0),e.defineProperty(this,`isRecording`,!1),e.defineProperty(this,`postSpeechSamples`,0),e.defineProperty(this,`prevBuffers`,[]),e.defineProperty(this,`inferenceChain`,Promise.resolve()),e.defineProperty(this,`eventListeners`,{}),e.defineProperty(this,`isReady`,!1);let n={sampleRate:16e3,speechThreshold:.3,exitThreshold:.1,minSilenceDurationMs:400,speechPadMs:80,minSpeechDurationMs:250,maxBufferDuration:30,newBufferSize:512};this.config={...n,...t},this.buffer=new Float32Array(this.config.maxBufferDuration*this.config.sampleRate),this.sampleRateTensor=new x(`int64`,[this.config.sampleRate],[]),this.state=new x(`float32`,new Float32Array(2*1*128),[2,1,128])}async initialize(){try{this.emit(`status`,{type:`info`,message:`Loading VAD model...`}),this.model=await b.from_pretrained(`onnx-community/silero-vad`,{config:{model_type:`custom`},dtype:`fp32`}),this.isReady=!0,this.emit(`status`,{type:`info`,message:`VAD model loaded successfully`})}catch(e){throw this.emit(`status`,{type:`error`,message:`Failed to load VAD model: ${e}`}),e}}on(e,t){this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t)}off(e,t){this.eventListeners[e]&&(this.eventListeners[e]=this.eventListeners[e].filter(e=>e!==t))}emit(e,t){if(this.eventListeners[e])for(let n of this.eventListeners[e])n(t)}async processAudio(e){if(!this.isReady)throw Error(`VAD model is not initialized. Call initialize() first.`);let t=this.isRecording,n=await this.detectSpeech(e),r=this.config.sampleRate/1e3,i=this.config.minSilenceDurationMs*r,a=this.config.speechPadMs*r,o=this.config.minSpeechDurationMs*r,s=Math.ceil(a/this.config.newBufferSize);if(!t&&!n){this.prevBuffers.length>=s&&this.prevBuffers.shift(),this.prevBuffers.push(e.slice(0));return}let c=this.buffer.length-this.bufferPointer;if(e.length>=c){this.buffer.set(e.subarray(0,c),this.bufferPointer),this.bufferPointer+=c;let t=e.subarray(c);this.processSpeechSegment(t);return}else this.buffer.set(e,this.bufferPointer),this.bufferPointer+=e.length;if(n){this.isRecording||(this.emit(`speech-start`,void 0),this.emit(`status`,{type:`info`,message:`Speech detected`})),this.isRecording=!0,this.postSpeechSamples=0;return}if(this.postSpeechSamples+=e.length,this.postSpeechSamples>=i){if(this.bufferPointer{var e;return(e=this.model)?.call(this,{input:t,sr:this.sampleRateTensor,state:this.state})}));this.state=n;let i=r.data[0];return this.emit(`debug`,{message:`VAD score`,data:{probability:i}}),i>this.config.speechThreshold||this.isRecording&&i>=this.config.exitThreshold}processSpeechSegment(e){let t=this.config.sampleRate/1e3,n=this.config.speechPadMs*t,r=this.bufferPointer/this.config.sampleRate*1e3,i=e?.length??0,a=this.prevBuffers.reduce((e,t)=>e+t.length,0),o=new Float32Array(a+this.bufferPointer+n),s=0;for(let e of this.prevBuffers)o.set(e,s),s+=e.length;o.set(this.buffer.slice(0,this.bufferPointer+n),s),this.emit(`speech-end`,void 0),this.emit(`speech-ready`,{buffer:o,duration:r}),e&&this.buffer.set(e,0),this.reset(i)}reset(e=0){this.buffer.fill(0,e),this.bufferPointer=e,this.isRecording=!1,this.postSpeechSamples=0,this.prevBuffers=[]}updateConfig(e){this.config={...this.config,...e},(e.maxBufferDuration||e.sampleRate)&&(this.buffer=new Float32Array(this.config.maxBufferDuration*this.config.sampleRate),this.bufferPointer=0),e.sampleRate&&(this.sampleRateTensor=new x(`int64`,[this.config.sampleRate],[]))}getLastProbability(){return 0}isCurrentlyRecording(){return this.isRecording}};async function se(e){let t=new C(e);return await t.initialize(),t}const ce={class:`space-y-6`},le={class:`rounded-lg bg-neutral-50 p-4 dark:bg-neutral-800`},ue={class:`space-y-4`},de={key:0,class:`space-y-3`},fe={key:1,class:`space-y-3`},pe={key:2,class:`space-y-3`},me={class:`flex items-center gap-3`},he={class:`text-sm font-medium`},ge={class:`ml-auto text-xs text-neutral-500`},_e={class:`border-t border-neutral-200 pt-3 dark:border-neutral-700`},ve={key:0,class:`mt-3 space-y-2`},w={key:0,class:`flex items-center gap-2 text-primary-600 dark:text-primary-400`},T={key:1,class:`flex items-center gap-2 text-red-600 dark:text-red-400`},E={class:`text-sm`},D={key:2,class:`flex items-center gap-2 text-green-600 dark:text-green-400`},O={class:`ml-auto text-xs text-neutral-500`},k={key:1,class:`border-t border-neutral-200 pt-4 dark:border-neutral-700`},A={key:0,class:`mt-3`},j={key:2,class:`border border-amber-200 rounded-lg bg-amber-50 p-3 dark:border-amber-800 dark:bg-amber-900/20`},M=50;var N=c({__name:`hearing`,setup(e){var c;let b=m({constraints:{audio:!0}}),x=t(()=>b.audioInputs.value),S=d((c=b.audioInputs.value[0])?.deviceId||``),C=d(!1),N=d(!1),P=d(),F=d(),I=d(),L=d(),R=d(),z=d(),B=d(0),V=d(!1),H=d(25),U=d(50),W=d(),G=d(!1),K=d(!1),q=d(``),J=d(!0),Y=d(0),X=d(.5),Z=d([]);async function ye(){if(!(G.value||K.value)){K.value=!0,q.value=``;try{let e=await se({sampleRate:16e3,speechThreshold:X.value,exitThreshold:X.value*.3,minSilenceDurationMs:400});e.on(`speech-start`,()=>{V.value=!0}),e.on(`speech-end`,()=>{V.value=!1}),e.on(`debug`,({data:e})=>{e?.probability!==void 0&&(Y.value=e.probability,Z.value.push(e.probability),Z.value.length>M&&Z.value.shift())}),e.on(`status`,({type:e,message:t})=>{e===`error`&&(q.value=t)});let t=new oe(e,{minChunkSize:512,audioContextOptions:{sampleRate:16e3,latencyHint:`interactive`}});await t.initialize(ae),W.value=t,G.value=!0}catch(e){q.value=e instanceof Error?e.message:String(e),console.error(`Failed to load VAD model:`,e)}finally{K.value=!1}}}async function Q(){try{if(!S.value){console.warn(`No audio input device selected`);return}await $(),F.value=await navigator.mediaDevices.getUserMedia({audio:{deviceId:S.value,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),P.value=new AudioContext;let e=P.value.createMediaStreamSource(F.value);I.value=P.value.createAnalyser(),I.value.fftSize=256,I.value.smoothingTimeConstant=.3,L.value=P.value.createGain(),L.value.gain.value=N.value?U.value/100:0,e.connect(I.value),N.value&&(e.connect(L.value),L.value.connect(P.value.destination));let t=I.value.frequencyBinCount;R.value=new Uint8Array(t),be(),J.value&&(await ye(),W.value&&await W.value.startMicrophone())}catch(e){console.error(`Error setting up audio monitoring:`,e),q.value=e instanceof Error?e.message:String(e)}}async function $(){z.value&&(cancelAnimationFrame(z.value),z.value=void 0),W.value&&await W.value.stopMicrophone(),F.value&&(F.value.getTracks().forEach(e=>e.stop()),F.value=void 0),P.value&&(await P.value.close(),P.value=void 0),I.value=void 0,L.value=void 0,R.value=void 0,B.value=0,V.value=!1,Y.value=0,Z.value=[]}function be(){let e=()=>{if(!I.value||!R.value)return;I.value.getByteFrequencyData(R.value);let t=0;for(let e=0;eH.value),z.value=requestAnimationFrame(e)};e()}async function xe(){!P.value||!L.value||(N.value?(L.value.gain.value=U.value/100,L.value.connect(P.value.destination)):(L.value.gain.value=0,L.value.disconnect()))}h(S,async()=>{C.value&&await Q()}),h(N,xe),h(U,()=>{L.value&&N.value&&(L.value.gain.value=U.value/100)}),h(x,()=>{var e;!S.value&&x.value.length>0&&(S.value=(e=x.value[0])?.deviceId)}),h(X,()=>{W.value&&G.value});async function Se(){C.value?await Q():await $()}let Ce=t(()=>{if(!J.value||!G.value)return V.value?`bg-green-500 shadow-lg shadow-green-500/50`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`;let e=Y.value,t=X.value;return e>t?`bg-green-500 shadow-lg shadow-green-500/50`:e>t*.5?`bg-yellow-500 shadow-lg shadow-yellow-500/30`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`});return ne(()=>{b.ensurePermissions().then(()=>ee()).then(()=>{var e;x.value.length>0&&!S.value&&(S.value=(e=x.value[0])?.deviceId)})}),l(()=>{$(),W.value&&W.value.dispose()}),(e,t)=>(u(),a(`div`,ce,[n(`div`,null,[s(p(re),{modelValue:S.value,"onUpdate:modelValue":t[0]||=e=>S.value=e,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:x.value.map(e=>({label:e.label||e.deviceId,value:e.deviceId})),placeholder:`Select an audio input device`},null,8,[`modelValue`,`options`])]),n(`div`,le,[t[12]||=n(`h3`,{class:`mb-4 flex items-center gap-2 text-lg`},[n(`div`,{class:`text-xl`,"i-solar:volume-loud-bold-duotone":``}),o(` Monitoring `)],-1),n(`div`,ue,[s(p(g),{modelValue:C.value,"onUpdate:modelValue":[t[1]||=e=>C.value=e,Se],label:`Enable Audio Monitoring`,description:`Start monitoring audio input levels and voice activity detection`},null,8,[`modelValue`]),C.value?(u(),a(`div`,de,[s(p(ie),{level:B.value,label:`Input Level`},null,8,[`level`]),J.value&&G.value?(u(),r(p(v),{key:0,value:Y.value,threshold:X.value,label:`Probability of Speech`,"below-label":`Silence`,"above-label":`Speech`,"threshold-label":`Detection threshold`},null,8,[`value`,`threshold`])):i(``,!0),J.value&&G.value?(u(),a(`div`,fe,[s(p(_),{modelValue:X.value,"onUpdate:modelValue":t[2]||=e=>X.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:.1,max:.9,step:.05,"format-value":e=>`${(e*100).toFixed(0)}%`},null,8,[`modelValue`,`format-value`])])):(u(),a(`div`,pe,[s(p(_),{modelValue:H.value,"onUpdate:modelValue":t[3]||=e=>H.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:1,max:80,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])),n(`div`,me,[n(`div`,{class:te([`h-4 w-4 rounded-full transition-all duration-200`,Ce.value])},null,2),n(`span`,he,f(V.value?`Speaking Detected`:`Silence`),1),n(`span`,ge,f(J.value&&G.value?`Model Based`:`Volume Based`),1)]),n(`div`,_e,[s(p(g),{modelValue:J.value,"onUpdate:modelValue":t[4]||=e=>J.value=e,label:`Model Based`,description:`Use AI models for more accurate speech detection`},null,8,[`modelValue`]),J.value?(u(),a(`div`,ve,[K.value?(u(),a(`div`,w,t[7]||=[n(`div`,{class:`animate-spin text-sm`,"i-solar:spinner-line-duotone":``},null,-1),n(`span`,{class:`text-sm`},`Loading...`,-1)])):q.value?(u(),a(`div`,T,[t[8]||=n(`div`,{class:`text-sm`,"i-solar:close-circle-bold-duotone":``},null,-1),n(`span`,E,`Inference error: `+f(q.value),1)])):G.value?(u(),a(`div`,D,[t[9]||=n(`div`,{class:`text-sm`,"i-solar:check-circle-bold-duotone":``},null,-1),t[10]||=n(`span`,{class:`text-sm`},`Activated`,-1),n(`span`,O,` Probability: `+f((Y.value*100).toFixed(1))+`% `,1)])):i(``,!0)])):i(``,!0)]),J.value&&G.value?(u(),r(p(y),{key:3,history:Z.value,"current-value":Y.value,threshold:X.value,"is-active":V.value,title:`Voice Activity`,subtitle:`Last 2 seconds`,"active-label":`Speaking`,"active-legend-label":`Voice detected`,"inactive-legend-label":`Silence`,"threshold-label":`Speech threshold`},null,8,[`history`,`current-value`,`threshold`,`is-active`])):i(``,!0)])):i(``,!0),C.value?(u(),a(`div`,k,[s(p(g),{modelValue:N.value,"onUpdate:modelValue":t[5]||=e=>N.value=e,label:`Monitor Audio (Listen)`,description:`Enable audio playback monitoring (like OBS). Be careful of feedback!`},null,8,[`modelValue`]),N.value?(u(),a(`div`,A,[s(p(_),{modelValue:U.value,"onUpdate:modelValue":t[6]||=e=>U.value=e,label:`Monitor Volume`,description:`Control the volume of audio monitoring playback`,min:0,max:100,step:5,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])):i(``,!0)])):i(``,!0),N.value?(u(),a(`div`,j,t[11]||=[n(`div`,{class:`flex items-center gap-2 text-amber-700 dark:text-amber-300`},[n(`div`,{class:`text-sm`,"i-solar:warning-circle-bold-duotone":``}),n(`span`,{class:`text-sm font-medium`},`Audio feedback warning`)],-1),n(`div`,{class:`mt-1 text-xs text-amber-600 dark:text-amber-400`},` Use headphones to prevent audio feedback. Lower the monitor volume if you hear echoing. `,-1)])):i(``,!0)])])]))}});typeof S==`function`&&S(N);var P=N;export{P as default}; \ No newline at end of file +var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{computed as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createTextVNode as o,createVNode as s,defineComponent as c,nextTick as ee,normalizeClass as te,onMounted as ne,onUnmounted as l,openBlock as u,ref as d,toDisplayString as f,unref as p,useDevicesList as m,watch as h}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import{FieldCheckbox_default as g,FieldRange_default as _,FieldSelect_default as re}from"./src-B9Iy8991.js";import{LevelMeter_default as ie,ThresholdMeter_default as v,TimeSeriesChart_default as y}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{__webpack_exports__AutoModel as b,__webpack_exports__Tensor as x}from"./transformers.web-DB6EOtf2.js";import{route_block_default as S}from"./route-block--T8TG4is.js";var ae=`/assets/process.worklet-CF6Ao8XG.js`,oe=class{constructor(t,n={}){e.defineProperty(this,`audioContext`,null),e.defineProperty(this,`audioWorkletNode`,null),e.defineProperty(this,`mediaStream`,null),e.defineProperty(this,`sourceNode`,null),e.defineProperty(this,`vad`,void 0),e.defineProperty(this,`workletInitialized`,!1),this.vad=t,this.audioContext=new AudioContext(n.audioContextOptions||{sampleRate:16e3,latencyHint:`interactive`})}async initialize(e){if(!this.audioContext)throw Error(`Audio context not created`);try{this.workletInitialized||(await this.audioContext.audioWorklet.addModule(e),URL.revokeObjectURL(e),this.workletInitialized=!0),this.audioWorkletNode=new AudioWorkletNode(this.audioContext,`vad-processor`),this.audioWorkletNode.port.onmessage=async e=>{let{buffer:t}=e.data;t&&t.length>0&&await this.vad.processAudio(new Float32Array(t))}}catch(e){throw console.error(`Failed to initialize audio worklet:`,e),e}}async startMicrophone(){if(!this.audioContext||!this.audioWorkletNode)throw Error(`Audio system not initialized. Call initialize() first.`);try{this.audioContext.state===`suspended`&&await this.audioContext.resume(),this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,sampleRate:this.audioContext.sampleRate}}),this.sourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.sourceNode.connect(this.audioWorkletNode);let e=this.audioContext.createGain();e.gain.value=0,this.audioWorkletNode.connect(e),e.connect(this.audioContext.destination)}catch(e){throw console.error(`Failed to start microphone:`,e),e}}async stopMicrophone(){var e,t;this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null),this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),(e=this.audioContext)?.suspend(),(t=this.audioWorkletNode)?.disconnect()}stop(){this.sourceNode&&this.audioWorkletNode&&(this.sourceNode.disconnect(),this.audioWorkletNode.disconnect()),this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null),this.audioContext&&this.audioContext.state!==`closed`&&this.audioContext.suspend(),this.sourceNode=null,this.audioWorkletNode=null}dispose(){this.stop(),this.audioContext&&this.audioContext.state!==`closed`&&(this.audioContext.close(),this.audioContext=null),this.workletInitialized=!1}},C=class{constructor(t={}){e.defineProperty(this,`config`,void 0),e.defineProperty(this,`model`,void 0),e.defineProperty(this,`state`,void 0),e.defineProperty(this,`sampleRateTensor`,void 0),e.defineProperty(this,`buffer`,void 0),e.defineProperty(this,`bufferPointer`,0),e.defineProperty(this,`isRecording`,!1),e.defineProperty(this,`postSpeechSamples`,0),e.defineProperty(this,`prevBuffers`,[]),e.defineProperty(this,`inferenceChain`,Promise.resolve()),e.defineProperty(this,`eventListeners`,{}),e.defineProperty(this,`isReady`,!1);let n={sampleRate:16e3,speechThreshold:.3,exitThreshold:.1,minSilenceDurationMs:400,speechPadMs:80,minSpeechDurationMs:250,maxBufferDuration:30,newBufferSize:512};this.config={...n,...t},this.buffer=new Float32Array(this.config.maxBufferDuration*this.config.sampleRate),this.sampleRateTensor=new x(`int64`,[this.config.sampleRate],[]),this.state=new x(`float32`,new Float32Array(2*1*128),[2,1,128])}async initialize(){try{this.emit(`status`,{type:`info`,message:`Loading VAD model...`}),this.model=await b.from_pretrained(`onnx-community/silero-vad`,{config:{model_type:`custom`},dtype:`fp32`}),this.isReady=!0,this.emit(`status`,{type:`info`,message:`VAD model loaded successfully`})}catch(e){throw this.emit(`status`,{type:`error`,message:`Failed to load VAD model: ${e}`}),e}}on(e,t){this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t)}off(e,t){this.eventListeners[e]&&(this.eventListeners[e]=this.eventListeners[e].filter(e=>e!==t))}emit(e,t){if(this.eventListeners[e])for(let n of this.eventListeners[e])n(t)}async processAudio(e){if(!this.isReady)throw Error(`VAD model is not initialized. Call initialize() first.`);let t=this.isRecording,n=await this.detectSpeech(e),r=this.config.sampleRate/1e3,i=this.config.minSilenceDurationMs*r,a=this.config.speechPadMs*r,o=this.config.minSpeechDurationMs*r,s=Math.ceil(a/this.config.newBufferSize);if(!t&&!n){this.prevBuffers.length>=s&&this.prevBuffers.shift(),this.prevBuffers.push(e.slice(0));return}let c=this.buffer.length-this.bufferPointer;if(e.length>=c){this.buffer.set(e.subarray(0,c),this.bufferPointer),this.bufferPointer+=c;let t=e.subarray(c);this.processSpeechSegment(t);return}else this.buffer.set(e,this.bufferPointer),this.bufferPointer+=e.length;if(n){this.isRecording||(this.emit(`speech-start`,void 0),this.emit(`status`,{type:`info`,message:`Speech detected`})),this.isRecording=!0,this.postSpeechSamples=0;return}if(this.postSpeechSamples+=e.length,this.postSpeechSamples>=i){if(this.bufferPointer{var e;return(e=this.model)?.call(this,{input:t,sr:this.sampleRateTensor,state:this.state})}));this.state=n;let i=r.data[0];return this.emit(`debug`,{message:`VAD score`,data:{probability:i}}),i>this.config.speechThreshold||this.isRecording&&i>=this.config.exitThreshold}processSpeechSegment(e){let t=this.config.sampleRate/1e3,n=this.config.speechPadMs*t,r=this.bufferPointer/this.config.sampleRate*1e3,i=e?.length??0,a=this.prevBuffers.reduce((e,t)=>e+t.length,0),o=new Float32Array(a+this.bufferPointer+n),s=0;for(let e of this.prevBuffers)o.set(e,s),s+=e.length;o.set(this.buffer.slice(0,this.bufferPointer+n),s),this.emit(`speech-end`,void 0),this.emit(`speech-ready`,{buffer:o,duration:r}),e&&this.buffer.set(e,0),this.reset(i)}reset(e=0){this.buffer.fill(0,e),this.bufferPointer=e,this.isRecording=!1,this.postSpeechSamples=0,this.prevBuffers=[]}updateConfig(e){this.config={...this.config,...e},(e.maxBufferDuration||e.sampleRate)&&(this.buffer=new Float32Array(this.config.maxBufferDuration*this.config.sampleRate),this.bufferPointer=0),e.sampleRate&&(this.sampleRateTensor=new x(`int64`,[this.config.sampleRate],[]))}getLastProbability(){return 0}isCurrentlyRecording(){return this.isRecording}};async function se(e){let t=new C(e);return await t.initialize(),t}const ce={class:`space-y-6`},le={class:`rounded-lg bg-neutral-50 p-4 dark:bg-neutral-800`},ue={class:`space-y-4`},de={key:0,class:`space-y-3`},fe={key:1,class:`space-y-3`},pe={key:2,class:`space-y-3`},me={class:`flex items-center gap-3`},he={class:`text-sm font-medium`},ge={class:`ml-auto text-xs text-neutral-500`},_e={class:`border-t border-neutral-200 pt-3 dark:border-neutral-700`},ve={key:0,class:`mt-3 space-y-2`},w={key:0,class:`flex items-center gap-2 text-primary-600 dark:text-primary-400`},T={key:1,class:`flex items-center gap-2 text-red-600 dark:text-red-400`},E={class:`text-sm`},D={key:2,class:`flex items-center gap-2 text-green-600 dark:text-green-400`},O={class:`ml-auto text-xs text-neutral-500`},k={key:1,class:`border-t border-neutral-200 pt-4 dark:border-neutral-700`},A={key:0,class:`mt-3`},j={key:2,class:`border border-amber-200 rounded-lg bg-amber-50 p-3 dark:border-amber-800 dark:bg-amber-900/20`},M=50;var N=c({__name:`hearing`,setup(e){var c;let b=m({constraints:{audio:!0}}),x=t(()=>b.audioInputs.value),S=d((c=b.audioInputs.value[0])?.deviceId||``),C=d(!1),N=d(!1),P=d(),F=d(),I=d(),L=d(),R=d(),z=d(),B=d(0),V=d(!1),H=d(25),U=d(50),W=d(),G=d(!1),K=d(!1),q=d(``),J=d(!0),Y=d(0),X=d(.5),Z=d([]);async function ye(){if(!(G.value||K.value)){K.value=!0,q.value=``;try{let e=await se({sampleRate:16e3,speechThreshold:X.value,exitThreshold:X.value*.3,minSilenceDurationMs:400});e.on(`speech-start`,()=>{V.value=!0}),e.on(`speech-end`,()=>{V.value=!1}),e.on(`debug`,({data:e})=>{e?.probability!==void 0&&(Y.value=e.probability,Z.value.push(e.probability),Z.value.length>M&&Z.value.shift())}),e.on(`status`,({type:e,message:t})=>{e===`error`&&(q.value=t)});let t=new oe(e,{minChunkSize:512,audioContextOptions:{sampleRate:16e3,latencyHint:`interactive`}});await t.initialize(ae),W.value=t,G.value=!0}catch(e){q.value=e instanceof Error?e.message:String(e),console.error(`Failed to load VAD model:`,e)}finally{K.value=!1}}}async function Q(){try{if(!S.value){console.warn(`No audio input device selected`);return}await $(),F.value=await navigator.mediaDevices.getUserMedia({audio:{deviceId:S.value,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),P.value=new AudioContext;let e=P.value.createMediaStreamSource(F.value);I.value=P.value.createAnalyser(),I.value.fftSize=256,I.value.smoothingTimeConstant=.3,L.value=P.value.createGain(),L.value.gain.value=N.value?U.value/100:0,e.connect(I.value),N.value&&(e.connect(L.value),L.value.connect(P.value.destination));let t=I.value.frequencyBinCount;R.value=new Uint8Array(t),be(),J.value&&(await ye(),W.value&&await W.value.startMicrophone())}catch(e){console.error(`Error setting up audio monitoring:`,e),q.value=e instanceof Error?e.message:String(e)}}async function $(){z.value&&(cancelAnimationFrame(z.value),z.value=void 0),W.value&&await W.value.stopMicrophone(),F.value&&(F.value.getTracks().forEach(e=>e.stop()),F.value=void 0),P.value&&(await P.value.close(),P.value=void 0),I.value=void 0,L.value=void 0,R.value=void 0,B.value=0,V.value=!1,Y.value=0,Z.value=[]}function be(){let e=()=>{if(!I.value||!R.value)return;I.value.getByteFrequencyData(R.value);let t=0;for(let e=0;eH.value),z.value=requestAnimationFrame(e)};e()}async function xe(){!P.value||!L.value||(N.value?(L.value.gain.value=U.value/100,L.value.connect(P.value.destination)):(L.value.gain.value=0,L.value.disconnect()))}h(S,async()=>{C.value&&await Q()}),h(N,xe),h(U,()=>{L.value&&N.value&&(L.value.gain.value=U.value/100)}),h(x,()=>{var e;!S.value&&x.value.length>0&&(S.value=(e=x.value[0])?.deviceId)}),h(X,()=>{W.value&&G.value});async function Se(){C.value?await Q():await $()}let Ce=t(()=>{if(!J.value||!G.value)return V.value?`bg-green-500 shadow-lg shadow-green-500/50`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`;let e=Y.value,t=X.value;return e>t?`bg-green-500 shadow-lg shadow-green-500/50`:e>t*.5?`bg-yellow-500 shadow-lg shadow-yellow-500/30`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`});return ne(()=>{b.ensurePermissions().then(()=>ee()).then(()=>{var e;x.value.length>0&&!S.value&&(S.value=(e=x.value[0])?.deviceId)})}),l(()=>{$(),W.value&&W.value.dispose()}),(e,t)=>(u(),a(`div`,ce,[n(`div`,null,[s(p(re),{modelValue:S.value,"onUpdate:modelValue":t[0]||=e=>S.value=e,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:x.value.map(e=>({label:e.label||e.deviceId,value:e.deviceId})),placeholder:`Select an audio input device`},null,8,[`modelValue`,`options`])]),n(`div`,le,[t[12]||=n(`h3`,{class:`mb-4 flex items-center gap-2 text-lg`},[n(`div`,{class:`text-xl`,"i-solar:volume-loud-bold-duotone":``}),o(` Monitoring `)],-1),n(`div`,ue,[s(p(g),{modelValue:C.value,"onUpdate:modelValue":[t[1]||=e=>C.value=e,Se],label:`Enable Audio Monitoring`,description:`Start monitoring audio input levels and voice activity detection`},null,8,[`modelValue`]),C.value?(u(),a(`div`,de,[s(p(ie),{level:B.value,label:`Input Level`},null,8,[`level`]),J.value&&G.value?(u(),r(p(v),{key:0,value:Y.value,threshold:X.value,label:`Probability of Speech`,"below-label":`Silence`,"above-label":`Speech`,"threshold-label":`Detection threshold`},null,8,[`value`,`threshold`])):i(``,!0),J.value&&G.value?(u(),a(`div`,fe,[s(p(_),{modelValue:X.value,"onUpdate:modelValue":t[2]||=e=>X.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:.1,max:.9,step:.05,"format-value":e=>`${(e*100).toFixed(0)}%`},null,8,[`modelValue`,`format-value`])])):(u(),a(`div`,pe,[s(p(_),{modelValue:H.value,"onUpdate:modelValue":t[3]||=e=>H.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:1,max:80,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])),n(`div`,me,[n(`div`,{class:te([`h-4 w-4 rounded-full transition-all duration-200`,Ce.value])},null,2),n(`span`,he,f(V.value?`Speaking Detected`:`Silence`),1),n(`span`,ge,f(J.value&&G.value?`Model Based`:`Volume Based`),1)]),n(`div`,_e,[s(p(g),{modelValue:J.value,"onUpdate:modelValue":t[4]||=e=>J.value=e,label:`Model Based`,description:`Use AI models for more accurate speech detection`},null,8,[`modelValue`]),J.value?(u(),a(`div`,ve,[K.value?(u(),a(`div`,w,t[7]||=[n(`div`,{class:`animate-spin text-sm`,"i-solar:spinner-line-duotone":``},null,-1),n(`span`,{class:`text-sm`},`Loading...`,-1)])):q.value?(u(),a(`div`,T,[t[8]||=n(`div`,{class:`text-sm`,"i-solar:close-circle-bold-duotone":``},null,-1),n(`span`,E,`Inference error: `+f(q.value),1)])):G.value?(u(),a(`div`,D,[t[9]||=n(`div`,{class:`text-sm`,"i-solar:check-circle-bold-duotone":``},null,-1),t[10]||=n(`span`,{class:`text-sm`},`Activated`,-1),n(`span`,O,` Probability: `+f((Y.value*100).toFixed(1))+`% `,1)])):i(``,!0)])):i(``,!0)]),J.value&&G.value?(u(),r(p(y),{key:3,history:Z.value,"current-value":Y.value,threshold:X.value,"is-active":V.value,title:`Voice Activity`,subtitle:`Last 2 seconds`,"active-label":`Speaking`,"active-legend-label":`Voice detected`,"inactive-legend-label":`Silence`,"threshold-label":`Speech threshold`},null,8,[`history`,`current-value`,`threshold`,`is-active`])):i(``,!0)])):i(``,!0),C.value?(u(),a(`div`,k,[s(p(g),{modelValue:N.value,"onUpdate:modelValue":t[5]||=e=>N.value=e,label:`Monitor Audio (Listen)`,description:`Enable audio playback monitoring (like OBS). Be careful of feedback!`},null,8,[`modelValue`]),N.value?(u(),a(`div`,A,[s(p(_),{modelValue:U.value,"onUpdate:modelValue":t[6]||=e=>U.value=e,label:`Monitor Volume`,description:`Control the volume of audio monitoring playback`,min:0,max:100,step:5,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])):i(``,!0)])):i(``,!0),N.value?(u(),a(`div`,j,t[11]||=[n(`div`,{class:`flex items-center gap-2 text-amber-700 dark:text-amber-300`},[n(`div`,{class:`text-sm`,"i-solar:warning-circle-bold-duotone":``}),n(`span`,{class:`text-sm font-medium`},`Audio feedback warning`)],-1),n(`div`,{class:`mt-1 text-xs text-amber-600 dark:text-amber-400`},` Use headphones to prevent audio feedback. Lower the monitor volume if you hear echoing. `,-1)])):i(``,!0)])])]))}});typeof S==`function`&&S(N);var P=N;export{P as default}; \ No newline at end of file diff --git a/assets/home-By88AHp7.js b/assets/home-DMVuOG4M.js similarity index 88% rename from assets/home-By88AHp7.js rename to assets/home-DMVuOG4M.js index 9370714ff585502e90627d14afe39b6159925b2e..3cf0ee486b9f4bbe2e9c4e0d55948f655f8c5d34 100644 --- a/assets/home-By88AHp7.js +++ b/assets/home-DMVuOG4M.js @@ -1 +1 @@ -import{RouterView as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,unref as o}from"./index-Dor8PgzM.js";const s={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)`},"h-full":``},c={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"h-full":``};var l=i({__name:`home`,setup(i){return(i,l)=>(a(),n(`div`,s,[t(`div`,c,[r(o(e))])]))}}),u=l;export{u as default}; \ No newline at end of file +import{RouterView as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,unref as o}from"./index-C-t5bjx6.js";const s={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)`},"h-full":``},c={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"h-full":``};var l=i({__name:`home`,setup(i){return(i,l)=>(a(),n(`div`,s,[t(`div`,c,[r(o(e))])]))}}),u=l;export{u as default}; \ No newline at end of file diff --git a/assets/icon-animation-BMPmq1VP.js b/assets/icon-animation-DJ14_q6r.js similarity index 84% rename from assets/icon-animation-BMPmq1VP.js rename to assets/icon-animation-DJ14_q6r.js index d59dbddaa578da36a4e04dc386119d2b735c94f1..5e597a868872896b2b17c2cc1c463f3803dbcccb 100644 --- a/assets/icon-animation-BMPmq1VP.js +++ b/assets/icon-animation-DJ14_q6r.js @@ -1 +1 @@ -import{computed as e,onMounted as t,onUnmounted as n,ref as r,useSettings as i}from"./index-Dor8PgzM.js";function a(a){let o=r(!1),s=r(!1),c=r(a),l=i(),u=e(()=>s.value&&!l.disableTransitions&&l.usePageSpecificTransitions);return t(()=>{s.value=!0,requestAnimationFrame(()=>{o.value=!0})}),n(()=>{o.value=!1,s.value=!1}),{iconAnimationStarted:o,showIconAnimation:u,animationIcon:c}}export{a as useIconAnimation}; \ No newline at end of file +import{computed as e,onMounted as t,onUnmounted as n,ref as r,useSettings as i}from"./index-C-t5bjx6.js";function a(a){let o=r(!1),s=r(!1),c=r(a),l=i(),u=e(()=>s.value&&!l.disableTransitions&&l.usePageSpecificTransitions);return t(()=>{s.value=!0,requestAnimationFrame(()=>{o.value=!0})}),n(()=>{o.value=!1,s.value=!1}),{iconAnimationStarted:o,showIconAnimation:u,animationIcon:c}}export{a as useIconAnimation}; \ No newline at end of file diff --git a/assets/image-BvW9nCQG.js b/assets/image-DfeFRFtx.js similarity index 95% rename from assets/image-BvW9nCQG.js rename to assets/image-DfeFRFtx.js index f2bf2346baf2f1bfada2fbe958701f9f2a215e44..039e099fc99f8c8ae41940ccaebf12373d20ff69 100644 --- a/assets/image-BvW9nCQG.js +++ b/assets/image-DfeFRFtx.js @@ -1,2 +1,2 @@ -import{__plugin_vue_export_helper_default as e,createBaseVNode as t,createCommentVNode as n,createElementBlock as r,defineComponent as i,openBlock as a,ref as o,toDisplayString as s,unref as c,useClipboard as l}from"./index-Dor8PgzM.js";const u={bg:`neutral-100`,flex:`~ col`,"items-center":``,"justify-center":``,"rounded-lg":``,"px-4":``,"py-3":``},d={key:0},f=[`src`],p={bg:`neutral-100`,class:`text-wrap-any`,"max-h":`100`,"overflow-scroll":``,"rounded-lg":``,"text-wrap":``,"text-black":``,"font-mono":``};var m=i({__name:`image`,setup(e){let i=o(),m=o(``),{copy:h}=l({source:m});async function g(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{var n;t(((n=e.target)==null||(n=n.result)==null?void 0:n.toString())||``)},r.onerror=e=>{n(e)},r.readAsDataURL(e)})}async function _(e){var t;let n=e.target,r=(t=n.files)?.[0];if(r){i.value=r;let e=await g(r);m.value=e}}return(e,i)=>(a(),r(`div`,null,[t(`label`,u,[t(`input`,{type:`file`,accept:`image/*`,hidden:``,onChange:_},null,32),i[1]||=t(`span`,null,`Upload Image`,-1)]),m.value?(a(),r(`div`,d,[t(`img`,{src:m.value,alt:`Uploaded Image`,"w-100":``},null,8,f),t(`pre`,p,` `+s(m.value)+` +import{__plugin_vue_export_helper_default as e,createBaseVNode as t,createCommentVNode as n,createElementBlock as r,defineComponent as i,openBlock as a,ref as o,toDisplayString as s,unref as c,useClipboard as l}from"./index-C-t5bjx6.js";const u={bg:`neutral-100`,flex:`~ col`,"items-center":``,"justify-center":``,"rounded-lg":``,"px-4":``,"py-3":``},d={key:0},f=[`src`],p={bg:`neutral-100`,class:`text-wrap-any`,"max-h":`100`,"overflow-scroll":``,"rounded-lg":``,"text-wrap":``,"text-black":``,"font-mono":``};var m=i({__name:`image`,setup(e){let i=o(),m=o(``),{copy:h}=l({source:m});async function g(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{var n;t(((n=e.target)==null||(n=n.result)==null?void 0:n.toString())||``)},r.onerror=e=>{n(e)},r.readAsDataURL(e)})}async function _(e){var t;let n=e.target,r=(t=n.files)?.[0];if(r){i.value=r;let e=await g(r);m.value=e}}return(e,i)=>(a(),r(`div`,null,[t(`label`,u,[t(`input`,{type:`file`,accept:`image/*`,hidden:``,onChange:_},null,32),i[1]||=t(`span`,null,`Upload Image`,-1)]),m.value?(a(),r(`div`,d,[t(`img`,{src:m.value,alt:`Uploaded Image`,"w-100":``},null,8,f),t(`pre`,p,` `+s(m.value)+` `,1),t(`button`,{bg:`primary-500`,text:`white`,"mt-4":``,"rounded-lg":``,"px-4":``,"py-2":``,onClick:i[0]||=()=>c(h)()},` Copy Data URL `)])):n(``,!0)]))}}),h=e(m,[[`__scopeId`,`data-v-7edd53e6`]]);export{h as default}; \ No newline at end of file diff --git a/assets/index-Dor8PgzM.js b/assets/index-C-t5bjx6.js similarity index 99% rename from assets/index-Dor8PgzM.js rename to assets/index-C-t5bjx6.js index 0cce661e8238ba7b1033b3afa5938a9725c25bb6..3b3645624ebdc31579e9b2ddd580ee9bf179f886 100644 --- a/assets/index-Dor8PgzM.js +++ b/assets/index-C-t5bjx6.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-DK2eGkeE.js","assets/HeaderLink-BN-EJFUu.js","assets/HeaderLink-DAzsygCR.css","assets/settings-B5qvHxHm.js","assets/components-1m8YjNRO.js","assets/import-url-browser-BPXUaBlv.js","assets/duckdb-mvp-C3i5IjU8.js","assets/src-BnFQ5wFr.js","assets/src-B8Pazang.css","assets/stores-BVVBBF04.js","assets/composables-BOdj-CMj.js","assets/dist-F6JCieW1.js","assets/webgpu-aYTuek9b.js","assets/index-CISmcbXk-DJz-iwh0.js","assets/types-AwjH7X1C.js","assets/queue-aUPoxb9G.js","assets/queues-BTBffrrj.js","assets/sleep-CvjNLutj.js","assets/Button-C9y21VLy.js","assets/Button-D6PjaMaR.css","assets/components-BhgRi_z7.css","assets/pages-C4YaFCau.js","assets/route-block--T8TG4is.js","assets/AnimatedWave-BwQ8RHQR.js","assets/Basic-CbvQnFR9.js","assets/AnimatedWave-BKRQHFx2.css","assets/audio-record-D3btUW_B.js","assets/background-remove-Bq9ik3yO.js","assets/transformers.web-WZURbMoG.js","assets/InputFile-iVzJ4JTk.js","assets/chat-kDuZ8L8x.js","assets/gesture-circle-dEhSZQp3.js","assets/image-BvW9nCQG.js","assets/image-BhuwcwI9.css","assets/polaroid-DPAymSNw.js","assets/vibrant-Bgs02A1a.js","assets/browser-BP4AmG4D.js","assets/queue-BqR-8_EY.js","assets/settings-7Adg0ndZ.js","assets/IconAnimation-DNjwD43A.js","assets/airi-card-mw1JngjQ.js","assets/CardCreate-C0oil_xo.js","assets/CardCreationDialog-CYjvvafK.js","assets/dist-B8MUgAeh.js","assets/CardCreationDialog-CNtImmVB.css","assets/CardDetailDialog-C5WGcTv5.js","assets/DeleteCardDialog-C72b0_i8.js","assets/CardListItem-DRyTsPsI.js","assets/CardCreate-Cs19blbA.js","assets/CardCreationDialog-C6JidgYK.js","assets/CardDetailDialog-BW_jiSws.js","assets/CardListItem-DalWAjah.js","assets/DeleteCardDialog-Ca2Mm-16.js","assets/appearance-DBeyZLwP.js","assets/color-scheme-BR3byuGg.js","assets/ColorPalette-B5CDhrZt.js","assets/color-scheme-DQ9rzeUD.css","assets/developer-D6LGtcCU.js","assets/general-BvsEaIJQ.js","assets/memory-DTRopWuR.js","assets/models-AmY2AY0C.js","assets/icon-animation-BMPmq1VP.js","assets/models-ctVuVUBS.css","assets/modules-B4NyxInC.js","assets/consciousness-kAj-ksUV.js","assets/hearing-8DQaE61m.js","assets/memory-long-term-DKciszM5.js","assets/memory-short-term-Bm0Da8ag.js","assets/speech-ByP1uYEY.js","assets/Textarea-D5jZ5rL5.js","assets/providers-D-_VRMeK.js","assets/alibaba-cloud-model-studio-CzyJX8a2.js","assets/anthropic-CLnNuWBX.js","assets/cloudflare-workers-ai-uldf83tZ.js","assets/deepseek-p_9m2h9g.js","assets/elevenlabs-wE9VDxlm.js","assets/featherless-ai-DQPQketQ.js","assets/fireworks-ai-BK1JbfzP.js","assets/google-generative-ai-BtzrxrfR.js","assets/microsoft-speech-oHJyYUA3.js","assets/mistral-ai-CSPbz6P7.js","assets/moonshot-ai-DQXpgnTx.js","assets/novita-ai-utW-azgn.js","assets/ollama-CHn_CRdf.js","assets/openai-D78WUN50.js","assets/openai-audio-speech-CIhpAE_g.js","assets/openai-audio-transcription-BQWhP4fg.js","assets/openrouter-ai-B5FAPnom.js","assets/player2-DQr7xDpa.js","assets/player2-speech-DdGKDDVO.js","assets/together-ai-GN2N0NkN.js","assets/volcengine-p6oDJzj5.js","assets/xai-CNHx3pHj.js","assets/scene-Bait6ok6.js","assets/stage-CVXzpwpy.js","assets/filter-message-BialTeOq.js","assets/delays-CenmsVvX.js","assets/emotions-BS9jIw56.js","assets/messages-Bpag3yji.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-C1ln69hW.js","assets/HeaderLink-CyWWkOPU.js","assets/HeaderLink-DAzsygCR.css","assets/settings-Nn2AwpUk.js","assets/components-DaLVZOhF.js","assets/import-url-browser-BPXUaBlv.js","assets/duckdb-mvp-C3i5IjU8.js","assets/src-B9Iy8991.js","assets/src-B8Pazang.css","assets/stores-BW_6w_OI.js","assets/composables-CEnUnIM2.js","assets/dist-F6JCieW1.js","assets/webgpu-aYTuek9b.js","assets/index-CISmcbXk-BKEuzw_9.js","assets/types-AwjH7X1C.js","assets/queue-Bp4D1cP3.js","assets/queues-DD1Fxfss.js","assets/sleep-CvjNLutj.js","assets/Button-DE0e46lv.js","assets/Button-8uEw5Afs.css","assets/components-BhgRi_z7.css","assets/pages-BohMTnhi.js","assets/route-block--T8TG4is.js","assets/AnimatedWave-DqKMnZAQ.js","assets/Basic-DnBqne8U.js","assets/AnimatedWave-BKRQHFx2.css","assets/audio-record-COiXC0pt.js","assets/background-remove-DVVfI1Xi.js","assets/transformers.web-DB6EOtf2.js","assets/InputFile-WiujwxGd.js","assets/chat-C7uR1EUr.js","assets/gesture-circle-BeGjgvNx.js","assets/image-DfeFRFtx.js","assets/image-BhuwcwI9.css","assets/polaroid-HVdbjIQr.js","assets/vibrant-GPCtw0rY.js","assets/browser-BP4AmG4D.js","assets/queue-DrZb4pfX.js","assets/settings-D244O10q.js","assets/IconAnimation-9WCWiV-Y.js","assets/airi-card-DrWWMwCR.js","assets/CardCreate-B09nhkcM.js","assets/CardCreationDialog-B1i7X0kT.js","assets/dist-BeDGrW0v.js","assets/CardCreationDialog-CNtImmVB.css","assets/CardDetailDialog-RKuCdXg0.js","assets/DeleteCardDialog-BIO7MxkY.js","assets/CardListItem-C5UadVtf.js","assets/CardCreate-BXajcpvK.js","assets/CardCreationDialog-ohI_4kmP.js","assets/CardDetailDialog-pJ19LoWD.js","assets/CardListItem-BXlJ2a3I.js","assets/DeleteCardDialog-D6RQM-NX.js","assets/appearance-Bl3T7BtW.js","assets/color-scheme-CkLbeWU6.js","assets/ColorPalette-C8KIoKTf.js","assets/color-scheme-DQ9rzeUD.css","assets/developer-CPJ4sT27.js","assets/general-D0JKvHDV.js","assets/memory-B4tFztnI.js","assets/models-BDiVXLbc.js","assets/icon-animation-DJ14_q6r.js","assets/models-ctVuVUBS.css","assets/modules-B_WFNh94.js","assets/consciousness-CEAWA4LX.js","assets/hearing-C5OHOeCl.js","assets/memory-long-term-CDpPvihx.js","assets/memory-short-term-C8UMWOHr.js","assets/speech-D4NcUzWM.js","assets/Textarea-SRGnauY5.js","assets/providers-BQTY_iJ9.js","assets/alibaba-cloud-model-studio-asn8Gwqn.js","assets/anthropic-CbFYT849.js","assets/cloudflare-workers-ai-CYDm84zU.js","assets/deepseek-BnI8cEci.js","assets/elevenlabs-DnbB9bTa.js","assets/featherless-ai-3KKQQVHb.js","assets/fireworks-ai-CfqA2SqF.js","assets/google-generative-ai-BC2Ukvsi.js","assets/microsoft-speech-0I0KtNpM.js","assets/mistral-ai-CxyrZSnm.js","assets/moonshot-ai-CPxUGdzM.js","assets/novita-ai-BHu56LyQ.js","assets/ollama-CbGvZQLV.js","assets/openai-CFrJH41X.js","assets/openai-audio-speech-CQnlHz-h.js","assets/openai-audio-transcription-COj7c5f3.js","assets/openrouter-ai-B3LA44lL.js","assets/player2-D0DMNaQM.js","assets/player2-speech-D3f8DqIF.js","assets/together-ai-DLS8TUdj.js","assets/volcengine-B-dG8mwz.js","assets/xai-5DuPupy5.js","assets/scene-BMgC1HoG.js","assets/stage-DU1LZDda.js","assets/filter-message-DFghiITe.js","assets/delays-CLOrklec.js","assets/emotions-nbudrl-b.js","assets/messages-BFRiVTfh.js"])))=>i.map(i=>d[i]); var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({}),t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(e&&(t=e(e=0)),t),c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),l=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},u=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;lt[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},d=(e,r,i)=>(i=e==null?{}:t(a(e)),u(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),f=e=>u(n({},`__esModule`,{value:!0}),e),p=e=>t=>d(t.default,e),m=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e){if(t.type!==`childList`)continue;for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(); /** * @vue/shared v3.5.17 @@ -3834,7 +3834,7 @@ void main() { }`;var NO=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){let r=new bp,i=e.properties.get(r);i.__webglTexture=t.texture,(t.depthNear!==n.depthNear||t.depthFar!==n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new Uh({vertexShader:jO,fragmentShader:MO,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Mh(new My(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},PO=class extends vf{constructor(e,t){super();let n=this,r=null,i=1,a=null,o=`local-floor`,s=1,c=null,l=null,u=null,d=null,f=null,p=null,m=new NO,h=t.getContextAttributes(),g=null,_=null,v=[],y=[],b=new U,x=null,S=new Jh;S.viewport=new xp;let C=new Jh;C.viewport=new xp;let w=[S,C],T=new xx,E=null,D=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=v[e];return t===void 0&&(t=new ng,v[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=v[e];return t===void 0&&(t=new ng,v[e]=t),t.getGripSpace()},this.getHand=function(e){let t=v[e];return t===void 0&&(t=new ng,v[e]=t),t.getHandSpace()};function O(e){let t=y.indexOf(e.inputSource);if(t===-1)return;let n=v[t];n!==void 0&&(n.update(e.inputSource,e.frame,c||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function k(){r.removeEventListener(`select`,O),r.removeEventListener(`selectstart`,O),r.removeEventListener(`selectend`,O),r.removeEventListener(`squeeze`,O),r.removeEventListener(`squeezestart`,O),r.removeEventListener(`squeezeend`,O),r.removeEventListener(`end`,k),r.removeEventListener(`inputsourceschange`,A);for(let e=0;e=0&&(y[r]=null,v[r].disconnect(n))}for(let t=0;t=y.length){y.push(n),r=e;break}else if(y[e]===null){y[e]=n,r=e;break}if(r===-1)break}let i=v[r];i&&i.connect(n)}}let j=new W,M=new W;function N(e,t,n){j.setFromMatrixPosition(t.matrixWorld),M.setFromMatrixPosition(n.matrixWorld);let r=j.distanceTo(M),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),c=(i[9]+1)/i[5],l=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(a[8]+1)/a[0],f=o*u,p=o*d,m=r/(-u+d),h=m*-u;if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(h),e.translateZ(m),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert(),i[10]===-1)e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse);else{let t=o+m,n=s+m,i=f-h,a=p+(r-h),u=c*s/n*t,d=l*s/n*t;e.projectionMatrix.makePerspective(i,a,u,d,t,n),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}function ee(e,t){t===null?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(r===null)return;let t=e.near,n=e.far;m.texture!==null&&(m.depthNear>0&&(t=m.depthNear),m.depthFar>0&&(n=m.depthFar)),T.near=C.near=S.near=t,T.far=C.far=S.far=n,(E!==T.near||D!==T.far)&&(r.updateRenderState({depthNear:T.near,depthFar:T.far}),E=T.near,D=T.far),S.layers.mask=e.layers.mask|2,C.layers.mask=e.layers.mask|4,T.layers.mask=S.layers.mask|C.layers.mask;let i=e.parent,a=T.cameras;ee(T,i);for(let e=0;e0&&(e.alphaTest.value=r.alphaTest);let i=t.get(r),a=i.envMap,o=i.envMapRotation;a&&(e.envMap.value=a,FO.copy(o),FO.x*=-1,FO.y*=-1,FO.z*=-1,a.isCubeTexture&&a.isRenderTargetTexture===!1&&(FO.y*=-1,FO.z*=-1),e.envMapRotation.value.setFromMatrix4(IO.makeRotationFromEuler(FO)),e.flipEnvMap.value=a.isCubeTexture&&a.isRenderTargetTexture===!1?-1:1,e.reflectivity.value=r.reflectivity,e.ior.value=r.ior,e.refractionRatio.value=r.refractionRatio),r.lightMap&&(e.lightMap.value=r.lightMap,e.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,e.lightMapTransform)),r.aoMap&&(e.aoMap.value=r.aoMap,e.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,e.aoMapTransform))}function o(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}function s(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function c(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=i*.5,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function l(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function u(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}function d(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}function f(e,t){e.metalness.value=t.metalness,t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap,n(t.metalnessMap,e.metalnessMapTransform)),e.roughness.value=t.roughness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap,n(t.roughnessMap,e.roughnessMapTransform)),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}function p(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===Wc&&e.clearcoatNormalScale.value.negate())),t.dispersion>0&&(e.dispersion.value=t.dispersion),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}function m(e,t){t.matcap&&(e.matcap.value=t.matcap)}function h(e,n){let r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function RO(e,t,n,r){let i={},a={},o=[],s=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function c(e,t){let n=t.program;r.uniformBlockBinding(e,n)}function l(e,n){let o=i[e.id];o===void 0&&(m(e),o=u(e),i[e.id]=o,e.addEventListener(`dispose`,g));let s=n.program;r.updateUBOMapping(e,s);let c=t.render.frame;a[e.id]!==c&&(f(e),a[e.id]=c)}function u(t){let n=d();t.__bindingPointIndex=n;let r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,i,a),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}function d(){for(let e=0;e0&&(n+=r-i),e.__size=n,e.__cache={},this}function h(e){let t={boundary:0,storage:0};return typeof e==`number`||typeof e==`boolean`?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn(`THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.`):console.warn(`THREE.WebGLRenderer: Unsupported uniform value type.`,e),t}function g(t){let n=t.target;n.removeEventListener(`dispose`,g);let r=o.indexOf(n.__bindingPointIndex);o.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}function _(){for(let t in i)e.deleteBuffer(i[t]);o=[],i={},a={}}return{bind:c,update:l,dispose:_}}var zO=class{constructor(e={}){let{canvas:t=tp(),context:n=null,depth:r=!0,stencil:i=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:s=!0,preserveDrawingBuffer:c=!1,powerPreference:l=`default`,failIfMajorPerformanceCaveat:u=!1,reverseDepthBuffer:d=!1}=e;this.isWebGLRenderer=!0;let f;if(n!==null){if(typeof WebGLRenderingContext<`u`&&n instanceof WebGLRenderingContext)throw Error(`THREE.WebGLRenderer: WebGL 1 is not supported since r163.`);f=n.getContextAttributes().alpha}else f=a;let p=new Uint32Array(4),m=new Int32Array(4),h=null,g=null,_=[],v=[];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=kl,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let y=this,b=!1;this._outputColorSpace=Ed;let x=0,S=0,C=null,w=-1,T=null,E=new xp,D=new xp,O=null,k=new K(0),A=0,j=t.width,M=t.height,N=1,ee=null,te=null,P=new xp(0,0,j,M),ne=new xp(0,0,j,M),re=!1,ie=new i_,ae=!1,oe=!1,se=new G,ce=new G,le=new W,ue=new xp,de={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},fe=!1;function pe(){return C===null?N:1}let F=n;function me(e,n){return t.getContext(e,n)}try{let e={alpha:!0,depth:r,stencil:i,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:l,failIfMajorPerformanceCaveat:u};if(`setAttribute`in t&&t.setAttribute(`data-engine`,`three.js r${Mc}`),t.addEventListener(`webglcontextlost`,ze,!1),t.addEventListener(`webglcontextrestored`,Be,!1),t.addEventListener(`webglcontextcreationerror`,Ve,!1),F===null){let t=`webgl2`;if(F=me(t,e),F===null)throw me(t)?Error(`Error creating WebGL context with your selected attributes.`):Error(`Error creating WebGL context.`)}}catch(e){throw console.error(`THREE.WebGLRenderer: `+e.message),e}let he,ge,I,_e,L,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie;function Le(){he=new vE(F),he.init(),Pe=new AO(F,he),ge=new qT(F,he,e,Pe),I=new OO(F,he),ge.reverseDepthBuffer&&d&&I.buffers.depth.setReversed(!0),_e=new xE(F),L=new fO,ve=new kO(F,he,I,L,ge,Pe,_e),ye=new YT(y),be=new _E(y),xe=new aC(F),Fe=new GT(F,xe),Se=new yE(F,xe,_e,Fe),Ce=new CE(F,Se,xe,_e),je=new SE(F,ge,ve),Oe=new JT(L),we=new dO(y,ye,be,he,ge,Fe,Oe),Te=new LO(y,L),Ee=new gO,De=new CO(he),Ae=new WT(y,ye,be,I,Ce,f,s),ke=new EO(y,Ce,ge),Ie=new RO(F,_e,ge,I),Me=new KT(F,he,_e),Ne=new bE(F,he,_e),_e.programs=we.programs,y.capabilities=ge,y.extensions=he,y.properties=L,y.renderLists=Ee,y.shadowMap=ke,y.state=I,y.info=_e}Le();let Re=new PO(y,F);this.xr=Re,this.getContext=function(){return F},this.getContextAttributes=function(){return F.getContextAttributes()},this.forceContextLoss=function(){let e=he.get(`WEBGL_lose_context`);e&&e.loseContext()},this.forceContextRestore=function(){let e=he.get(`WEBGL_lose_context`);e&&e.restoreContext()},this.getPixelRatio=function(){return N},this.setPixelRatio=function(e){e!==void 0&&(N=e,this.setSize(j,M,!1))},this.getSize=function(e){return e.set(j,M)},this.setSize=function(e,n,r=!0){if(Re.isPresenting){console.warn(`THREE.WebGLRenderer: Can't change size while VR device is presenting.`);return}j=e,M=n,t.width=Math.floor(e*N),t.height=Math.floor(n*N),r===!0&&(t.style.width=e+`px`,t.style.height=n+`px`),this.setViewport(0,0,e,n)},this.getDrawingBufferSize=function(e){return e.set(j*N,M*N).floor()},this.setDrawingBufferSize=function(e,n,r){j=e,M=n,N=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(E)},this.getViewport=function(e){return e.copy(P)},this.setViewport=function(e,t,n,r){e.isVector4?P.set(e.x,e.y,e.z,e.w):P.set(e,t,n,r),I.viewport(E.copy(P).multiplyScalar(N).round())},this.getScissor=function(e){return e.copy(ne)},this.setScissor=function(e,t,n,r){e.isVector4?ne.set(e.x,e.y,e.z,e.w):ne.set(e,t,n,r),I.scissor(D.copy(ne).multiplyScalar(N).round())},this.getScissorTest=function(){return re},this.setScissorTest=function(e){I.setScissorTest(re=e)},this.setOpaqueSort=function(e){ee=e},this.setTransparentSort=function(e){te=e},this.getClearColor=function(e){return e.copy(Ae.getClearColor())},this.setClearColor=function(){Ae.setClearColor(...arguments)},this.getClearAlpha=function(){return Ae.getClearAlpha()},this.setClearAlpha=function(){Ae.setClearAlpha(...arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;if(e){let e=!1;if(C!==null){let t=C.texture.format;e=t===Eu||t===wu||t===Su}if(e){let e=C.texture.type,t=e===iu||e===lu||e===su||e===mu||e===fu||e===pu,n=Ae.getClearColor(),r=Ae.getClearAlpha(),i=n.r,a=n.g,o=n.b;t?(p[0]=i,p[1]=a,p[2]=o,p[3]=r,F.clearBufferuiv(F.COLOR,0,p)):(m[0]=i,m[1]=a,m[2]=o,m[3]=r,F.clearBufferiv(F.COLOR,0,m))}else r|=F.COLOR_BUFFER_BIT}t&&(r|=F.DEPTH_BUFFER_BIT),n&&(r|=F.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),F.clear(r)},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`,ze,!1),t.removeEventListener(`webglcontextrestored`,Be,!1),t.removeEventListener(`webglcontextcreationerror`,Ve,!1),Ae.dispose(),Ee.dispose(),De.dispose(),L.dispose(),ye.dispose(),be.dispose(),Ce.dispose(),Fe.dispose(),Ie.dispose(),we.dispose(),Re.dispose(),Re.removeEventListener(`sessionstart`,Je),Re.removeEventListener(`sessionend`,Ye),Xe.stop()};function ze(e){e.preventDefault(),console.log(`THREE.WebGLRenderer: Context Lost.`),b=!0}function Be(){console.log(`THREE.WebGLRenderer: Context Restored.`),b=!1;let e=_e.autoReset,t=ke.enabled,n=ke.autoUpdate,r=ke.needsUpdate,i=ke.type;Le(),_e.autoReset=e,ke.enabled=t,ke.autoUpdate=n,ke.needsUpdate=r,ke.type=i}function Ve(e){console.error(`THREE.WebGLRenderer: A WebGL context could not be created. Reason: `,e.statusMessage)}function He(e){let t=e.target;t.removeEventListener(`dispose`,He),Ue(t)}function Ue(e){We(e),L.remove(e)}function We(e){let t=L.get(e).programs;t!==void 0&&(t.forEach(function(e){we.releaseProgram(e)}),e.isShaderMaterial&&we.releaseShaderCache(e))}this.renderBufferDirect=function(e,t,n,r,i,a){t===null&&(t=de);let o=i.isMesh&&i.matrixWorld.determinant()<0,s=at(e,t,n,r,i);I.setMaterial(r,o);let c=n.index,l=1;if(r.wireframe===!0){if(c=Se.getWireframeAttribute(n),c===void 0)return;l=2}let u=n.drawRange,d=n.attributes.position,f=u.start*l,p=(u.start+u.count)*l;a!==null&&(f=Math.max(f,a.start*l),p=Math.min(p,(a.start+a.count)*l)),c===null?d!=null&&(f=Math.max(f,0),p=Math.min(p,d.count)):(f=Math.max(f,0),p=Math.min(p,c.count));let m=p-f;if(m<0||m===1/0)return;Fe.setup(i,r,s,n,c);let h,g=Me;if(c!==null&&(h=xe.get(c),g=Ne,g.setIndex(h)),i.isMesh)r.wireframe===!0?(I.setLineWidth(r.wireframeLinewidth*pe()),g.setMode(F.LINES)):g.setMode(F.TRIANGLES);else if(i.isLine){let e=r.linewidth;e===void 0&&(e=1),I.setLineWidth(e*pe()),i.isLineSegments?g.setMode(F.LINES):i.isLineLoop?g.setMode(F.LINE_LOOP):g.setMode(F.LINE_STRIP)}else i.isPoints?g.setMode(F.POINTS):i.isSprite&&g.setMode(F.TRIANGLES);if(i.isBatchedMesh)if(i._multiDrawInstances!==null)rp(`THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.`),g.renderMultiDrawInstances(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount,i._multiDrawInstances);else if(he.get(`WEBGL_multi_draw`))g.renderMultiDraw(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount);else{let e=i._multiDrawStarts,t=i._multiDrawCounts,n=i._multiDrawCount,a=c?xe.get(c).bytesPerElement:1,o=L.get(r).currentProgram.getUniforms();for(let r=0;r{function n(){if(r.forEach(function(e){let t=L.get(e),n=t.currentProgram;n.isReady()&&r.delete(e)}),r.size===0){t(e);return}setTimeout(n,10)}he.get(`KHR_parallel_shader_compile`)===null?setTimeout(n,10):n()})};let Ke=null;function qe(e){Ke&&Ke(e)}function Je(){Xe.stop()}function Ye(){Xe.start()}let Xe=new iC;Xe.setAnimationLoop(qe),typeof self<`u`&&Xe.setContext(self),this.setAnimationLoop=function(e){Ke=e,Re.setAnimationLoop(e),e===null?Xe.stop():Xe.start()},Re.addEventListener(`sessionstart`,Je),Re.addEventListener(`sessionend`,Ye),this.render=function(e,t){if(t!==void 0&&t.isCamera!==!0){console.error(`THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.`);return}if(b===!0)return;if(e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t.parent===null&&t.matrixWorldAutoUpdate===!0&&t.updateMatrixWorld(),Re.enabled===!0&&Re.isPresenting===!0&&(Re.cameraAutoUpdate===!0&&Re.updateCamera(t),t=Re.getCamera()),e.isScene===!0&&e.onBeforeRender(y,e,t,C),g=De.get(e,v.length),g.init(t),v.push(g),ce.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),ie.setFromProjectionMatrix(ce),oe=this.localClippingEnabled,ae=Oe.init(this.clippingPlanes,oe),h=Ee.get(e,_.length),h.init(),_.push(h),Re.enabled===!0&&Re.isPresenting===!0){let e=y.xr.getDepthSensingMesh();e!==null&&Ze(e,t,-1/0,y.sortObjects)}Ze(e,t,0,y.sortObjects),h.finish(),y.sortObjects===!0&&h.sort(ee,te),fe=Re.enabled===!1||Re.isPresenting===!1||Re.hasDepthSensing()===!1,fe&&Ae.addToRenderList(h,e),this.info.render.frame++,ae===!0&&Oe.beginShadows();let n=g.state.shadowsArray;ke.render(n,e,t),ae===!0&&Oe.endShadows(),this.info.autoReset===!0&&this.info.reset();let r=h.opaque,i=h.transmissive;if(g.setupLights(),t.isArrayCamera){let n=t.cameras;if(i.length>0)for(let t=0,a=n.length;t0&&$e(r,i,e,t),fe&&Ae.render(e),Qe(h,e,t);C!==null&&S===0&&(ve.updateMultisampleRenderTarget(C),ve.updateRenderTargetMipmap(C)),e.isScene===!0&&e.onAfterRender(y,e,t),Fe.resetDefaultState(),w=-1,T=null,v.pop(),v.length>0?(g=v[v.length-1],ae===!0&&Oe.setGlobalState(y.clippingPlanes,g.state.camera)):g=null,_.pop(),h=_.length>0?_[_.length-1]:null};function Ze(e,t,n,r){if(e.visible===!1)return;let i=e.layers.test(t.layers);if(i){if(e.isGroup)n=e.renderOrder;else if(e.isLOD)e.autoUpdate===!0&&e.update(t);else if(e.isLight)g.pushLight(e),e.castShadow&&g.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||ie.intersectsSprite(e)){r&&ue.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ce);let t=Ce.update(e),i=e.material;i.visible&&h.push(e,t,i,n,ue.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||ie.intersectsObject(e))){let t=Ce.update(e),i=e.material;if(r&&(e.boundingSphere===void 0?(t.boundingSphere===null&&t.computeBoundingSphere(),ue.copy(t.boundingSphere.center)):(e.boundingSphere===null&&e.computeBoundingSphere(),ue.copy(e.boundingSphere.center)),ue.applyMatrix4(e.matrixWorld).applyMatrix4(ce)),Array.isArray(i)){let r=t.groups;for(let a=0,o=r.length;a0&&et(i,t,n),a.length>0&&et(a,t,n),o.length>0&&et(o,t,n),I.buffers.depth.setTest(!0),I.buffers.depth.setMask(!0),I.buffers.color.setMask(!0),I.setPolygonOffset(!1)}function $e(e,t,n,r){let a=n.isScene===!0?n.overrideMaterial:null;if(a!==null)return;g.state.transmissionRenderTarget[r.id]===void 0&&(g.state.transmissionRenderTarget[r.id]=new Cp(1,1,{generateMipmaps:!0,type:he.has(`EXT_color_buffer_half_float`)||he.has(`EXT_color_buffer_float`)?du:iu,minFilter:nu,samples:4,stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:up.workingColorSpace}));let o=g.state.transmissionRenderTarget[r.id],s=r.viewport||E;o.setSize(s.z*y.transmissionResolutionScale,s.w*y.transmissionResolutionScale);let c=y.getRenderTarget();y.setRenderTarget(o),y.getClearColor(k),A=y.getClearAlpha(),A<1&&y.setClearColor(16777215,.5),y.clear(),fe&&Ae.render(n);let l=y.toneMapping;y.toneMapping=kl;let u=r.viewport;if(r.viewport!==void 0&&(r.viewport=void 0),g.setupLightsView(r),ae===!0&&Oe.setGlobalState(y.clippingPlanes,r),et(e,n,r),ve.updateMultisampleRenderTarget(o),ve.updateRenderTargetMipmap(o),he.has(`WEBGL_multisampled_render_to_texture`)===!1){let e=!1;for(let i=0,a=t.length;i0),d=!!n.morphAttributes.position,f=!!n.morphAttributes.normal,p=!!n.morphAttributes.color,m=kl;r.toneMapped&&(C===null||C.isXRRenderTarget===!0)&&(m=y.toneMapping);let h=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,_=h===void 0?0:h.length,v=L.get(r),b=g.state.lights;if(ae===!0&&(oe===!0||e!==T)){let t=e===T&&r.id===w;Oe.setState(r,e,t)}let x=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==b.state.version?x=!0:v.outputColorSpace===s?i.isBatchedMesh&&v.batching===!1||!i.isBatchedMesh&&v.batching===!0||i.isBatchedMesh&&v.batchingColor===!0&&i.colorTexture===null||i.isBatchedMesh&&v.batchingColor===!1&&i.colorTexture!==null||i.isInstancedMesh&&v.instancing===!1||!i.isInstancedMesh&&v.instancing===!0||i.isSkinnedMesh&&v.skinning===!1||!i.isSkinnedMesh&&v.skinning===!0||i.isInstancedMesh&&v.instancingColor===!0&&i.instanceColor===null||i.isInstancedMesh&&v.instancingColor===!1&&i.instanceColor!==null||i.isInstancedMesh&&v.instancingMorph===!0&&i.morphTexture===null||i.isInstancedMesh&&v.instancingMorph===!1&&i.morphTexture!==null?x=!0:v.envMap===c?r.fog===!0&&v.fog!==a||v.numClippingPlanes!==void 0&&(v.numClippingPlanes!==Oe.numPlanes||v.numIntersection!==Oe.numIntersection)?x=!0:v.vertexAlphas===l&&v.vertexTangents===u&&v.morphTargets===d&&v.morphNormals===f&&v.morphColors===p&&v.toneMapping===m?v.morphTargetsCount!==_&&(x=!0):x=!0:x=!0:x=!0:(x=!0,v.__version=r.version);let S=v.currentProgram;x===!0&&(S=nt(r,t,i));let E=!1,D=!1,O=!1,k=S.getUniforms(),A=v.uniforms;if(I.useProgram(S.program)&&(E=!0,D=!0,O=!0),r.id!==w&&(w=r.id,D=!0),E||T!==e){let t=I.buffers.depth.getReversed();t?(se.copy(e.projectionMatrix),ap(se),op(se),k.setValue(F,`projectionMatrix`,se)):k.setValue(F,`projectionMatrix`,e.projectionMatrix),k.setValue(F,`viewMatrix`,e.matrixWorldInverse);let n=k.map.cameraPosition;n!==void 0&&n.setValue(F,le.setFromMatrixPosition(e.matrixWorld)),ge.logarithmicDepthBuffer&&k.setValue(F,`logDepthBufFC`,2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&k.setValue(F,`isOrthographic`,e.isOrthographicCamera===!0),T!==e&&(T=e,D=!0,O=!0)}if(i.isSkinnedMesh){k.setOptional(F,i,`bindMatrix`),k.setOptional(F,i,`bindMatrixInverse`);let e=i.skeleton;e&&(e.boneTexture===null&&e.computeBoneTexture(),k.setValue(F,`boneTexture`,e.boneTexture,ve))}i.isBatchedMesh&&(k.setOptional(F,i,`batchingTexture`),k.setValue(F,`batchingTexture`,i._matricesTexture,ve),k.setOptional(F,i,`batchingIdTexture`),k.setValue(F,`batchingIdTexture`,i._indirectTexture,ve),k.setOptional(F,i,`batchingColorTexture`),i._colorsTexture!==null&&k.setValue(F,`batchingColorTexture`,i._colorsTexture,ve));let j=n.morphAttributes;if((j.position!==void 0||j.normal!==void 0||j.color!==void 0)&&je.update(i,n,S),(D||v.receiveShadow!==i.receiveShadow)&&(v.receiveShadow=i.receiveShadow,k.setValue(F,`receiveShadow`,i.receiveShadow)),r.isMeshGouraudMaterial&&r.envMap!==null&&(A.envMap.value=c,A.flipEnvMap.value=c.isCubeTexture&&c.isRenderTargetTexture===!1?-1:1),r.isMeshStandardMaterial&&r.envMap===null&&t.environment!==null&&(A.envMapIntensity.value=t.environmentIntensity),D&&(k.setValue(F,`toneMappingExposure`,y.toneMappingExposure),v.needsLights&&ot(A,O),a&&r.fog===!0&&Te.refreshFogUniforms(A,a),Te.refreshMaterialUniforms(A,r,N,M,g.state.transmissionRenderTarget[e.id]),AD.upload(F,rt(v),A,ve)),r.isShaderMaterial&&r.uniformsNeedUpdate===!0&&(AD.upload(F,rt(v),A,ve),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&k.setValue(F,`center`,i.center),k.setValue(F,`modelViewMatrix`,i.modelViewMatrix),k.setValue(F,`normalMatrix`,i.normalMatrix),k.setValue(F,`modelMatrix`,i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){let e=r.uniformsGroups;for(let t=0,n=e.length;t0&&ve.useMultisampledRTT(e)===!1?L.get(e).__webglMultisampledFramebuffer:Array.isArray(l)?l[n]:l,E.copy(e.viewport),D.copy(e.scissor),O=e.scissorTest}else E.copy(P).multiplyScalar(N).floor(),D.copy(ne).multiplyScalar(N).floor(),O=re;n!==0&&(i=ct);let s=I.bindFramebuffer(F.FRAMEBUFFER,i);if(s&&r&&I.drawBuffers(e,i),I.viewport(E),I.scissor(D),I.setScissorTest(O),a){let r=L.get(e.texture);F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(o){let r=L.get(e.texture),i=t;F.framebufferTextureLayer(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,r.__webglTexture,n,i)}else if(e!==null&&n!==0){let t=L.get(e.texture);F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_2D,t.__webglTexture,n)}w=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);return}let c=L.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c){I.bindFramebuffer(F.FRAMEBUFFER,c);try{let o=e.textures[s],c=o.format,l=o.type;if(!ge.textureFormatReadable(c)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.`);return}if(!ge.textureTypeReadable(l)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.`);return}t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&(e.textures.length>1&&F.readBuffer(F.COLOR_ATTACHMENT0+s),F.readPixels(t,n,r,i,Pe.convert(c),Pe.convert(l),a))}finally{let e=C===null?null:L.get(C).__webglFramebuffer;I.bindFramebuffer(F.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget))throw Error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);let c=L.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c)if(t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i){I.bindFramebuffer(F.FRAMEBUFFER,c);let o=e.textures[s],l=o.format,u=o.type;if(!ge.textureFormatReadable(l))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.`);if(!ge.textureTypeReadable(u))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.`);let d=F.createBuffer();F.bindBuffer(F.PIXEL_PACK_BUFFER,d),F.bufferData(F.PIXEL_PACK_BUFFER,a.byteLength,F.STREAM_READ),e.textures.length>1&&F.readBuffer(F.COLOR_ATTACHMENT0+s),F.readPixels(t,n,r,i,Pe.convert(l),Pe.convert(u),0);let f=C===null?null:L.get(C).__webglFramebuffer;I.bindFramebuffer(F.FRAMEBUFFER,f);let p=F.fenceSync(F.SYNC_GPU_COMMANDS_COMPLETE,0);return F.flush(),await ip(F,p,4),F.bindBuffer(F.PIXEL_PACK_BUFFER,d),F.getBufferSubData(F.PIXEL_PACK_BUFFER,0,a),F.deleteBuffer(d),F.deleteSync(p),a}else throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.`)},this.copyFramebufferToTexture=function(e,t=null,n=0){let r=2**-n,i=Math.floor(e.image.width*r),a=Math.floor(e.image.height*r),o=t===null?0:t.x,s=t===null?0:t.y;ve.setTexture2D(e,0),F.copyTexSubImage2D(F.TEXTURE_2D,n,0,0,o,s,i,a),I.unbindTexture()};let lt=F.createFramebuffer(),ut=F.createFramebuffer();this.copyTextureToTexture=function(e,t,n=null,r=null,i=0,a=null){a===null&&(i===0?a=0:(rp(`WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels.`),a=i,i=0));let o,s,c,l,u,d,f,p,m,h=e.isCompressedTexture?e.mipmaps[a]:e.image;if(n!==null)o=n.max.x-n.min.x,s=n.max.y-n.min.y,c=n.isBox3?n.max.z-n.min.z:1,l=n.min.x,u=n.min.y,d=n.isBox3?n.min.z:0;else{let t=2**-i;o=Math.floor(h.width*t),s=Math.floor(h.height*t),c=e.isDataArrayTexture?h.depth:e.isData3DTexture?Math.floor(h.depth*t):1,l=0,u=0,d=0}r===null?(f=0,p=0,m=0):(f=r.x,p=r.y,m=r.z);let g=Pe.convert(t.format),_=Pe.convert(t.type),v;t.isData3DTexture?(ve.setTexture3D(t,0),v=F.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(ve.setTexture2DArray(t,0),v=F.TEXTURE_2D_ARRAY):(ve.setTexture2D(t,0),v=F.TEXTURE_2D),F.pixelStorei(F.UNPACK_FLIP_Y_WEBGL,t.flipY),F.pixelStorei(F.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),F.pixelStorei(F.UNPACK_ALIGNMENT,t.unpackAlignment);let y=F.getParameter(F.UNPACK_ROW_LENGTH),b=F.getParameter(F.UNPACK_IMAGE_HEIGHT),x=F.getParameter(F.UNPACK_SKIP_PIXELS),S=F.getParameter(F.UNPACK_SKIP_ROWS),C=F.getParameter(F.UNPACK_SKIP_IMAGES);F.pixelStorei(F.UNPACK_ROW_LENGTH,h.width),F.pixelStorei(F.UNPACK_IMAGE_HEIGHT,h.height),F.pixelStorei(F.UNPACK_SKIP_PIXELS,l),F.pixelStorei(F.UNPACK_SKIP_ROWS,u),F.pixelStorei(F.UNPACK_SKIP_IMAGES,d);let w=e.isDataArrayTexture||e.isData3DTexture,T=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let n=L.get(e),r=L.get(t),h=L.get(n.__renderTarget),g=L.get(r.__renderTarget);I.bindFramebuffer(F.READ_FRAMEBUFFER,h.__webglFramebuffer),I.bindFramebuffer(F.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let n=0;n{e.delete(t)},n=()=>{e.clear()},r=n=>{e.add(n);let r=()=>t(n);return BO(r),{off:r}},i=(...t)=>Promise.all(Array.from(e).map(e=>e(...t)));return{on:r,off:t,trigger:i,clear:n}}const HO=new WeakMap,UO=(...e)=>{var t;let n=e[0],r=(t=Ao())?.proxy;if(r==null&&!Qi())throw Error(`injectLocal must be called in setup`);return r&&HO.has(r)&&n in HO.get(r)?HO.get(r)[n]:Zi(...e)},WO=typeof window<`u`&&typeof document<`u`,GO=typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,KO=e=>e!==void 0,qO=e=>e!=null,JO=Object.prototype.toString,YO=e=>JO.call(e)===`[object Object]`,XO=()=>{};function ZO(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function QO(e,t={}){let n,r,i=XO,a=e=>{clearTimeout(e),i(),i=XO},o,s=s=>{let c=B(e),l=B(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&(a(r),r=null),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=null,e(s())},c)})};return s}function $O(e){let t=Object.create(null);return n=>{let r=t[n];return r||(t[n]=e(n))}}const ek=/\B([A-Z])/g,tk=$O(e=>e.replace(ek,`-$1`).toLowerCase()),nk=/-(\w)/g,rk=$O(e=>e.replace(nk,(e,t)=>t?t.toUpperCase():``));function ik(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function ak(e,t,n=!1){return t.reduce((t,r)=>(r in e&&(!n||e[r]!==void 0)&&(t[r]=e[r]),t),{})}function ok(e){return e||Ao()}function sk(e){return Array.isArray(e)?e:[e]}function ck(e,t=200,n={}){return ZO(QO(t,n),e)}function lk(e,t=200,n={}){let r=R(e.value),i=ck(()=>{r.value=e.value},t,n);return V(e,()=>i()),r}function uk(e,t={}){if(!pn(e))return Sn(e);let n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(let r in e.value)n[r]=xn(()=>({get(){return e.value[r]},set(n){var i;let a=(i=B(t.replaceRef))??!0;if(a)if(Array.isArray(e.value)){let t=[...e.value];t[r]=n,e.value=t}else{let t={...e.value,[r]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}else e.value[r]=n}}));return n}const dk=B;function fk(e,t=!0,n){let r=ok();r?$r(e,n):t?e():Kn(e)}function pk(e,t=1e3,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=null,o=z(!1);function s(){a&&(clearInterval(a),a=null)}function c(){o.value=!1,s()}function l(){let n=B(t);n<=0||(o.value=!0,i&&e(),s(),o.value&&(a=setInterval(e,n)))}if(r&&WO&&l(),pn(t)||typeof t==`function`){let e=V(t,()=>{o.value&&WO&&l()});BO(e)}return BO(c),{isActive:o,pause:c,resume:l}}function mk(e,t,n){return V(e,t,{...n,immediate:!0})}const hk=WO?window:void 0,gk=WO?window.document:void 0,_k=WO?window.navigator:void 0,vk=WO?window.location:void 0;function yk(e){var t;let n=B(e);return(t=n?.$el)??n}function bk(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=H(()=>{let t=sk(B(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),a=mk(()=>{var t,n;return[(n=(t=i.value)?.map(e=>yk(e)))??[hk].filter(e=>e!=null),sk(B(i.value?e[1]:e[0])),sk(_n(i.value?e[2]:e[1])),B(i.value?e[3]:e[2])]},([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=YO(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`}),o=()=>{a(),n()};return BO(n),o}function xk(){let e=z(!1),t=Ao();return t&&$r(()=>{e.value=!0},t),e}function Sk(e){let t=xk();return H(()=>(t.value,!!e()))}function Ck(e,t,n={}){let{window:r=hk,...i}=n,a,o=Sk(()=>r&&`MutationObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e),n=sk(t).map(yk).filter(qO);return new Set(n)}),l=V(()=>c.value,e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),u=()=>a?.takeRecords(),d=()=>{l(),s()};return BO(d),{isSupported:o,stop:d,takeRecords:u}}function wk(e,t={}){let{immediate:n=!0,fpsLimit:r=void 0,window:i=hk,once:a=!1}=t,o=z(!1),s=H(()=>r?1e3/B(r):null),c=0,l=null;function u(t){if(!o.value||!i)return;c||=t;let n=t-c;if(s.value&&nn&&`matchMedia`in n&&typeof n.matchMedia==`function`),a=z(typeof r==`number`),o=z(),s=z(!1),c=e=>{s.value=e.matches};return Aa(()=>{if(a.value){a.value=!i.value;let t=B(e).split(`,`);s.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=ik(n[1])),i&&a&&(a=r<=ik(i[1])),t?!a:a});return}i.value&&(o.value=n.matchMedia(B(e)),s.value=o.value.matches)}),bk(o,`change`,c,{passive:!0}),H(()=>s.value)}function Ok(e){return JSON.parse(JSON.stringify(e))}function kk(e={}){let{window:t=hk}=e,n=z(1),r=Dk(()=>`(resolution: ${n.value}dppx)`,e),i=XO;return t&&(i=mk(r,()=>n.value=t.devicePixelRatio)),{pixelRatio:tn(n),stop:i}}function Ak(e,t,n={}){let{window:r=hk,...i}=n,a,o=Sk(()=>r&&`ResizeObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e);return Array.isArray(t)?t.map(e=>yk(e)):[yk(t)]}),l=V(c,e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),u=()=>{s(),l()};return BO(u),{isSupported:o,stop:u}}function jk(e,t={}){let{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:a=!0,updateTiming:o=`sync`}=t,s=z(0),c=z(0),l=z(0),u=z(0),d=z(0),f=z(0),p=z(0),m=z(0);function h(){let t=yk(e);if(!t){n&&(s.value=0,c.value=0,l.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0);return}let r=t.getBoundingClientRect();s.value=r.height,c.value=r.bottom,l.value=r.left,u.value=r.right,d.value=r.top,f.value=r.width,p.value=r.x,m.value=r.y}function g(){o===`sync`?h():o===`next-frame`&&requestAnimationFrame(()=>h())}return Ak(e,g),V(()=>yk(e),e=>!e&&g()),Ck(e,g,{attributeFilter:[`style`,`class`]}),i&&bk(`scroll`,g,{capture:!0,passive:!0}),r&&bk(`resize`,g,{passive:!0}),fk(()=>{a&&g()}),{height:s,bottom:c,left:l,right:u,top:d,width:f,x:p,y:m,update:g}}function Mk(e,t={width:0,height:0},n={}){let{window:r=hk,box:i=`content-box`}=n,a=H(()=>{var t,n;return(n=(t=yk(e))?.namespaceURI)?.includes(`svg`)}),o=z(t.width),s=z(t.height),{stop:c}=Ak(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=yk(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=sk(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);fk(()=>{let n=yk(e);n&&(o.value=`offsetWidth`in n?n.offsetWidth:t.width,s.value=`offsetHeight`in n?n.offsetHeight:t.height)});let l=V(()=>yk(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function u(){c(),l()}return{width:o,height:s,stop:u}}function Nk(e){var t;let n=z(0);if(typeof performance>`u`)return n;let r=(t=e?.every)??10,i=performance.now(),a=0;return wk(()=>{if(a+=1,a>=r){let e=performance.now(),t=e-i;n.value=Math.round(1e3/(t/a)),i=e,a=0}}),n}function Pk(e={}){let t=R(),n=Sk(()=>typeof performance<`u`&&`memory`in performance);if(n.value){let{interval:n=1e3}=e;pk(()=>{t.value=performance.memory},n,{immediate:e.immediate,immediateCallback:e.immediateCallback})}return{isSupported:n,memory:t}}const Fk={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},Ik=Object.keys(Fk);function Lk(e={}){let{target:t=hk}=e,n=z(!1),r=R(e.initialValue||{});Object.assign(r.value,Fk,r.value);let i=t=>{n.value=!0,!(e.pointerTypes&&!e.pointerTypes.includes(t.pointerType))&&(r.value=ak(t,Ik,!1))};if(t){let e={passive:!0};bk(t,[`pointerdown`,`pointermove`,`pointerup`],i,e),bk(t,`pointerleave`,()=>n.value=!1,e)}return{...uk(r),isInside:n}}const Rk=[{max:6e4,value:1e3,name:`second`},{max:276e4,value:6e4,name:`minute`},{max:72e6,value:36e5,name:`hour`},{max:5184e5,value:864e5,name:`day`},{max:24192e5,value:6048e5,name:`week`},{max:28512e6,value:2592e6,name:`month`},{max:1/0,value:31536e6,name:`year`}];function zk(e,t,n,r={}){var i,a,o;let{clone:s=!1,passive:c=!1,eventName:l,deep:u=!1,defaultValue:d,shouldEmit:f}=r,p=Ao(),m=n||p?.emit||(i=p?.$emit)?.bind(p)||(o=(a=p?.proxy)?.$emit)?.bind(p?.proxy),h=l;t||=`modelValue`,h||=`update:${t.toString()}`;let g=e=>s?typeof s==`function`?s(e):Ok(e):e,_=()=>KO(e[t])?g(e[t]):d,v=e=>{f?f(e)&&m(h,e):m(h,e)};if(c){let n=_(),r=R(n),i=!1;return V(()=>e[t],e=>{i||(i=!0,r.value=g(e),Kn(()=>i=!1))}),V(r,n=>{!i&&(n!==e[t]||u)&&v(n)},{deep:u}),r}else return H({get(){return _()},set(e){v(e)}})}function Bk(e={}){let{window:t=hk,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=z(n),c=z(r),l=()=>{if(t)if(o===`outer`)s.value=t.outerWidth,c.value=t.outerHeight;else if(o===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};l(),fk(l);let u={passive:!0};if(bk(`resize`,l,u),t&&o===`visual`&&t.visualViewport&&bk(t.visualViewport,`resize`,l,u),i){let e=Dk(`(orientation: portrait)`);V(e,()=>l())}return{width:s,height:c}}var Vk=Object.defineProperty,Hk=(e,t,n)=>t in e?Vk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uk=(e,t,n)=>Hk(e,typeof t==`symbol`?t:t+``,n);const Wk=`@tresjs/core`,Gk=`module`,Kk=`4.3.6`,qk=`pnpm@10.6.3`,Jk=`Declarative ThreeJS using Vue Components`,Yk=`Alvaro Saburido (https://github.com/alvarosabu/)`,Xk=`MIT`,Zk={type:`git`,url:`git+https://github.com/Tresjs/tres.git`},Qk=[`vue`,`3d`,`threejs`,`three`,`threejs-vue`],$k=!1,eA={".":{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`},"./*":`./*`},tA=`./dist/tres.js`,nA=`./dist/tres.js`,rA=`./dist/index.d.ts`,iA=[`*.d.ts`,`dist`],aA={access:`public`},oA={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`},sA={three:`>=0.133`,vue:`>=3.4`},cA={"@alvarosabu/utils":`^3.2.0`,"@vue/devtools-api":`^6.6.3`,"@vueuse/core":`^12.5.0`},lA={"@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`},uA={name:Wk,type:Gk,version:Kk,packageManager:qk,description:Jk,author:Yk,license:Xk,repository:Zk,keywords:Qk,sideEffects:$k,exports:eA,main:tA,module:nA,types:rA,files:iA,publishConfig:aA,scripts:oA,peerDependencies:sA,dependencies:cA,devDependencies:lA};function dA(e){let t={nodes:{},materials:{}};return e&&e.traverse(e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material)}),t}async function fA(e,t,n,r,i){let{logError:a}=xj(),o=new e;return i&&i(o),n&&n(o),await new Promise((e,n)=>{o.load(t,t=>{let n=t;n.scene&&Object.assign(n,dA(n.scene)),e(n)},r,e=>{a(`[useLoader] - Failed to load resource`,e),n(e)})})}var pA=class extends Mh{constructor(...e){super(...e),Uk(this,`type`,`HightlightMesh`),Uk(this,`createTime`),this.createTime=Date.now()}onBeforeRender(){let e=(Date.now()-this.createTime)/1e3,t=1+.07*Math.sin(2.5*e);this.scale.set(t,t,t)}};function mA(e){return typeof e>`u`}function hA(e){return Array.isArray(e)}function gA(e){return typeof e==`number`}function _A(e){return typeof e==`string`}function vA(e){return typeof e==`function`}function yA(e){return e===Object(e)&&!hA(e)&&!vA(e)}function bA(e){return yA(e)&&!!e.isObject3D}function xA(e){return yA(e)&&!!e.isColor}function SA(e){return e!=null&&(typeof e==`string`||typeof e==`number`||xA(e))}function CA(e){return typeof e==`object`&&!!e&&`set`in e&&typeof e.set==`function`}function wA(e){return CA(e)&&`copy`in e&&typeof e.copy==`function`}function TA(e){return!!(e!=null&&e.constructor)}function EA(e){return e instanceof dm}function DA(e){return yA(e)&&!!e.isCamera}function OA(e){return yA(e)&&!!e.isBufferGeometry}function kA(e){return yA(e)&&!!e.isMaterial}function AA(e){return yA(e)&&!!e.isLight}function jA(e){return yA(e)&&!!e.isFog}function MA(e){return yA(e)&&!!e.isScene}function NA(e){return bA(e)||OA(e)||kA(e)||jA(e)}function PA(e){return yA(e)&&!!e.isPrimitive}const FA=(e,t)=>{for(let n of Object.keys(t))t[n]instanceof Object&&Object.assign(t[n],FA(e[n],t[n]));return Object.assign(e||{},t),e},IA=`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`,LA=HA(IA);function RA(e){return e&&e.nodeType===1}function zA(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const BA=/\B([A-Z])/g;function VA(e){return e.replace(BA,`-$1`).toLowerCase()}function HA(e,t){let n=Object.create(null),r=e.split(`,`);for(let e=0;e!!n[e.toLowerCase()]:e=>!!n[e]}const UA=(e,t)=>{if(!t)return;let n=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return n?.reduce((e,t)=>e&&e[t],e)},WA=(e,t,n)=>{let r=Array.isArray(t)?t:t.match(/([^[.\]])+/g);r&&r.reduce((e,t,i)=>(e[t]===void 0&&(e[t]={}),i===r.length-1&&(e[t]=n),e[t]),e)};function GA(e,t){if(RA(e)&&RA(t)){let n=e.attributes,r=t.attributes;return n.length===r.length?Array.from(n).every(({name:e,value:n})=>t.getAttribute(e)===n):!1}if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!r.includes(i)||!GA(e[i],t[i]))return!1;return!0}function KA(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n{if(e.uuid===t)return e;for(let t of e.children){let e=i(t);if(e)return e}},a=i(e);if(!a){console.warn(`Object with UUID not found in the scene.`);return}let o=a;for(let e=0;eQA(e)),!(e instanceof ag)){let t=e;e&&((n=e.dispose)==null||n.call(e)),t.geometry&&t.geometry.dispose(),Array.isArray(t.material)?t.material.forEach(e=>ZA(e)):t.material&&ZA(t.material)}}function $A(e,t){let n=0;for(let r=0;rt===0?e:e.charAt(0).toUpperCase()+e.slice(1)).join(``)}const nj=/-\d+$/;function rj(e,t,n){if(_A(n)){if(nj.test(n)){let t=n.replace(nj,``),{target:r,key:i}=ej(e,t);if(!Array.isArray(r[i])){let e=r[i],t=[];t.__tresDetach=()=>{t.every(e=>mA(e))&&(r[i]=e)},r[i]=t}}let{target:r,key:i}=ej(e,n);t.__tres.previousAttach=r[i],r[i]=lj(t)}else t.__tres.previousAttach=n(e,t)}function ij(e,t,n){var r,i,a;if(_A(n)){let{target:r,key:i}=ej(e,n),a=t.__tres.previousAttach;a===void 0?delete r[i]:r[i]=a,`__tresDetach`in r&&r.__tresDetach()}else (i=(r=t.__tres)?.previousAttach)==null||i.call(r,e,t);(a=t.__tres)==null||delete a.previousAttach}function aj(e,t,n){let r=e;return r.__tres={type:`unknown`,eventCount:0,root:n,handlers:{},memoizedProps:{},objects:[],parent:null,previousAttach:null,...t},r.__tres.attach||(r.isMaterial?r.__tres.attach=`material`:r.isBufferGeometry?r.__tres.attach=`geometry`:r.isFog&&(r.__tres.attach=`fog`)),r}function oj(e){var t;let n=(t=e?.__tres)?.root;n&&n.render&&n.render.canBeInvalidated.value&&n.invalidate()}function sj(e,t,n){var r;if(!vA(e.setPixelRatio))return;let i=0;if(n&&hA(n)&&n.length>=2){let[e,r]=n;i=Gf.clamp(t,e,r)}else i=gA(n)?n:t;i!==(r=e.getPixelRatio)?.call(e)&&e.setPixelRatio(i)}function cj(e,t,n,r,i){let a=[...t.__tres.objects],o=lj(t);if(e=lj(e),o===e)return!0;let s=aj(e,t.__tres??{},i),c=t.parent??t.__tres.parent??null,l={...t.__tres.memoizedProps};delete l.object;for(let e of a)uj(e,i),dj(e,i);o.__tres.objects=[],r.remove(t);for(let[e,t]of Object.entries(l))r.patchProp(s,e,s[e],t);n(e),r.insert(t,c);for(let e of a)r.insert(e,t);return!0}function lj(e){return PA(e)?(e.object.__tres=e.__tres,e.object):e}function uj(e,t){var n,r,i,a;let o=(n=e.__tres)?.parent||t.scene.value;e.__tres&&(e.__tres.parent=null),o&&o.__tres&&`objects`in o.__tres&&$A(o.__tres.objects,t=>t!==e),(r=e.__tres)!=null&&r.attach?ij(o,e,e.__tres.attach):((a=(i=e.parent)?.remove)==null||a.call(i,lj(e)),e.parent=null)}function dj(e,t){var n;(n=e.traverse)==null||n.call(e,e=>{var n;t.deregisterCamera(e),(n=t.eventManager)==null||n.deregisterPointerMissedObject(e)}),t.deregisterCamera(e),oj(e)}async function fj(e,t){let n=new Lb(t),r=e=>new Promise((t,r)=>{n.load(e,e=>t(e),()=>null,()=>{r(Error(`[useTextures] - Failed to load texture`))})});if(qA(e)){let t=await Promise.all(e.map(e=>r(e)));return e.length>1?t:t[0]}else{let{map:t,displacementMap:n,normalMap:i,roughnessMap:a,metalnessMap:o,aoMap:s,alphaMap:c,matcap:l}=e;return{map:t?await r(t):null,displacementMap:n?await r(n):null,normalMap:i?await r(i):null,roughnessMap:a?await r(a):null,metalnessMap:o?await r(o):null,aoMap:s?await r(s):null,alphaMap:c?await r(c):null,matcap:l?await r(l):null}}}const pj=Rr({__name:`component`,props:{map:{},displacementMap:{},normalMap:{},roughnessMap:{},metalnessMap:{},aoMap:{},alphaMap:{},matcap:{}},async setup(e){let t,n,r=e,i=([t,n]=Ai(()=>$t(fj(r))),t=await t,n(),t);return(e,t)=>_i(e.$slots,`default`,{textures:_n(i)})}}),mj=({sizes:e})=>{let t=R([]),n=H(()=>t.value[0]),r=e=>{let n=e instanceof Wh?e:t.value.find(t=>t.uuid===e);if(!n)return;let r=t.value.filter(({uuid:e})=>e!==n.uuid);t.value=[n,...r]},i=(e,n=!1)=>{if(DA(e)){let i=e;if(t.value.some(({uuid:e})=>e===i.uuid))return;n?r(i):t.value.push(i)}},a=e=>{if(DA(e)){let n=e;t.value=t.value.filter(({uuid:e})=>e!==n.uuid)}};return Aa(()=>{e.aspectRatio.value&&t.value.forEach(t=>{!t.manual&&(t instanceof Jh||hj(t))&&(t instanceof Jh?t.aspect=e.aspectRatio.value:(t.left=e.width.value*-.5,t.right=e.width.value*.5,t.top=e.height.value*.5,t.bottom=e.height.value*-.5),t.updateProjectionMatrix())})}),ri(()=>{t.value=[]}),{camera:n,cameras:t,registerCamera:i,deregisterCamera:a,setCameraActive:r}};function hj(e){return e.hasOwnProperty(`isOrthographicCamera`)&&e.isOrthographicCamera}const gj=!0,_j=`[TresJS ▲ ■ ●] `;function vj(...e){typeof e[0]==`string`?e[0]=_j+e[0]:e.unshift(_j),console.error(...e)}function yj(...e){typeof e[0]==`string`?e[0]=_j+e[0]:e.unshift(_j),console.warn(...e)}function bj(e,t){}function xj(){return{logError:vj,logWarning:yj,logMessage:bj}}const Sj=R({}),Cj=e=>Object.assign(Sj.value,e);function wj(){let e=new Map,t=new Set,n=0,r=!1,i=()=>{let n=Array.from(e.entries()).sort((e,t)=>{let n=e[1].priority-t[1].priority;return n===0?e[1].addI-t[1].addI:n});t.clear(),n.forEach(e=>t.add(e[0]))},a=n=>{e.delete(n),t.delete(n)};return{on:(t,i=0)=>{e.set(t,{priority:i,addI:n++});let o=()=>a(t);return BO(o),r=!0,{off:o}},off:a,trigger:(...e)=>{r&&(i(),r=!1),t.forEach(t=>t(...e))},dispose:()=>{e.clear(),t.clear()},get count(){return e.size}}}function Tj(){let e=!0,t=!0,n=!1,r=new Sx(!1),i=R(r.running),a=R(!1),o,s=Gf.generateUUID(),c=null,l=wj(),u=wj(),d=wj();S();let f={};function p(e){f=e}function m(e,t,n=0){switch(t){case`before`:return l.on(e,n);case`render`:return c||=e,u.dispose(),u.on(e);case`after`:return d.on(e,n)}}function h(){t&&(t=!1,S(),x())}function g(){t=!0,S(),cancelAnimationFrame(o)}function _(){n=!1,S()}function v(){n=!0,S()}function y(){a.value=!0}function b(){a.value=!1}function x(){if(!e){o=requestAnimationFrame(x);return}let t=r.getDelta(),n=r.getElapsedTime(),s={camera:_n(f.camera),scene:_n(f.scene),renderer:_n(f.renderer),raycaster:_n(f.raycaster),controls:_n(f.controls),invalidate:f.invalidate,advance:f.advance},p={delta:t,elapsed:n,clock:r,...s};i.value&&l.trigger(p),a.value||(u.count?u.trigger(p):c&&c(p)),i.value&&d.trigger(p),o=requestAnimationFrame(x)}function S(){let e=!t&&!n;r.running!==e&&(r.running?r.stop():r.start()),i.value=r.running}return{loopId:s,register:(e,t,n)=>m(e,t,n),start:h,stop:g,pause:v,resume:_,pauseRender:y,resumeRender:b,isRenderPaused:a,isActive:i,setContext:p,setReady:t=>e=t}}function Ej(e){let t=0;return e.traverse(e=>{if(e.isMesh&&e.geometry&&e.type!==`HightlightMesh`){let n=e.geometry,r=n.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,i=n.index?n.index.count*Uint32Array.BYTES_PER_ELEMENT:0,a=n.attributes.normal?n.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,o=n.attributes.uv?n.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,s=r+i+a+o;t+=s}}),t}function Dj(e){return(e/1024).toFixed(2)}const Oj=Number.parseInt(Mc.replace(`dev`,``));function kj(e){return e instanceof K?e:Array.isArray(e)?new K(...e):new K(e)}const Aj={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:Ed,toneMapping:Nl,toneMappingExposure:3,shadowMap:{enabled:!0,type:Vc}},flat:{toneMapping:kl,toneMappingExposure:1}};function jj({canvas:e,options:t,contextParts:{sizes:n,render:r,invalidate:i,advance:a}}){let o=H(()=>({alpha:dk(t.alpha)??!0,depth:dk(t.depth),canvas:yk(e),context:dk(t.context),stencil:dk(t.stencil),antialias:dk(t.antialias)??!0,precision:dk(t.precision),powerPreference:dk(t.powerPreference),premultipliedAlpha:dk(t.premultipliedAlpha),preserveDrawingBuffer:dk(t.preserveDrawingBuffer),logarithmicDepthBuffer:dk(t.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:dk(t.failIfMajorPerformanceCaveat)})),s=z(new zO(o.value));function c(){t.renderMode===`on-demand`&&i()}V(o,()=>{s.value.dispose(),s.value=new zO(o.value),c()}),V([n.width,n.height],()=>{s.value.setSize(n.width.value,n.height.value),c()},{immediate:!0}),V(()=>t.clearColor,c);let{pixelRatio:l}=kk(),{logError:u}=xj(),d=(()=>{let e=new zO,t={shadowMap:{enabled:e.shadowMap.enabled,type:e.shadowMap.type},toneMapping:e.toneMapping,toneMappingExposure:e.toneMappingExposure,outputColorSpace:e.outputColorSpace};return e.dispose(),t})(),f=dk(t.renderMode);return f===`on-demand`&&i(),f===`manual`&&setTimeout(()=>{a()},100),Aa(()=>{let e=dk(t.preset);e&&(e in Aj||u(`Renderer Preset must be one of these: ${Object.keys(Aj).join(`, `)}`),FA(s.value,Aj[e])),sj(s.value,l.value,dk(t.dpr)),f===`always`&&(r.frames.value=Math.max(1,r.frames.value));let n=(t,n)=>{let r=dk(t),i=()=>{if(e)return UA(Aj[e],n)};if(r!==void 0)return r;let a=i();return a===void 0?UA(d,n):a},i=(e,t)=>WA(s.value,t,n(e,t));i(t.shadows,`shadowMap.enabled`),i(t.toneMapping??Nl,`toneMapping`),i(t.shadowMapType,`shadowMap.type`),Oj<150&&i(!t.useLegacyLights,`physicallyCorrectLights`),i(t.outputColorSpace,`outputColorSpace`),i(t.toneMappingExposure,`toneMappingExposure`);let a=n(t.clearColor,`clearColor`);a&&s.value.setClearColor(a?kj(a):new K(0))}),ri(()=>{s.value.dispose(),s.value.forceContextLoss()}),{renderer:s}}function Mj(e,t,n=10){let r=dk(e)?Bk():Mk(H(()=>dk(t).parentElement)),i=tn(lk(r.width,n)),a=tn(lk(r.height,n)),o=H(()=>i.value/a.value);return{height:a,width:i,aspectRatio:o}}const Nj=(e,t)=>{let n=H(()=>t.renderer.value.domElement),r=z([]),{x:i,y:a}=Lk({target:n}),o=0,{width:s,height:c,top:l,left:u}=jk(n),d=({x:e,y:t})=>{if(n.value)return{x:(e-u.value)/s.value*2-1,y:-((t-l.value)/c.value)*2+1}},f=({x:n,y:i})=>{if(t.camera.value)return t.raycaster.value.setFromCamera(new U(n,i),t.camera.value),r.value=t.raycaster.value.intersectObjects(e.value,!0),r.value},p=e=>{let t=d({x:e?.clientX??i.value,y:e?.clientY??a.value});return t&&f(t)||[]},m=VO(),h=VO(),g=VO(),_=VO(),v=VO(),y=VO(),b=VO(),x=VO();function S(e){let t={};for(let n in e)typeof n!=`function`&&(t[n]=e[n]);return t}let C=(e,n)=>{var i,a,s;let c=S(n),l=new W(n?.clientX,n?.clientY,0).unproject((i=t.camera)?.value);e.trigger({...c,intersections:r.value,unprojectedPoint:l,ray:(a=t.raycaster)?.value.ray,camera:(s=t.camera)?.value,sourceEvent:n,delta:o,stopPropagating:!1})},w,T=e=>{p(e),C(g,e),w=e},E=()=>{w&&T(w)},D,O,k,A=e=>{var t;D=(t=r.value[0])?.object,o=0,O=new U(e?.clientX??i.value,e?.clientY??a.value),C(v,e)},j,M=!1,N=e=>{var t,n,s;e instanceof PointerEvent&&(r.value.length===0&&C(y,e),D===(t=r.value[0])?.object&&(k=new U(e?.clientX??i.value,e?.clientY??a.value),o=O?.distanceTo(k),e.button===0?(C(m,e),j===(n=r.value[0])?.object?M=!0:(j=(s=r.value[0])?.object,M=!1)):e.button===2&&C(b,e)),C(_,e))},ee=e=>{M&&(C(h,e),j=void 0,M=!1)},te=e=>C(g,e),P=e=>C(x,e);return n.value.addEventListener(`pointerup`,N),n.value.addEventListener(`pointerdown`,A),n.value.addEventListener(`pointermove`,T),n.value.addEventListener(`pointerleave`,te),n.value.addEventListener(`dblclick`,ee),n.value.addEventListener(`wheel`,P),ri(()=>{n!=null&&n.value&&(n.value.removeEventListener(`pointerup`,N),n.value.removeEventListener(`pointerdown`,A),n.value.removeEventListener(`pointermove`,T),n.value.removeEventListener(`pointerleave`,te),n.value.removeEventListener(`dblclick`,ee),n.value.removeEventListener(`wheel`,P))}),{intersects:r,onClick:e=>m.on(e).off,onDblClick:e=>h.on(e).off,onContextMenu:e=>b.on(e).off,onPointerMove:e=>g.on(e).off,onPointerUp:e=>_.on(e).off,onPointerDown:e=>v.on(e).off,onPointerMissed:e=>y.on(e).off,onWheel:e=>x.on(e).off,forceUpdate:E}};function Pj(e,t){if(Array.isArray(e))for(let n of e)n(t);typeof e==`function`&&e(t)}function Fj(e,t,n){var r;let i=z(),a=z();e&&(i.value=e),t&&(a.value=t);let o=e=>{var t;return(t=e.__tres)?.eventCount>0},s=e=>{var t;return(t=e.children)?.some(e=>s(e))||o(e)},c=z(((r=i.value)?.children).filter(s)||[]);function l(e,t){let r=[],i=()=>t.stopPropagating=!0;t.stopPropagation=i;for(let i of t?.intersections){if(t.stopPropagating)return;t={...t,...i};let{object:a}=i;t.eventObject=a,Pj(a[e],t),r.push(a);let o=a.parent;for(;o!==null&&!t.stopPropagating&&!r.includes(o);)t.eventObject=o,Pj(o[e],t),r.push(o),o=o.parent;let s=VA(e.slice(2));n(s,{intersection:i,event:t})}}let{onClick:u,onDblClick:d,onContextMenu:f,onPointerMove:p,onPointerDown:m,onPointerUp:h,onPointerMissed:g,onWheel:_,forceUpdate:v}=Nj(c,t);h(e=>l(`onPointerUp`,e)),m(e=>l(`onPointerDown`,e)),u(e=>l(`onClick`,e)),d(e=>l(`onDoubleClick`,e)),f(e=>l(`onContextMenu`,e)),_(e=>l(`onWheel`,e));let y=[];p(e=>{let t=e.intersections.map(({object:e})=>e),n=e.intersections;y.forEach(({object:n})=>{t.includes(n)||(e.intersections=y,l(`onPointerLeave`,e),l(`onPointerOut`,e))}),e.intersections=n,e.intersections.forEach(({object:t})=>{y.includes(t)||(l(`onPointerEnter`,e),l(`onPointerOver`,e))}),l(`onPointerMove`,e),y=e.intersections});let b=[];g(e=>{let t=()=>e.stopPropagating=!0;e.stopPropagation=t,b.forEach(t=>{e.stopPropagating||(e.eventObject=t,Pj(t.onPointerMissed,e))}),n(`pointer-missed`,{event:e})});function x(e){NA(e)&&bA(e)&&c.value.push(e)}function S(e){if(NA(e)&&bA(e)){let t=c.value.indexOf(e);t>-1&&c.value.splice(t,1)}}function C(e){NA(e)&&bA(e)&&e.onPointerMissed&&b.push(e)}function w(e){if(NA(e)&&bA(e)){let t=b.indexOf(e);t>-1&&b.splice(t,1)}}return t.eventManager={forceUpdate:v,registerObject:x,deregisterObject:S,registerPointerMissedObject:C,deregisterPointerMissedObject:w},{forceUpdate:v,registerObject:x,deregisterObject:S,registerPointerMissedObject:C,deregisterPointerMissedObject:w}}function Ij(e,t,n=100){n=n<=0?100:n;let r=VO(),i=new Set,a=!1,o=!1,s=null;function c(){s&&clearTimeout(s),!o&&!a&&e()?(r.trigger(t),i.forEach(e=>e()),i.clear(),a=!0):!o&&!a&&(s=setTimeout(c,n))}function l(){o=!0,s&&clearTimeout(s)}c();let u=(e,...t)=>{e(...t)};return{on:e=>{if(a)return u(e,t),{off:()=>{}};{let t=r.on(e);return i.add(t.off),r.on(e)}},off:r.off,trigger:r.trigger,clear:r.clear,cancel:l}}const Lj=new WeakMap;function Rj(e){if(e||=Bj(),Lj.has(e))return Lj.get(e);let t=100,n=Date.now(),r=Ij(()=>{if(Date.now()-n>=t)return!0;{let t=e.renderer.value,n=t?.domElement||{width:0,height:0};return!!(t&&n.width>0&&n.height>0)}},e);return Lj.set(e,r),r}function zj({scene:e,canvas:t,windowSize:n,rendererOptions:r,emit:i}){let a=z(e),o=Mj(n,t),{camera:s,cameras:c,registerCamera:l,deregisterCamera:u,setCameraActive:d}=mj({sizes:o}),f={mode:R(r.renderMode||`always`),priority:R(0),frames:R(0),maxFrames:60,canBeInvalidated:H(()=>f.mode.value===`on-demand`&&f.frames.value===0)};function p(e=1){r.renderMode===`on-demand`&&(f.frames.value=Math.min(f.maxFrames,f.frames.value+e))}function m(){r.renderMode===`manual`&&(f.frames.value=1)}let{renderer:h}=jj({canvas:t,options:r,contextParts:{sizes:o,render:f,invalidate:p,advance:m}}),g={sizes:o,scene:a,camera:s,cameras:tn(c),renderer:h,raycaster:z(new sS),controls:R(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:f,advance:m,extend:Cj,invalidate:p,registerCamera:l,setCameraActive:d,deregisterCamera:u,loop:Tj()};Xi(`useTres`,g),g.scene.value.__tres={root:g},g.loop.register(()=>{s.value&&f.frames.value>0&&(h.value.render(e,s.value),i(`render`,g.renderer.value)),f.priority.value=0,f.mode.value===`always`?f.frames.value=1:f.frames.value=Math.max(0,f.frames.value-1)},`render`);let{on:_,cancel:v}=Rj(g);g.loop.setReady(!1),g.loop.start(),_(()=>{i(`ready`,g),g.loop.setReady(!0),Fj(e,g,i)}),ri(()=>{v(),g.loop.stop()});let y=100,b=Nk({every:y}),{isSupported:x,memory:S}=Pk({interval:y}),C=160,w=performance.now(),T=({timestamp:e})=>{g.scene.value&&(g.perf.memory.allocatedMem=Ej(g.scene.value)),e-w>=y&&(w=e,g.perf.fps.accumulator.push(b.value),g.perf.fps.accumulator.length>C&&g.perf.fps.accumulator.shift(),g.perf.fps.value=b.value,x.value&&S.value&&(g.perf.memory.accumulator.push(S.value.usedJSHeapSize/1024/1024),g.perf.memory.accumulator.length>C&&g.perf.memory.accumulator.shift(),g.perf.memory.currentMem=g.perf.memory.accumulator.reduce((e,t)=>e+t,0)/g.perf.memory.accumulator.length))},E=0,D=1,{pause:O}=wk(({delta:e})=>{window.__TRES__DEVTOOLS__&&(T({timestamp:performance.now()}),E+=e,E>=D&&(window.__TRES__DEVTOOLS__.cb(g),E=0))},{immediate:!0});return ri(()=>{O()}),g}function Bj(){let e=Zi(`useTres`);if(!e)throw Error(`useTresContext must be used together with useTresContextProvider`);return e}const Vj=Bj;function Hj(){let{camera:e,scene:t,renderer:n,loop:r,raycaster:i,controls:a,invalidate:o,advance:s}=Bj();r.setContext({camera:e,scene:t,renderer:n,raycaster:i,controls:a,invalidate:o,advance:s});function c(e,t=0){return r.register(e,`before`,t)}function l(e){return r.register(e,`render`)}function u(e,t=0){return r.register(e,`after`,t)}return{pause:r.pause,resume:r.resume,pauseRender:r.pauseRender,resumeRender:r.resumeRender,isActive:r.isActive,onBeforeRender:c,render:l,onAfterRender:u}}const Uj=VO(),Wj=VO(),Gj=VO(),Kj=new Sx;let qj=0,Jj=0;const{pause:Yj,resume:Xj,isActive:Zj}=wk(()=>{Uj.trigger({delta:qj,elapsed:Jj,clock:Kj}),Wj.trigger({delta:qj,elapsed:Jj,clock:Kj}),Gj.trigger({delta:qj,elapsed:Jj,clock:Kj})},{immediate:!1});Gj.on(()=>{qj=Kj.getDelta(),Jj=Kj.getElapsedTime()});function Qj(e,t={},n={}){let r=e,i=e=>{r=e},a=new Proxy({},{}),o={has(e,n){return n in t||n in r},get(e,n,i){return n in t?t[n](r):r[n]},set(e,t,o){return n[t]?n[t](o,r,a,i):r[t]=o,!0}};return a=new Proxy({},o),a}const{logError:$j}=xj(),eM=[`onClick`,`onContextMenu`,`onPointerMove`,`onPointerEnter`,`onPointerLeave`,`onPointerOver`,`onPointerOut`,`onDoubleClick`,`onPointerDown`,`onPointerUp`,`onPointerCancel`,`onPointerMissed`,`onLostPointerCapture`,`onWheel`],tM=e=>{let t=e.scene.value;function n(t,n,o,s){if(s||={},s.args||=[],t===`template`||LA(t))return null;let c=t.replace(`Tres`,``),l;if(t===`primitive`){(!yA(s.object)||pn(s.object))&&$j(`Tres primitives need an 'object' prop, whose value is an object or shallowRef`),c=s.object.type;let t={};l=Qj(s.object,{object:e=>e,isPrimitive:()=>!0,__tres:()=>t},{object:(t,n,o,s)=>{cj(t,o,s,{patchProp:a,remove:i,insert:r},e)},__tres:e=>{Object.assign(t,e)}})}else{let e=Sj.value[c];e||$j(`${c} is not defined on the THREE namespace. Use extend to add it to the catalog.`),l=new e(...s.args)}return l?(l.isCamera&&(s!=null&&s.position||l.position.set(3,3,3),s!=null&&s.lookAt||l.lookAt(0,0,0)),l=aj(l,{...l.__tres,type:c,memoizedProps:s,eventCount:0,primitive:t===`primitive`,attach:s.attach},e),l):null}function r(n,r){var i,a,o;if(!n)return;r||=t;let s=n.__tres?n:aj(n,{},e),c=r.__tres?r:aj(r,{},e);n=lj(s),r=lj(c),n.__tres&&(i=n.__tres)?.eventCount>0&&((a=e.eventManager)==null||a.registerObject(n)),e.registerCamera(n),(o=e.eventManager)==null||o.registerPointerMissedObject(n),s.__tres.attach?rj(c,s,s.__tres.attach):bA(n)&&bA(c)&&(c.add(n),n.dispatchEvent({type:`added`})),s.__tres.parent=c,c.__tres.objects&&!c.__tres.objects.includes(s)&&c.__tres.objects.push(s)}function i(t,n){var r,a,o,s;if(!t)return;t!=null&&t.__tres&&(r=t.__tres)?.eventCount>0&&((a=e.eventManager)==null||a.deregisterObject(t)),n=mA(n)?`default`:n;let c=(o=t.__tres)?.dispose;mA(c)||(n=c===null?!1:c);let l=(s=t.__tres)?.primitive,u=n===`default`?!l:!!n;if(t.__tres&&`objects`in t.__tres&&[...t.__tres.objects].forEach(e=>i(e,n)),u&&t.children&&[...t.children].forEach(e=>i(e,n)),uj(t,e),dj(t,e),u&&!MA(t)){if(vA(n))n(t);else if(vA(t.dispose))try{t.dispose()}catch{}}`__tres`in t&&delete t.__tres}function a(t,n,a,o){var s,c;if(!t)return;let l=t,u=n;if(t.__tres&&(t.__tres.memoizedProps[n]=o),n===`attach`){let n=(s=t.__tres)?.parent||t.parent;i(t),aj(t,{attach:o},e),n&&r(t,n);return}if(n===`dispose`){t.__tres||(t=aj(t,{},e)),t.__tres.dispose=o;return}if(bA(t)&&u===`blocks-pointer-events`){o||o===``?t[u]=o:delete t[u];return}eM.includes(n)&&t.__tres&&(t.__tres.eventCount+=1);let d=zA(u),f=l?.[d];if(u===`args`){let e=t,n=a??[],r=o??[],i=(c=t.__tres)?.type||t.type;i&&n.length&&!KA(n,r)&&(l=Object.assign(e,new Sj.value[i](...o)));return}if(l.type===`BufferGeometry`){if(u===`args`)return;l.setAttribute(zA(u),new ih(...o));return}if(u.includes(`-`)&&f===void 0){f=l;for(let e of u.split(`-`))d=u=zA(e),l=f,f=f?.[u]}let p=o;if(p===``&&(p=!0),vA(f)){eM.includes(n)||(hA(p)?t[d](...p):t[d](p)),d.startsWith(`on`)&&vA(p)&&(l[d]=p);return}EA(f)&&EA(p)?f.mask=p.mask:xA(f)&&SA(p)?f.set(p):wA(f)&&TA(p)&&f.constructor===p.constructor?f.copy(p):CA(f)&&Array.isArray(p)?`fromArray`in f&&typeof f.fromArray==`function`?f.fromArray(p):f.set(...p):CA(f)&&typeof p==`number`?`setScalar`in f&&typeof f.setScalar==`function`?f.setScalar(p):f.set(p):l[d]=p,oj(t)}function o(e){var t;return(t=e?.__tres)?.parent||null}function s(t){let n=aj(new Dm,{type:`Comment`},e);return n.name=t,n}function c(e){var t;let n=o(e),r=(t=n?.__tres)?.objects||[],i=r.indexOf(e);return i<0||i>=r.length-1?null:r[i+1]}return{insert:r,remove:i,createElement:n,patchProp:a,parentNode:o,createText:()=>void 0,createComment:s,setText:()=>void 0,setElementText:()=>void 0,nextSibling:c,querySelector:()=>void 0,setScopeId:()=>void 0,cloneNode:()=>void 0,insertStaticContent:()=>void 0}};function nM(){return rM().__VUE_DEVTOOLS_GLOBAL_HOOK__}function rM(){return typeof navigator<`u`&&typeof window<`u`?window:typeof globalThis<`u`?globalThis:{}}const iM=typeof Proxy==`function`,aM=`devtools-plugin:setup`,oM=`plugin:settings:set`;let sM,cM;function lM(){var e;return sM!==void 0||(typeof window<`u`&&window.performance?(sM=!0,cM=window.performance):typeof globalThis<`u`&&(e=globalThis.perf_hooks)!=null&&e.performance?(sM=!0,cM=globalThis.perf_hooks.performance):sM=!1),sM}function uM(){return lM()?cM.now():Date.now()}var dM=class{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;let n={};if(e.settings)for(let t in e.settings){let r=e.settings[t];n[t]=r.defaultValue}let r=`__vue-devtools-plugin-settings__${e.id}`,i=Object.assign({},n);try{let e=localStorage.getItem(r),t=JSON.parse(e);Object.assign(i,t)}catch{}this.fallbacks={getSettings(){return i},setSettings(e){try{localStorage.setItem(r,JSON.stringify(e))}catch{}i=e},now(){return uM()}},t&&t.on(oM,(e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)}),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:t===`on`?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise(n=>{this.targetQueue.push({method:t,args:e,resolve:n})})})}async setRealTarget(e){this.target=e;for(let e of this.onQueue)this.target.on[e.method](...e.args);for(let e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}};function fM(e,t){let n=e,r=rM(),i=nM(),a=iM&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))i.emit(aM,e,t);else{let e=a?new dM(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}}function pM(e,t){let n=`▲ ■ ●${e}`;typeof mM==`function`?mM(n,t):console.log(n)}function mM(e,t){throw Error(e+t)}const hM=e=>{let t={id:e.uuid,label:e.type,children:[],tags:[]};e.name!==``&&t.tags.push({label:e.name,textColor:5750629,backgroundColor:15793395});let n=Ej(e);return n>0&&t.tags.push({label:`${Dj(n)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:`Memory usage`}),e.type.includes(`Light`)&&(AA(e)&&t.tags.push({label:`${e.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:`Intensity`}),t.tags.push({label:`#${new K(e.color).getHexString()}`,textColor:9738662,backgroundColor:16316922,tooltip:`Color`})),e.type.includes(`Camera`)&&(t.tags.push({label:`${e.fov}°`,textColor:9738662,backgroundColor:16316922,tooltip:`Field of view`}),t.tags.push({label:`x: ${Math.round(e.position.x)} y: ${Math.round(e.position.y)} z: ${Math.round(e.position.z)}`,textColor:9738662,backgroundColor:16316922,tooltip:`Position`})),t};function gM(e,t,n=``){e.children.forEach(e=>{if(e.type===`HightlightMesh`||n&&!e.type.includes(n)&&!e.name.includes(n))return;let r=hM(e);t.children.push(r),gM(e,r,n)})}const _M=[],vM=`tres:inspector`,yM=$t({sceneGraph:null});function bM(e,t){fM({id:`dev.esm.tres`,label:`TresJS 🪐`,logo:`https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg`,packageName:`tresjs`,homepage:`https://tresjs.org`,componentStateTypes:_M,app:e},e=>{typeof e.now!=`function`&&pM(`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.`),e.addInspector({id:vM,label:`TresJS 🪐`,icon:`account_tree`,treeFilterPlaceholder:`Search instances`}),setInterval(()=>{e.sendInspectorTree(vM)},1e3),setInterval(()=>{e.notifyComponentUpdate()},5e3),e.on.getInspectorTree(e=>{if(e.inspectorId===vM){let n=hM(t.scene.value);gM(t.scene.value,n,e.filter),yM.sceneGraph=n,e.rootNodes=[n]}});let n=null,r=null;e.on.getInspectorState(e=>{var i;if(e.inspectorId===vM){let[a]=t.scene.value.getObjectsByProperty(`uuid`,e.nodeId);if(!a)return;if(r&&n&&n.parent&&r.remove(n),a.isMesh){let e=YA(a);a.add(e),n=e,r=a}e.state={object:Object.entries(a).map(([e,t])=>e===`children`?{key:e,value:t.filter(e=>e.type!==`HightlightMesh`)}:{key:e,value:t,editable:!0}).filter(({key:e})=>e!==`parent`)},a.isScene&&(e.state={...e.state,state:[{key:`Scene Info`,value:{objects:a.children.length,memory:Ej(a),calls:t.renderer.value.info.render.calls,triangles:t.renderer.value.info.render.triangles,points:t.renderer.value.info.render.points,lines:t.renderer.value.info.render.lines}},{key:`Programs`,value:(i=t.renderer.value.info.programs)?.map(e=>({...e,programName:e.name}))||[]}]})}}),e.on.editInspectorState(e=>{e.inspectorId===vM&&JA(t.scene.value,e.nodeId,e.path,e.state.value)})})}const xM=[`data-scene`,`data-tres`],SM=Rr({__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(e,{expose:t,emit:n}){let r=e,i=n,a=wi(),o=R(),s=z(new ag),c=Ao();Cj(rC);let l=(e,t=!1)=>Rr({setup(){var n;let i=(n=Ao())?.appContext;i&&(i.app=c?.appContext.app);let o={};function s(e){e&&(e.parent&&s(e.parent),e.provides&&Object.assign(o,e.provides))}return c!=null&&c.parent&&r.enableProvideBridge&&(s(c.parent),Reflect.ownKeys(o).forEach(e=>{Xi(e,o[e])})),Xi(`useTres`,e),Xi(`extend`,Cj),typeof window<`u`&&bM(i?.app,e),()=>Jo(Ya,null,t?[]:a.default())}}),u=(e,t=!1)=>{let n=l(e,t),{render:r}=ya(tM(e));r(Jo(n),s.value)},d=(e,t=!1)=>{QA(e.scene.value),t&&(e.renderer.value.dispose(),e.renderer.value.renderLists.dispose(),e.renderer.value.forceContextLoss()),s.value.__tres={root:e}},f=z(null);t({context:f,dispose:()=>d(f.value,!0)});let p=()=>{d(f.value),u(f.value,!0)};return $r(()=>{let e=o;f.value=zj({scene:s.value,canvas:e,windowSize:r.windowSize??!1,rendererOptions:r,emit:i});let{registerCamera:t,camera:n,cameras:a,deregisterCamera:c}=f.value;u(f.value);let l=()=>{let e=new Jh(45,window.innerWidth/window.innerHeight,.1,1e3);e.position.set(3,3,3),e.lookAt(0,0,0),t(e);let n=Aa(()=>{a.value.length>=2&&(e.removeFromParent(),c(e),n?.())})};V(()=>r.camera,(e,n)=>{e&&t(e),n&&(n.removeFromParent(),c(n))},{immediate:!0}),n.value||l()}),ri(p),(e,t)=>(to(),oo(`canvas`,{ref_key:`canvas`,ref:o,"data-scene":s.value.uuid,class:Se(e.$attrs.class),"data-tres":`tresjs ${_n(uA).version}`,style:L({display:`block`,width:`100%`,height:`100%`,position:e.windowSize?`fixed`:`relative`,top:0,left:0,pointerEvents:`auto`,touchAction:`none`,...e.$attrs.style})},null,14,xM))}}),CM=[`TresCanvas`,`TresLeches`,`TresScene`],wM={template:{compilerOptions:{isCustomElement:e=>e.startsWith(`Tres`)&&!CM.includes(e)||e===`primitive`}}},{logWarning:TM}=xj();var EM=class extends F_{constructor(e,t){let n=[1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],r=new bh;r.setAttribute(`position`,new q(n,3)),r.computeBoundingSphere();let i=new D_({fog:!1});super(r,i),this.light=e,this.color=t,this.type=`RectAreaLightHelper`;let a=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],o=new bh;o.setAttribute(`position`,new q(a,3)),o.computeBoundingSphere(),this.add(new Mh(o,new Ym({side:Wc,fog:!1})))}updateMatrixWorld(){if(this.scale.set(.5*this.light.width,.5*this.light.height,1),this.color!==void 0)this.material.color.set(this.color),this.children[0].material.color.set(this.color);else{this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);let e=this.material.color,t=Math.max(e.r,e.g,e.b);t>1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}this.matrixWorld.extractRotation(this.light.matrixWorld).scale(this.scale).copyPosition(this.light.matrixWorld),this.children[0].matrixWorld.copy(this.matrixWorld)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}};const{logWarning:DM}=xj();let OM,kM;const AM={DirectionalLight:FS,PointLight:TS,SpotLight:yS,HemisphereLight:kS,RectAreaLight:EM},jM={mounted:e=>{if(!e.isLight){DM(`${e.type} is not a light`);return}OM=AM[e.type],e.parent.add(new OM(e,1,e.color.getHex()))},updated:e=>{kM=e.parent.children.find(e=>e instanceof OM),!(kM instanceof EM)&&kM.update()},unmounted:e=>{if(!e.isLight){DM(`${e.type} is not a light`);return}kM=e.parent.children.find(e=>e instanceof OM),kM&&kM.dispose&&kM.dispose(),e.parent&&e.parent.remove(kM)}},MM={mounted:(e,t)=>{if(t.arg){console.log(`v-log:${t.arg}`,e[t.arg]);return}console.log(`v-log`,e)}},NM={install(e){e.component(`TresCanvas`,SM)}};var PM=c((exports,t)=>{(function(n,r){typeof define==`function`&&define.amd?define(r):typeof exports==`object`?t.exports=r():n.NProgress=r()})(void 0,function(){var e={};e.version=`0.2.0`;var t=e.settings={minimum:.08,easing:`ease`,positionUsing:``,speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:`[role="bar"]`,spinnerSelector:`[role="spinner"]`,parent:`body`,template:`
`};e.configure=function(e){var n,r;for(n in e)r=e[n],r!==void 0&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var s=e.isStarted();r=n(r,t.minimum,1),e.status=r===1?null:r;var c=e.render(!s),l=c.querySelector(t.barSelector),u=t.speed,d=t.easing;return c.offsetWidth,a(function(n){t.positionUsing===``&&(t.positionUsing=e.getPositioningCSS()),o(l,i(r,u,d)),r===1?(o(c,{transition:`none`,opacity:1}),c.offsetWidth,setTimeout(function(){o(c,{transition:`all `+u+`ms linear`,opacity:0}),setTimeout(function(){e.remove(),n()},u)},u)):setTimeout(n,u)}),this},e.isStarted=function(){return typeof e.status==`number`},e.start=function(){e.status||e.set(0);var n=function(){setTimeout(function(){e.status&&(e.trickle(),n())},t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return!t&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(t){var r=e.status;return r?(typeof t!=`number`&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var t=0,n=0;e.promise=function(r){return!r||r.state()===`resolved`?this:(n===0&&e.start(),t++,n++,r.always(function(){n--,n===0?(t=0,e.done()):e.set((t-n)/t)}),this)}}(),e.render=function(n){if(e.isRendered())return document.getElementById(`nprogress`);c(document.documentElement,`nprogress-busy`);var i=document.createElement(`div`);i.id=`nprogress`,i.innerHTML=t.template;var a=i.querySelector(t.barSelector),s=n?`-100`:r(e.status||0),l=document.querySelector(t.parent),u;return o(a,{transition:`all 0 linear`,transform:`translate3d(`+s+`%,0,0)`}),t.showSpinner||(u=i.querySelector(t.spinnerSelector),u&&d(u)),l!=document.body&&c(l,`nprogress-custom-parent`),l.appendChild(i),i},e.remove=function(){l(document.documentElement,`nprogress-busy`),l(document.querySelector(t.parent),`nprogress-custom-parent`);var e=document.getElementById(`nprogress`);e&&d(e)},e.isRendered=function(){return!!document.getElementById(`nprogress`)},e.getPositioningCSS=function(){var e=document.body.style,t=`WebkitTransform`in e?`Webkit`:`MozTransform`in e?`Moz`:`msTransform`in e?`ms`:`OTransform`in e?`O`:``;return t+`Perspective`in e?`translate3d`:t+`Transform`in e?`translate`:`margin`};function n(e,t,n){return en?n:e}function r(e){return(-1+e)*100}function i(e,n,i){var a;return a=t.positionUsing===`translate3d`?{transform:`translate3d(`+r(e)+`%,0,0)`}:t.positionUsing===`translate`?{transform:`translate(`+r(e)+`%,0)`}:{"margin-left":r(e)+`%`},a.transition=`all `+n+`ms `+i,a}var a=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),e.length==1&&t()}}(),o=function(){var e=[`Webkit`,`O`,`Moz`,`ms`],t={};function n(e){return e.replace(/^-ms-/,`ms-`).replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r=e.length,i=t.charAt(0).toUpperCase()+t.slice(1),a;r--;)if(a=e[r]+i,a in n)return a;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n=arguments,r,i;if(n.length==2)for(r in t)i=t[r],i!==void 0&&t.hasOwnProperty(r)&&a(e,r,i);else a(e,n[1],n[2])}}();function s(e,t){var n=typeof e==`string`?e:u(e);return n.indexOf(` `+t+` `)>=0}function c(e,t){var n=u(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function l(e,t){var n=u(e),r;s(e,t)&&(r=n.replace(` `+t+` `,` `),e.className=r.substring(1,r.length-1))}function u(e){return(` `+(e.className||``)+` `).replace(/\s+/gi,` `)}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e})});const FM=new Set,IM=new WeakMap,LM=new WeakMap,RM=new WeakMap,zM=new WeakMap,BM=new WeakMap,VM=new WeakMap,HM=new WeakMap,UM=new WeakSet;let WM,GM=0,KM=0;const qM=`__aa_tgt`,JM=`__aa_del`,YM=`__aa_new`,XM=e=>{let t=oN(e);t&&t.forEach(e=>cN(e))},ZM=e=>{e.forEach(e=>{e.target===WM&&eN(),IM.has(e.target)&&$M(e.target)})};function QM(e){let t=zM.get(e);t?.disconnect();let n=IM.get(e),r=0,i=5;n||(n=dN(e),IM.set(e,n));let{offsetWidth:a,offsetHeight:o}=WM,s=[n.top-i,a-(n.left+i+n.width),o-(n.top+i+n.height),n.left-i],c=s.map(e=>`${-1*Math.floor(e)}px`).join(` `),l=new IntersectionObserver(()=>{++r>1&&$M(e)},{root:WM,threshold:1,rootMargin:c});l.observe(e),zM.set(e,l)}function $M(e){clearTimeout(HM.get(e));let t=pN(e),n=vN(t)?500:t.duration;HM.set(e,setTimeout(async()=>{let t=RM.get(e);try{await t?.finished,IM.set(e,dN(e)),QM(e)}catch{}},n))}function eN(){clearTimeout(HM.get(WM)),HM.set(WM,setTimeout(()=>{FM.forEach(e=>gN(e,e=>nN(()=>$M(e))))},100))}function tN(e){setTimeout(()=>{BM.set(e,setInterval(()=>nN($M.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function nN(e){typeof requestIdleCallback==`function`?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let rN,iN;const aN=typeof window<`u`&&`ResizeObserver`in window;aN&&(WM=document.documentElement,rN=new MutationObserver(XM),iN=new ResizeObserver(ZM),window.addEventListener(`scroll`,()=>{KM=window.scrollY,GM=window.scrollX}),iN.observe(WM));function oN(e){let t=e.reduce((e,t)=>[...e,...Array.from(t.addedNodes),...Array.from(t.removedNodes)],[]),n=t.every(e=>e.nodeName===`#comment`);return n?!1:e.reduce((e,t)=>{if(e===!1)return!1;if(t.target instanceof Element){if(sN(t.target),!e.has(t.target)){e.add(t.target);for(let n=0;nt(e,VM.has(e)));for(let n=0;ne(r,VM.has(r)))}}function _N(e){return Array.isArray(e)?e:[e]}function vN(e){return typeof e==`function`}function yN(e){let t=IM.get(e),n=dN(e);if(!hN(e))return IM.set(e,n);let r;if(!t)return;let i=pN(e);if(typeof i!=`function`){let a=t.left-n.left,o=t.top-n.top,[s,c,l,u]=fN(e,t,n),d={transform:`translate(${a}px, ${o}px)`},f={transform:`translate(0, 0)`};s!==c&&(d.width=`${s}px`,f.width=`${c}px`),l!==u&&(d.height=`${l}px`,f.height=`${u}px`),r=e.animate([d,f],{duration:i.duration,easing:i.easing})}else{let[a]=_N(i(e,`remain`,t,n));r=new Animation(a),r.play()}RM.set(e,r),IM.set(e,n),r.addEventListener(`finish`,$M.bind(null,e))}function bN(e){YM in e&&delete e[YM];let t=dN(e);IM.set(e,t);let n=pN(e);if(!hN(e))return;let r;if(typeof n!=`function`)r=e.animate([{transform:`scale(.98)`,opacity:0},{transform:`scale(0.98)`,opacity:0,offset:.5},{transform:`scale(1)`,opacity:1}],{duration:n.duration*1.5,easing:`ease-in`});else{let[i]=_N(n(e,`add`,t));r=new Animation(i),r.play()}RM.set(e,r),r.addEventListener(`finish`,$M.bind(null,e))}function xN(e,t){var n;e.remove(),IM.delete(e),LM.delete(e),RM.delete(e),(n=zM.get(e))==null||n.disconnect(),setTimeout(()=>{if(JM in e&&delete e[JM],Object.defineProperty(e,YM,{value:!0,configurable:!0}),t&&e instanceof HTMLElement)for(let n in t)e.style[n]=``},0)}function SN(e){var t;if(!LM.has(e)||!IM.has(e))return;let[n,r]=LM.get(e);Object.defineProperty(e,JM,{value:!0,configurable:!0});let i=window.scrollX,a=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):n&&n.parentNode?n.parentNode.appendChild(e):(t=mN(e))==null||t.appendChild(e),!hN(e))return xN(e);let[o,s,c,l]=wN(e),u=pN(e),d=IM.get(e);(i!==GM||a!==KM)&&CN(e,i,a,u);let f,p={position:`absolute`,top:`${o}px`,left:`${s}px`,width:`${c}px`,height:`${l}px`,margin:`0`,pointerEvents:`none`,transformOrigin:`center`,zIndex:`100`};if(!vN(u))Object.assign(e.style,p),f=e.animate([{transform:`scale(1)`,opacity:1},{transform:`scale(.98)`,opacity:0}],{duration:u.duration,easing:`ease-out`});else{let[t,n]=_N(u(e,`remove`,d));n?.styleReset!==!1&&(p=n?.styleReset||p,Object.assign(e.style,p)),f=new Animation(t),f.play()}RM.set(e,f),f.addEventListener(`finish`,xN.bind(null,e,p))}function CN(e,t,n,r){let i=GM-t,a=KM-n,o=document.documentElement.style.scrollBehavior,s=getComputedStyle(WM).scrollBehavior;if(s===`smooth`&&(document.documentElement.style.scrollBehavior=`auto`),window.scrollTo(window.scrollX+i,window.scrollY+a),!e.parentElement)return;let c=e.parentElement,l=c.clientHeight,u=c.clientWidth,d=performance.now();function f(){requestAnimationFrame(()=>{if(!vN(r)){let e=l-c.clientHeight,t=u-c.clientWidth;d+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-t,top:window.scrollY-e}),l=c.clientHeight,u=c.clientWidth,f()):document.documentElement.style.scrollBehavior=o}})}f()}function wN(e){let t=IM.get(e),[n,,r]=fN(e,t,dN(e)),i=e.parentElement;for(;i&&(getComputedStyle(i).position===`static`||i instanceof HTMLBodyElement);)i=i.parentElement;i||=document.body;let a=getComputedStyle(i),o=IM.get(i)||dN(i),s=Math.round(t.top-o.top)-lN(a.borderTopWidth),c=Math.round(t.left-o.left)-lN(a.borderLeftWidth);return[s,c,n,r]}function TN(e,t={}){if(rN&&iN){let n=window.matchMedia(`(prefers-reduced-motion: reduce)`),r=n.matches&&!vN(t)&&!t.disrespectUserMotionPreference;r||(UM.add(e),getComputedStyle(e).position===`static`&&Object.assign(e.style,{position:`relative`}),gN(e,$M,tN,e=>iN?.observe(e)),vN(t)?VM.set(e,t):VM.set(e,{duration:250,easing:`ease-in-out`,...t}),rN.observe(e,{childList:!0}),FM.add(e))}return Object.freeze({parent:e,enable:()=>{UM.add(e)},disable:()=>{UM.delete(e)},isEnabled:()=>UM.has(e)})}const EN={mounted:(e,t)=>{TN(e,t.value||{})},getSSRProps:()=>({})},DN=EN,ON={install(e){e.directive(`auto-animate`,DN)}};function kN(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function AN(e,t,n=`.`,r){if(!kN(t))return AN(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];if(a==null||r&&r(i,t,a,n))continue;Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:kN(a)&&kN(i[t])?i[t]=AN(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a}return i}function jN(e){return(...t)=>t.reduce((t,n)=>AN(t,n,``,e),{})}const MN=jN(),NN=jN((e,t,n)=>{if(e[t]!==void 0&&typeof n==`function`)return e[t]=n(e[t]),!0}),PN=jN((e,t,n)=>{if(Array.isArray(e[t])&&typeof n==`function`)return e[t]=n(e[t]),!0});function FN(e){return ze()?(Be(e),!0):!1}function IN(){let e=new Set,t=t=>{e.delete(t)},n=()=>{e.clear()},r=n=>{e.add(n);let r=()=>t(n);return FN(r),{off:r}},i=(...t)=>Promise.all(Array.from(e).map(e=>e(...t)));return{on:r,off:t,trigger:i,clear:n}}const LN=new WeakMap,RN=(...e)=>{var t;let n=e[0],r=(t=Ao())?.proxy;if(r==null&&!Qi())throw Error(`injectLocal must be called in setup`);return r&&LN.has(r)&&n in LN.get(r)?LN.get(r)[n]:Zi(...e)},zN=typeof window<`u`&&typeof document<`u`,BN=typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,VN=e=>e!=null,HN=Object.prototype.toString,UN=e=>HN.call(e)===`[object Object]`,WN=()=>{},GN=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function KN(...e){if(e.length!==1)return Tn(...e);let t=e[0];return typeof t==`function`?tn(xn(()=>({get:t,set:WN}))):R(t)}function qN(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}const JN=e=>e();function YN(e,t={}){let n,r,i=WN,a=e=>{clearTimeout(e),i(),i=WN},o,s=s=>{let c=B(e),l=B(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&(a(r),r=void 0),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=void 0,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=void 0,e(s())},c)})};return s}function XN(...e){let t=0,n,r=!0,i=WN,a,o,s,c,l;!pn(e[0])&&typeof e[0]==`object`?{delay:o,trailing:s=!0,leading:c=!0,rejectOnCancel:l=!1}=e[0]:[o,s=!0,c=!0,l=!1]=e;let u=()=>{n&&(clearTimeout(n),n=void 0,i(),i=WN)},d=e=>{let d=B(o),f=Date.now()-t,p=()=>a=e();return u(),d<=0?(t=Date.now(),p()):(f>d&&(c||!r)?(t=Date.now(),p()):s&&(a=new Promise((e,a)=>{i=l?a:e,n=setTimeout(()=>{t=Date.now(),r=!0,e(p()),u()},Math.max(0,d-f))})),!c&&!n&&(n=setTimeout(()=>r=!0,d)),r=!1,a)};return d}function ZN(e=JN,t={}){let{initialState:n=`active`}=t,r=KN(n===`active`);function i(){r.value=!1}function a(){r.value=!0}let o=(...t)=>{r.value&&e(...t)};return{isActive:tn(r),pause:i,resume:a,eventFilter:o}}function QN(e,t=!1,n=`Timeout`){return new Promise((r,i)=>{t?setTimeout(()=>i(n),e):setTimeout(r,e)})}function $N(e){let t;function n(){return t||=e(),t}return n.reset=async()=>{let e=t;t=void 0,e&&await e},n}function eP(e,t){var n;if(typeof e==`number`)return e+t;let r=(n=e.match(/^-?\d+\.?\d*/))?.[0]||``,i=e.slice(r.length),a=Number.parseFloat(r)+t;return Number.isNaN(a)?e:a+i}function tP(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function nP(e,t,n=!1){return t.reduce((t,r)=>(r in e&&(!n||e[r]!==void 0)&&(t[r]=e[r]),t),{})}function rP(e){return Array.isArray(e)?e:[e]}function iP(e){let t=Object.create(null);return n=>{let r=t[n];return r||(t[n]=e(n))}}const aP=/\B([A-Z])/g,oP=iP(e=>e.replace(aP,`-$1`).toLowerCase()),sP=/-(\w)/g,cP=iP(e=>e.replace(sP,(e,t)=>t?t.toUpperCase():``));function lP(e){return e||Ao()}function uP(e,t=200,n={}){return qN(YN(t,n),e)}function dP(e,t=200,n={}){let r=R(B(e)),i=uP(()=>{r.value=e.value},t,n);return V(e,()=>i()),nn(r)}function fP(e,t=200,n=!1,r=!0,i=!1){return qN(XN(t,n,r,i),e)}function pP(e,t=200,n=!0,r=!0){if(t<=0)return e;let i=R(B(e)),a=fP(()=>{i.value=e.value},t,n,r);return V(e,()=>a()),i}function mP(e,t,n={}){let{eventFilter:r=JN,...i}=n;return V(e,qN(r,t),i)}function hP(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=ZN(r,{initialState:i}),u=mP(e,t,{...a,eventFilter:o});return{stop:u,pause:s,resume:c,isActive:l}}function gP(e,t={}){if(!pn(e))return Sn(e);let n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(let r in e.value)n[r]=xn(()=>({get(){return e.value[r]},set(n){var i;let a=(i=B(t.replaceRef))??!0;if(a)if(Array.isArray(e.value)){let t=[...e.value];t[r]=n,e.value=t}else{let t={...e.value,[r]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}else e.value[r]=n}}));return n}function _P(e,t=!0,n){let r=lP(n);r?$r(e,n):t?e():Kn(e)}function vP(e,t){let n=lP(t);n&&ri(e,t)}function yP(e,t=!1){function n(n,{flush:r=`sync`,deep:i=!1,timeout:a,throwOnTimeout:o}={}){let s=null,c=new Promise(a=>{s=V(e,e=>{n(e)!==t&&(s?s():Kn(()=>s?.()),a(e))},{flush:r,deep:i,immediate:!0})}),l=[c];return a!=null&&l.push(QN(a,o).then(()=>B(e)).finally(()=>s?.())),Promise.race(l)}function r(r,i){if(!pn(r))return n(e=>e===r,i);let{flush:a=`sync`,deep:o=!1,timeout:s,throwOnTimeout:c}=i??{},l=null,u=new Promise(n=>{l=V([e,r],([e,r])=>{t!==(e===r)&&(l?l():Kn(()=>l?.()),n(e))},{flush:a,deep:o,immediate:!0})}),d=[u];return s!=null&&d.push(QN(s,c).then(()=>B(e)).finally(()=>(l?.(),B(e)))),Promise.race(d)}function i(e){return n(e=>!!e,e)}function a(e){return r(null,e)}function o(e){return r(void 0,e)}function s(e){return n(Number.isNaN,e)}function c(e,t){return n(t=>{let n=Array.from(t);return n.includes(e)||n.includes(B(e))},t)}function l(e){return u(1,e)}function u(e=1,t){let r=-1;return n(()=>(r+=1,r>=e),t)}if(Array.isArray(B(e))){let r={toMatch:n,toContains:c,changed:l,changedTimes:u,get not(){return yP(e,!t)}};return r}else{let c={toMatch:n,toBe:r,toBeTruthy:i,toBeNull:a,toBeNaN:s,toBeUndefined:o,changed:l,changedTimes:u,get not(){return yP(e,!t)}};return c}}function bP(e){return yP(e)}function xP(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=z(!1),o;function s(){o&&(clearTimeout(o),o=void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},B(t))}return r&&(a.value=!0,zN&&l()),FN(c),{isPending:nn(a),start:l,stop:c}}function SP(e,t,n={}){let{debounce:r=0,maxWait:i=void 0,...a}=n;return mP(e,t,{...a,eventFilter:YN(r,{maxWait:i})})}function CP(e,t,n){return V(e,t,{...n,immediate:!0})}function wP(e,t,n){let r;r=pn(n)?{evaluating:n}:n||{};let{lazy:i=!1,flush:a=`pre`,evaluating:o=void 0,shallow:s=!0,onError:c=WN}=r,l=z(!i),u=s?z(t):R(t),d=0;return Aa(async t=>{if(!l.value)return;d++;let n=d,r=!1;o&&Promise.resolve().then(()=>{o.value=!0});try{let i=await e(e=>{t(()=>{o&&(o.value=!1),r||e()})});n===d&&(u.value=i)}catch(e){c(e)}finally{o&&n===d&&(o.value=!1),r=!0}},{flush:a}),i?H(()=>(l.value=!0,u.value)):u}const TP=zN?window:void 0,EP=zN?window.document:void 0,DP=zN?window.navigator:void 0,OP=zN?window.location:void 0;function kP(e){var t;let n=B(e);return(t=n?.$el)??n}function AP(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=H(()=>{let t=rP(B(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),a=CP(()=>{var t,n;return[(n=(t=i.value)?.map(e=>kP(e)))??[TP].filter(e=>e!=null),rP(B(i.value?e[1]:e[0])),rP(_n(i.value?e[2]:e[1])),B(i.value?e[3]:e[2])]},([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=UN(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`}),o=()=>{a(),n()};return FN(n),o}function jP(){let e=z(!1),t=Ao();return t&&$r(()=>{e.value=!0},t),e}function MP(e){let t=jP();return H(()=>(t.value,!!e()))}function NP(e,t,n={}){let{window:r=TP,...i}=n,a,o=MP(()=>r&&`MutationObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e),n=rP(t).map(kP).filter(VN);return new Set(n)}),l=V(()=>c.value,e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),u=()=>a?.takeRecords(),d=()=>{l(),s()};return FN(d),{isSupported:o,stop:d,takeRecords:u}}const PP=Symbol(`vueuse-ssr-width`);function FP(){let e=Qi()?RN(PP,null):null;return typeof e==`number`?e:void 0}function IP(e,t={}){let{window:n=TP,ssrWidth:r=FP()}=t,i=MP(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),a=z(typeof r==`number`),o=z(),s=z(!1),c=e=>{s.value=e.matches};return Aa(()=>{if(a.value){a.value=!i.value;let t=B(e).split(`,`);s.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=tP(n[1])),i&&a&&(a=r<=tP(i[1])),t?!a:a});return}i.value&&(o.value=n.matchMedia(B(e)),s.value=o.value.matches)}),AP(o,`change`,c,{passive:!0}),H(()=>s.value)}const LP={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function RP(e,t={}){function n(t,n){let r=B(e[B(t)]);return n!=null&&(r=eP(r,n)),typeof r==`number`&&(r=`${r}px`),r}let{window:r=TP,strategy:i=`min-width`,ssrWidth:a=FP()}=t,o=typeof a==`number`,s=o?z(!1):{value:!0};o&&_P(()=>s.value=!!r);function c(e,t){return!s.value&&o?e===`min`?a>=tP(t):a<=tP(t):r?r.matchMedia(`(${e}-width: ${t})`).matches:!1}let l=e=>IP(()=>`(min-width: ${n(e)})`,t),u=e=>IP(()=>`(max-width: ${n(e)})`,t),d=Object.keys(e).reduce((e,t)=>(Object.defineProperty(e,t,{get:()=>i===`min-width`?l(t):u(t),enumerable:!0,configurable:!0}),e),{});function f(){let t=Object.keys(e).map(e=>[e,d[e],tP(n(e))]).sort((e,t)=>e[2]-t[2]);return H(()=>t.filter(([,e])=>e.value).map(([e])=>e))}return Object.assign(d,{greaterOrEqual:l,smallerOrEqual:u,greater(e){return IP(()=>`(min-width: ${n(e,.1)})`,t)},smaller(e){return IP(()=>`(max-width: ${n(e,-.1)})`,t)},between(e,r){return IP(()=>`(min-width: ${n(e)}) and (max-width: ${n(r,-.1)})`,t)},isGreater(e){return c(`min`,n(e,.1))},isGreaterOrEqual(e){return c(`min`,n(e))},isSmaller(e){return c(`max`,n(e,-.1))},isSmallerOrEqual(e){return c(`max`,n(e))},isInBetween(e,t){return c(`min`,n(e))&&c(`max`,n(t,-.1))},current:f,active(){let e=f();return H(()=>e.value.length===0?``:e.value.at(i===`min-width`?-1:0))}})}function zP(e,t={}){let{controls:n=!1,navigator:r=DP}=t,i=MP(()=>r&&`permissions`in r),a=z(),o=typeof e==`string`?{name:e}:e,s=z(),c=()=>{var e,t;s.value=(t=(e=a.value)?.state)??`prompt`};AP(a,`change`,c,{passive:!0});let l=$N(async()=>{if(i.value){if(!a.value)try{a.value=await r.permissions.query(o)}catch{a.value=void 0}finally{c()}if(n)return ln(a.value)}});return l(),n?{state:s,isSupported:i,query:l}:s}function BP(e={}){let{navigator:t=DP,read:n=!1,source:r,copiedDuring:i=1500,legacy:a=!1}=e,o=MP(()=>t&&`clipboard`in t),s=zP(`clipboard-read`),c=zP(`clipboard-write`),l=H(()=>o.value||a),u=z(``),d=z(!1),f=xP(()=>d.value=!1,i,{immediate:!1});async function p(){let e=!(o.value&&_(s.value));if(!e)try{u.value=await t.clipboard.readText()}catch{e=!0}e&&(u.value=g())}l.value&&n&&AP([`copy`,`cut`],p,{passive:!0});async function m(e=B(r)){if(l.value&&e!=null){let n=!(o.value&&_(c.value));if(!n)try{await t.clipboard.writeText(e)}catch{n=!0}n&&h(e),u.value=e,d.value=!0,f.start()}}function h(e){let t=document.createElement(`textarea`);t.value=e??``,t.style.position=`absolute`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),t.remove()}function g(){var e,t,n;return(n=(t=(e=document==null?void 0:document.getSelection)?.call(document))?.toString())??``}function _(e){return e===`granted`||e===`prompt`}return{isSupported:l,text:u,copied:d,copy:m}}const VP=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},HP=`__vueuse_ssr_handlers__`,UP=WP();function WP(){return HP in VP||(VP[HP]=VP[HP]||{}),VP[HP]}function GP(e,t){return UP[e]||t}function KP(e){return IP(`(prefers-color-scheme: dark)`,e)}function qP(e){return e==null?`any`:e instanceof Set?`set`:e instanceof Map?`map`:e instanceof Date?`date`:typeof e==`boolean`?`boolean`:typeof e==`string`?`string`:typeof e==`object`?`object`:Number.isNaN(e)?`any`:`number`}const JP={boolean:{read:e=>e===`true`,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},YP=`vueuse-storage`;function XP(e,t,n,r={}){var i;let{flush:a=`pre`,deep:o=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:l=!1,shallow:u,window:d=TP,eventFilter:f,onError:p=e=>{console.error(e)},initOnMounted:m}=r,h=(u?z:R)(typeof t==`function`?t():t),g=H(()=>B(e));if(!n)try{n=GP(`getDefaultStorage`,()=>{var e;return(e=TP)?.localStorage})()}catch(e){p(e)}if(!n)return h;let _=B(t),v=qP(_),y=(i=r.serializer)??JP[v],{pause:b,resume:x}=hP(h,()=>E(h.value),{flush:a,deep:o,eventFilter:f});V(g,()=>O(),{flush:a});let S=!1,C=e=>{m&&!S||O(e)},w=e=>{m&&!S||k(e)};d&&s&&(n instanceof Storage?AP(d,`storage`,C,{passive:!0}):AP(d,YP,w)),m?_P(()=>{S=!0,O()}):O();function T(e,t){if(d){let r={key:g.value,oldValue:e,newValue:t,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent(`storage`,r):new CustomEvent(YP,{detail:r}))}}function E(e){try{let t=n.getItem(g.value);if(e==null)T(t,null),n.removeItem(g.value);else{let r=y.write(e);t!==r&&(n.setItem(g.value,r),T(t,r))}}catch(e){p(e)}}function D(e){let t=e?e.newValue:n.getItem(g.value);if(t==null)return c&&_!=null&&n.setItem(g.value,y.write(_)),_;if(!e&&l){let e=y.read(t);return typeof l==`function`?l(e,_):v===`object`&&!Array.isArray(e)?{..._,...e}:e}else if(typeof t!=`string`)return t;else return y.read(t)}function O(e){if(!(e&&e.storageArea!==n)){if(e&&e.key==null){h.value=_;return}if(!(e&&e.key!==g.value)){b();try{e?.newValue!==y.write(h.value)&&(h.value=D(e))}catch(e){p(e)}finally{e?Kn(x):x()}}}}function k(e){O(e.detail)}return h}const ZP=`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function QP(e={}){let{selector:t=`html`,attribute:n=`class`,initialValue:r=`auto`,window:i=TP,storage:a,storageKey:o=`vueuse-color-scheme`,listenToStorageChanges:s=!0,storageRef:c,emitAuto:l,disableTransition:u=!0}=e,d={auto:``,light:`light`,dark:`dark`,...e.modes||{}},f=KP({window:i}),p=H(()=>f.value?`dark`:`light`),m=c||(o==null?KN(r):XP(o,r,a,{window:i,listenToStorageChanges:s})),h=H(()=>m.value===`auto`?p.value:m.value),g=GP(`updateHTMLAttrs`,(e,t,n)=>{let r=typeof e==`string`?i?.document.querySelector(e):kP(e);if(!r)return;let a=new Set,o=new Set,s=null;if(t===`class`){let e=n.split(/\s/g);Object.values(d).flatMap(e=>(e||``).split(/\s/g)).filter(Boolean).forEach(t=>{e.includes(t)?a.add(t):o.add(t)})}else s={key:t,value:n};if(a.size===0&&o.size===0&&s===null)return;let c;u&&(c=i.document.createElement(`style`),c.appendChild(document.createTextNode(ZP)),i.document.head.appendChild(c));for(let e of a)r.classList.add(e);for(let e of o)r.classList.remove(e);s&&r.setAttribute(s.key,s.value),u&&(i.getComputedStyle(c).opacity,document.head.removeChild(c))});function _(e){var r;g(t,n,(r=d[e])??e)}function v(t){e.onChanged?e.onChanged(t,_):_(t)}V(h,v,{flush:`post`,immediate:!0}),_P(()=>v(h.value));let y=H({get(){return l?m.value:h.value},set(e){m.value=e}});return Object.assign(y,{store:m,system:p,state:h})}function $P(e,t,n={}){let{window:r=TP,initialValue:i,observe:a=!1}=n,o=z(i),s=H(()=>{var e;return kP(t)||(e=r?.document)?.documentElement});function c(){var t;let n=B(e),a=B(s);if(a&&r&&n){let e=(t=r.getComputedStyle(a).getPropertyValue(n))?.trim();o.value=e||o.value||i}}return a&&NP(s,c,{attributeFilter:[`style`,`class`],window:r}),V([s,()=>B(e)],(e,t)=>{t[0]&&t[1]&&t[0].style.removeProperty(t[1]),c()},{immediate:!0}),V([o,s],([t,n])=>{let r=B(e);n?.style&&r&&(t==null?n.style.removeProperty(r):n.style.setProperty(r,t))},{immediate:!0}),o}function eF(e={}){let{valueDark:t=`dark`,valueLight:n=``}=e,r=QP({...e,onChanged:(t,n)=>{var r;e.onChanged?(r=e.onChanged)==null||r.call(e,t===`dark`,n,t):n(t)},modes:{dark:t,light:n}}),i=H(()=>r.system.value),a=H({get(){return r.value===`dark`},set(e){let t=e?`dark`:`light`;i.value===t?r.value=`auto`:r.value=t}});return a}function tF(e={}){let{navigator:t=DP,requestPermissions:n=!1,constraints:r={audio:!0,video:!0},onUpdated:i}=e,a=R([]),o=H(()=>a.value.filter(e=>e.kind===`videoinput`)),s=H(()=>a.value.filter(e=>e.kind===`audioinput`)),c=H(()=>a.value.filter(e=>e.kind===`audiooutput`)),l=MP(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),u=z(!1),d;async function f(){l.value&&(a.value=await t.mediaDevices.enumerateDevices(),i?.(a.value),d&&(d.getTracks().forEach(e=>e.stop()),d=null))}async function p(){let e=r.video?`camera`:`microphone`;if(!l.value)return!1;if(u.value)return!0;let{state:n,query:i}=zP(e,{controls:!0});if(await i(),n.value!==`granted`){let e=!0;try{let e=await t.mediaDevices.enumerateDevices(),n=e.some(e=>e.kind===`videoinput`),i=e.some(e=>e.kind===`audioinput`||e.kind===`audiooutput`);r.video=n?r.video:!1,r.audio=i?r.audio:!1,d=await t.mediaDevices.getUserMedia(r)}catch{d=null,e=!1}f(),u.value=e}else u.value=!0;return u.value}return l.value&&(n&&p(),AP(t.mediaDevices,`devicechange`,f,{passive:!0}),f()),{devices:a,ensurePermissions:p,permissionGranted:u,videoInputs:o,audioInputs:s,audioOutputs:c,isSupported:l}}function nF(e,t,n={}){let{window:r=TP,...i}=n,a,o=MP(()=>r&&`ResizeObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e);return Array.isArray(t)?t.map(e=>kP(e)):[kP(t)]}),l=V(c,e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),u=()=>{s(),l()};return FN(u),{isSupported:o,stop:u}}function rF(e,t={}){let{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:a=!0,updateTiming:o=`sync`}=t,s=z(0),c=z(0),l=z(0),u=z(0),d=z(0),f=z(0),p=z(0),m=z(0);function h(){let t=kP(e);if(!t){n&&(s.value=0,c.value=0,l.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0);return}let r=t.getBoundingClientRect();s.value=r.height,c.value=r.bottom,l.value=r.left,u.value=r.right,d.value=r.top,f.value=r.width,p.value=r.x,m.value=r.y}function g(){o===`sync`?h():o===`next-frame`&&requestAnimationFrame(()=>h())}return nF(e,g),V(()=>kP(e),e=>!e&&g()),NP(e,g,{attributeFilter:[`style`,`class`]}),i&&AP(`scroll`,g,{capture:!0,passive:!0}),r&&AP(`resize`,g,{passive:!0}),_P(()=>{a&&g()}),{height:s,bottom:c,left:l,right:u,top:d,width:f,x:p,y:m,update:g}}function iF(e,t,n={}){let{root:r,rootMargin:i=`0px`,threshold:a=0,window:o=TP,immediate:s=!0}=n,c=MP(()=>o&&`IntersectionObserver`in o),l=H(()=>{let t=B(e);return rP(t).map(kP).filter(VN)}),u=WN,d=z(s),f=c.value?V(()=>[l.value,kP(r),d.value],([e,n])=>{if(u(),!d.value||!e.length)return;let r=new IntersectionObserver(t,{root:kP(n),rootMargin:i,threshold:a});e.forEach(e=>e&&r.observe(e)),u=()=>{r.disconnect(),u=WN}},{immediate:s,flush:`post`}):WN,p=()=>{u(),f(),d.value=!1};return FN(p),{isSupported:c,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:p}}const aF={multiple:!0,accept:`*`,reset:!1,directory:!1};function oF(e){if(!e)return null;if(e instanceof FileList)return e;let t=new DataTransfer;for(let n of e)t.items.add(n);return t.files}function sF(e={}){let{document:t=EP}=e,n=R(oF(e.initialFiles)),{on:r,trigger:i}=IN(),{on:a,trigger:o}=IN(),s;t&&(s=kP(e.input)||t.createElement(`input`),s.type=`file`,s.onchange=e=>{let t=e.target;n.value=t.files,i(n.value)},s.oncancel=()=>{o()});let c=()=>{n.value=null,s&&s.value&&(s.value=``,i(null))},l=t=>{if(!s)return;let n={...aF,...e,...t};s.multiple=n.multiple,s.accept=n.accept,s.webkitdirectory=n.directory,GN(n,`capture`)&&(s.capture=n.capture),n.reset&&c(),s.click()};return{files:tn(n),open:l,reset:c,onCancel:a,onChange:r}}const cF=1;function lF(e,t={}){let{throttle:n=0,idle:r=200,onStop:i=WN,onScroll:a=WN,offset:o={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:c={capture:!1,passive:!0},behavior:l=`auto`,window:u=TP,onError:d=e=>{console.error(e)}}=t,f=typeof s==`boolean`?{mutation:s}:s,p=z(0),m=z(0),h=H({get(){return p.value},set(e){_(e,void 0)}}),g=H({get(){return m.value},set(e){_(void 0,e)}});function _(t,n){var r,i,a,o;if(!u)return;let s=B(e);if(!s)return;(a=s instanceof Document?u.document.body:s)==null||a.scrollTo({top:(r=B(n))??g.value,left:(i=B(t))??h.value,behavior:B(l)});let c=(o=s?.document)?.documentElement||s?.documentElement||s;h!=null&&(p.value=c.scrollLeft),g!=null&&(m.value=c.scrollTop)}let v=z(!1),y=$t({left:!0,right:!1,top:!0,bottom:!1}),b=$t({left:!1,right:!1,top:!1,bottom:!1}),x=e=>{v.value&&(v.value=!1,b.left=!1,b.right=!1,b.top=!1,b.bottom=!1,i(e))},S=uP(x,n+r),C=e=>{var t;if(!u)return;let n=(t=e?.document)?.documentElement||e?.documentElement||kP(e),{display:r,flexDirection:i,direction:a}=getComputedStyle(n),s=a===`rtl`?-1:1,c=n.scrollLeft;b.left=cp.value;let l=Math.abs(c*s)<=(o.left||0),d=Math.abs(c*s)+n.clientWidth>=n.scrollWidth-(o.right||0)-cF;r===`flex`&&i===`row-reverse`?(y.left=d,y.right=l):(y.left=l,y.right=d),p.value=c;let f=n.scrollTop;e===u.document&&!f&&(f=u.document.body.scrollTop),b.top=fm.value;let h=Math.abs(f)<=(o.top||0),g=Math.abs(f)+n.clientHeight>=n.scrollHeight-(o.bottom||0)-cF;r===`flex`&&i===`column-reverse`?(y.top=g,y.bottom=h):(y.top=h,y.bottom=g),m.value=f},w=e=>{var t;if(!u)return;let n=(t=e.target.documentElement)??e.target;C(n),v.value=!0,S(e),a(e)};return AP(e,`scroll`,n?fP(w,n,!0,!1):w,c),_P(()=>{try{let t=B(e);if(!t)return;C(t)}catch(e){d(e)}}),f?.mutation&&e!=null&&e!==u&&e!==document&&NP(e,()=>{let t=B(e);t&&C(t)},{attributes:!0,childList:!0,subtree:!0}),AP(e,`scrollend`,x,c),{x:h,y:g,isScrolling:v,arrivedState:y,directions:b,measure(){let t=B(e);u&&t&&C(t)}}}function uF(e,t,n={}){let{window:r=TP}=n;return XP(e,t,r?.localStorage,n)}const dF={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function fF(e={}){let{type:t=`page`,touch:n=!0,resetOnTouchEnds:r=!1,initialValue:i={x:0,y:0},window:a=TP,target:o=a,scroll:s=!0,eventFilter:c}=e,l=null,u=0,d=0,f=z(i.x),p=z(i.y),m=z(null),h=typeof t==`function`?t:dF[t],g=e=>{let t=h(e);l=e,t&&([f.value,p.value]=t,m.value=`mouse`),a&&(u=a.scrollX,d=a.scrollY)},_=e=>{if(e.touches.length>0){let t=h(e.touches[0]);t&&([f.value,p.value]=t,m.value=`touch`)}},v=()=>{if(!l||!a)return;let e=h(l);l instanceof MouseEvent&&e&&(f.value=e[0]+a.scrollX-u,p.value=e[1]+a.scrollY-d)},y=()=>{f.value=i.x,p.value=i.y},b=c?e=>c(()=>g(e),{}):e=>g(e),x=c?e=>c(()=>_(e),{}):e=>_(e),S=c?()=>c(()=>v(),{}):()=>v();if(o){let e={passive:!0};AP(o,[`mousemove`,`dragover`],b,e),n&&t!==`movement`&&(AP(o,[`touchstart`,`touchmove`],x,e),r&&AP(o,`touchend`,y,e)),s&&t===`page`&&AP(a,`scroll`,S,e)}return{x:f,y:p,sourceType:m}}function pF(e){let t=z(),n=()=>{t.value&&URL.revokeObjectURL(t.value),t.value=void 0};return V(()=>B(e),e=>{n(),e&&(t.value=URL.createObjectURL(e))},{immediate:!0}),FN(n),tn(t)}const mF={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},hF=Object.keys(mF);function gF(e={}){let{target:t=TP}=e,n=z(!1),r=R(e.initialValue||{});Object.assign(r.value,mF,r.value);let i=t=>{n.value=!0,!(e.pointerTypes&&!e.pointerTypes.includes(t.pointerType))&&(r.value=nP(t,hF,!1))};if(t){let e={passive:!0};AP(t,[`pointerdown`,`pointermove`,`pointerup`],i,e),AP(t,`pointerleave`,()=>n.value=!1,e)}return{...gP(r),isInside:n}}const _F=`--vueuse-safe-area-top`,vF=`--vueuse-safe-area-right`,yF=`--vueuse-safe-area-bottom`,bF=`--vueuse-safe-area-left`;function xF(){let e=z(``),t=z(``),n=z(``),r=z(``);if(zN){let e=$P(_F),t=$P(vF),n=$P(yF),r=$P(bF);e.value=`env(safe-area-inset-top, 0px)`,t.value=`env(safe-area-inset-right, 0px)`,n.value=`env(safe-area-inset-bottom, 0px)`,r.value=`env(safe-area-inset-left, 0px)`,_P(i),AP(`resize`,uP(i),{passive:!0})}function i(){e.value=SF(_F),t.value=SF(vF),n.value=SF(yF),r.value=SF(bF)}return{top:e,right:t,bottom:n,left:r,update:i}}function SF(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}const CF=[{max:6e4,value:1e3,name:`second`},{max:276e4,value:6e4,name:`minute`},{max:72e6,value:36e5,name:`hour`},{max:5184e5,value:864e5,name:`day`},{max:24192e5,value:6048e5,name:`week`},{max:28512e6,value:2592e6,name:`month`},{max:1/0,value:31536e6,name:`year`}];function wF(e={}){var t,n;let r=z((t=e.enabled)??!1),i=z((n=e.autoSwitch)??!0),a=R(e.constraints),{navigator:o=DP}=e,s=MP(()=>{var e;return(e=o?.mediaDevices)?.getUserMedia}),c=z();function l(e){switch(e){case`video`:if(a.value)return a.value.video||!1;break;case`audio`:if(a.value)return a.value.audio||!1;break}}async function u(){if(!(!s.value||c.value))return c.value=await o.mediaDevices.getUserMedia({video:l(`video`),audio:l(`audio`)}),c.value}function d(){var e;(e=c.value)==null||e.getTracks().forEach(e=>e.stop()),c.value=void 0}function f(){d(),r.value=!1}async function p(){return await u(),c.value&&(r.value=!0),c.value}async function m(){return d(),await p()}return V(r,e=>{e?u():d()},{immediate:!0}),V(a,()=>{i.value&&c.value&&m()},{immediate:!0}),FN(()=>{f()}),{isSupported:s,stream:c,start:p,stop:f,restart:m,constraints:a,enabled:r,autoSwitch:i}}function TF(e,t,n){let{window:r=TP}=n??{},i=R(null),a=z(),o=(...e)=>{a.value&&a.value.postMessage(...e)},s=function(){a.value&&a.value.terminate()};return r&&(typeof e==`string`?a.value=new Worker(e,t):typeof e==`function`?a.value=e():a.value=e,a.value.onmessage=e=>{i.value=e.data},FN(()=>{a.value&&a.value.terminate()})),{data:i,post:o,terminate:s,worker:a}}function EF(e={}){let{window:t=TP,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=z(n),c=z(r),l=()=>{if(t)if(o===`outer`)s.value=t.outerWidth,c.value=t.outerHeight;else if(o===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};l(),_P(l);let u={passive:!0};if(AP(`resize`,l,u),t&&o===`visual`&&t.visualViewport&&AP(t.visualViewport,`resize`,l,u),i){let e=IP(`(orientation: portrait)`);V(e,()=>l())}return{width:s,height:c}}const DF=1/60*1e3,OF=typeof performance<`u`?()=>performance.now():()=>Date.now(),kF=typeof window<`u`?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(OF()),DF);function AF(e){let t=[],n=[],r=0,i=!1,a=!1,o=new WeakSet,s={schedule:(e,a=!1,s=!1)=>{let c=s&&i,l=c?t:n;return a&&o.add(e),l.indexOf(e)===-1&&(l.push(e),c&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);t!==-1&&n.splice(t,1),o.delete(e)},process:c=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n(e[t]=AF(()=>NF=!0),e),{}),RF=IF.reduce((e,t)=>{let n=LF[t];return e[t]=(e,t=!1,r=!1)=>(NF||UF(),n.schedule(e,t,r)),e},{}),zF=IF.reduce((e,t)=>(e[t]=LF[t].cancel,e),{}),BF=IF.reduce((e,t)=>(e[t]=()=>LF[t].process(FF),e),{}),VF=e=>LF[e].process(FF),HF=e=>{NF=!1,FF.delta=MF?DF:Math.max(Math.min(e-FF.timestamp,jF),1),FF.timestamp=e,PF=!0,IF.forEach(VF),PF=!1,NF&&(MF=!1,kF(HF))},UF=()=>{NF=!0,MF=!0,PF||kF(HF)},WF=()=>FF;var GF=RF;function KF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),XF=.001,ZF=.01,QF=10,$F=.05,eI=1;function tI({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;qF(e<=QF*1e3,`Spring duration must be 10 seconds or less`);let o=1-t;o=YF($F,eI,o),e=YF(ZF,QF,e/1e3),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=iI(t,o),c=Math.exp(-i);return XF-a/s*c},a=t=>{let r=t*o,a=r*e,s=a*n+n,c=o**2*t**2*e,l=Math.exp(-a),u=iI(t**2,o),d=-i(t)+XF>0?-1:1;return d*((s-c)*l)/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-XF+r*i},a=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,c=rI(i,a,s);if(e*=1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}const nI=12;function rI(e,t,n){let r=n;for(let n=1;ne[t]!==void 0)}function cI(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!sI(e,oI)&&sI(e,aI)){let n=tI(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function lI(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,a=KF(e,[`from`,`to`,`restSpeed`,`restDelta`]);let o={done:!1,value:t},{stiffness:s,damping:c,mass:l,velocity:u,duration:d,isResolvedFromDuration:f}=cI(a),p=uI,m=uI;function h(){let e=u?-(u/1e3):0,r=n-t,a=c/(2*Math.sqrt(s*l)),o=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),a<1){let t=iI(o,a);p=i=>{let s=Math.exp(-a*o*i);return n-s*((e+a*o*r)/t*Math.sin(t*i)+r*Math.cos(t*i))},m=n=>{let i=Math.exp(-a*o*n);return a*o*i*(Math.sin(t*n)*(e+a*o*r)/t+r*Math.cos(t*n))-i*(Math.cos(t*n)*(e+a*o*r)-t*r*Math.sin(t*n))}}else if(a===1)p=t=>n-Math.exp(-o*t)*(r+(e+o*r)*t);else{let t=o*Math.sqrt(a*a-1);p=i=>{let s=Math.exp(-a*o*i),c=Math.min(t*i,300);return n-s*((e+a*o*r)*Math.sinh(c)+t*r*Math.cosh(c))/t}}}return h(),{next:e=>{let t=p(e);if(f)o.done=e>=d;else{let a=m(e)*1e3,s=Math.abs(a)<=r,c=Math.abs(n-t)<=i;o.done=s&&c}return o.value=o.done?n:t,o},flipTarget:()=>{u=-u,[t,n]=[n,t],h()}}}lI.needsInterpolation=(e,t)=>typeof e==`string`||typeof t==`string`;const uI=e=>0,dI=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},fI=(e,t,n)=>-n*e+n*t+e,pI=(e,t)=>n=>Math.max(Math.min(n,t),e),mI=e=>e%1?Number(e.toFixed(5)):e,hI=/(-)?([\d]*\.?[\d])+/g,gI=/(#[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,_I=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function vI(e){return typeof e==`string`}const yI={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},bI=Object.assign(Object.assign({},yI),{transform:pI(0,1)}),xI=Object.assign(Object.assign({},yI),{default:1}),SI=e=>({test:t=>vI(t)&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),CI=SI(`deg`),wI=SI(`%`),TI=SI(`px`),EI=SI(`vh`),DI=SI(`vw`),OI=Object.assign(Object.assign({},wI),{parse:e=>wI.parse(e)/100,transform:e=>wI.transform(e*100)}),kI=(e,t)=>n=>!!(vI(n)&&_I.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),AI=(e,t,n)=>r=>{if(!vI(r))return r;let[i,a,o,s]=r.match(hI);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},jI={test:kI(`hsl`,`hue`),parse:AI(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+wI.transform(mI(t))+`, `+wI.transform(mI(n))+`, `+mI(bI.transform(r))+`)`},MI=pI(0,255),NI=Object.assign(Object.assign({},yI),{transform:e=>Math.round(MI(e))}),PI={test:kI(`rgb`,`red`),parse:AI(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+NI.transform(e)+`, `+NI.transform(t)+`, `+NI.transform(n)+`, `+mI(bI.transform(r))+`)`};function FI(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const II={test:kI(`#`),parse:FI,transform:PI.transform},LI={test:e=>PI.test(e)||II.test(e)||jI.test(e),parse:e=>PI.test(e)?PI.parse(e):jI.test(e)?jI.parse(e):II.parse(e),transform:e=>vI(e)?e:e.hasOwnProperty(`red`)?PI.transform(e):jI.transform(e)},RI="${c}",zI="${n}";function BI(e){var t,n,r,i;return isNaN(e)&&vI(e)&&((n=(t=e.match(hI))?.length)??0)+((i=(r=e.match(gI))?.length)??0)>0}function VI(e){typeof e==`number`&&(e=`${e}`);let t=[],n=0,r=e.match(gI);r&&(n=r.length,e=e.replace(gI,RI),t.push(...r.map(LI.parse)));let i=e.match(hI);return i&&(e=e.replace(hI,zI),t.push(...i.map(yI.parse))),{values:t,numColors:n,tokenised:e}}function HI(e){return VI(e).values}function UI(e){let{values:t,numColors:n,tokenised:r}=VI(e),i=t.length;return e=>{let t=r;for(let r=0;rtypeof e==`number`?0:e;function GI(e){let t=HI(e),n=UI(e);return n(t.map(WI))}const KI={test:BI,parse:HI,createTransformer:UI,getAnimatableNone:GI},qI=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function JI(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(hI)||[];if(!r)return e;let i=n.replace(r,``),a=qI.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}const YI=/([a-z-]*)\(.*?\)/g,XI=Object.assign(Object.assign({},KI),{getAnimatableNone:e=>{let t=e.match(YI);return t?t.map(JI).join(` `):e}});function ZI(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function QI({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=ZI(s,r,e+1/3),a=ZI(s,r,e),o=ZI(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}const $I=(e,t,n)=>{let r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},eL=[II,PI,jI],tL=e=>eL.find(t=>t.test(e)),nL=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,rL=(e,t)=>{let n=tL(e),r=tL(t);JF(!!n,nL(e)),JF(!!r,nL(t));let i=n.parse(e),a=r.parse(t);n===jI&&(i=QI(i),n=PI),r===jI&&(a=QI(a),r=PI);let o=Object.assign({},i);return e=>{for(let t in o)t!==`alpha`&&(o[t]=$I(i[t],a[t],e));return o.alpha=fI(i.alpha,a.alpha,e),n.transform(o)}},iL=e=>typeof e==`number`,aL=(e,t)=>n=>t(e(n)),oL=(...e)=>e.reduce(aL);function sL(e,t){return iL(e)?n=>fI(e,t,n):LI.test(e)?rL(e,t):dL(e,t)}const cL=(e,t)=>{let n=[...e],r=n.length,i=e.map((e,n)=>sL(e,t[n]));return e=>{for(let t=0;t{let n=Object.assign(Object.assign({},e),t),r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=sL(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}};function uL(e){let t=KI.parse(e),n=t.length,r=0,i=0,a=0;for(let e=0;e{let n=KI.createTransformer(t),r=uL(e),i=uL(t),a=r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers;return a?oL(cL(r.parsed,i.parsed),n):(qF(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),n=>`${n>0?t:e}`)},fL=(e,t)=>n=>fI(e,t,n);function pL(e){if(typeof e==`number`)return fL;if(typeof e==`string`)return LI.test(e)?rL:dL;if(Array.isArray(e))return cL;if(typeof e==`object`)return lL}function mL(e,t,n){let r=[],i=n||pL(e[0]),a=e.length-1;for(let n=0;nn(dI(e,t,r))}function gL(e,t){let n=e.length,r=n-1;return i=>{let a=0,o=!1;if(i<=e[0]?o=!0:i>=e[r]&&(a=r-1,o=!0),!o){let t=1;for(;ti||t===r);t++);a=t-1}let s=dI(e[a],e[a+1],i);return t[a](s)}}function _L(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;JF(a===t.length,`Both input and output ranges must be the same length`),JF(!r||!Array.isArray(r)||r.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[a-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let o=mL(t,r,i),s=a===2?hL(e,o):gL(e,o);return n?t=>s(YF(e[0],e[a-1],t)):s}const vL=e=>t=>1-e(1-t),yL=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,bL=e=>t=>t**+e,xL=e=>t=>t*t*((e+1)*t-e),SL=e=>{let t=xL(e);return e=>(e*=2)<1?.5*t(e):.5*(2-2**(-10*(e-1)))},CL=1.525,wL=4/11,TL=8/11,EL=9/10,DL=e=>e,OL=bL(2),kL=vL(OL),AL=yL(OL),jL=e=>1-Math.sin(Math.acos(e)),ML=vL(jL),NL=yL(ML),PL=xL(CL),FL=vL(PL),IL=yL(PL),LL=SL(CL),RL=4356/361,zL=35442/1805,BL=16061/1805,VL=e=>{if(e===1||e===0)return e;let t=e*e;return ee<.5?.5*(1-VL(1-e*2)):.5*VL(e*2-1)+.5;function WL(e,t){return e.map(()=>t||AL).splice(0,e.length-1)}function GL(e){let t=e.length;return e.map((e,n)=>n===0?0:n/(t-1))}function KL(e,t){return e.map(e=>e*t)}function qL({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){let a={done:!1,value:e},o=Array.isArray(t)?t:[e,t],s=KL(r&&r.length===o.length?r:GL(o),i);function c(){return _L(s,o,{ease:Array.isArray(n)?n:WL(o,n)})}let l=c();return{next:e=>(a.value=l(e),a.done=e>=i,a),flipTarget:()=>{o.reverse(),l=c()}}}function JL({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:a}){let o={done:!1,value:t},s=n*e,c=t+s,l=a===void 0?c:a(c);return l!==c&&(s=l-t),{next:e=>{let t=-s*Math.exp(-e/r);return o.done=!(t>i||t<-i),o.value=o.done?l:l+t,o},flipTarget:()=>{}}}const YL={keyframes:qL,spring:lI,decay:JL};function XL(e){if(Array.isArray(e.to))return qL;if(YL[e.type])return YL[e.type];let t=new Set(Object.keys(e));return t.has(`ease`)||t.has(`duration`)&&!t.has(`dampingRatio`)?qL:t.has(`dampingRatio`)||t.has(`stiffness`)||t.has(`mass`)||t.has(`damping`)||t.has(`restSpeed`)||t.has(`restDelta`)?lI:qL}function ZL(e,t,n=0){return e-t-n}function QL(e,t,n=0,r=!0){return r?ZL(t+-e,t,n):t-(e-t)+n}function $L(e,t,n,r){return r?e>=t+n:e<=-n}const eR=e=>{let t=({delta:t})=>e(t);return{start:()=>GF.update(t,!0),stop:()=>zF.update(t)}};function tR(e){var t,n,{from:r,autoplay:i=!0,driver:a=eR,elapsed:o=0,repeat:s=0,repeatType:c=`loop`,repeatDelay:l=0,onPlay:u,onStop:d,onComplete:f,onRepeat:p,onUpdate:m}=e,h=KF(e,[`from`,`autoplay`,`driver`,`elapsed`,`repeat`,`repeatType`,`repeatDelay`,`onPlay`,`onStop`,`onComplete`,`onRepeat`,`onUpdate`]);let{to:g}=h,_,v=0,y=h.duration,b,x=!1,S=!0,C,w=XL(h);(n=(t=w).needsInterpolation)?.call(t,r,g)&&(C=_L([0,100],[r,g],{clamp:!1}),r=0,g=100);let T=w(Object.assign(Object.assign({},h),{from:r,to:g}));function E(){v++,c===`reverse`?(S=v%2==0,o=QL(o,y,l,S)):(o=ZL(o,y,l),c===`mirror`&&T.flipTarget()),x=!1,p&&p()}function D(){_.stop(),f&&f()}function O(e){if(S||(e=-e),o+=e,!x){let e=T.next(Math.max(0,o));b=e.value,C&&(b=C(b)),x=S?e.done:o<=0}m?.(b),x&&(v===0&&(y??=o),v{d?.(),_.stop()}}}function nR(e,t){return t?e*(1e3/t):0}function rR({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:a=750,bounceStiffness:o=500,bounceDamping:s=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:d,onComplete:f,onStop:p}){let m;function h(e){return n!==void 0&&er}function g(e){return n===void 0?r:r===void 0||Math.abs(n-e){var n;d?.(t),(n=e.onUpdate)==null||n.call(e,t)},onComplete:f,onStop:p}))}function v(e){_(Object.assign({type:`spring`,stiffness:o,damping:s,restDelta:c},e))}if(h(e))v({from:e,velocity:t,to:g(e)});else{let r=i*t+e;l!==void 0&&(r=l(r));let o=g(r),s=o===n?-1:1,u,d,f=e=>{u=d,d=e,t=nR(e-u,WF().delta),(s===1&&e>o||s===-1&&em?.stop()}}const iR=(e,t)=>1-3*t+3*e,aR=(e,t)=>3*t-6*e,oR=e=>3*e,sR=(e,t,n)=>((iR(t,n)*e+aR(t,n))*e+oR(t))*e,cR=(e,t,n)=>3*iR(t,n)*e*e+2*aR(t,n)*e+oR(t),lR=1e-7,uR=10;function dR(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=sR(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>lR&&++s=pR?mR(t,c,e,n):l===0?c:dR(t,r,r+gR,e,n)}return e=>e===0||e===1?e:sR(a(e),t,r)}const vR={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`},yR={};var bR=class{constructor(){e.defineProperty(this,`subscriptions`,new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,n){if(this.subscriptions.size)for(let r of this.subscriptions)r(e,t,n)}clear(){this.subscriptions.clear()}};function xR(e){return!Number.isNaN(Number.parseFloat(e))}var SR=class{constructor(t){e.defineProperty(this,`current`,void 0),e.defineProperty(this,`prev`,void 0),e.defineProperty(this,`timeDelta`,0),e.defineProperty(this,`lastUpdated`,0),e.defineProperty(this,`updateSubscribers`,new bR),e.defineProperty(this,`stopAnimation`,void 0),e.defineProperty(this,`canTrackVelocity`,!1),e.defineProperty(this,`updateAndNotify`,e=>{this.prev=this.current,this.current=e;let{delta:t,timestamp:n}=WF();this.lastUpdated!==n&&(this.timeDelta=t,this.lastUpdated=n),GF.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)}),e.defineProperty(this,`scheduleVelocityCheck`,()=>GF.postRender(this.velocityCheck)),e.defineProperty(this,`velocityCheck`,({timestamp:e})=>{this.canTrackVelocity||=xR(this.current),e!==this.lastUpdated&&(this.prev=this.current)}),this.prev=this.current=t,this.canTrackVelocity=xR(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?nR(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{let{stop:n}=e(t);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 CR(e){return new SR(e)}const{isArray:wR}=Array;function TR(){let e=R({}),t=t=>{let n=t=>{e.value[t]&&(e.value[t].stop(),e.value[t].destroy(),delete e.value[t])};t?wR(t)?t.forEach(n):n(t):Object.keys(e.value).forEach(n)},n=(t,n,r)=>{if(e.value[t])return e.value[t];let i=CR(n);return i.onChange(e=>r[t]=e),e.value[t]=i,i};return vP(t),{motionValues:e,get:n,stop:t}}function ER(e){return Array.isArray(e)}function DR(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function OR(e){return{type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function kR(e){return{type:`spring`,stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function AR(){return{type:`keyframes`,ease:`linear`,duration:300}}function jR(e){return{type:`keyframes`,duration:800,values:e}}const MR={default:kR,x:DR,y:DR,z:DR,rotate:DR,rotateX:DR,rotateY:DR,rotateZ:DR,scaleX:OR,scaleY:OR,scale:OR,backgroundColor:AR,color:AR,opacity:AR};function NR(e,t){let n;return n=ER(t)?jR:MR[e]||MR.default,{to:t,...n(t)}}const PR={...yI,transform:Math.round},FR={color:LI,backgroundColor:LI,outlineColor:LI,fill:LI,stroke:LI,borderColor:LI,borderTopColor:LI,borderRightColor:LI,borderBottomColor:LI,borderLeftColor:LI,borderWidth:TI,borderTopWidth:TI,borderRightWidth:TI,borderBottomWidth:TI,borderLeftWidth:TI,borderRadius:TI,radius:TI,borderTopLeftRadius:TI,borderTopRightRadius:TI,borderBottomRightRadius:TI,borderBottomLeftRadius:TI,width:TI,maxWidth:TI,height:TI,maxHeight:TI,size:TI,top:TI,right:TI,bottom:TI,left:TI,padding:TI,paddingTop:TI,paddingRight:TI,paddingBottom:TI,paddingLeft:TI,margin:TI,marginTop:TI,marginRight:TI,marginBottom:TI,marginLeft:TI,rotate:CI,rotateX:CI,rotateY:CI,rotateZ:CI,scale:xI,scaleX:xI,scaleY:xI,scaleZ:xI,skew:CI,skewX:CI,skewY:CI,distance:TI,translateX:TI,translateY:TI,translateZ:TI,x:TI,y:TI,z:TI,perspective:TI,transformPerspective:TI,opacity:bI,originX:OI,originY:OI,originZ:TI,zIndex:PR,filter:XI,WebkitFilter:XI,fillOpacity:bI,strokeOpacity:bI,numOctaves:PR},IR=e=>FR[e];function LR(e,t){return t&&typeof e==`number`&&t.transform?t.transform(e):e}function RR(e,t){let n=IR(e);return n!==XI&&(n=KI),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zR={linear:DL,easeIn:OL,easeInOut:AL,easeOut:kL,circIn:jL,circInOut:NL,circOut:ML,backIn:PL,backInOut:IL,backOut:FL,anticipate:LL,bounceIn:HL,bounceInOut:UL,bounceOut:VL};function BR(e){if(Array.isArray(e)){let[t,n,r,i]=e;return _R(t,n,r,i)}else if(typeof e==`string`)return zR[e];return e}function VR(e){return Array.isArray(e)&&typeof e[0]!=`number`}function HR(e,t){return e===`zIndex`?!1:!!(typeof t==`number`||Array.isArray(t)||typeof t==`string`&&KI.test(t)&&!t.startsWith(`url(`))}function UR(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function WR({ease:e,times:t,delay:n,...r}){let i={...r};return t&&(i.offset=t),e&&(i.ease=VR(e)?e.map(BR):BR(e)),n&&(i.elapsed=-n),i}function GR(e,t,n){return Array.isArray(t.to)&&(e.duration||=800),UR(t),KR(e)||(e={...e,...NR(n,t.to)}),{...t,...WR(e)}}function KR({delay:e,repeat:t,repeatType:n,repeatDelay:r,from:i,...a}){return!!Object.keys(a).length}function qR(e,t){return e[t]||e.default||e}function JR(e,t,n,r,i){let a=qR(r,e),o=a.from===null||a.from===void 0?t.get():a.from,s=HR(e,n);o===`none`&&s&&typeof n==`string`&&(o=RR(e,n));let c=HR(e,o);function l(s){let c={from:o,to:n,velocity:r.velocity?r.velocity:t.getVelocity(),onUpdate:e=>t.set(e)};return a.type===`inertia`||a.type===`decay`?rR({...c,...a}):tR({...GR(a,c,e),onUpdate:e=>{c.onUpdate(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{i&&i(),s&&s()}})}function u(e){return t.set(n),i&&i(),e&&e(),{stop:()=>{}}}return!c||!s||a.type===!1?u:l}function YR(){let{motionValues:e,stop:t,get:n}=TR(),r=(e,t,r,i={},a)=>{let o=r[e],s=n(e,o,r);if(i&&i.immediate){s.set(t);return}let c=JR(e,s,t,i,a);s.start(c)};return{motionValues:e,stop:t,push:r}}function XR(e,t={},{motionValues:n,push:r,stop:i}=YR()){let a=_n(t),o=R(!1);V(n,e=>{o.value=Object.values(e).filter(e=>e.isAnimating()).length>0},{immediate:!0,deep:!0});let s=e=>{if(!a||!a[e])throw Error(`The variant ${e} does not exist.`);return a[e]},c=t=>{typeof t==`string`&&(t=s(t));let n=Object.entries(t).map(([n,i])=>{if(n!==`transition`)return new Promise(a=>r(n,i,e,t.transition||NR(n,t[n]),a))}).filter(Boolean);async function i(){var e,r;await Promise.all(n),(e=t.transition)==null||(r=e.onComplete)==null||r.call(e)}return Promise.all([i()])},l=t=>{let n=UN(t)?t:s(t);Object.entries(n).forEach(([t,n])=>{t!==`transition`&&r(t,n,e,{immediate:!0})})},u=async e=>{let t;if(a&&(a.leave&&(t=a.leave),!a.leave&&a.initial&&(t=a.initial)),!t){e();return}await c(t),e()};return{isAnimating:o,apply:c,set:l,leave:u,stop:i}}const ZR=typeof window<`u`,QR=()=>ZR&&(window.onpointerdown===null||vR?.TEST),$R=()=>ZR&&(window.ontouchstart===null||vR?.TEST),ez=()=>ZR&&(window.onmousedown===null||vR?.TEST);function tz({target:e,state:t,variants:n,apply:r}){let i=_n(n),a=R(!1),o=R(!1),s=R(!1),c=H(()=>{let e=[...Object.keys(t.value||{})];return i?(i.hovered&&(e=[...e,...Object.keys(i.hovered)]),i.tapped&&(e=[...e,...Object.keys(i.tapped)]),i.focused&&(e=[...e,...Object.keys(i.focused)]),e):e}),l=H(()=>{let e={};for(let n in Object.assign(e,t.value),a.value&&i.hovered&&Object.assign(e,i.hovered),o.value&&i.tapped&&Object.assign(e,i.tapped),s.value&&i.focused&&Object.assign(e,i.focused),e)c.value.includes(n)||delete e[n];return e});i.hovered&&(AP(e,`mouseenter`,()=>a.value=!0),AP(e,`mouseleave`,()=>{a.value=!1,o.value=!1})),i.tapped&&(ez()&&(AP(e,`mousedown`,()=>o.value=!0),AP(e,`mouseup`,()=>o.value=!1)),QR()&&(AP(e,`pointerdown`,()=>o.value=!0),AP(e,`pointerup`,()=>o.value=!1)),$R()&&(AP(e,`touchstart`,()=>o.value=!0),AP(e,`touchend`,()=>o.value=!1))),i.focused&&(AP(e,`focus`,()=>s.value=!0),AP(e,`blur`,()=>s.value=!1)),V([a,o,s],()=>{r(l.value)})}function nz({set:e,target:t,variants:n,variant:r}){let i=_n(n);V(()=>t,()=>{i&&(i.initial&&(e(`initial`),r.value=`initial`),i.enter&&(r.value=`enter`))},{immediate:!0,flush:`pre`})}function rz({state:e,apply:t}){V(e,e=>{e&&t(e)},{immediate:!0})}function iz({target:e,variants:t,variant:n}){let r=_n(t);r&&(r.visible||r.visibleOnce)&&iF(e,([{isIntersecting:e}])=>{r.visible?e?n.value=`visible`:n.value=`initial`:r.visibleOnce&&(e&&n.value!==`visibleOnce`?n.value=`visibleOnce`:n.value||=`initial`)})}function az(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&nz(e),t.syncVariants&&rz(e),t.visibilityHooks&&iz(e),t.eventListeners&&tz(e)}function oz(e={}){let t=$t({...e}),n=R({});return V(t,()=>{let e={};for(let[n,r]of Object.entries(t)){let t=IR(n),i=LR(r,t);e[n]=i}n.value=e},{immediate:!0,deep:!0}),{state:t,style:n}}function sz(e,t){V(()=>kP(e),e=>{e&&t(e)},{immediate:!0})}const cz={x:`translateX`,y:`translateY`,z:`translateZ`};function lz(e={},t=!0){let n=$t({...e}),r=R(``);return V(n,e=>{let n=``,i=!1;if(t&&(e.x||e.y||e.z)){let t=[e.x||0,e.y||0,e.z||0].map(e=>LR(e,TI)).join(`,`);n+=`translate3d(${t}) `,i=!0}for(let[r,i]of Object.entries(e)){if(t&&(r===`x`||r===`y`||r===`z`))continue;let e=IR(r),a=LR(i,e);n+=`${cz[r]||r}(${a}) `}t&&!i&&(n+=`translateZ(0px) `),r.value=n.trim()},{immediate:!0,deep:!0}),{state:n,transform:r}}const uz=[``,`X`,`Y`,`Z`],dz=[`perspective`,`translate`,`scale`,`rotate`,`skew`],fz=[`transformPerspective`,`x`,`y`,`z`];dz.forEach(e=>{uz.forEach(t=>{let n=e+t;fz.push(n)})});const pz=new Set(fz);function mz(e){return pz.has(e)}const hz=new Set([`originX`,`originY`,`originZ`]);function gz(e){return hz.has(e)}function _z(e){let t={},n={};return Object.entries(e).forEach(([e,r])=>{mz(e)||gz(e)?t[e]=r:n[e]=r}),{transform:t,style:n}}function vz(e){let{transform:t,style:n}=_z(e),{transform:r}=lz(t),{style:i}=oz(n);return r.value&&(i.value.transform=r.value),i.value}function yz(e,t){let n,r,{state:i,style:a}=oz();return sz(e,e=>{r=e;for(let t of Object.keys(FR)){if(e.style[t]===null||e.style[t]===``||mz(t)||gz(t))continue;i[t]=e.style[t]}n&&Object.entries(n).forEach(([t,n])=>e.style[t]=n),t&&t(i)}),V(a,e=>{if(!r){n=e;return}for(let t in e)r.style[t]=e[t]},{immediate:!0}),{style:i}}function bz(e){let t=e.trim().split(/\) |\)/);if(t.length===1)return{};let n=e=>e.endsWith(`px`)||e.endsWith(`deg`)?Number.parseFloat(e):Number.isNaN(Number(e))?Number(e):e;return t.reduce((e,t)=>{if(!t)return e;let[r,i]=t.split(`(`),a=i.split(`,`),o=a.map(e=>n(e.endsWith(`)`)?e.replace(`)`,``):e.trim())),s=o.length===1?o[0]:o;return{...e,[r]:s}},{})}function xz(e,t){Object.entries(bz(t)).forEach(([t,n])=>{let r=[`x`,`y`,`z`];if(t===`translate3d`){if(n===0){r.forEach(t=>e[t]=0);return}n.forEach((t,n)=>e[r[n]]=t);return}if(n=Number.parseFloat(`${n}`),t===`translateX`){e.x=n;return}if(t===`translateY`){e.y=n;return}if(t===`translateZ`){e.z=n;return}e[t]=n})}function Sz(e,t){let n,r,{state:i,transform:a}=lz();return sz(e,e=>{r=e,e.style.transform&&xz(i,e.style.transform),n&&(e.style.transform=n),t&&t(i)}),V(a,e=>{if(!r){n=e;return}r.style.transform=e},{immediate:!0}),{transform:i}}function Cz(e){return Object.entries(e)}function wz(e,t){let n=$t({}),r=e=>Object.entries(e).forEach(([e,t])=>n[e]=t),{style:i}=yz(e,r),{transform:a}=Sz(e,r);return V(n,e=>{Cz(e).forEach(([e,t])=>{let n=mz(e)?a:i;n[e]&&n[e]===t||(n[e]=t)})},{immediate:!0,deep:!0}),sz(e,()=>t&&r(t)),{motionProperties:n,style:i,transform:a}}function Tz(e={}){let t=_n(e),n=R(),r=H(()=>{if(n.value)return t[n.value]});return{state:r,variant:n}}function Ez(e,t={},n){let{motionProperties:r}=wz(e),{variant:i,state:a}=Tz(t),o=XR(r,t),s={target:e,variant:i,variants:t,state:a,motionProperties:r,...o};return az(s,n),s}const Dz=[`delay`,`duration`],Oz=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...Dz];function kz(e){return Dz.includes(e)}function Az(e,t){let n=e.props?e.props:e.data&&e.data.attrs?e.data.attrs:{};if(n){n.variants&&UN(n.variants)&&(t.value={...t.value,...n.variants});for(let e of Oz){if(!n||!n[e])continue;if(kz(e)&&typeof n[e]==`number`){for(let r of[`enter`,`visible`,`visibleOnce`]){let i=t.value[r];if(i==null)continue;i.transition??={},i.transition[e]=n[e]}continue}if(UN(n[e])){let r=n[e];e===`visible-once`&&(e=`visibleOnce`),t.value[e]=r}}}}function jz(e,t=!1){let n=(n,r,i)=>{let a=r.value&&typeof r.value==`string`?r.value:i.key;a&&yR[a]&&yR[a].stop();let o=t?structuredClone(ln(e)||{}):e||{},s=R(o);typeof r.value==`object`&&(s.value=r.value),Az(i,s);let c={eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1},l=Ez(n,s,c);n.motionInstance=l,a&&(yR[a]=l)},r=(e,t,n)=>{e.motionInstance&&iz(e.motionInstance)};return{created:n,mounted:r,getSSRProps(t,n){let{initial:r}=t.value||n&&n?.props||{};r=_n(r);let i=MN({},e?.initial||{},r||{});if(!i||Object.keys(i).length===0)return;let a=vz(i);return{style:a}}}}const Mz={initial:{opacity:0},enter:{opacity:1}},Nz={initial:{opacity:0},visible:{opacity:1}},Pz={initial:{opacity:0},visibleOnce:{opacity:1}},Fz={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},Iz={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},Lz={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},Rz={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},zz={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},Bz={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},Vz={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}},Uz={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},Wz={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}},Kz={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},qz={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Jz={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}},Xz={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},Zz={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},Qz={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},$z={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},eB={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},tB={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},nB={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},rB={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},iB={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},aB={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},oB={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},sB={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},cB={__proto__:null,fade:Mz,fadeVisible:Nz,fadeVisibleOnce:Pz,pop:Fz,popVisible:Iz,popVisibleOnce:Lz,rollBottom:qz,rollLeft:Rz,rollRight:Vz,rollTop:Wz,rollVisibleBottom:Jz,rollVisibleLeft:zz,rollVisibleOnceBottom:Yz,rollVisibleOnceLeft:Bz,rollVisibleOnceRight:Uz,rollVisibleOnceTop:Kz,rollVisibleRight:Hz,rollVisibleTop:Gz,slideBottom:aB,slideLeft:Xz,slideRight:$z,slideTop:nB,slideVisibleBottom:oB,slideVisibleLeft:Zz,slideVisibleOnceBottom:sB,slideVisibleOnceLeft:Qz,slideVisibleOnceRight:tB,slideVisibleOnceTop:iB,slideVisibleRight:eB,slideVisibleTop:rB};function lB(e){let t=`àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;`,n=`aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------`,r=new RegExp(t.split(``).join(`|`),`g`);return e.toString().replace(/[A-Z]/g,e=>`-${e}`).toLowerCase().replace(/\s+/g,`-`).replace(r,e=>n.charAt(t.indexOf(e))).replace(/&/g,`-and-`).replace(/[^\w\-]+/g,``).replace(/-{2,}/g,`-`).replace(/^-+/,``).replace(/-+$/,``)}const uB=Symbol(``),dB={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 fB(e){return Object.prototype.toString.call(e)===`[object Object]`}function pB(e){if(Array.isArray(e))return e.map(pB);if(fB(e)){let t={};for(let n in e)t[n]=pB(e[n]);return t}return e}function mB(e){let t=$t({}),n=Zi(uB,{}),r=H(()=>e.preset==null?{}:n!=null&&e.preset in n?structuredClone(ln(n)[e.preset]):e.preset in cB?structuredClone(cB[e.preset]):{}),i=H(()=>({initial:e.initial,enter:e.enter,leave:e.leave,visible:e.visible,visibleOnce:e.visibleOnce,hovered:e.hovered,tapped:e.tapped,focused:e.focused}));function a(e,t){for(let n of[`delay`,`duration`]){if(t[n]==null)continue;let r=Number.parseInt(t[n]);for(let t of[`enter`,`visible`,`visibleOnce`]){let i=e[t];if(i==null)continue;i.transition??={},i.transition[n]=r}}return e}let o=H(()=>{let t=MN({},i.value,r.value,e.variants||{});return a({...t},e)});function s(e,n,r){var i;e.props??={},(i=e.props).style??(i.style={}),e.props.style={...e.props.style,...r};let s=a(pB(o.value),e.props);return e.props.onVnodeMounted=({el:e})=>{t[n]=Ez(e,s)},e.props.onVnodeUpdated=({el:e})=>{let r=vz(t[n].state);for(let[t,n]of Object.entries(r))e.style[t]=n},e}return{motionConfig:o,setNodeInstance:s}}const hB=Rr({name:`Motion`,props:{...dB,is:{type:[String,Object],default:`div`}},setup(e){let t=wi(),{motionConfig:n,setNodeInstance:r}=mB(e);return()=>{let i=vz(n.value.initial||{}),a=Jo(e.is,void 0,t);return r(a,0,i),a}}}),gB=Rr({name:`MotionGroup`,props:{...dB,is:{type:[String,Object],required:!1}},setup(e){let t=wi(),{motionConfig:n,setNodeInstance:r}=mB(e);return()=>{var i;let a=vz(n.value.initial||{}),o=(i=t.default)?.call(t)||[];for(let e=0;evB=e,bB=Symbol();function xB(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var SB;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(SB||={});const CB=typeof window<`u`,wB=(()=>typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null})();function TB(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function EB(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){jB(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function DB(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function OB(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}const kB=typeof navigator==`object`?navigator:{userAgent:``},AB=(()=>/Macintosh/.test(kB.userAgent)&&/AppleWebKit/.test(kB.userAgent)&&!/Safari/.test(kB.userAgent))(),jB=CB?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!AB?MB:`msSaveOrOpenBlob`in kB?NB:PB:()=>{};function MB(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?OB(r):DB(r.href)?EB(e,t,n):(r.target=`_blank`,OB(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){OB(r)},0))}function NB(e,t=`download`,n){if(typeof e==`string`)if(DB(e))EB(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){OB(t)})}else navigator.msSaveOrOpenBlob(TB(e,n),t)}function PB(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return EB(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(wB.HTMLElement))||`safari`in wB,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||AB)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}const{assign:FB}=Object;function IB(){let e=Re(!0),t=e.run(()=>R({})),n=[],r=[],i=un({install(e){yB(i),i._a=e,e.provide(bB,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const LB=()=>{};function RB(e,t,n,r=LB){e.push(t);let i=()=>{let n=e.indexOf(t);n>-1&&(e.splice(n,1),r())};return!n&&ze()&&Be(i),i}function zB(e,...t){e.slice().forEach(e=>{e(...t)})}const BB=e=>e(),VB=Symbol(),HB=Symbol();function UB(e,t){for(let n in e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e),t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];xB(i)&&xB(r)&&e.hasOwnProperty(n)&&!pn(r)&&!an(r)?e[n]=UB(i,r):e[n]=r}return e}const WB=Symbol();function GB(e){return!xB(e)||!Object.prototype.hasOwnProperty.call(e,WB)}const{assign:KB}=Object;function qB(e){return!!(pn(e)&&e.effect)}function JB(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){s||(n.state.value[e]=i?i():{});let t=Sn(n.state.value[e]);return KB(t,a,Object.keys(o||{}).reduce((t,r)=>(t[r]=un(H(()=>{yB(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=YB(e,l,t,n,r,!0),c}function YB(e,t,n={},r,i,a){let o,s=KB({actions:{}},n),c={deep:!0},l,u,d=[],f=[],p,m=r.state.value[e];!a&&!m&&(r.state.value[e]={});let h=R({}),g;function _(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:SB.patchFunction,storeId:e,events:p}):(UB(r.state.value[e],t),n={type:SB.patchObject,payload:t,storeId:e,events:p});let i=g=Symbol();Kn().then(()=>{g===i&&(l=!0)}),u=!0,zB(d,n,r.state.value[e])}let v=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{KB(e,t)})}:LB;function y(){o.stop(),d=[],f=[],r._s.delete(e)}let b=(t,n=``)=>{if(VB in t)return t[HB]=n,t;let i=function(){yB(r);let n=Array.from(arguments),a=[],o=[];function s(e){a.push(e)}function c(e){o.push(e)}zB(f,{args:n,name:i[HB],store:C,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:C,n)}catch(e){throw zB(o,e),e}return l instanceof Promise?l.then(e=>(zB(a,e),e)).catch(e=>(zB(o,e),Promise.reject(e))):(zB(a,l),l)};return i[VB]=!0,i[HB]=n,i},x=un({actions:{},getters:{},state:[],hotState:h}),S={_p:r,$id:e,$onAction:RB.bind(null,f),$patch:_,$reset:v,$subscribe(t,n={}){let i=RB(d,t,n.detached,()=>a()),a=o.run(()=>V(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:SB.direct,events:p},r)},KB({},c,n)));return i},$dispose:y},C=$t(S);r._s.set(e,C);let w=r._a&&r._a.runWithContext||BB,T=w(()=>r._e.run(()=>(o=Re()).run(()=>t({action:b}))));for(let t in T){let n=T[t];if(pn(n)&&!qB(n)||an(n))a||(m&&GB(n)&&(pn(n)?n.value=m[t]:UB(n,m[t])),r.state.value[e][t]=n);else if(typeof n==`function`){let e=b(n,t);T[t]=e,s.actions[t]=n}}return KB(C,T),KB(ln(C),T),Object.defineProperty(C,`$state`,{get:()=>r.state.value[e],set:e=>{_(t=>{KB(t,e)})}}),r._p.forEach(e=>{KB(C,o.run(()=>e({store:C,app:r._a,pinia:r,options:s})))}),m&&a&&n.hydrate&&n.hydrate(C.$state,m),l=!0,u=!0,C} /*! #__NO_SIDE_EFFECTS__ */ -function XB(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=Qi();n||=o?Zi(bB,null):null,n&&yB(n),n=vB,n._s.has(e)||(i?YB(e,t,r,n):JB(e,r,n));let s=n._s.get(e);return s}return a.$id=e,a}function ZB(e){let t=ln(e),n={};for(let r in t){let i=t[r];i.effect?n[r]=H({get:()=>e[r],set(t){e[r]=t}}):(pn(i)||an(i))&&(n[r]=Tn(e,r))}return n}const QB=`modulepreload`,$B=function(e){return`/`+e},eV={},Y=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},i=document.getElementsByTagName(`link`),a=document.querySelector(`meta[property=csp-nonce]`),o=a?.nonce||a?.getAttribute(`nonce`);r=e(t.map(e=>{if(e=$B(e,n),e in eV)return;eV[e]=!0;let t=e.endsWith(`.css`),r=t?`[rel="stylesheet"]`:``,a=!!n;if(a)for(let n=i.length-1;n>=0;n--){let r=i[n];if(r.href===e&&(!t||r.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${e}"]${r}`))return;let s=document.createElement(`link`);if(s.rel=t?`stylesheet`:QB,t||(s.as=`script`),s.crossOrigin=``,s.href=e,o&&s.setAttribute(`nonce`,o),document.head.appendChild(s),t)return new Promise((t,n)=>{s.addEventListener(`load`,t),s.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${e}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[]){if(e.status!==`rejected`)continue;i(e.reason)}return e().catch(i)})},tV=e=>{let t={},n=Object.assign({"/src/layouts/default.vue":()=>Y(()=>import(`./default-DK2eGkeE.js`),__vite__mapDeps([0,1,2])),"/src/layouts/home.vue":()=>Y(()=>import(`./home-By88AHp7.js`),[]),"/src/layouts/plain.vue":()=>Y(()=>import(`./plain-Cy4loiH2.js`),[]),"/src/layouts/settings.vue":()=>Y(()=>import(`./settings-B5qvHxHm.js`),__vite__mapDeps([3,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),"/src/layouts/stage.vue":()=>Y(()=>import(`./stage-PUSvLclx.js`),[])});Object.entries(n).forEach(([e,n])=>{let r=e.replace(`/src/layouts/`,``).replace(`.vue`,``);t[r]=n});function r(e,n=!0){return e.map(e=>{var i,a,o;if((i=e.children)?.length>0&&(e.children=r(e.children,!1)),n){var s,c,l;let n=!e.component&&(s=e.children)?.find(e=>{var t;return(e.path===``||e.path===`/`)&&(t=e.meta)?.isLayout});if(n)return e;if((c=e.meta)?.layout!==!1)return{path:e.path,component:t[(l=e.meta)?.layout||`default`],children:e.path===`/`?[e]:[{...e,path:``}],meta:{isLayout:!0}}}return(a=e.meta)?.layout?{path:e.path,component:t[(o=e.meta)?.layout],children:[{...e,path:``}],meta:{isLayout:!0}}:e})}return r(e)},nV=typeof document<`u`;function rV(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function iV(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&rV(e.default)}const aV=Object.assign;function oV(e,t){let n={};for(let r in t){let i=t[r];n[r]=cV(i)?i.map(e):e(i)}return n}const sV=()=>{},cV=Array.isArray,lV=/#/g,uV=/&/g,dV=/\//g,fV=/=/g,pV=/\?/g,mV=/\+/g,hV=/%5B/g,gV=/%5D/g,_V=/%5E/g,vV=/%60/g,yV=/%7B/g,bV=/%7C/g,xV=/%7D/g,SV=/%20/g;function CV(e){return encodeURI(``+e).replace(bV,`|`).replace(hV,`[`).replace(gV,`]`)}function wV(e){return CV(e).replace(yV,`{`).replace(xV,`}`).replace(_V,`^`)}function TV(e){return CV(e).replace(mV,`%2B`).replace(SV,`+`).replace(lV,`%23`).replace(uV,`%26`).replace(vV,"`").replace(yV,`{`).replace(xV,`}`).replace(_V,`^`)}function EV(e){return TV(e).replace(fV,`%3D`)}function DV(e){return CV(e).replace(lV,`%23`).replace(pV,`%3F`)}function OV(e){return e==null?``:DV(e).replace(dV,`%2F`)}function kV(e){try{return decodeURIComponent(``+e)}catch{}return``+e}const AV=/\/$/,jV=e=>e.replace(AV,``);function MV(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return s=0&&(c=-1),c>-1&&(r=t.slice(0,c),a=t.slice(c+1,s>-1?s:t.length),i=e(a)),s>-1&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=BV(r??t,n),{fullPath:r+(a&&`?`)+a+o,path:r,query:i,hash:kV(o)}}function NV(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function PV(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function FV(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&IV(t.matched[r],n.matched[i])&&LV(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function IV(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function LV(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!RV(e[n],t[n]))return!1;return!0}function RV(e,t){return cV(e)?zV(e,t):cV(t)?zV(t,e):e===t}function zV(e,t){return cV(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function BV(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}const VV={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};var HV;(function(e){e.pop=`pop`,e.push=`push`})(HV||={});var UV;(function(e){e.back=`back`,e.forward=`forward`,e.unknown=``})(UV||={});function WV(e){if(!e)if(nV){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),jV(e)}const GV=/^[^#]+#/;function KV(e,t){return e.replace(GV,`#`)+t}function qV(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const JV=()=>({left:window.scrollX,top:window.scrollY});function YV(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=qV(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function XV(e,t){let n=history.state?history.state.position-t:-1;return n+e}const ZV=new Map;function QV(e,t){ZV.set(e,t)}function $V(e){let t=ZV.get(e);return ZV.delete(e),t}let eH=()=>location.protocol+`//`+location.host;function tH(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),PV(n,``)}let o=PV(n,e);return o+r+i}function nH(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=tH(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:HV.pop,direction:u?u>0?UV.forward:UV.back:UV.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){let{history:e}=window;e.state&&e.replaceState(aV({},e.state,{scroll:JV()}),``)}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`beforeunload`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`beforeunload`,u,{passive:!0}),{pauseListeners:c,listen:l,destroy:d}}function rH(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?JV():null}}function iH(e){let{history:t,location:n}=window,r={value:tH(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:eH()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){let o=aV({},t.state,rH(i.value.back,e,i.value.forward,!0),n,{position:i.value.position});a(e,o,!0),r.value=e}function s(e,n){let o=aV({},i.value,t.state,{forward:e,scroll:JV()});a(o.current,o,!0);let s=aV({},rH(r.value,e,null),{position:o.position+1},n);a(e,s,!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function aH(e){e=WV(e);let t=iH(e),n=nH(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=aV({location:``,base:e,go:r,createHref:KV.bind(null,e)},t,n);return Object.defineProperty(i,`location`,{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,`state`,{enumerable:!0,get:()=>t.state.value}),i}function oH(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),aH(e)}function sH(e){return typeof e==`string`||e&&typeof e==`object`}function cH(e){return typeof e==`string`||typeof e==`symbol`}const lH=Symbol(``);var uH;(function(e){e[e.aborted=4]=`aborted`,e[e.cancelled=8]=`cancelled`,e[e.duplicated=16]=`duplicated`})(uH||={});function dH(e,t){return aV(Error(),{type:e,[lH]:!0},t)}function fH(e,t){return e instanceof Error&&lH in e&&(t==null||!!(e.type&t))}const pH=`[^/]+?`,mH={sensitive:!1,strict:!1,start:!0,end:!0},hH=/[.+*?^${}()[\]/\\]/g;function gH(e,t){let n=aV({},mH,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;rt.length?t.length===1&&t[0]===80?1:-1:0}function vH(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}const bH={type:0,value:``},xH=/[a-zA-Z0-9_]/;function SH(e){if(!e)return[[]];if(e===`/`)return[[bH]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),l=``)}function f(){l+=c}for(;s{o(f)}:sV}function o(e){if(cH(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=jH(e,n);n.splice(t,0,e),e.record.name&&!OH(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw dH(1,{location:e});s=i.record.name,a=aV(TH(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&TH(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw dH(1,{location:e,currentLocation:t});s=i.record.name,a=aV({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:kH(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function TH(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function EH(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:DH(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,`mods`,{value:{}}),t}function DH(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function OH(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function kH(e){return e.reduce((e,t)=>aV(e,t.meta),{})}function AH(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}function jH(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1,a=vH(e,t[i]);a<0?r=i:n=i+1}let i=MH(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function MH(e){let t=e;for(;t=t.parent;)if(NH(t)&&vH(e,t)===0)return t}function NH({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function PH(e){let t={};if(e===``||e===`?`)return t;let n=e[0]===`?`,r=(n?e.slice(1):e).split(`&`);for(let e=0;ee&&TV(e)):[r&&TV(r)];i.forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function IH(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=cV(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}const LH=Symbol(``),RH=Symbol(``),zH=Symbol(``),BH=Symbol(``),VH=Symbol(``);function HH(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function UH(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(dH(4,{from:n,to:t})):e instanceof Error?c(e):sH(e)?c(dH(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function WH(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(t!==`beforeRouteEnter`&&!o.instances[e])continue;if(rV(s)){let c=s.__vccOpts||s,l=c[t];l&&a.push(UH(l,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=iV(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=s.__vccOpts||s,l=c[t];return l&&UH(l,n,r,o,e,i)()}))}}return a}function GH(e){let t=Zi(zH),n=Zi(BH),r=!1,i=null,a=H(()=>{let n=_n(e.to);return t.resolve(n)}),o=H(()=>{let{matched:e}=a.value,{length:t}=e,r=e[t-1],i=n.matched;if(!r||!i.length)return-1;let o=i.findIndex(IV.bind(null,r));if(o>-1)return o;let s=ZH(e[t-2]);return t>1&&ZH(r)===s&&i[i.length-1].path!==s?i.findIndex(IV.bind(null,e[t-2])):o}),s=H(()=>o.value>-1&&XH(n.params,a.value.params)),c=H(()=>o.value>-1&&o.value===n.matched.length-1&&LV(n.params,a.value.params));function l(n={}){if(YH(n)){let n=t[_n(e.replace)?`replace`:`push`](_n(e.to)).catch(sV);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:a,href:H(()=>a.value.href),isActive:s,isExactActive:c,navigate:l}}function KH(e){return e.length===1?e[0]:e}const qH=Rr({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:GH,setup(e,{slots:t}){let n=$t(GH(e)),{options:r}=Zi(zH),i=H(()=>({[QH(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[QH(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&KH(t.default(n));return e.custom?r:Jo(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}}),JH=qH;function YH(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function XH(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!cV(i)||i.length!==r.length||r.some((e,t)=>e!==i[t]))return!1}return!0}function ZH(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}const QH=(e,t,n)=>e??t??n,$H=Rr({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Zi(VH),i=H(()=>e.route||r.value),a=Zi(RH,0),o=H(()=>{let e=_n(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=H(()=>i.value.matched[o.value]);Xi(RH,H(()=>o.value+1)),Xi(LH,s),Xi(VH,i);let c=R();return V(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!IV(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return eU(n.default,{Component:l,route:r});let u=o.props[a],d=u?u===!0?r.params:typeof u==`function`?u(r):u:null,f=e=>{e.component.isUnmounted&&(o.instances[a]=null)},p=Jo(l,aV({},d,t,{onVnodeUnmounted:f,ref:c}));return eU(n.default,{Component:p,route:r})||p}}});function eU(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}const tU=$H;function nU(e){let t=wH(e.routes,e),n=e.parseQuery||PH,r=e.stringifyQuery||FH,i=e.history,a=HH(),o=HH(),s=HH(),c=z(VV),l=VV;nV&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=oV.bind(null,e=>``+e),d=oV.bind(null,OV),f=oV.bind(null,kV);function p(e,n){let r,i;return cH(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=aV({},a||c.value),typeof e==`string`){let r=MV(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return aV(r,o,{params:f(o.params),hash:kV(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=aV({},e,{path:MV(n,e.path,a.path).path});else{let t=aV({},e.params);for(let e in t)t[e]??delete t[e];o=aV({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=NV(r,aV({},e,{hash:wV(l),path:s.path})),m=i.createHref(p);return aV({fullPath:p,hash:l,query:r===FH?IH(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?MV(n,e,c.value.path):aV({},e)}function y(e,t){if(l!==e)return dH(8,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(aV(v(e),{replace:!0}))}function S(e){let t=e.matched[e.matched.length-1];if(t&&t.redirect){let{redirect:n}=t,r=typeof n==`function`?n(e):n;return typeof r==`string`&&(r=r.includes(`?`)||r.includes(`#`)?r=v(r):{path:r},r.params={}),aV({query:e.query,hash:e.hash,params:r.path==null?e.params:{}},r)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n);if(u)return C(aV(v(u),{state:typeof u==`object`?aV({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&FV(r,i,n)&&(f=dH(16,{to:d,from:i}),ne(i,i,!0,!1)),(f?Promise.resolve(f):E(d,i)).catch(e=>fH(e)?fH(e,2)?e:P(e):ee(e,d,i)).then(e=>{if(e){if(fH(e,2))return C(aV({replace:s},v(e.to),{state:typeof e.to==`object`?aV({},a,e.to.state):a,force:o}),t||d)}else e=O(d,i,!0,s,a);return D(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=ae.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,s]=rU(e,t);n=WH(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(UH(r,e,t))});let c=w.bind(null,e,t);return n.push(c),se(n).then(()=>{n=[];for(let r of a.list())n.push(UH(r,e,t));return n.push(c),se(n)}).then(()=>{n=WH(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(UH(r,e,t))});return n.push(c),se(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(cV(r.beforeEnter))for(let i of r.beforeEnter)n.push(UH(i,e,t));else n.push(UH(r.beforeEnter,e,t));return n.push(c),se(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=WH(s,`beforeRouteEnter`,e,t,T),n.push(c),se(n))).then(()=>{n=[];for(let r of o.list())n.push(UH(r,e,t));return n.push(c),se(n)}).catch(e=>fH(e,8)?e:Promise.reject(e))}function D(e,t,n){s.list().forEach(r=>T(()=>r(e,t,n)))}function O(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===VV,l=nV?history.state:{};n&&(r||s?i.replace(e.fullPath,aV({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,ne(e,t,n,s),P()}let k;function A(){k||=i.listen((e,t,n)=>{if(!oe.listening)return;let r=_(e),a=S(r);if(a){C(aV(a,{replace:!0,force:!0}),r).catch(sV);return}l=r;let o=c.value;nV&&QV(XV(o.fullPath,n.delta),JV()),E(r,o).catch(e=>fH(e,12)?e:fH(e,2)?(C(aV(v(e.to),{force:!0}),r).then(e=>{fH(e,20)&&!n.delta&&n.type===HV.pop&&i.go(-1,!1)}).catch(sV),Promise.reject()):(n.delta&&i.go(-n.delta,!1),ee(e,r,o))).then(e=>{e||=O(r,o,!1),e&&(n.delta&&!fH(e,8)?i.go(-n.delta,!1):n.type===HV.pop&&fH(e,20)&&i.go(-1,!1)),D(r,o,e)}).catch(sV)})}let j=HH(),M=HH(),N;function ee(e,t,n){P(e);let r=M.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function te(){return N&&c.value!==VV?Promise.resolve():new Promise((e,t)=>{j.add([e,t])})}function P(e){return N||(N=!e,A(),j.list().forEach(([t,n])=>e?n(e):t()),j.reset()),e}function ne(t,n,r,i){let{scrollBehavior:a}=e;if(!nV||!a)return Promise.resolve();let o=!r&&$V(XV(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return Kn().then(()=>a(t,n,o)).then(e=>e&&YV(e)).catch(e=>ee(e,t,n))}let re=e=>i.go(e),ie,ae=new Set,oe={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:re,back:()=>re(-1),forward:()=>re(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:M.add,isReady:te,install(e){let t=this;e.component(`RouterLink`,JH),e.component(`RouterView`,tU),e.config.globalProperties.$router=t,Object.defineProperty(e.config.globalProperties,`$route`,{enumerable:!0,get:()=>_n(c)}),nV&&!ie&&c.value===VV&&(ie=!0,b(i.location).catch(e=>{}));let n={};for(let e in VV)Object.defineProperty(n,e,{get:()=>c.value[e],enumerable:!0});e.provide(zH,t),e.provide(BH,en(n)),e.provide(VH,c);let r=e.unmount;ae.add(e),e.unmount=function(){ae.delete(e),ae.size<1&&(l=VV,k&&k(),k=null,c.value=VV,ie=!1,N=!1),r()}}};function se(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return oe}function rU(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;oIV(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>IV(e,s))||i.push(s))}return[n,r,i]}function iU(){return Zi(zH)}function aU(e){return Zi(BH)}const oU=[{path:`/`,name:`/`,component:()=>Y(()=>import(`./pages-C4YaFCau.js`),__vite__mapDeps([21,22,1,2,23,9,10,11,12,13,14,15,16,17,18,19,24,25,4,5,6,7,8,20])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}},{path:`/:all(.*)`,name:`/[...all]`,component:()=>Y(()=>import(`./_...all_-Cre4u0Q1.js`),[])},{path:`/audio`,name:`/audio`,component:()=>Y(()=>import(`./audio-ablSksVU.js`),[])},{path:`/devtools`,children:[{path:`audio-record`,name:`/devtools/audio-record`,component:()=>Y(()=>import(`./audio-record-D3btUW_B.js`),__vite__mapDeps([26,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))},{path:`background-remove`,name:`/devtools/background-remove`,component:()=>Y(()=>import(`./background-remove-Bq9ik3yO.js`),__vite__mapDeps([27,7,8,28,12,29]))},{path:`chat`,name:`/devtools/chat`,component:()=>Y(()=>import(`./chat-kDuZ8L8x.js`),__vite__mapDeps([30,11]))},{path:`gesture-circle`,name:`/devtools/gesture-circle`,component:()=>Y(()=>import(`./gesture-circle-dEhSZQp3.js`),__vite__mapDeps([31,22])),meta:{layout:`plain`}},{path:`image`,name:`/devtools/image`,component:()=>Y(()=>import(`./image-BvW9nCQG.js`),__vite__mapDeps([32,33]))},{path:`polaroid`,name:`/devtools/polaroid`,component:()=>Y(()=>import(`./polaroid-DPAymSNw.js`),__vite__mapDeps([34,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))},{path:`vibrant`,name:`/devtools/vibrant`,component:()=>Y(()=>import(`./vibrant-Bgs02A1a.js`),__vite__mapDeps([35,7,8,36,29]))}]},{path:`/queue`,name:`/queue`,component:()=>Y(()=>import(`./queue-BqR-8_EY.js`),__vite__mapDeps([37,17,15]))},{path:`/settings`,children:[{path:``,name:`/settings/`,component:()=>Y(()=>import(`./settings-7Adg0ndZ.js`),__vite__mapDeps([38,22,39,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`airi-card`,children:[{path:``,name:`/settings/airi-card/`,component:()=>Y(()=>import(`./airi-card-mw1JngjQ.js`),__vite__mapDeps([40,22,41,42,7,8,43,9,10,11,12,13,14,15,16,17,18,19,44,45,46,47,4,5,6,20,29])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`components`,children:[{path:`CardCreate`,name:`/settings/airi-card/components/CardCreate`,component:()=>Y(()=>import(`./CardCreate-Cs19blbA.js`),__vite__mapDeps([48,41]))},{path:`CardCreationDialog`,name:`/settings/airi-card/components/CardCreationDialog`,component:()=>Y(()=>import(`./CardCreationDialog-C6JidgYK.js`),__vite__mapDeps([49,42,7,8,43,9,10,11,12,13,14,15,16,17,18,19,44,4,5,6,20]))},{path:`CardDetailDialog`,name:`/settings/airi-card/components/CardDetailDialog`,component:()=>Y(()=>import(`./CardDetailDialog-BW_jiSws.js`),__vite__mapDeps([50,45,46,43,7,8,18,19,9,10,11,12,13,14,15,16,17,4,5,6,20]))},{path:`CardListItem`,name:`/settings/airi-card/components/CardListItem`,component:()=>Y(()=>import(`./CardListItem-DalWAjah.js`),__vite__mapDeps([51,47,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))},{path:`DeleteCardDialog`,name:`/settings/airi-card/components/DeleteCardDialog`,component:()=>Y(()=>import(`./DeleteCardDialog-Ca2Mm-16.js`),__vite__mapDeps([52,46,43,7,8,18,19]))}]}]},{path:`appearance`,children:[{path:``,name:`/settings/appearance/`,component:()=>Y(()=>import(`./appearance-DBeyZLwP.js`),__vite__mapDeps([53,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`color-scheme`,name:`/settings/appearance/color-scheme`,component:()=>Y(()=>import(`./color-scheme-BR3byuGg.js`),__vite__mapDeps([54,22,55,43,7,8,4,5,6,9,10,11,12,13,14,15,16,17,18,19,20,56])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`developer`,name:`/settings/appearance/developer`,component:()=>Y(()=>import(`./developer-D6LGtcCU.js`),__vite__mapDeps([57,22,9,10,11,12,13,14,15,16,17])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`general`,name:`/settings/appearance/general`,component:()=>Y(()=>import(`./general-BvsEaIJQ.js`),__vite__mapDeps([58,22,7,8,9,10,11,12,13,14,15,16,17])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`memory`,children:[{path:``,name:`/settings/memory/`,component:()=>Y(()=>import(`./memory-DTRopWuR.js`),__vite__mapDeps([59,22])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`models`,children:[{path:``,name:`/settings/models/`,component:()=>Y(()=>import(`./models-AmY2AY0C.js`),__vite__mapDeps([60,22,39,55,43,7,8,61,4,5,6,9,10,11,12,13,14,15,16,17,18,19,20,36,62])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]},{path:`modules`,children:[{path:``,name:`/settings/modules/`,component:()=>Y(()=>import(`./modules-B4NyxInC.js`),__vite__mapDeps([63,22,39,61,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`consciousness`,name:`/settings/modules/consciousness`,component:()=>Y(()=>import(`./consciousness-kAj-ksUV.js`),__vite__mapDeps([64,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`hearing`,name:`/settings/modules/hearing`,component:()=>Y(()=>import(`./hearing-8DQaE61m.js`),__vite__mapDeps([65,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,28])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-long-term`,name:`/settings/modules/memory-long-term`,component:()=>Y(()=>import(`./memory-long-term-DKciszM5.js`),__vite__mapDeps([66,22])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-short-term`,name:`/settings/modules/memory-short-term`,component:()=>Y(()=>import(`./memory-short-term-Bm0Da8ag.js`),__vite__mapDeps([67,22])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`speech`,name:`/settings/modules/speech`,component:()=>Y(()=>import(`./speech-ByP1uYEY.js`),__vite__mapDeps([68,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,24,69])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`providers`,children:[{path:``,name:`/settings/providers/`,component:()=>Y(()=>import(`./providers-D-_VRMeK.js`),__vite__mapDeps([70,22,39,61,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`alibaba-cloud-model-studio`,name:`/settings/providers/alibaba-cloud-model-studio`,component:()=>Y(()=>import(`./alibaba-cloud-model-studio-CzyJX8a2.js`),__vite__mapDeps([71,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`anthropic`,name:`/settings/providers/anthropic`,component:()=>Y(()=>import(`./anthropic-CLnNuWBX.js`),__vite__mapDeps([72,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`cloudflare-workers-ai`,name:`/settings/providers/cloudflare-workers-ai`,component:()=>Y(()=>import(`./cloudflare-workers-ai-uldf83tZ.js`),__vite__mapDeps([73,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`deepseek`,name:`/settings/providers/deepseek`,component:()=>Y(()=>import(`./deepseek-p_9m2h9g.js`),__vite__mapDeps([74,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`elevenlabs`,name:`/settings/providers/elevenlabs`,component:()=>Y(()=>import(`./elevenlabs-wE9VDxlm.js`),__vite__mapDeps([75,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`featherless-ai`,name:`/settings/providers/featherless-ai`,component:()=>Y(()=>import(`./featherless-ai-DQPQketQ.js`),__vite__mapDeps([76,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`fireworks-ai`,name:`/settings/providers/fireworks-ai`,component:()=>Y(()=>import(`./fireworks-ai-BK1JbfzP.js`),__vite__mapDeps([77,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`google-generative-ai`,name:`/settings/providers/google-generative-ai`,component:()=>Y(()=>import(`./google-generative-ai-BtzrxrfR.js`),__vite__mapDeps([78,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`microsoft-speech`,name:`/settings/providers/microsoft-speech`,component:()=>Y(()=>import(`./microsoft-speech-oHJyYUA3.js`),__vite__mapDeps([79,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`mistral-ai`,name:`/settings/providers/mistral-ai`,component:()=>Y(()=>import(`./mistral-ai-CSPbz6P7.js`),__vite__mapDeps([80,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`moonshot-ai`,name:`/settings/providers/moonshot-ai`,component:()=>Y(()=>import(`./moonshot-ai-DQXpgnTx.js`),__vite__mapDeps([81,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`novita-ai`,name:`/settings/providers/novita-ai`,component:()=>Y(()=>import(`./novita-ai-utW-azgn.js`),__vite__mapDeps([82,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`ollama`,name:`/settings/providers/ollama`,component:()=>Y(()=>import(`./ollama-CHn_CRdf.js`),__vite__mapDeps([83,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai`,name:`/settings/providers/openai`,component:()=>Y(()=>import(`./openai-D78WUN50.js`),__vite__mapDeps([84,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-speech`,name:`/settings/providers/openai-audio-speech`,component:()=>Y(()=>import(`./openai-audio-speech-CIhpAE_g.js`),__vite__mapDeps([85,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-transcription`,name:`/settings/providers/openai-audio-transcription`,component:()=>Y(()=>import(`./openai-audio-transcription-BQWhP4fg.js`),__vite__mapDeps([86,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openrouter-ai`,name:`/settings/providers/openrouter-ai`,component:()=>Y(()=>import(`./openrouter-ai-B5FAPnom.js`),__vite__mapDeps([87,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2`,name:`/settings/providers/player2`,component:()=>Y(()=>import(`./player2-DQr7xDpa.js`),__vite__mapDeps([88,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2-speech`,name:`/settings/providers/player2-speech`,component:()=>Y(()=>import(`./player2-speech-DdGKDDVO.js`),__vite__mapDeps([89,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`together-ai`,name:`/settings/providers/together-ai`,component:()=>Y(()=>import(`./together-ai-GN2N0NkN.js`),__vite__mapDeps([90,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`volcengine`,name:`/settings/providers/volcengine`,component:()=>Y(()=>import(`./volcengine-p6oDJzj5.js`),__vite__mapDeps([91,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`xai`,name:`/settings/providers/xai`,component:()=>Y(()=>import(`./xai-CNHx3pHj.js`),__vite__mapDeps([92,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`scene`,children:[{path:``,name:`/settings/scene/`,component:()=>Y(()=>import(`./scene-Bait6ok6.js`),__vite__mapDeps([93,22,39,61,9,10,11,12,13,14,15,16,17])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]}]},{path:`/stage`,children:[{path:``,name:`/stage/`,component:()=>Y(()=>import(`./stage-CVXzpwpy.js`),__vite__mapDeps([94,22,1,2,23,9,10,11,12,13,14,15,16,17,18,19,24,25,4,5,6,7,8,20])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}}]},{path:`/test`,children:[{path:`filter-message`,name:`/test/filter-message`,component:()=>Y(()=>import(`./filter-message-BialTeOq.js`),__vite__mapDeps([95,7,8,17,24,69]))},{path:`queues`,children:[{path:`delays`,name:`/test/queues/delays`,component:()=>Y(()=>import(`./delays-CenmsVvX.js`),__vite__mapDeps([96,7,8,10,17,15,16,24,69]))},{path:`emotions`,name:`/test/queues/emotions`,component:()=>Y(()=>import(`./emotions-BS9jIw56.js`),__vite__mapDeps([97,7,8,17,15,16,24,69]))},{path:`messages`,name:`/test/queues/messages`,component:()=>Y(()=>import(`./messages-Bpag3yji.js`),__vite__mapDeps([98,7,8,17,15,16,24,69]))}]}]}],sU=(e,t)=>{if(typeof e==`number`){if(t===3)return{mode:`rgb`,r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:`rgb`,r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:`rgb`,r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:`rgb`,r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}};var cU=sU;const lU={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};var uU=lU;const dU=e=>cU(uU[e.toLowerCase()],6);var fU=dU;const pU=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,mU=e=>{let t;return(t=e.match(pU))?cU(parseInt(t[1],16),t[1].length):void 0};var hU=mU;const gU=`([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)`,_U=`(?:${gU}|none)`,vU=`${gU}%`,yU=`(?:${gU}%|none)`,bU=`(?:${gU}%|${gU})`,xU=`(?:${gU}%|${gU}|none)`,SU=`(?:${gU}(deg|grad|rad|turn)|${gU})`,CU=`(?:${gU}(deg|grad|rad|turn)|${gU}|none)`,wU=`\\s*,\\s*`,TU=RegExp(`^`+xU+`$`),EU=RegExp(`^rgba?\\(\\s*${gU}${wU}${gU}${wU}${gU}\\s*(?:,\\s*${bU}\\s*)?\\)$`),DU=RegExp(`^rgba?\\(\\s*${vU}${wU}${vU}${wU}${vU}\\s*(?:,\\s*${bU}\\s*)?\\)$`),OU=e=>{let t={mode:`rgb`},n;if(n=e.match(EU))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(DU))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]===void 0?n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))):t.alpha=Math.max(0,Math.min(1,n[4]/100)),t};var kU=OU;const AU=(e,t)=>e===void 0?void 0:typeof e==`object`?e.mode===void 0?t?{...e,mode:t}:void 0:e:nW(e);var jU=AU;const MU=(e=`rgb`)=>t=>(t=jU(t,e))===void 0?void 0:t.mode===e?t:PU[t.mode][e]?PU[t.mode][e](t):e===`rgb`?PU[t.mode].rgb(t):PU.rgb[e](PU[t.mode].rgb(t));var NU=MU;const PU={},FU={},IU=[],LU={},RU=e=>e,zU=e=>(PU[e.mode]={...PU[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{PU[t]||(PU[t]={}),PU[t][e.mode]=e.fromMode[t]}),e.ranges||={},e.difference||={},e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]==`function`&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=RU)}),FU[e.mode]=e,(e.parse||[]).forEach(t=>{VU(t,e.mode)}),NU(e.mode)),BU=e=>FU[e],VU=(e,t)=>{if(typeof e==`string`){if(!t)throw Error(`'mode' required when 'parser' is a string`);LU[e]=t}else typeof e==`function`&&IU.indexOf(e)<0&&IU.push(e)},HU=/[^\x00-\x7F]|[a-zA-Z_]/,UU=/[^\x00-\x7F]|[-\w]/,X={Function:`function`,Ident:`ident`,Number:`number`,Percentage:`percentage`,ParenClose:`)`,None:`none`,Hue:`hue`,Alpha:`alpha`};let Z=0;function WU(e){let t=e[Z],n=e[Z+1];return t===`-`||t===`+`?/\d/.test(n)||n===`.`&&/\d/.test(e[Z+2]):t===`.`?/\d/.test(n):/\d/.test(t)}function GU(e){if(Z>=e.length)return!1;let t=e[Z];if(HU.test(t))return!0;if(t===`-`){if(e.length-Z<2)return!1;let t=e[Z+1];return!!(t===`-`||HU.test(t))}return!1}const KU={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function qU(e){let t=``;if((e[Z]===`-`||e[Z]===`+`)&&(t+=e[Z++]),t+=JU(e),e[Z]===`.`&&/\d/.test(e[Z+1])&&(t+=e[Z++]+JU(e)),(e[Z]===`e`||e[Z]===`E`)&&((e[Z+1]===`-`||e[Z+1]===`+`)&&/\d/.test(e[Z+2])?t+=e[Z++]+e[Z++]+JU(e):/\d/.test(e[Z+1])&&(t+=e[Z++]+JU(e))),GU(e)){let n=YU(e);return n===`deg`||n===`rad`||n===`turn`||n===`grad`?{type:X.Hue,value:t*KU[n]}:void 0}return e[Z]===`%`?(Z++,{type:X.Percentage,value:+t}):{type:X.Number,value:+t}}function JU(e){let t=``;for(;/\d/.test(e[Z]);)t+=e[Z++];return t}function YU(e){let t=``;for(;Ze[r],set(t){e[r]=t}}):(pn(i)||an(i))&&(n[r]=Tn(e,r))}return n}const QB=`modulepreload`,$B=function(e){return`/`+e},eV={},Y=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},i=document.getElementsByTagName(`link`),a=document.querySelector(`meta[property=csp-nonce]`),o=a?.nonce||a?.getAttribute(`nonce`);r=e(t.map(e=>{if(e=$B(e,n),e in eV)return;eV[e]=!0;let t=e.endsWith(`.css`),r=t?`[rel="stylesheet"]`:``,a=!!n;if(a)for(let n=i.length-1;n>=0;n--){let r=i[n];if(r.href===e&&(!t||r.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${e}"]${r}`))return;let s=document.createElement(`link`);if(s.rel=t?`stylesheet`:QB,t||(s.as=`script`),s.crossOrigin=``,s.href=e,o&&s.setAttribute(`nonce`,o),document.head.appendChild(s),t)return new Promise((t,n)=>{s.addEventListener(`load`,t),s.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${e}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[]){if(e.status!==`rejected`)continue;i(e.reason)}return e().catch(i)})},tV=e=>{let t={},n=Object.assign({"/src/layouts/default.vue":()=>Y(()=>import(`./default-C1ln69hW.js`),__vite__mapDeps([0,1,2])),"/src/layouts/home.vue":()=>Y(()=>import(`./home-DMVuOG4M.js`),[]),"/src/layouts/plain.vue":()=>Y(()=>import(`./plain-0ecyFzXQ.js`),[]),"/src/layouts/settings.vue":()=>Y(()=>import(`./settings-Nn2AwpUk.js`),__vite__mapDeps([3,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),"/src/layouts/stage.vue":()=>Y(()=>import(`./stage-wnk7RoUv.js`),[])});Object.entries(n).forEach(([e,n])=>{let r=e.replace(`/src/layouts/`,``).replace(`.vue`,``);t[r]=n});function r(e,n=!0){return e.map(e=>{var i,a,o;if((i=e.children)?.length>0&&(e.children=r(e.children,!1)),n){var s,c,l;let n=!e.component&&(s=e.children)?.find(e=>{var t;return(e.path===``||e.path===`/`)&&(t=e.meta)?.isLayout});if(n)return e;if((c=e.meta)?.layout!==!1)return{path:e.path,component:t[(l=e.meta)?.layout||`default`],children:e.path===`/`?[e]:[{...e,path:``}],meta:{isLayout:!0}}}return(a=e.meta)?.layout?{path:e.path,component:t[(o=e.meta)?.layout],children:[{...e,path:``}],meta:{isLayout:!0}}:e})}return r(e)},nV=typeof document<`u`;function rV(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function iV(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&rV(e.default)}const aV=Object.assign;function oV(e,t){let n={};for(let r in t){let i=t[r];n[r]=cV(i)?i.map(e):e(i)}return n}const sV=()=>{},cV=Array.isArray,lV=/#/g,uV=/&/g,dV=/\//g,fV=/=/g,pV=/\?/g,mV=/\+/g,hV=/%5B/g,gV=/%5D/g,_V=/%5E/g,vV=/%60/g,yV=/%7B/g,bV=/%7C/g,xV=/%7D/g,SV=/%20/g;function CV(e){return encodeURI(``+e).replace(bV,`|`).replace(hV,`[`).replace(gV,`]`)}function wV(e){return CV(e).replace(yV,`{`).replace(xV,`}`).replace(_V,`^`)}function TV(e){return CV(e).replace(mV,`%2B`).replace(SV,`+`).replace(lV,`%23`).replace(uV,`%26`).replace(vV,"`").replace(yV,`{`).replace(xV,`}`).replace(_V,`^`)}function EV(e){return TV(e).replace(fV,`%3D`)}function DV(e){return CV(e).replace(lV,`%23`).replace(pV,`%3F`)}function OV(e){return e==null?``:DV(e).replace(dV,`%2F`)}function kV(e){try{return decodeURIComponent(``+e)}catch{}return``+e}const AV=/\/$/,jV=e=>e.replace(AV,``);function MV(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return s=0&&(c=-1),c>-1&&(r=t.slice(0,c),a=t.slice(c+1,s>-1?s:t.length),i=e(a)),s>-1&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=BV(r??t,n),{fullPath:r+(a&&`?`)+a+o,path:r,query:i,hash:kV(o)}}function NV(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function PV(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function FV(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&IV(t.matched[r],n.matched[i])&&LV(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function IV(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function LV(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!RV(e[n],t[n]))return!1;return!0}function RV(e,t){return cV(e)?zV(e,t):cV(t)?zV(t,e):e===t}function zV(e,t){return cV(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function BV(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}const VV={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};var HV;(function(e){e.pop=`pop`,e.push=`push`})(HV||={});var UV;(function(e){e.back=`back`,e.forward=`forward`,e.unknown=``})(UV||={});function WV(e){if(!e)if(nV){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),jV(e)}const GV=/^[^#]+#/;function KV(e,t){return e.replace(GV,`#`)+t}function qV(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const JV=()=>({left:window.scrollX,top:window.scrollY});function YV(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=qV(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function XV(e,t){let n=history.state?history.state.position-t:-1;return n+e}const ZV=new Map;function QV(e,t){ZV.set(e,t)}function $V(e){let t=ZV.get(e);return ZV.delete(e),t}let eH=()=>location.protocol+`//`+location.host;function tH(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),PV(n,``)}let o=PV(n,e);return o+r+i}function nH(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=tH(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:HV.pop,direction:u?u>0?UV.forward:UV.back:UV.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){let{history:e}=window;e.state&&e.replaceState(aV({},e.state,{scroll:JV()}),``)}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`beforeunload`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`beforeunload`,u,{passive:!0}),{pauseListeners:c,listen:l,destroy:d}}function rH(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?JV():null}}function iH(e){let{history:t,location:n}=window,r={value:tH(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:eH()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){let o=aV({},t.state,rH(i.value.back,e,i.value.forward,!0),n,{position:i.value.position});a(e,o,!0),r.value=e}function s(e,n){let o=aV({},i.value,t.state,{forward:e,scroll:JV()});a(o.current,o,!0);let s=aV({},rH(r.value,e,null),{position:o.position+1},n);a(e,s,!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function aH(e){e=WV(e);let t=iH(e),n=nH(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=aV({location:``,base:e,go:r,createHref:KV.bind(null,e)},t,n);return Object.defineProperty(i,`location`,{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,`state`,{enumerable:!0,get:()=>t.state.value}),i}function oH(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),aH(e)}function sH(e){return typeof e==`string`||e&&typeof e==`object`}function cH(e){return typeof e==`string`||typeof e==`symbol`}const lH=Symbol(``);var uH;(function(e){e[e.aborted=4]=`aborted`,e[e.cancelled=8]=`cancelled`,e[e.duplicated=16]=`duplicated`})(uH||={});function dH(e,t){return aV(Error(),{type:e,[lH]:!0},t)}function fH(e,t){return e instanceof Error&&lH in e&&(t==null||!!(e.type&t))}const pH=`[^/]+?`,mH={sensitive:!1,strict:!1,start:!0,end:!0},hH=/[.+*?^${}()[\]/\\]/g;function gH(e,t){let n=aV({},mH,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;rt.length?t.length===1&&t[0]===80?1:-1:0}function vH(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}const bH={type:0,value:``},xH=/[a-zA-Z0-9_]/;function SH(e){if(!e)return[[]];if(e===`/`)return[[bH]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),l=``)}function f(){l+=c}for(;s{o(f)}:sV}function o(e){if(cH(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=jH(e,n);n.splice(t,0,e),e.record.name&&!OH(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw dH(1,{location:e});s=i.record.name,a=aV(TH(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&TH(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw dH(1,{location:e,currentLocation:t});s=i.record.name,a=aV({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:kH(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function TH(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function EH(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:DH(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,`mods`,{value:{}}),t}function DH(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function OH(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function kH(e){return e.reduce((e,t)=>aV(e,t.meta),{})}function AH(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}function jH(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1,a=vH(e,t[i]);a<0?r=i:n=i+1}let i=MH(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function MH(e){let t=e;for(;t=t.parent;)if(NH(t)&&vH(e,t)===0)return t}function NH({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function PH(e){let t={};if(e===``||e===`?`)return t;let n=e[0]===`?`,r=(n?e.slice(1):e).split(`&`);for(let e=0;ee&&TV(e)):[r&&TV(r)];i.forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function IH(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=cV(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}const LH=Symbol(``),RH=Symbol(``),zH=Symbol(``),BH=Symbol(``),VH=Symbol(``);function HH(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function UH(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(dH(4,{from:n,to:t})):e instanceof Error?c(e):sH(e)?c(dH(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function WH(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(t!==`beforeRouteEnter`&&!o.instances[e])continue;if(rV(s)){let c=s.__vccOpts||s,l=c[t];l&&a.push(UH(l,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=iV(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=s.__vccOpts||s,l=c[t];return l&&UH(l,n,r,o,e,i)()}))}}return a}function GH(e){let t=Zi(zH),n=Zi(BH),r=!1,i=null,a=H(()=>{let n=_n(e.to);return t.resolve(n)}),o=H(()=>{let{matched:e}=a.value,{length:t}=e,r=e[t-1],i=n.matched;if(!r||!i.length)return-1;let o=i.findIndex(IV.bind(null,r));if(o>-1)return o;let s=ZH(e[t-2]);return t>1&&ZH(r)===s&&i[i.length-1].path!==s?i.findIndex(IV.bind(null,e[t-2])):o}),s=H(()=>o.value>-1&&XH(n.params,a.value.params)),c=H(()=>o.value>-1&&o.value===n.matched.length-1&&LV(n.params,a.value.params));function l(n={}){if(YH(n)){let n=t[_n(e.replace)?`replace`:`push`](_n(e.to)).catch(sV);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:a,href:H(()=>a.value.href),isActive:s,isExactActive:c,navigate:l}}function KH(e){return e.length===1?e[0]:e}const qH=Rr({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:GH,setup(e,{slots:t}){let n=$t(GH(e)),{options:r}=Zi(zH),i=H(()=>({[QH(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[QH(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&KH(t.default(n));return e.custom?r:Jo(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}}),JH=qH;function YH(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function XH(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!cV(i)||i.length!==r.length||r.some((e,t)=>e!==i[t]))return!1}return!0}function ZH(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}const QH=(e,t,n)=>e??t??n,$H=Rr({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Zi(VH),i=H(()=>e.route||r.value),a=Zi(RH,0),o=H(()=>{let e=_n(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=H(()=>i.value.matched[o.value]);Xi(RH,H(()=>o.value+1)),Xi(LH,s),Xi(VH,i);let c=R();return V(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!IV(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return eU(n.default,{Component:l,route:r});let u=o.props[a],d=u?u===!0?r.params:typeof u==`function`?u(r):u:null,f=e=>{e.component.isUnmounted&&(o.instances[a]=null)},p=Jo(l,aV({},d,t,{onVnodeUnmounted:f,ref:c}));return eU(n.default,{Component:p,route:r})||p}}});function eU(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}const tU=$H;function nU(e){let t=wH(e.routes,e),n=e.parseQuery||PH,r=e.stringifyQuery||FH,i=e.history,a=HH(),o=HH(),s=HH(),c=z(VV),l=VV;nV&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=oV.bind(null,e=>``+e),d=oV.bind(null,OV),f=oV.bind(null,kV);function p(e,n){let r,i;return cH(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=aV({},a||c.value),typeof e==`string`){let r=MV(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return aV(r,o,{params:f(o.params),hash:kV(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=aV({},e,{path:MV(n,e.path,a.path).path});else{let t=aV({},e.params);for(let e in t)t[e]??delete t[e];o=aV({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=NV(r,aV({},e,{hash:wV(l),path:s.path})),m=i.createHref(p);return aV({fullPath:p,hash:l,query:r===FH?IH(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?MV(n,e,c.value.path):aV({},e)}function y(e,t){if(l!==e)return dH(8,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(aV(v(e),{replace:!0}))}function S(e){let t=e.matched[e.matched.length-1];if(t&&t.redirect){let{redirect:n}=t,r=typeof n==`function`?n(e):n;return typeof r==`string`&&(r=r.includes(`?`)||r.includes(`#`)?r=v(r):{path:r},r.params={}),aV({query:e.query,hash:e.hash,params:r.path==null?e.params:{}},r)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n);if(u)return C(aV(v(u),{state:typeof u==`object`?aV({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&FV(r,i,n)&&(f=dH(16,{to:d,from:i}),ne(i,i,!0,!1)),(f?Promise.resolve(f):E(d,i)).catch(e=>fH(e)?fH(e,2)?e:P(e):ee(e,d,i)).then(e=>{if(e){if(fH(e,2))return C(aV({replace:s},v(e.to),{state:typeof e.to==`object`?aV({},a,e.to.state):a,force:o}),t||d)}else e=O(d,i,!0,s,a);return D(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=ae.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,s]=rU(e,t);n=WH(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(UH(r,e,t))});let c=w.bind(null,e,t);return n.push(c),se(n).then(()=>{n=[];for(let r of a.list())n.push(UH(r,e,t));return n.push(c),se(n)}).then(()=>{n=WH(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(UH(r,e,t))});return n.push(c),se(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(cV(r.beforeEnter))for(let i of r.beforeEnter)n.push(UH(i,e,t));else n.push(UH(r.beforeEnter,e,t));return n.push(c),se(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=WH(s,`beforeRouteEnter`,e,t,T),n.push(c),se(n))).then(()=>{n=[];for(let r of o.list())n.push(UH(r,e,t));return n.push(c),se(n)}).catch(e=>fH(e,8)?e:Promise.reject(e))}function D(e,t,n){s.list().forEach(r=>T(()=>r(e,t,n)))}function O(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===VV,l=nV?history.state:{};n&&(r||s?i.replace(e.fullPath,aV({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,ne(e,t,n,s),P()}let k;function A(){k||=i.listen((e,t,n)=>{if(!oe.listening)return;let r=_(e),a=S(r);if(a){C(aV(a,{replace:!0,force:!0}),r).catch(sV);return}l=r;let o=c.value;nV&&QV(XV(o.fullPath,n.delta),JV()),E(r,o).catch(e=>fH(e,12)?e:fH(e,2)?(C(aV(v(e.to),{force:!0}),r).then(e=>{fH(e,20)&&!n.delta&&n.type===HV.pop&&i.go(-1,!1)}).catch(sV),Promise.reject()):(n.delta&&i.go(-n.delta,!1),ee(e,r,o))).then(e=>{e||=O(r,o,!1),e&&(n.delta&&!fH(e,8)?i.go(-n.delta,!1):n.type===HV.pop&&fH(e,20)&&i.go(-1,!1)),D(r,o,e)}).catch(sV)})}let j=HH(),M=HH(),N;function ee(e,t,n){P(e);let r=M.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function te(){return N&&c.value!==VV?Promise.resolve():new Promise((e,t)=>{j.add([e,t])})}function P(e){return N||(N=!e,A(),j.list().forEach(([t,n])=>e?n(e):t()),j.reset()),e}function ne(t,n,r,i){let{scrollBehavior:a}=e;if(!nV||!a)return Promise.resolve();let o=!r&&$V(XV(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return Kn().then(()=>a(t,n,o)).then(e=>e&&YV(e)).catch(e=>ee(e,t,n))}let re=e=>i.go(e),ie,ae=new Set,oe={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:re,back:()=>re(-1),forward:()=>re(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:M.add,isReady:te,install(e){let t=this;e.component(`RouterLink`,JH),e.component(`RouterView`,tU),e.config.globalProperties.$router=t,Object.defineProperty(e.config.globalProperties,`$route`,{enumerable:!0,get:()=>_n(c)}),nV&&!ie&&c.value===VV&&(ie=!0,b(i.location).catch(e=>{}));let n={};for(let e in VV)Object.defineProperty(n,e,{get:()=>c.value[e],enumerable:!0});e.provide(zH,t),e.provide(BH,en(n)),e.provide(VH,c);let r=e.unmount;ae.add(e),e.unmount=function(){ae.delete(e),ae.size<1&&(l=VV,k&&k(),k=null,c.value=VV,ie=!1,N=!1),r()}}};function se(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return oe}function rU(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;oIV(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>IV(e,s))||i.push(s))}return[n,r,i]}function iU(){return Zi(zH)}function aU(e){return Zi(BH)}const oU=[{path:`/`,name:`/`,component:()=>Y(()=>import(`./pages-BohMTnhi.js`),__vite__mapDeps([21,22,1,2,23,9,10,11,12,13,14,15,16,17,18,19,24,25,4,5,6,7,8,20])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}},{path:`/:all(.*)`,name:`/[...all]`,component:()=>Y(()=>import(`./_...all_-DN80NrxA.js`),[])},{path:`/audio`,name:`/audio`,component:()=>Y(()=>import(`./audio-B0s8-AFI.js`),[])},{path:`/devtools`,children:[{path:`audio-record`,name:`/devtools/audio-record`,component:()=>Y(()=>import(`./audio-record-COiXC0pt.js`),__vite__mapDeps([26,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))},{path:`background-remove`,name:`/devtools/background-remove`,component:()=>Y(()=>import(`./background-remove-DVVfI1Xi.js`),__vite__mapDeps([27,7,8,28,12,29]))},{path:`chat`,name:`/devtools/chat`,component:()=>Y(()=>import(`./chat-C7uR1EUr.js`),__vite__mapDeps([30,11]))},{path:`gesture-circle`,name:`/devtools/gesture-circle`,component:()=>Y(()=>import(`./gesture-circle-BeGjgvNx.js`),__vite__mapDeps([31,22])),meta:{layout:`plain`}},{path:`image`,name:`/devtools/image`,component:()=>Y(()=>import(`./image-DfeFRFtx.js`),__vite__mapDeps([32,33]))},{path:`polaroid`,name:`/devtools/polaroid`,component:()=>Y(()=>import(`./polaroid-HVdbjIQr.js`),__vite__mapDeps([34,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))},{path:`vibrant`,name:`/devtools/vibrant`,component:()=>Y(()=>import(`./vibrant-GPCtw0rY.js`),__vite__mapDeps([35,7,8,36,29]))}]},{path:`/queue`,name:`/queue`,component:()=>Y(()=>import(`./queue-DrZb4pfX.js`),__vite__mapDeps([37,17,15]))},{path:`/settings`,children:[{path:``,name:`/settings/`,component:()=>Y(()=>import(`./settings-D244O10q.js`),__vite__mapDeps([38,22,39,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`airi-card`,children:[{path:``,name:`/settings/airi-card/`,component:()=>Y(()=>import(`./airi-card-DrWWMwCR.js`),__vite__mapDeps([40,22,41,42,7,8,43,9,10,11,12,13,14,15,16,17,18,19,44,45,46,47,4,5,6,20,29])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`components`,children:[{path:`CardCreate`,name:`/settings/airi-card/components/CardCreate`,component:()=>Y(()=>import(`./CardCreate-BXajcpvK.js`),__vite__mapDeps([48,41]))},{path:`CardCreationDialog`,name:`/settings/airi-card/components/CardCreationDialog`,component:()=>Y(()=>import(`./CardCreationDialog-ohI_4kmP.js`),__vite__mapDeps([49,42,7,8,43,9,10,11,12,13,14,15,16,17,18,19,44,4,5,6,20]))},{path:`CardDetailDialog`,name:`/settings/airi-card/components/CardDetailDialog`,component:()=>Y(()=>import(`./CardDetailDialog-pJ19LoWD.js`),__vite__mapDeps([50,45,46,43,7,8,18,19,9,10,11,12,13,14,15,16,17,4,5,6,20]))},{path:`CardListItem`,name:`/settings/airi-card/components/CardListItem`,component:()=>Y(()=>import(`./CardListItem-BXlJ2a3I.js`),__vite__mapDeps([51,47,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))},{path:`DeleteCardDialog`,name:`/settings/airi-card/components/DeleteCardDialog`,component:()=>Y(()=>import(`./DeleteCardDialog-D6RQM-NX.js`),__vite__mapDeps([52,46,43,7,8,18,19]))}]}]},{path:`appearance`,children:[{path:``,name:`/settings/appearance/`,component:()=>Y(()=>import(`./appearance-Bl3T7BtW.js`),__vite__mapDeps([53,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`color-scheme`,name:`/settings/appearance/color-scheme`,component:()=>Y(()=>import(`./color-scheme-CkLbeWU6.js`),__vite__mapDeps([54,22,55,43,7,8,4,5,6,9,10,11,12,13,14,15,16,17,18,19,20,56])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`developer`,name:`/settings/appearance/developer`,component:()=>Y(()=>import(`./developer-CPJ4sT27.js`),__vite__mapDeps([57,22,9,10,11,12,13,14,15,16,17])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`general`,name:`/settings/appearance/general`,component:()=>Y(()=>import(`./general-D0JKvHDV.js`),__vite__mapDeps([58,22,7,8,9,10,11,12,13,14,15,16,17])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`memory`,children:[{path:``,name:`/settings/memory/`,component:()=>Y(()=>import(`./memory-B4tFztnI.js`),__vite__mapDeps([59,22])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`models`,children:[{path:``,name:`/settings/models/`,component:()=>Y(()=>import(`./models-BDiVXLbc.js`),__vite__mapDeps([60,22,39,55,43,7,8,61,4,5,6,9,10,11,12,13,14,15,16,17,18,19,20,36,62])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]},{path:`modules`,children:[{path:``,name:`/settings/modules/`,component:()=>Y(()=>import(`./modules-B_WFNh94.js`),__vite__mapDeps([63,22,39,61,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`consciousness`,name:`/settings/modules/consciousness`,component:()=>Y(()=>import(`./consciousness-CEAWA4LX.js`),__vite__mapDeps([64,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`hearing`,name:`/settings/modules/hearing`,component:()=>Y(()=>import(`./hearing-C5OHOeCl.js`),__vite__mapDeps([65,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,28])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-long-term`,name:`/settings/modules/memory-long-term`,component:()=>Y(()=>import(`./memory-long-term-CDpPvihx.js`),__vite__mapDeps([66,22])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-short-term`,name:`/settings/modules/memory-short-term`,component:()=>Y(()=>import(`./memory-short-term-C8UMWOHr.js`),__vite__mapDeps([67,22])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`speech`,name:`/settings/modules/speech`,component:()=>Y(()=>import(`./speech-D4NcUzWM.js`),__vite__mapDeps([68,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,24,69])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`providers`,children:[{path:``,name:`/settings/providers/`,component:()=>Y(()=>import(`./providers-BQTY_iJ9.js`),__vite__mapDeps([70,22,39,61,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`alibaba-cloud-model-studio`,name:`/settings/providers/alibaba-cloud-model-studio`,component:()=>Y(()=>import(`./alibaba-cloud-model-studio-asn8Gwqn.js`),__vite__mapDeps([71,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`anthropic`,name:`/settings/providers/anthropic`,component:()=>Y(()=>import(`./anthropic-CbFYT849.js`),__vite__mapDeps([72,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`cloudflare-workers-ai`,name:`/settings/providers/cloudflare-workers-ai`,component:()=>Y(()=>import(`./cloudflare-workers-ai-CYDm84zU.js`),__vite__mapDeps([73,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`deepseek`,name:`/settings/providers/deepseek`,component:()=>Y(()=>import(`./deepseek-BnI8cEci.js`),__vite__mapDeps([74,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`elevenlabs`,name:`/settings/providers/elevenlabs`,component:()=>Y(()=>import(`./elevenlabs-DnbB9bTa.js`),__vite__mapDeps([75,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`featherless-ai`,name:`/settings/providers/featherless-ai`,component:()=>Y(()=>import(`./featherless-ai-3KKQQVHb.js`),__vite__mapDeps([76,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`fireworks-ai`,name:`/settings/providers/fireworks-ai`,component:()=>Y(()=>import(`./fireworks-ai-CfqA2SqF.js`),__vite__mapDeps([77,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`google-generative-ai`,name:`/settings/providers/google-generative-ai`,component:()=>Y(()=>import(`./google-generative-ai-BC2Ukvsi.js`),__vite__mapDeps([78,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`microsoft-speech`,name:`/settings/providers/microsoft-speech`,component:()=>Y(()=>import(`./microsoft-speech-0I0KtNpM.js`),__vite__mapDeps([79,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`mistral-ai`,name:`/settings/providers/mistral-ai`,component:()=>Y(()=>import(`./mistral-ai-CxyrZSnm.js`),__vite__mapDeps([80,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`moonshot-ai`,name:`/settings/providers/moonshot-ai`,component:()=>Y(()=>import(`./moonshot-ai-CPxUGdzM.js`),__vite__mapDeps([81,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`novita-ai`,name:`/settings/providers/novita-ai`,component:()=>Y(()=>import(`./novita-ai-BHu56LyQ.js`),__vite__mapDeps([82,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`ollama`,name:`/settings/providers/ollama`,component:()=>Y(()=>import(`./ollama-CbGvZQLV.js`),__vite__mapDeps([83,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai`,name:`/settings/providers/openai`,component:()=>Y(()=>import(`./openai-CFrJH41X.js`),__vite__mapDeps([84,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-speech`,name:`/settings/providers/openai-audio-speech`,component:()=>Y(()=>import(`./openai-audio-speech-CQnlHz-h.js`),__vite__mapDeps([85,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-transcription`,name:`/settings/providers/openai-audio-transcription`,component:()=>Y(()=>import(`./openai-audio-transcription-COj7c5f3.js`),__vite__mapDeps([86,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openrouter-ai`,name:`/settings/providers/openrouter-ai`,component:()=>Y(()=>import(`./openrouter-ai-B3LA44lL.js`),__vite__mapDeps([87,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2`,name:`/settings/providers/player2`,component:()=>Y(()=>import(`./player2-D0DMNaQM.js`),__vite__mapDeps([88,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2-speech`,name:`/settings/providers/player2-speech`,component:()=>Y(()=>import(`./player2-speech-D3f8DqIF.js`),__vite__mapDeps([89,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`together-ai`,name:`/settings/providers/together-ai`,component:()=>Y(()=>import(`./together-ai-DLS8TUdj.js`),__vite__mapDeps([90,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`volcengine`,name:`/settings/providers/volcengine`,component:()=>Y(()=>import(`./volcengine-B-dG8mwz.js`),__vite__mapDeps([91,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`xai`,name:`/settings/providers/xai`,component:()=>Y(()=>import(`./xai-5DuPupy5.js`),__vite__mapDeps([92,22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`scene`,children:[{path:``,name:`/settings/scene/`,component:()=>Y(()=>import(`./scene-BMgC1HoG.js`),__vite__mapDeps([93,22,39,61,9,10,11,12,13,14,15,16,17])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]}]},{path:`/stage`,children:[{path:``,name:`/stage/`,component:()=>Y(()=>import(`./stage-DU1LZDda.js`),__vite__mapDeps([94,22,1,2,23,9,10,11,12,13,14,15,16,17,18,19,24,25,4,5,6,7,8,20])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}}]},{path:`/test`,children:[{path:`filter-message`,name:`/test/filter-message`,component:()=>Y(()=>import(`./filter-message-DFghiITe.js`),__vite__mapDeps([95,7,8,17,24,69]))},{path:`queues`,children:[{path:`delays`,name:`/test/queues/delays`,component:()=>Y(()=>import(`./delays-CLOrklec.js`),__vite__mapDeps([96,7,8,10,17,15,16,24,69]))},{path:`emotions`,name:`/test/queues/emotions`,component:()=>Y(()=>import(`./emotions-nbudrl-b.js`),__vite__mapDeps([97,7,8,17,15,16,24,69]))},{path:`messages`,name:`/test/queues/messages`,component:()=>Y(()=>import(`./messages-BFRiVTfh.js`),__vite__mapDeps([98,7,8,17,15,16,24,69]))}]}]}],sU=(e,t)=>{if(typeof e==`number`){if(t===3)return{mode:`rgb`,r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:`rgb`,r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:`rgb`,r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:`rgb`,r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}};var cU=sU;const lU={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};var uU=lU;const dU=e=>cU(uU[e.toLowerCase()],6);var fU=dU;const pU=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,mU=e=>{let t;return(t=e.match(pU))?cU(parseInt(t[1],16),t[1].length):void 0};var hU=mU;const gU=`([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)`,_U=`(?:${gU}|none)`,vU=`${gU}%`,yU=`(?:${gU}%|none)`,bU=`(?:${gU}%|${gU})`,xU=`(?:${gU}%|${gU}|none)`,SU=`(?:${gU}(deg|grad|rad|turn)|${gU})`,CU=`(?:${gU}(deg|grad|rad|turn)|${gU}|none)`,wU=`\\s*,\\s*`,TU=RegExp(`^`+xU+`$`),EU=RegExp(`^rgba?\\(\\s*${gU}${wU}${gU}${wU}${gU}\\s*(?:,\\s*${bU}\\s*)?\\)$`),DU=RegExp(`^rgba?\\(\\s*${vU}${wU}${vU}${wU}${vU}\\s*(?:,\\s*${bU}\\s*)?\\)$`),OU=e=>{let t={mode:`rgb`},n;if(n=e.match(EU))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(DU))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]===void 0?n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))):t.alpha=Math.max(0,Math.min(1,n[4]/100)),t};var kU=OU;const AU=(e,t)=>e===void 0?void 0:typeof e==`object`?e.mode===void 0?t?{...e,mode:t}:void 0:e:nW(e);var jU=AU;const MU=(e=`rgb`)=>t=>(t=jU(t,e))===void 0?void 0:t.mode===e?t:PU[t.mode][e]?PU[t.mode][e](t):e===`rgb`?PU[t.mode].rgb(t):PU.rgb[e](PU[t.mode].rgb(t));var NU=MU;const PU={},FU={},IU=[],LU={},RU=e=>e,zU=e=>(PU[e.mode]={...PU[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{PU[t]||(PU[t]={}),PU[t][e.mode]=e.fromMode[t]}),e.ranges||={},e.difference||={},e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]==`function`&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=RU)}),FU[e.mode]=e,(e.parse||[]).forEach(t=>{VU(t,e.mode)}),NU(e.mode)),BU=e=>FU[e],VU=(e,t)=>{if(typeof e==`string`){if(!t)throw Error(`'mode' required when 'parser' is a string`);LU[e]=t}else typeof e==`function`&&IU.indexOf(e)<0&&IU.push(e)},HU=/[^\x00-\x7F]|[a-zA-Z_]/,UU=/[^\x00-\x7F]|[-\w]/,X={Function:`function`,Ident:`ident`,Number:`number`,Percentage:`percentage`,ParenClose:`)`,None:`none`,Hue:`hue`,Alpha:`alpha`};let Z=0;function WU(e){let t=e[Z],n=e[Z+1];return t===`-`||t===`+`?/\d/.test(n)||n===`.`&&/\d/.test(e[Z+2]):t===`.`?/\d/.test(n):/\d/.test(t)}function GU(e){if(Z>=e.length)return!1;let t=e[Z];if(HU.test(t))return!0;if(t===`-`){if(e.length-Z<2)return!1;let t=e[Z+1];return!!(t===`-`||HU.test(t))}return!1}const KU={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function qU(e){let t=``;if((e[Z]===`-`||e[Z]===`+`)&&(t+=e[Z++]),t+=JU(e),e[Z]===`.`&&/\d/.test(e[Z+1])&&(t+=e[Z++]+JU(e)),(e[Z]===`e`||e[Z]===`E`)&&((e[Z+1]===`-`||e[Z+1]===`+`)&&/\d/.test(e[Z+2])?t+=e[Z++]+e[Z++]+JU(e):/\d/.test(e[Z+1])&&(t+=e[Z++]+JU(e))),GU(e)){let n=YU(e);return n===`deg`||n===`rad`||n===`turn`||n===`grad`?{type:X.Hue,value:t*KU[n]}:void 0}return e[Z]===`%`?(Z++,{type:X.Percentage,value:+t}):{type:X.Number,value:+t}}function JU(e){let t=``;for(;/\d/.test(e[Z]);)t+=e[Z++];return t}function YU(e){let t=``;for(;Z4)){if(n.length===4){if(n[3].type!==X.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:X.None,value:void 0}),n.every(e=>e.type!==X.Alpha)?n:void 0}}function eW(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==X.Function)return;let r=$U(e,t);if(r)return r.unshift(n.value),r}const tW=e=>{if(typeof e!=`string`)return;let t=ZU(e),n=t?eW(t,!0):void 0,r,i=0,a=IU.length;for(;ie===`transparent`?{mode:`rgb`,r:0,g:0,b:0,alpha:0}:void 0;var oW=aW;const sW=(e,t,n)=>e+n*(t-e),cW=e=>{let t=[];for(let n=0;nt=>{let n=cW(t);return t=>{let r=t*n.length,i=t>=1?n.length-1:Math.max(Math.floor(r),0),a=n[i];return a===void 0?void 0:e(a[0],a[1],r-i)}},Q=lW(sW),uW=e=>{let t=!1,n=e.map(e=>e===void 0?1:(t=!0,e));return t?n:e},dW={mode:`rgb`,channels:[`r`,`g`,`b`,`alpha`],parse:[iW,hU,kU,fU,oW,`srgb`],serialize:`srgb`,interpolate:{r:Q,g:Q,b:Q,alpha:{use:Q,fixup:uW}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}};var fW=dW;const pW=(e=0)=>Math.abs(e)**(563/256)*Math.sign(e),mW=e=>{let t=pW(e.r),n=pW(e.g),r=pW(e.b),i={mode:`xyz65`,x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i};var hW=mW;const gW=e=>Math.abs(e)**(256/563)*Math.sign(e),_W=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`a98`,r:gW(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:gW(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:gW(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i};var vW=_W;const yW=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*((t+.055)/1.055)**2.4},bW=({r:e,g:t,b:n,alpha:r})=>{let i={mode:`lrgb`,r:yW(e),g:yW(t),b:yW(n)};return r!==void 0&&(i.alpha=r),i};var xW=bW;const SW=e=>{let{r:t,g:n,b:r,alpha:i}=xW(e),a={mode:`xyz65`,x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(a.alpha=i),a};var CW=SW;const wW=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*t**(1/2.4)-.055):e*12.92},TW=({r:e,g:t,b:n,alpha:r},i=`rgb`)=>{let a={mode:i,r:wW(e),g:wW(t),b:wW(n)};return r!==void 0&&(a.alpha=r),a};var EW=TW;const DW=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=EW({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i};var OW=DW;const kW={...fW,mode:`a98`,parse:[`a98-rgb`],serialize:`a98-rgb`,fromMode:{rgb:e=>vW(CW(e)),xyz65:vW},toMode:{rgb:e=>OW(hW(e)),xyz65:hW}};var AW=kW;const jW=e=>(e%=360)<0?e+360:e;var MW=jW;const NW=(e,t)=>e.map((n,r,i)=>{if(n===void 0)return n;let a=MW(n);return r===0||e[r-1]===void 0?a:t(a-MW(i[r-1]))}).reduce((e,t)=>!e.length||t===void 0||e[e.length-1]===void 0?(e.push(t),e):(e.push(t+e[e.length-1]),e),[]),PW=e=>NW(e,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),FW=[-.14861,1.78277,-.29227,-.90649,1.97294,0],IW=Math.PI/180,LW=180/Math.PI;let RW=FW[3]*FW[4],zW=FW[1]*FW[4],BW=FW[1]*FW[2]-FW[0]*FW[3];const VW=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(BW*n+e*RW-t*zW)/(BW+RW-zW),a=n-i,o=(FW[4]*(t-i)-FW[2]*a)/FW[3],s={mode:`cubehelix`,l:i,s:i===0||i===1?void 0:Math.sqrt(a*a+o*o)/(FW[4]*i*(1-i))};return s.s&&(s.h=Math.atan2(o,a)*LW-120),r!==void 0&&(s.alpha=r),s};var HW=VW;const UW=({h:e,s:t,l:n,alpha:r})=>{let i={mode:`rgb`};e=(e===void 0?0:e+120)*IW,n===void 0&&(n=0);let a=t===void 0?0:t*n*(1-n),o=Math.cos(e),s=Math.sin(e);return i.r=n+a*(FW[0]*o+FW[1]*s),i.g=n+a*(FW[2]*o+FW[3]*s),i.b=n+a*(FW[4]*o+FW[5]*s),r!==void 0&&(i.alpha=r),i};var WW=UW;const GW=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=MW(e.h),r=MW(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*i},KW=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=MW(e.h),r=MW(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},qW=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=MW(e.h),r=MW(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*i},JW=e=>{let t=e.reduce((e,t)=>{if(t!==void 0){let n=t*Math.PI/180;e.sin+=Math.sin(n),e.cos+=Math.cos(n)}return e},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},YW={mode:`cubehelix`,channels:[`h`,`s`,`l`,`alpha`],parse:[`--cubehelix`],serialize:`--cubehelix`,ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:HW},toMode:{rgb:WW},interpolate:{h:{use:Q,fixup:PW},s:Q,l:Q,alpha:{use:Q,fixup:uW}},difference:{h:GW},average:{h:JW}};var XW=YW;const ZW=({l:e,a:t,b:n,alpha:r},i=`lch`)=>{t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.sqrt(t*t+n*n),o={mode:i,l:e,c:a};return a&&(o.h=MW(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(o.alpha=r),o};var QW=ZW;const $W=({l:e,c:t,h:n,alpha:r},i=`lab`)=>{n===void 0&&(n=0);let a={mode:i,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(a.alpha=r),a};var eG=$W;const tG=29**3/3**3,nG=6**3/29**3,rG={X:.3457/.3585,Y:1,Z:.2958/.3585},iG={X:.3127/.329,Y:1,Z:.3583/.329},aG=29**3/3**3,oG=6**3/29**3;let sG=e=>e**3>nG?e**3:(116*e-16)/tG;const cG=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,a=t/500+i,o=i-n/200,s={mode:`xyz65`,x:sG(a)*iG.X,y:sG(i)*iG.Y,z:sG(o)*iG.Z};return r!==void 0&&(s.alpha=r),s};var lG=cG;const uG=e=>OW(lG(e));var dG=uG;const fG=e=>e>nG?Math.cbrt(e):(tG*e+16)/116,pG=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=fG(e/iG.X),a=fG(t/iG.Y),o=fG(n/iG.Z),s={mode:`lab65`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s};var mG=pG;const hG=e=>{let t=mG(CW(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var gG=hG;const _G=1,vG=1,yG=26/180*Math.PI,bG=Math.cos(yG),xG=Math.sin(yG),SG=100/Math.log(139/100),CG=({l:e,c:t,h:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`lab65`,l:(Math.exp(e*_G/SG)-1)/.0039},a=(Math.exp(.0435*t*vG*_G)-1)/.075,o=a*Math.cos(n/180*Math.PI-yG),s=a*Math.sin(n/180*Math.PI-yG);return i.a=o*bG-s/.83*xG,i.b=o*xG+s/.83*bG,r!==void 0&&(i.alpha=r),i};var wG=CG;const TG=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=t*bG+n*xG,a=.83*(n*bG-t*xG),o=Math.sqrt(i*i+a*a),s={mode:`dlch`,l:SG/_G*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*vG*_G)};return s.c&&(s.h=MW((Math.atan2(a,i)+yG)/Math.PI*180)),r!==void 0&&(s.alpha=r),s};var EG=TG;const DG=e=>wG(QW(e,`dlch`)),OG=e=>eG(EG(e),`dlab`),kG={mode:`dlab`,parse:[`--din99o-lab`],serialize:`--din99o-lab`,toMode:{lab65:DG,rgb:e=>dG(DG(e))},fromMode:{lab65:OG,rgb:e=>OG(gG(e))},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Q,a:Q,b:Q,alpha:{use:Q,fixup:uW}}};var AG=kG;const jG={mode:`dlch`,parse:[`--din99o-lch`],serialize:`--din99o-lch`,toMode:{lab65:wG,dlab:e=>eG(e,`dlab`),rgb:e=>dG(wG(e))},fromMode:{lab65:EG,dlab:e=>QW(e,`dlch`),rgb:e=>EG(gG(e))},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Q,c:Q,h:{use:Q,fixup:PW},alpha:{use:Q,fixup:uW}},difference:{h:qW},average:{h:JW}};var MG=jG;function NG({h:e,s:t,i:n,alpha:r}){e=MW(e===void 0?0:e),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:n*(1+t*(3/(2-i)-1)),g:n*(1+t*(3*(1-i)/(2-i)-1)),b:n*(1-t)};break;case 1:a={r:n*(1+t*(3*(1-i)/(2-i)-1)),g:n*(1+t*(3/(2-i)-1)),b:n*(1-t)};break;case 2:a={r:n*(1-t),g:n*(1+t*(3/(2-i)-1)),b:n*(1+t*(3*(1-i)/(2-i)-1))};break;case 3:a={r:n*(1-t),g:n*(1+t*(3*(1-i)/(2-i)-1)),b:n*(1+t*(3/(2-i)-1))};break;case 4:a={r:n*(1+t*(3*(1-i)/(2-i)-1)),g:n*(1-t),b:n*(1+t*(3/(2-i)-1))};break;case 5:a={r:n*(1+t*(3/(2-i)-1)),g:n*(1-t),b:n*(1+t*(3*(1-i)/(2-i)-1))};break;default:a={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return a.mode=`rgb`,r!==void 0&&(a.alpha=r),a}function PG({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),a=Math.min(e,t,n),o={mode:`hsi`,s:e+t+n===0?0:1-3*a/(e+t+n),i:(e+t+n)/3};return i-a!==0&&(o.h=(i===e?(t-n)/(i-a)+(t{switch(t){case`deg`:return+e;case`rad`:return e/Math.PI*180;case`grad`:return e/10*9;case`turn`:return e*360}};var BG=zG;const VG=RegExp(`^hsla?\\(\\s*${SU}${wU}${vU}${wU}${vU}\\s*(?:,\\s*${bU}\\s*)?\\)$`),HG=e=>{let t=e.match(VG);if(!t)return;let n={mode:`hsl`};return t[3]===void 0?t[1]!==void 0&&t[2]!==void 0&&(n.h=BG(t[1],t[2])):n.h=+t[3],t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]===void 0?t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))):n.alpha=Math.max(0,Math.min(1,t[6]/100)),n};var UG=HG;function WG(e,t){if(!t||t[0]!==`hsl`&&t[0]!==`hsla`)return;let n={mode:`hsl`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Percentage)return;n.h=r.value}if(i.type!==X.None){if(i.type===X.Hue)return;n.s=i.value/100}if(a.type!==X.None){if(a.type===X.Hue)return;n.l=a.value/100}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var GG=WG;const KG={mode:`hsl`,toMode:{rgb:LG},fromMode:{rgb:RG},channels:[`h`,`s`,`l`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[GG,UG],serialize:e=>`hsl(${e.h===void 0?`none`:e.h} ${e.s===void 0?`none`:e.s*100+`%`} ${e.l===void 0?`none`:e.l*100+`%`}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:Q,fixup:PW},s:Q,l:Q,alpha:{use:Q,fixup:uW}},difference:{h:GW},average:{h:JW}};var qG=KG;function JG({h:e,s:t,v:n,alpha:r}){e=MW(e===void 0?0:e),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:n,g:n*(1-t*i),b:n*(1-t)};break;case 1:a={r:n*(1-t*i),g:n,b:n*(1-t)};break;case 2:a={r:n*(1-t),g:n,b:n*(1-t*i)};break;case 3:a={r:n*(1-t),g:n*(1-t*i),b:n};break;case 4:a={r:n*(1-t*i),g:n*(1-t),b:n};break;case 5:a={r:n,g:n*(1-t),b:n*(1-t*i)};break;default:a={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return a.mode=`rgb`,r!==void 0&&(a.alpha=r),a}function YG({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),a=Math.min(e,t,n),o={mode:`hsv`,s:i===0?0:1-a/i,v:i};return i-a!==0&&(o.h=(i===e?(t-n)/(i-a)+(t1){let e=t+n;t/=e,n/=e}return JG({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function $G(e){let t=YG(e);if(t===void 0)return;let n=t.s===void 0?0:t.s,r=t.v===void 0?0:t.v,i={mode:`hwb`,w:(1-n)*r,b:1-r};return t.h!==void 0&&(i.h=t.h),t.alpha!==void 0&&(i.alpha=t.alpha),i}function eK(e,t){if(!t||t[0]!==`hwb`)return;let n={mode:`hwb`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Percentage)return;n.h=r.value}if(i.type!==X.None){if(i.type===X.Hue)return;n.w=i.value/100}if(a.type!==X.None){if(a.type===X.Hue)return;n.b=a.value/100}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var tK=eK;const nK={mode:`hwb`,toMode:{rgb:QG},fromMode:{rgb:$G},channels:[`h`,`w`,`b`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[tK],serialize:e=>`hwb(${e.h===void 0?`none`:e.h} ${e.w===void 0?`none`:e.w*100+`%`} ${e.b===void 0?`none`:e.b*100+`%`}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:Q,fixup:PW},w:Q,b:Q,alpha:{use:Q,fixup:uW}},difference:{h:KW},average:{h:JW}};var rK=nK;const iK=203,aK=.1593017578125,oK=78.84375,sK=.8359375,cK=18.8515625,lK=18.6875;function uK(e){if(e<0)return 0;let t=e**(1/oK);return 1e4*(Math.max(0,t-sK)/(cK-lK*t))**(1/aK)}function dK(e){if(e<0)return 0;let t=(e/1e4)**aK;return((sK+cK*t)/(1+lK*t))**+oK}const fK=e=>Math.max(e/iK,0),pK=({i:e,t,p:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=uK(e+.008609037037932761*t+.11102962500302593*n),a=uK(e-.00860903703793275*t-.11102962500302599*n),o=uK(e+.5600313357106791*t-.32062717498731885*n),s={mode:`xyz65`,x:fK(2.070152218389422*i-1.3263473389671556*a+.2066510476294051*o),y:fK(.3647385209748074*i+.680566024947227*a-.0453045459220346*o),z:fK(-.049747207535812*i-.0492609666966138*a+1.1880659249923042*o)};return r!==void 0&&(s.alpha=r),s};var mK=pK;const hK=(e=0)=>Math.max(e*iK,0),gK=({x:e,y:t,z:n,alpha:r})=>{let i=hK(e),a=hK(t),o=hK(n),s=dK(.3592832590121217*i+.6976051147779502*a-.0358915932320289*o),c=dK(-.1920808463704995*i+1.1004767970374323*a+.0753748658519118*o),l=dK(.0070797844607477*i+.0748396662186366*a+.8433265453898765*o),u=.5*s+.5*c,d=1.61376953125*s-3.323486328125*c+1.709716796875*l,f=4.378173828125*s-4.24560546875*c-.132568359375*l,p={mode:`itp`,i:u,t:d,p:f};return r!==void 0&&(p.alpha=r),p};var _K=gK;const vK={mode:`itp`,channels:[`i`,`t`,`p`,`alpha`],parse:[`--ictcp`],serialize:`--ictcp`,toMode:{xyz65:mK,rgb:e=>OW(mK(e))},fromMode:{xyz65:_K,rgb:e=>_K(CW(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Q,t:Q,p:Q,alpha:{use:Q,fixup:uW}}};var yK=vK;const bK=134.03437499999998,xK=16295499532821565e-27,SK=e=>{if(e<0)return 0;let t=(e/1e4)**aK;return((sK+cK*t)/(1+lK*t))**+bK},CK=(e=0)=>Math.max(e*203,0),wK=({x:e,y:t,z:n,alpha:r})=>{e=CK(e),t=CK(t),n=CK(n);let i=1.15*e-.15*n,a=.66*t+.34*e,o=SK(.41478972*i+.579999*a+.014648*n),s=SK(-.20151*i+1.120649*a+.0531008*n),c=SK(-.0166008*i+.2648*a+.6684799*n),l=(o+s)/2,u={mode:`jab`,j:.44*l/(1-.56*l)-xK,a:3.524*o-4.066708*s+.542708*c,b:.199076*o+1.096799*s-1.295875*c};return r!==void 0&&(u.alpha=r),u};var TK=wK;const EK=134.03437499999998,DK=16295499532821565e-27,OK=e=>{if(e<0)return 0;let t=e**(1/EK);return 1e4*((sK-t)/(lK*t-cK))**(1/aK)},kK=e=>e/203,AK=({j:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+DK)/(.44+.56*(e+DK)),a=OK(i+.13860504*t+.058047316*n),o=OK(i-.13860504*t-.058047316*n),s=OK(i-.096019242*t-.8118919*n),c={mode:`xyz65`,x:kK(1.661373024652174*a-.914523081304348*o+.23136208173913045*s),y:kK(-.3250758611844533*a+1.571847026732543*o-.21825383453227928*s),z:kK(-.090982811*a-.31272829*o+1.5227666*s)};return r!==void 0&&(c.alpha=r),c};var jK=AK;const MK=e=>{let t=TK(CW(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var NK=MK;const PK=e=>OW(jK(e));var FK=PK;const IK={mode:`jab`,channels:[`j`,`a`,`b`,`alpha`],parse:[`--jzazbz`],serialize:`--jzazbz`,fromMode:{rgb:NK,xyz65:TK},toMode:{rgb:FK,xyz65:jK},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Q,a:Q,b:Q,alpha:{use:Q,fixup:uW}}};var LK=IK;const RK=({j:e,a:t,b:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),a={mode:`jch`,j:e,c:i};return i&&(a.h=MW(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a};var zK=RK;const BK=({j:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:`jab`,j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i};var VK=BK;const HK={mode:`jch`,parse:[`--jzczhz`],serialize:`--jzczhz`,toMode:{jab:VK,rgb:e=>FK(VK(e))},fromMode:{rgb:e=>zK(NK(e)),jab:zK},channels:[`j`,`c`,`h`,`alpha`],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Q,fixup:PW},c:Q,j:Q,alpha:{use:Q,fixup:uW}},difference:{h:qW},average:{h:JW}};var UK=HK;const WK=29**3/3**3,GK=6**3/29**3;let KK=e=>e**3>GK?e**3:(116*e-16)/WK;const qK=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,a=t/500+i,o=i-n/200,s={mode:`xyz50`,x:KK(a)*rG.X,y:KK(i)*rG.Y,z:KK(o)*rG.Z};return r!==void 0&&(s.alpha=r),s};var JK=qK;const YK=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=EW({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i};var XK=YK;const ZK=e=>XK(JK(e));var QK=ZK;const $K=e=>{let{r:t,g:n,b:r,alpha:i}=xW(e),a={mode:`xyz50`,x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(a.alpha=i),a};var eq=$K;const tq=e=>e>GK?Math.cbrt(e):(WK*e+16)/116,nq=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=tq(e/rG.X),a=tq(t/rG.Y),o=tq(n/rG.Z),s={mode:`lab`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s};var rq=nq;const iq=e=>{let t=rq(eq(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var aq=iq;function oq(e,t){if(!t||t[0]!==`lab`)return;let n={mode:`lab`},[,r,i,a,o]=t;if(!(r.type===X.Hue||i.type===X.Hue||a.type===X.Hue))return r.type!==X.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==X.None&&(n.a=i.type===X.Number?i.value:i.value*125/100),a.type!==X.None&&(n.b=a.type===X.Number?a.value:a.value*125/100),o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var sq=oq;const cq={mode:`lab`,toMode:{xyz50:JK,rgb:QK},fromMode:{xyz50:rq,rgb:aq},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[sq],serialize:e=>`lab(${e.l===void 0?`none`:e.l} ${e.a===void 0?`none`:e.a} ${e.b===void 0?`none`:e.b}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{l:Q,a:Q,b:Q,alpha:{use:Q,fixup:uW}}};var lq=cq;const uq={...lq,mode:`lab65`,parse:[`--lab-d65`],serialize:`--lab-d65`,toMode:{xyz65:lG,rgb:dG},fromMode:{xyz65:mG,rgb:gG},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}};var dq=uq;function fq(e,t){if(!t||t[0]!==`lch`)return;let n={mode:`lch`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==X.None&&(n.c=Math.max(0,i.type===X.Number?i.value:i.value*150/100)),a.type!==X.None){if(a.type===X.Percentage)return;n.h=a.value}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var pq=fq;const mq={mode:`lch`,toMode:{lab:eG,rgb:e=>QK(eG(e))},fromMode:{rgb:e=>QW(aq(e)),lab:QW},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[pq],serialize:e=>`lch(${e.l===void 0?`none`:e.l} ${e.c===void 0?`none`:e.c} ${e.h===void 0?`none`:e.h}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:Q,fixup:PW},c:Q,l:Q,alpha:{use:Q,fixup:uW}},difference:{h:qW},average:{h:JW}};var hq=mq;const gq={...hq,mode:`lch65`,parse:[`--lch-d65`],serialize:`--lch-d65`,toMode:{lab65:e=>eG(e,`lab65`),rgb:e=>dG(eG(e,`lab65`))},fromMode:{rgb:e=>QW(gG(e),`lch65`),lab65:e=>QW(e,`lch65`)},ranges:{l:[0,100],c:[0,150],h:[0,360]}};var _q=gq;const vq=({l:e,u:t,v:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),a={mode:`lchuv`,l:e,c:i};return i&&(a.h=MW(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a};var yq=vq;const bq=({l:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:`luv`,l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i};var xq=bq;const Sq=(e,t,n)=>4*e/(e+15*t+3*n),Cq=(e,t,n)=>9*t/(e+15*t+3*n),wq=Sq(rG.X,rG.Y,rG.Z),Tq=Cq(rG.X,rG.Y,rG.Z),Eq=e=>e<=GK?WK*e:116*Math.cbrt(e)-16,Dq=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Eq(t/rG.Y),a=Sq(e,t,n),o=Cq(e,t,n);!isFinite(a)||!isFinite(o)?i=a=o=0:(a=13*i*(a-wq),o=13*i*(o-Tq));let s={mode:`luv`,l:i,u:a,v:o};return r!==void 0&&(s.alpha=r),s};var Oq=Dq;const kq=(e,t,n)=>4*e/(e+15*t+3*n),Aq=(e,t,n)=>9*t/(e+15*t+3*n),jq=kq(rG.X,rG.Y,rG.Z),Mq=Aq(rG.X,rG.Y,rG.Z),Nq=({l:e,u:t,v:n,alpha:r})=>{if(e===void 0&&(e=0),e===0)return{mode:`xyz50`,x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let i=t/(13*e)+jq,a=n/(13*e)+Mq,o=rG.Y*(e<=8?e/WK:((e+16)/116)**3),s=o*(9*i)/(4*a),c=o*(12-3*i-20*a)/(4*a),l={mode:`xyz50`,x:s,y:o,z:c};return r!==void 0&&(l.alpha=r),l};var Pq=Nq;const Fq=e=>yq(Oq(eq(e))),Iq=e=>XK(Pq(xq(e))),Lq={mode:`lchuv`,toMode:{luv:xq,rgb:Iq},fromMode:{rgb:Fq,luv:yq},channels:[`l`,`c`,`h`,`alpha`],parse:[`--lchuv`],serialize:`--lchuv`,ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Q,fixup:PW},c:Q,l:Q,alpha:{use:Q,fixup:uW}},difference:{h:qW},average:{h:JW}};var Rq=Lq;const zq={...fW,mode:`lrgb`,toMode:{rgb:EW},fromMode:{rgb:xW},parse:[`srgb-linear`],serialize:`srgb-linear`};var Bq=zq;const Vq={mode:`luv`,toMode:{xyz50:Pq,rgb:e=>XK(Pq(e))},fromMode:{xyz50:Oq,rgb:e=>Oq(eq(e))},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:Q,u:Q,v:Q,alpha:{use:Q,fixup:uW}}};var Hq=Vq;const Uq=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*n),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*n),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*n),s={mode:`oklab`,l:.210454268309314*i+.7936177747023054*a-.0040720430116193*o,a:1.9779985324311684*i-2.42859224204858*a+.450593709617411*o,b:.0259040424655478*i+.7827717124575296*a-.8086757549230774*o};return r!==void 0&&(s.alpha=r),s};var Wq=Uq;const Gq=e=>{let t=Wq(xW(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var Kq=Gq;const qq=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+.3963377773761749*t+.2158037573099136*n)**3,a=(e-.1055613458156586*t-.0638541728258133*n)**3,o=(e-.0894841775298119*t-1.2914855480194092*n)**3,s={mode:`lrgb`,r:4.076741636075957*i-3.3077115392580616*a+.2309699031821044*o,g:-1.2684379732850317*i+2.6097573492876887*a-.3413193760026573*o,b:-.0041960761386756*i-.7034186179359362*a+1.7076146940746117*o};return r!==void 0&&(s.alpha=r),s};var Jq=qq;const Yq=e=>EW(Jq(e));var Xq=Yq;function Zq(e){let t=.206,n=.03,r=(1+t)/(1+n);return .5*(r*e-t+Math.sqrt((r*e-t)*(r*e-t)+4*n*r*e))}function Qq(e){let t=.206,n=.03,r=(1+t)/(1+n);return(e*e+t*e)/(r*(e+n))}function $q(e,t){let n,r,i,a,o,s,c,l;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,i=.59662641,a=.75515197,o=.56771245,s=4.0767416621,c=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,i=.08285427,a=.1254107,o=.14503204,s=-1.2684380046,c=2.6097574011,l=-.3413193965):(n=1.35733652,r=-.00915799,i=-1.1513021,a=-.50559606,o=.00692167,s=-.0041960863,c=-.7034186147,l=1.707614701);let u=n+r*e+i*t+a*e*e+o*e*t,d=.3963377774*e+.2158037573*t,f=-.1055613458*e-.0638541728*t,p=-.0894841775*e-1.291485548*t;{let e=1+u*d,t=1+u*f,n=1+u*p,r=e*e*e,i=t*t*t,a=n*n*n,o=3*d*e*e,m=3*f*t*t,h=3*p*n*n,g=6*d*d*e,_=6*f*f*t,v=6*p*p*n,y=s*r+c*i+l*a,b=s*o+c*m+l*h,x=s*g+c*_+l*v;u-=y*b/(b*b-.5*y*x)}return u}function eJ(e,t){let n=$q(e,t),r=Jq({l:1,a:n*e,b:n*t}),i=Math.cbrt(1/Math.max(r.r,r.g,r.b)),a=i*n;return[i,a]}function tJ(e,t,n,r,i,a=null){a||=eJ(e,t);let o;if((n-i)*a[1]-(a[0]-i)*r<=0)o=a[1]*i/(r*a[0]+a[1]*(i-n));else{o=a[1]*(i-1)/(r*(a[0]-1)+a[1]*(i-n));{let a=n-i,s=r,c=.3963377774*e+.2158037573*t,l=-.1055613458*e-.0638541728*t,u=-.0894841775*e-1.291485548*t,d=a+s*c,f=a+s*l,p=a+s*u;{let e=i*(1-o)+o*n,t=o*r,a=e+t*c,s=e+t*l,m=e+t*u,h=a*a*a,g=s*s*s,_=m*m*m,v=3*d*a*a,y=3*f*s*s,b=3*p*m*m,x=6*d*d*a,S=6*f*f*s,C=6*p*p*m,w=4.0767416621*h-3.3077115913*g+.2309699292*_-1,T=4.0767416621*v-3.3077115913*y+.2309699292*b,E=4.0767416621*x-3.3077115913*S+.2309699292*C,D=T/(T*T-.5*w*E),O=-w*D,k=-1.2684380046*h+2.6097574011*g-.3413193965*_-1,A=-1.2684380046*v+2.6097574011*y-.3413193965*b,j=-1.2684380046*x+2.6097574011*S-.3413193965*C,M=A/(A*A-.5*k*j),N=-k*M,ee=-.0041960863*h-.7034186147*g+1.707614701*_-1,te=-.0041960863*v-.7034186147*y+1.707614701*b,P=-.0041960863*x-.7034186147*S+1.707614701*C,ne=te/(te*te-.5*ee*P),re=-ee*ne;O=D>=0?O:1e6,N=M>=0?N:1e6,re=ne>=0?re:1e6,o+=Math.min(O,Math.min(N,re))}}}return o}function nJ(e,t,n=null){n||=eJ(e,t);let r=n[0],i=n[1];return[i/r,i/(1-r)]}function rJ(e,t,n){let r=eJ(t,n),i=tJ(t,n,e,1,e,r),a=nJ(t,n,r),o=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),c=i/Math.min(e*a[0],(1-e)*a[1]),l=e*o,u=(1-e)*s,d=.9*c*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(u*u*u*u))));l=e*.4,u=(1-e)*.8;let f=Math.sqrt(1/(1/(l*l)+1/(u*u)));return[f,d,i]}function iJ(e){let t=e.l===void 0?0:e.l,n=e.a===void 0?0:e.a,r=e.b===void 0?0:e.b,i={mode:`okhsl`,l:Zq(t)};e.alpha!==void 0&&(i.alpha=e.alpha);let a=Math.sqrt(n*n+r*r);if(!a)return i.s=0,i;let[o,s,c]=rJ(t,n/a,r/a),l;if(aiJ(Kq(e))},toMode:{oklab:aJ,rgb:e=>Xq(aJ(e))}};var sJ=oJ;function cJ(e){let t=e.l===void 0?0:e.l,n=e.a===void 0?0:e.a,r=e.b===void 0?0:e.b,i=Math.sqrt(n*n+r*r),a=i?n/i:1,o=i?r/i:1,[s,c]=nJ(a,o),l=.5,u=1-l/s,d=c/(i+t*c),f=d*t,p=d*i,m=Qq(f),h=p*m/f,g=Jq({l:m,a:a*h,b:o*h}),_=Math.cbrt(1/Math.max(g.r,g.g,g.b,0));t/=_,i=i/_*Zq(t)/t,t=Zq(t);let v={mode:`okhsv`,s:i?(l+c)*p/(c*l+c*u*p):0,v:t?t/f:0};return v.s&&(v.h=MW(Math.atan2(r,n)*180/Math.PI)),e.alpha!==void 0&&(v.alpha=e.alpha),v}function lJ(e){let t={mode:`oklab`};e.alpha!==void 0&&(t.alpha=e.alpha);let n=e.h===void 0?0:e.h,r=e.s===void 0?0:e.s,i=e.v===void 0?0:e.v,a=Math.cos(n/180*Math.PI),o=Math.sin(n/180*Math.PI),[s,c]=nJ(a,o),l=.5,u=1-l/s,d=1-r*l/(l+c-c*u*r),f=r*c*l/(l+c-c*u*r),p=Qq(d),m=f*p/d,h=Jq({l:p,a:a*m,b:o*m}),g=Math.cbrt(1/Math.max(h.r,h.g,h.b,0)),_=Qq(i*d),v=f*_/d;return t.l=_*g,t.a=v*a*g,t.b=v*o*g,t}const uJ={...ZG,mode:`okhsv`,channels:[`h`,`s`,`v`,`alpha`],parse:[`--okhsv`],serialize:`--okhsv`,fromMode:{oklab:cJ,rgb:e=>cJ(Kq(e))},toMode:{oklab:lJ,rgb:e=>Xq(lJ(e))}};var dJ=uJ;function fJ(e,t){if(!t||t[0]!==`oklab`)return;let n={mode:`oklab`},[,r,i,a,o]=t;if(!(r.type===X.Hue||i.type===X.Hue||a.type===X.Hue))return r.type!==X.None&&(n.l=Math.min(Math.max(0,r.type===X.Number?r.value:r.value/100),1)),i.type!==X.None&&(n.a=i.type===X.Number?i.value:i.value*.4/100),a.type!==X.None&&(n.b=a.type===X.Number?a.value:a.value*.4/100),o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var pJ=fJ;const mJ={...lq,mode:`oklab`,toMode:{lrgb:Jq,rgb:Xq},fromMode:{lrgb:Wq,rgb:Kq},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[pJ],serialize:e=>`oklab(${e.l===void 0?`none`:e.l} ${e.a===void 0?`none`:e.a} ${e.b===void 0?`none`:e.b}${e.alpha<1?` / ${e.alpha}`:``})`};var hJ=mJ;function gJ(e,t){if(!t||t[0]!==`oklch`)return;let n={mode:`oklch`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Hue)return;n.l=Math.min(Math.max(0,r.type===X.Number?r.value:r.value/100),1)}if(i.type!==X.None&&(n.c=Math.max(0,i.type===X.Number?i.value:i.value*.4/100)),a.type!==X.None){if(a.type===X.Percentage)return;n.h=a.value}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var _J=gJ;const vJ={...hq,mode:`oklch`,toMode:{oklab:e=>eG(e,`oklab`),rgb:e=>Xq(eG(e,`oklab`))},fromMode:{rgb:e=>QW(Kq(e),`oklch`),oklab:e=>QW(e,`oklch`)},parse:[_J],serialize:e=>`oklch(${e.l===void 0?`none`:e.l} ${e.c===void 0?`none`:e.c} ${e.h===void 0?`none`:e.h}${e.alpha<1?` / ${e.alpha}`:``})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}};var yJ=vJ;const bJ=e=>{let{r:t,g:n,b:r,alpha:i}=xW(e),a={mode:`xyz65`,x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(a.alpha=i),a};var xJ=bJ;const SJ=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=EW({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},`p3`);return r!==void 0&&(i.alpha=r),i};var CJ=SJ;const wJ={...fW,mode:`p3`,parse:[`display-p3`],serialize:`display-p3`,fromMode:{rgb:e=>CJ(CW(e)),xyz65:CJ},toMode:{rgb:e=>OW(xJ(e)),xyz65:xJ}};var TJ=wJ;const EJ=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*t**(1/1.8):16*e},DJ=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`prophoto`,r:EJ(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:EJ(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:EJ(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i};var OJ=DJ;const kJ=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*t**1.8:e/16},AJ=e=>{let t=kJ(e.r),n=kJ(e.g),r=kJ(e.b),i={mode:`xyz50`,x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i};var jJ=AJ;const MJ={...fW,mode:`prophoto`,parse:[`prophoto-rgb`],serialize:`prophoto-rgb`,fromMode:{xyz50:OJ,rgb:e=>OJ(eq(e))},toMode:{xyz50:jJ,rgb:e=>XK(jJ(e))}};var NJ=MJ;const PJ=1.09929682680944,FJ=.018053968510807,IJ=e=>{let t=Math.abs(e);return t>FJ?(Math.sign(e)||1)*(PJ*t**.45-(PJ-1)):4.5*e},LJ=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`rec2020`,r:IJ(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:IJ(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:IJ(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i};var RJ=LJ;const zJ=1.09929682680944,BJ=.018053968510807,VJ=(e=0)=>{let t=Math.abs(e);return t{let t=VJ(e.r),n=VJ(e.g),r=VJ(e.b),i={mode:`xyz65`,x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i};var UJ=HJ;const WJ={...fW,mode:`rec2020`,fromMode:{xyz65:RJ,rgb:e=>RJ(CW(e))},toMode:{xyz65:UJ,rgb:e=>OW(UJ(e))},parse:[`rec2020`],serialize:`rec2020`};var GJ=WJ;const KJ=.0037930732552754493,qJ=Math.cbrt(KJ),JJ=e=>Math.cbrt(e)-qJ,YJ=e=>{let{r:t,g:n,b:r,alpha:i}=xW(e),a=JJ(.3*t+.622*n+.078*r+KJ),o=JJ(.23*t+.692*n+.078*r+KJ),s=JJ(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+KJ),c={mode:`xyb`,x:(a-o)/2,y:(a+o)/2,b:s-(a+o)/2};return i!==void 0&&(c.alpha=i),c};var XJ=YJ;const ZJ=e=>(e+qJ)**3,QJ=({x:e,y:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=ZJ(e+t)-KJ,a=ZJ(t-e)-KJ,o=ZJ(n+t)-KJ,s=EW({r:11.031566904639861*i-9.866943908131562*a-.16462299650829934*o,g:-3.2541473810744237*i+4.418770377582723*a-.16462299650829934*o,b:-3.6588512867136815*i+2.7129230459360922*a+1.9459282407775895*o});return r!==void 0&&(s.alpha=r),s};var $J=QJ;const eY={mode:`xyb`,channels:[`x`,`y`,`b`,`alpha`],parse:[`--xyb`],serialize:`--xyb`,toMode:{rgb:$J},fromMode:{rgb:XJ},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Q,y:Q,b:Q,alpha:{use:Q,fixup:uW}}};var tY=eY;const nY={mode:`xyz50`,parse:[`xyz-d50`],serialize:`xyz-d50`,toMode:{rgb:XK,lab:rq},fromMode:{rgb:eq,lab:JK},channels:[`x`,`y`,`z`,`alpha`],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Q,y:Q,z:Q,alpha:{use:Q,fixup:uW}}};var rY=nY;const iY=e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:`xyz50`,x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(a.alpha=i),a};var aY=iY;const oY=e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:`xyz65`,x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(a.alpha=i),a};var sY=oY;const cY={mode:`xyz65`,toMode:{rgb:OW,xyz50:aY},fromMode:{rgb:CW,xyz50:sY},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:Q,y:Q,z:Q,alpha:{use:Q,fixup:uW}}};var lY=cY;const uY=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`yiq`,y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(i.alpha=r),i};var dY=uY;const fY=({y:e,i:t,q:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`rgb`,r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(i.alpha=r),i};var pY=fY;const mY={mode:`yiq`,toMode:{rgb:pY},fromMode:{rgb:dY},channels:[`y`,`i`,`q`,`alpha`],parse:[`--yiq`],serialize:`--yiq`,ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Q,i:Q,q:Q,alpha:{use:Q,fixup:uW}}};var hY=mY;const gY=(e,t)=>Math.round(e*(t=10**t))/t,_Y=(e=4)=>t=>typeof t==`number`?gY(t,e):t;var vY=_Y;let yY=vY(2);const bY=e=>Math.max(0,Math.min(1,e||0)),xY=e=>Math.round(bY(e)*255),SY=NU(`rgb`),CY=NU(`hsl`),wY=e=>{if(e===void 0)return;let t=xY(e.r),n=xY(e.g),r=xY(e.b);return`#`+(1<<24|t<<16|n<<8|r).toString(16).slice(1)},TY=e=>{let t=jU(e);if(!t)return;let n=BU(t.mode);if(!n.serialize||typeof n.serialize==`string`){let e=`color(${n.serialize||`--${t.mode}`} `;return n.channels.forEach((n,r)=>{n!==`alpha`&&(e+=(r?` `:``)+(t[n]===void 0?`none`:t[n]))}),t.alpha!==void 0&&t.alpha<1&&(e+=` / ${t.alpha}`),e+`)`}if(typeof n.serialize==`function`)return n.serialize(t)},EY=e=>wY(SY(e)),DY=zU(AW),OY=zU(XW),kY=zU(AG),AY=zU(MG),jY=zU(IG),MY=zU(qG),NY=zU(ZG),PY=zU(rK),FY=zU(yK),IY=zU(LK),LY=zU(UK),RY=zU(lq),zY=zU(dq),BY=zU(hq),VY=zU(_q),HY=zU(Rq),UY=zU(Bq),WY=zU(Hq),GY=zU(sJ),KY=zU(dJ),qY=zU(hJ),JY=zU(yJ),YY=zU(TJ),XY=zU(NJ),ZY=zU(GJ),QY=zU(fW),$Y=zU(tY),eX=zU(rY),tX=zU(lY),nX=zU(hY),rX=220.44,iX=NU(`oklch`),aX=e=>{var t;return e?(t=iX(e))?.h:rX},oX=XB(`settings`,()=>{let e=R(),t=uF(`settings/language`,`en`),n=uF(`settings/stage/view/model-renderer`,`2d`),r=uF(`settings/audio/input`,`false`),i=H(()=>{var t;return(t=e.value)?.deviceId}),{audioInputs:a,ensurePermissions:o}=tF({constraints:{audio:!0}}),s=R(),c=R(`/assets/live2d/models/hiyori_pro_zh.zip`),l=R(`url`),u=R(!1),d=uF(`settings/live2d/position`,{x:0,y:0}),f=R({group:`Idle`,index:0}),p=R([]),m=uF(`settings/live2d/motion-map`,{}),h=uF(`settings/disable-transitions`,!0),g=uF(`settings/use-page-specific-transitions`,!0),_=uF(`settings/theme/colors/hue`,rX),v=uF(`settings/theme/colors/hue-dynamic`,!1),y=uF(`settings/allow-visible-on-all-workspaces`,!0);function b(e=rX){_.value=e,v.value=!1}function x(e){b(aX(e))}function S(e){if(v.value)return!1;let t=aX(e);if(!t)return!1;let n=Math.abs(t-_.value);return n<.01||n>359.99}return V(r,t=>{t===`false`&&(e.value=void 0),t===`true`&&o().then(()=>{e.value=a.value[0]})}),V(a,()=>{r.value===`true`&&!e.value&&(e.value=a.value[0])},{immediate:!0}),{live2dModelFile:s,live2dModelUrl:c,live2dLoadSource:l,live2dCurrentMotion:f,live2dPosition:d,availableLive2dMotions:p,live2dMotionMap:m,loadingLive2dModel:u,disableTransitions:h,usePageSpecificTransitions:g,language:t,stageView:n,themeColorsHue:_,themeColorsHueDynamic:v,isAudioInputOn:r,selectedAudioDevice:e,selectedAudioDeviceId:i,allowVisibleOnAllWorkspaces:y,setThemeColorsHue:b,applyPrimaryColorFrom:x,isColorSelectedForPrimary:S}});var sX=Rr({__name:`ArrowTransition`,props:{stageTransition:{default:()=>({primaryColor:`#666`,secondaryColor:`#ccc`})}},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>n.value.primaryColor||`#666`),i=H(()=>n.value.secondaryColor||`#ccc`);return $r(()=>{document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-2`,i.value)}),(e,t)=>(to(),oo(`div`,{class:`stage-transition-3`,style:L({zIndex:n.value.zIndex||100})},null,4))}}),cX=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},lX=cX(sX,[[`__scopeId`,`data-v-df576df0`]]),uX=Rr({__name:`BubbleWaveOutTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>{var e;return(e=t.stageTransition)?.colors||[`#eee`,`#ebcb8b`,`#c56370`,`#3f3b52`]});return $r(()=>{var e,r;document.documentElement.style.setProperty(`--circle-expansion-delay`,`${(e=t.stageTransition)?.delay||0}s`),document.documentElement.style.setProperty(`--circle-expansion-duration`,`${(r=t.stageTransition)?.duration||.4}s`),n.value.forEach((e,t)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${t+1}`,e)})}),(t,r)=>{var i;return to(),oo(`div`,{class:`circle-expansion-transition`,style:L({zIndex:(i=e.stageTransition)?.zIndex||100})},[(to(!0),oo(Ya,null,gi(n.value,(e,t)=>(to(),oo(`div`,{key:t}))),128))],4)}}}),dX=cX(uX,[[`__scopeId`,`data-v-0c29056c`]]),fX=Rr({__name:`FantasyFallTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>{var e;return(e=t.stageTransition)?.direction||`up`}),r=H(()=>`fantasy-fall-${n.value}`);return $r(()=>{var e,n,r,i,a,o;document.documentElement.style.setProperty(`--fantasy-fall-color`,(e=t.stageTransition)?.primaryColor||`#eee`),document.documentElement.style.setProperty(`--fantasy-fall-duration`,`${(n=t.stageTransition)?.duration||.6}s`),document.documentElement.style.setProperty(`--fantasy-fall-delay`,`${(r=t.stageTransition)?.delay||0}s`),document.documentElement.style.setProperty(`--fantasy-fall-radius-sm`,`${((i=t.stageTransition)==null||(i=i.borderRadius)==null?void 0:i.sm)||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-md`,`${((a=t.stageTransition)==null||(a=a.borderRadius)==null?void 0:a.md)||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-lg`,`${((o=t.stageTransition)==null||(o=o.borderRadius)==null?void 0:o.lg)||`50%`}`)}),(t,n)=>{var i;return to(),oo(`div`,{class:Se([`fantasy-fall-transition`,r.value]),style:L({zIndex:(i=e.stageTransition)?.zIndex??100})},null,6)}}}),pX=cX(fX,[[`__scopeId`,`data-v-e62bf496`]]),mX=Rr({__name:`MultipleBlocksRevealTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>{var e;return(e=n.value)?.primaryColor||`#666`}),i=H(()=>{var e;return(e=n.value)?.secondaryColor||`#ccc`});return $r(()=>{document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-2`,i.value)}),(e,t)=>{var r;return to(),oo(`div`,{class:`stage-transition-4`,style:L({zIndex:(r=n.value)?.zIndex??100})},t[0]||=[yo(`
`,5)],4)}}}),hX=cX(mX,[[`__scopeId`,`data-v-6d1179fc`]]),gX=Rr({__name:`SlideTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>{var e;return(e=n.value)?.primaryColor||`#666`}),i=H(()=>{var e;return(e=n.value)?.secondaryColor||`#ccc`});return V([n,r,i],()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,i.value)}),$r(()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,i.value)}),(e,t)=>{var r;return to(),oo(`div`,{class:`stage-transition-1`,style:L({zIndex:(r=n.value)?.zIndex??100})},null,4)}}}),_X=cX(gX,[[`__scopeId`,`data-v-bf1d1566`]]),vX=Rr({__name:`SlopeSlideTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>{var e;return(e=n.value)?.primaryColor??`#666`}),i=H(()=>{var e;return(e=n.value)?.secondaryColor??`#ccc`});return $r(()=>{document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-2`,i.value)}),(e,t)=>{var r;return to(),oo(`div`,{class:`stage-transition-2`,style:L({zIndex:(r=n.value)?.zIndex??100})},null,4)}}}),yX=cX(vX,[[`__scopeId`,`data-v-8ff7120f`]]),bX=Rr({__name:`RectanglesRotateTransition`,props:{stageTransition:null},setup(e){let t=e;return $r(()=>{var e,n,r,i,a,o,s;document.documentElement.style.setProperty(`--rectangle-rotate-1-color`,(e=t.stageTransition)?.primaryColor||`#ebcb8b`),document.documentElement.style.setProperty(`--rectangle-rotate-2-color`,(n=t.stageTransition)?.secondaryColor||`#c56370`),document.documentElement.style.setProperty(`--rectangle-rotate-3-color`,(r=t.stageTransition)?.tertiaryColor||`#43445b`),document.documentElement.style.setProperty(`--rectangle-rotate-duration`,`${(i=t.stageTransition)?.duration||.6}s`),document.documentElement.style.setProperty(`--rectangle-rotate-delay`,`${(a=t.stageTransition)?.delay||0}s`),document.documentElement.style.setProperty(`--rectangle-rotate-stagger`,`${(o=t.stageTransition)?.staggerDelay||.1}s`),document.documentElement.style.setProperty(`--rectangle-rotate-rotation`,`${(s=t.stageTransition)?.rotation||270}deg`)}),(t,n)=>{var r;return to(),oo(`div`,{class:`rectangle-rotate-transition`,style:L({zIndex:(r=e.stageTransition)?.zIndex??100})},n[0]||=[po(`div`,{class:`rectangle rectangle-rotate-1`},[po(`div`)],-1),po(`div`,{class:`rectangle rectangle-rotate-2`},[po(`div`)],-1),po(`div`,{class:`rectangle rectangle-rotate-3`},[po(`div`)],-1)],4)}}}),xX=cX(bX,[[`__scopeId`,`data-v-f4b1dc64`]]),SX=Rr({__name:`StageTransitionGroup`,props:{primaryColor:null,secondaryColor:null,tertiaryColor:null,colors:null,zIndex:null,disableTransitions:{type:Boolean},usePageSpecificTransitions:{type:Boolean}},setup(e){let t=e,n=iU(),r=R(!1),i=R(),a=R(``),o=R(),s=z({slide:{component:_X,duration:2700},"slope-slide":{component:yX,duration:2700},arrow:{component:lX,duration:2700},"multiple-blocks-reveal":{component:hX,duration:2800},"fantasy-fall":{component:pX,duration:2700},"rectangles-rotate":{component:xX,duration:2700},"bubble-wave-out":{component:dX,duration:1e3}}),c=R([]);function l(e){return c.value.push(e),()=>{let t=c.value.indexOf(e);t>=0&&c.value.splice(t,1)}}async function u(e,t={}){i.value=e;for(let n of c.value)try{await Promise.resolve(n(e,t))}catch(t){console.error(`Error in transition hook at stage "${e}":`,t)}}async function d(e,t,n){if(e.name===`none`||!e.name){t(),n();return}let i=s.value[e.name];if(!i){console.error(`Transition ${e.name} not found`),t(),n();return}let c=i.nextDelay===void 0?i.duration/3:i.nextDelay,d=!1,f=e=>{e===`navigation`&&!d&&(d=!0,t())},p=l(f);try{await u(`before-enter`,{transitionName:e.name}),r.value&&(await u(`before-leave`,{transitionName:a.value}),a.value=``,o.value=void 0,r.value=!1,await u(`after-leave`,{transitionName:a.value}),await new Promise(e=>setTimeout(e,50))),a.value=e.name,o.value=e,r.value=!0,await u(`enter-active`,{transitionName:name}),setTimeout(async()=>{await u(`navigation`,{transitionName:e.name,config:i}),d||(d=!0,t())},c),setTimeout(async()=>{await u(`after-enter`,{transitionName:e.name})},i.duration),setTimeout(async()=>{await u(`before-leave`,{transitionName:e.name})},i.duration+10),setTimeout(async()=>{await u(`leave-active`,{transitionName:e.name})},i.duration+20);let s=i.exitDuration??0;setTimeout(async()=>{r.value=!1,a.value=``,o.value=void 0,await u(`after-leave`,{transitionName:e.name}),n()},i.duration+s)}catch(e){console.error(e)}finally{p(),setTimeout(()=>{d||(d=!0,t())},i.duration*2)}}function f(e,t){return new Promise(n=>{d(e,t,n)})}return n.beforeEach((e,n,r)=>{if(t.disableTransitions){r();return}if(typeof e.meta.stageTransition!=`object`){r();return}let i=e.meta.stageTransition;if(t.usePageSpecificTransitions&&i.pageSpecificAvailable){r();return}t.primaryColor!==void 0&&(i.primaryColor=t.primaryColor),t.secondaryColor!==void 0&&(i.secondaryColor=t.secondaryColor),t.tertiaryColor!==void 0&&(i.tertiaryColor=t.tertiaryColor),t.colors!==void 0&&(i.colors=t.colors),t.zIndex!==void 0&&(i.zIndex=t.zIndex),f(i,r)}),(e,t)=>(to(),oo(Ya,null,[_i(e.$slots,`default`),r.value?(to(),oo(Ya,{key:0},[s.value[a.value]?(to(),so(fi(s.value[a.value].component),{key:0,"stage-transition":o.value},null,8,[`stage-transition`])):bo(``,!0)],64)):bo(``,!0)],64))}}),CX=SX; diff --git a/assets/index-CISmcbXk-DJz-iwh0.js b/assets/index-CISmcbXk-BKEuzw_9.js similarity index 64% rename from assets/index-CISmcbXk-DJz-iwh0.js rename to assets/index-CISmcbXk-BKEuzw_9.js index 6b82399d0b26e688568f37b64b64b6a4e4260864..ff650743f8af69401521e84d5d0b8d50417181b4 100644 --- a/assets/index-CISmcbXk-DJz-iwh0.js +++ b/assets/index-CISmcbXk-BKEuzw_9.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/effect-WSjEuzC9-B-2N9gqs.js","assets/index-Dor8PgzM.js","assets/index-BtJ4BQCK.css","assets/sury-DmrZ3_Oj-CDnSj_Mc.js","assets/valibot-CQk-M5rL-DabJ-oZi.js","assets/zod-Db63SLXj-jXllG_aY.js"])))=>i.map(i=>d[i]); -import{__vitePreload as e}from"./index-Dor8PgzM.js";const t=`https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies`,n=async(e,n)=>{try{return await e}catch{throw Error(`xsschema: Missing dependencies "${n}". see ${t}`)}},r=async t=>{switch(t){case`arktype`:return e(()=>import(`./arktype-C-GObzDh-BnCES2qI.js`),[]).then(async({getToJsonSchemaFn:e})=>e());case`effect`:return e(()=>import(`./effect-WSjEuzC9-B-2N9gqs.js`),__vite__mapDeps([0,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`sury`:return e(()=>import(`./sury-DmrZ3_Oj-CDnSj_Mc.js`),__vite__mapDeps([3,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`valibot`:return e(()=>import(`./valibot-CQk-M5rL-DabJ-oZi.js`),__vite__mapDeps([4,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`zod`:return e(()=>import(`./zod-Db63SLXj-jXllG_aY.js`),__vite__mapDeps([5,1,2])).then(async({getToJsonSchemaFn:e})=>e());default:throw Error(`xsschema: Unsupported schema vendor "${t}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},i=async e=>r(e[`~standard`].vendor).then(async t=>t(e));export{t as missingDependenciesUrl,i as toJsonSchema,n as tryImport}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/effect-WSjEuzC9-CJEidUVY.js","assets/index-C-t5bjx6.js","assets/index-BtJ4BQCK.css","assets/sury-DmrZ3_Oj-B-4he_YB.js","assets/valibot-CQk-M5rL-CwVUpuNO.js","assets/zod-Db63SLXj-BvllDf1x.js"])))=>i.map(i=>d[i]); +import{__vitePreload as e}from"./index-C-t5bjx6.js";const t=`https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies`,n=async(e,n)=>{try{return await e}catch{throw Error(`xsschema: Missing dependencies "${n}". see ${t}`)}},r=async t=>{switch(t){case`arktype`:return e(()=>import(`./arktype-C-GObzDh-BnCES2qI.js`),[]).then(async({getToJsonSchemaFn:e})=>e());case`effect`:return e(()=>import(`./effect-WSjEuzC9-CJEidUVY.js`),__vite__mapDeps([0,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`sury`:return e(()=>import(`./sury-DmrZ3_Oj-B-4he_YB.js`),__vite__mapDeps([3,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`valibot`:return e(()=>import(`./valibot-CQk-M5rL-CwVUpuNO.js`),__vite__mapDeps([4,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`zod`:return e(()=>import(`./zod-Db63SLXj-BvllDf1x.js`),__vite__mapDeps([5,1,2])).then(async({getToJsonSchemaFn:e})=>e());default:throw Error(`xsschema: Unsupported schema vendor "${t}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},i=async e=>r(e[`~standard`].vendor).then(async t=>t(e));export{t as missingDependenciesUrl,i as toJsonSchema,n as tryImport}; \ No newline at end of file diff --git a/assets/memory-DTRopWuR.js b/assets/memory-B4tFztnI.js similarity index 91% rename from assets/memory-DTRopWuR.js rename to assets/memory-B4tFztnI.js index d46c600528222501fd5efa8977a67d1b28f0e7ca..4bdb8347291429d77003bcbf7c44b1d2d0e06ad4 100644 --- a/assets/memory-DTRopWuR.js +++ b/assets/memory-B4tFztnI.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,resolveDirective as i,withDirectives as a}from"./index-Dor8PgzM.js";import{route_block_default as o}from"./route-block--T8TG4is.js";const s={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":``};var c=n({__name:`index`,setup(n){return(n,o)=>{let c=i(`motion`);return a((r(),t(`div`,s,o[0]||=[e(`div`,{text:`60`,"i-solar:leaf-bold-duotone":``},null,-1)])),[[c]])}}});typeof o==`function`&&o(c);var l=c;export{l as default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,resolveDirective as i,withDirectives as a}from"./index-C-t5bjx6.js";import{route_block_default as o}from"./route-block--T8TG4is.js";const s={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":``};var c=n({__name:`index`,setup(n){return(n,o)=>{let c=i(`motion`);return a((r(),t(`div`,s,o[0]||=[e(`div`,{text:`60`,"i-solar:leaf-bold-duotone":``},null,-1)])),[[c]])}}});typeof o==`function`&&o(c);var l=c;export{l as default}; \ No newline at end of file diff --git a/assets/memory-long-term-DKciszM5.js b/assets/memory-long-term-CDpPvihx.js similarity index 77% rename from assets/memory-long-term-DKciszM5.js rename to assets/memory-long-term-CDpPvihx.js index d007f418314552bd9967df848d7244271476215f..723c0a651d8039aa468792d91e0cce9bc8c61ebb 100644 --- a/assets/memory-long-term-DKciszM5.js +++ b/assets/memory-long-term-CDpPvihx.js @@ -1 +1 @@ -import{createElementBlock as e,defineComponent as t,openBlock as n}from"./index-Dor8PgzM.js";import{route_block_default as r}from"./route-block--T8TG4is.js";var i=t({__name:`memory-long-term`,setup(t){return(t,r)=>(n(),e(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file +import{createElementBlock as e,defineComponent as t,openBlock as n}from"./index-C-t5bjx6.js";import{route_block_default as r}from"./route-block--T8TG4is.js";var i=t({__name:`memory-long-term`,setup(t){return(t,r)=>(n(),e(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file diff --git a/assets/memory-short-term-Bm0Da8ag.js b/assets/memory-short-term-C8UMWOHr.js similarity index 77% rename from assets/memory-short-term-Bm0Da8ag.js rename to assets/memory-short-term-C8UMWOHr.js index 14921b1a8d06dfec198cd2d450f25b173f838399..3683a5e2a6c6ecb19e87423833bcf414e6902afc 100644 --- a/assets/memory-short-term-Bm0Da8ag.js +++ b/assets/memory-short-term-C8UMWOHr.js @@ -1 +1 @@ -import{createElementBlock as e,defineComponent as t,openBlock as n}from"./index-Dor8PgzM.js";import{route_block_default as r}from"./route-block--T8TG4is.js";var i=t({__name:`memory-short-term`,setup(t){return(t,r)=>(n(),e(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file +import{createElementBlock as e,defineComponent as t,openBlock as n}from"./index-C-t5bjx6.js";import{route_block_default as r}from"./route-block--T8TG4is.js";var i=t({__name:`memory-short-term`,setup(t){return(t,r)=>(n(),e(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file diff --git a/assets/messages-Bpag3yji.js b/assets/messages-BFRiVTfh.js similarity index 77% rename from assets/messages-Bpag3yji.js rename to assets/messages-BFRiVTfh.js index 69136a7dac2ebbe3971de30b06f7658e3100d328..bd750587e6cd575a43de75cb11193bc476e4362f 100644 --- a/assets/messages-Bpag3yji.js +++ b/assets/messages-BFRiVTfh.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-Dor8PgzM.js";import"./src-BnFQ5wFr.js";import"./Basic-CbvQnFR9.js";import{Textarea_default as u}from"./Textarea-D5jZ5rL5.js";import{llmInferenceEndToken as d,useMessageContentQueue as f}from"./queues-BTBffrrj.js";import"./sleep-CvjNLutj.js";import{useQueue as p}from"./queue-aUPoxb9G.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var y=i({__name:`messages`,setup(i){let y=o(``),b=o([]),x=o(!1),S=p({handlers:[async e=>{b.value.push(e.data)}]}),C=f(S);async function w(){x.value=!0,C.add(y.value),C.add(d),y.value=``,x.value=!1}return(i,o)=>(a(),n(`div`,m,[t(`div`,h,[r(l(u),{modelValue:y.value,"onUpdate:modelValue":o[0]||=e=>y.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:w},null,8,[`modelValue`]),t(`button`,g,c(x.value?`Processing...`:`Send`),1)]),t(`div`,_,[t(`div`,v,[o[1]||=t(`h3`,{"font-normal":``},` TTS Message `,-1),(a(!0),n(e,null,s(b.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-C-t5bjx6.js";import"./src-B9Iy8991.js";import"./Basic-DnBqne8U.js";import{Textarea_default as u}from"./Textarea-SRGnauY5.js";import{llmInferenceEndToken as d,useMessageContentQueue as f}from"./queues-DD1Fxfss.js";import"./sleep-CvjNLutj.js";import{useQueue as p}from"./queue-Bp4D1cP3.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var y=i({__name:`messages`,setup(i){let y=o(``),b=o([]),x=o(!1),S=p({handlers:[async e=>{b.value.push(e.data)}]}),C=f(S);async function w(){x.value=!0,C.add(y.value),C.add(d),y.value=``,x.value=!1}return(i,o)=>(a(),n(`div`,m,[t(`div`,h,[r(l(u),{modelValue:y.value,"onUpdate:modelValue":o[0]||=e=>y.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:w},null,8,[`modelValue`]),t(`button`,g,c(x.value?`Processing...`:`Send`),1)]),t(`div`,_,[t(`div`,v,[o[1]||=t(`h3`,{"font-normal":``},` TTS Message `,-1),(a(!0),n(e,null,s(b.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/microsoft-speech-oHJyYUA3.js b/assets/microsoft-speech-0I0KtNpM.js similarity index 85% rename from assets/microsoft-speech-oHJyYUA3.js rename to assets/microsoft-speech-0I0KtNpM.js index ce0e39c4f5258bdceaa4ee488da5f8b4479e0c1f..91dfb20a7b3f5d6f8714870f991dc5fda0dd0db7 100644 --- a/assets/microsoft-speech-oHJyYUA3.js +++ b/assets/microsoft-speech-0I0KtNpM.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import{FieldInput_default as h,FieldRange_default as g}from"./src-BnFQ5wFr.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`;var C=i({__name:`microsoft-speech`,setup(i){let{t:y}=u(),C={pitch:0,speed:1,volume:0},w=m(),T=p(),{providers:E}=c(T),D=s(0),O=s(1),k=s(0),A=e({get:()=>{var e;return(e=E.value[x])?.region||`eastasia`},set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=e(()=>{var e;return!!(e=E.value[x])?.apiKey}),M=e(()=>w.availableVoices[x]||[]);a(async()=>{await w.loadVoicesForProvider(x)}),d([j,A],async()=>{await w.loadVoicesForProvider(x)});async function N(e,t,n){let r=T.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=T.getProviderConfig(x),a=i.model||S,o={...i,region:A.value,disableSsml:!n};if(!n&&t){let n=M.value.find(e=>e.id===t);if(n){let s=w.generateSSML(e,n,{...i,pitch:D.value});return await w.speech(r,a,s,t,o)}}return await w.speech(r,a,e,t,o)}return(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":f(()=>[r(l(h),{modelValue:A.value,"onUpdate:modelValue":i[0]||=e=>A.value=e,label:l(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:l(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":f(()=>[t(`div`,b,[r(l(g),{modelValue:D.value,"onUpdate:modelValue":i[1]||=e=>D.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(y)(`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`]),r(l(g),{modelValue:O.value,"onUpdate:modelValue":i[2]||=e=>O.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:k.value,"onUpdate:modelValue":i[3]||=e=>k.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(y)(`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:f(()=>[r(l(_),{"available-voices":M.value,"generate-speech":N,"api-key-configured":j.value,"default-text":`Hello! This is a test of the Microsoft Speech synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import{FieldInput_default as h,FieldRange_default as g}from"./src-B9Iy8991.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`;var C=i({__name:`microsoft-speech`,setup(i){let{t:y}=u(),C={pitch:0,speed:1,volume:0},w=m(),T=p(),{providers:E}=c(T),D=s(0),O=s(1),k=s(0),A=e({get:()=>{var e;return(e=E.value[x])?.region||`eastasia`},set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=e(()=>{var e;return!!(e=E.value[x])?.apiKey}),M=e(()=>w.availableVoices[x]||[]);a(async()=>{await w.loadVoicesForProvider(x)}),d([j,A],async()=>{await w.loadVoicesForProvider(x)});async function N(e,t,n){let r=T.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=T.getProviderConfig(x),a=i.model||S,o={...i,region:A.value,disableSsml:!n};if(!n&&t){let n=M.value.find(e=>e.id===t);if(n){let s=w.generateSSML(e,n,{...i,pitch:D.value});return await w.speech(r,a,s,t,o)}}return await w.speech(r,a,e,t,o)}return(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":f(()=>[r(l(h),{modelValue:A.value,"onUpdate:modelValue":i[0]||=e=>A.value=e,label:l(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:l(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":f(()=>[t(`div`,b,[r(l(g),{modelValue:D.value,"onUpdate:modelValue":i[1]||=e=>D.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(y)(`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`]),r(l(g),{modelValue:O.value,"onUpdate:modelValue":i[2]||=e=>O.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:k.value,"onUpdate:modelValue":i[3]||=e=>k.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(y)(`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:f(()=>[r(l(_),{"available-voices":M.value,"generate-speech":N,"api-key-configured":j.value,"default-text":`Hello! This is a test of the Microsoft Speech synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file diff --git a/assets/mistral-ai-CSPbz6P7.js b/assets/mistral-ai-CxyrZSnm.js similarity index 82% rename from assets/mistral-ai-CSPbz6P7.js rename to assets/mistral-ai-CxyrZSnm.js index 41f1ffc86efc7daf745af34a3e9fa56ef1512bc1..bddabab966e2d8fa6a560c560105c510267a4c9a 100644 --- a/assets/mistral-ai-CSPbz6P7.js +++ b/assets/mistral-ai-CxyrZSnm.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`mistral-ai`;var x=r({__name:`mistral-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`mis-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.mistral.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`mistral-ai`;var x=r({__name:`mistral-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`mis-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.mistral.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/models-AmY2AY0C.js b/assets/models-BDiVXLbc.js similarity index 89% rename from assets/models-AmY2AY0C.js rename to assets/models-BDiVXLbc.js index 60c4ba9c2af509413a88330e8aac98c4d81ed0fb..d45952816e43292f7bbc58ef116505f3b4c43319 100644 --- a/assets/models-AmY2AY0C.js +++ b/assets/models-BDiVXLbc.js @@ -1 +1 @@ -import{Fragment as e,__plugin_vue_export_helper_default as t,__toESM as n,createBaseVNode as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createTextVNode as s,createVNode as c,defineComponent as l,openBlock as u,ref as d,renderList as f,renderSlot as p,resolveDirective as m,storeToRefs as h,toDisplayString as g,unref as _,useElementBounding as v,useFileDialog as y,useI18n as b,useMouse as x,useObjectUrl as S,useSettings as C,vModelSelect as w,vModelText as T,watch as E,withCtx as D,withDirectives as O}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import"./dist-B8MUgAeh.js";import{Canvas_default as k,Model_default as A,Section_default as j,require_jszip_min as M,require_localforage as N}from"./components-1m8YjNRO.js";import{Emotion as P,EmotionNeutralMotionName as F}from"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as I}from"./route-block--T8TG4is.js";import{Vibrant as L}from"./browser-BP4AmG4D.js";import{ColorPalette_default as R}from"./ColorPalette-B5CDhrZt.js";import{IconAnimation_default as z}from"./IconAnimation-DNjwD43A.js";import{useIconAnimation as B}from"./icon-animation-BMPmq1VP.js";const V=[`disabled`];var H=l({__name:`Live2DModelControlButton`,emits:[`click`],setup(e){let t=C();return(e,n)=>(u(),o(`button`,{disabled:_(t).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]||=t=>e.$emit(`click`)},[p(e.$slots,`default`)],8,V))}}),U=H,W=n(M()),G=n(N());const K={flex:`~ col gap-2`},q={flex:``,"items-center":``,"gap-2":``},J=[`disabled`,`placeholder`],Y={"font-medium":``,"font-mono":``},X={flex:``,"gap-2":``},Z=[`onUpdate:modelValue`],Q=[`href`,`download`];var ee=l({__name:`Live2DSettings`,props:{palette:null},emits:[`extractColorsFromModel`],setup(t){let{t:n}=b(),l=y({accept:`application/zip`}),p=C(),{live2dModelFile:m,live2dMotionMap:v,live2dLoadSource:x,loadingLive2dModel:k,availableLive2dMotions:A,live2dModelUrl:M}=h(p),N=d(M.value);l.onChange(e=>{e&&e.length>0&&(v.value={},m.value=e[0],x.value=`file`,k.value=!0)}),E(()=>p.loadingLive2dModel,e=>{e||x.value===`file`&&A.value.forEach(e=>{e.motionName in P?v.value[e.fileName]=e.motionName:v.value[e.fileName]=F})});async function I(e,t){if(!Object.keys(t).length)return e;let n=new W.default,r=await n.loadAsync(e),i=Object.keys(r.files).find(e=>e.endsWith(`model3.json`));if(!i)throw Error(`model3.json not found`);let a=await r.file(i).async(`string`),o=JSON.parse(a),s={};Object.entries(t).forEach(([e,t])=>{if(s[t]){s[t].push({File:e});return}s[t]=[{File:e}]}),o.FileReferences.Motions=s,r.file(i,JSON.stringify(o,null,2));let c=await r.generateAsync({type:`blob`});return new File([c],e.name,{type:e.type,lastModified:e.lastModified})}async function L(){let e=await G.default.getItem(`live2dModel`);if(!e)return;let t=await I(e,v.value);m.value=t,x.value=`file`,k.value=!0}let z=S(m);return(d,m)=>(u(),o(`div`,K,[c(_(j),{title:_(n)(`settings.live2d.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`},{default:D(()=>[r(`div`,q,[O(r(`input`,{"onUpdate:modelValue":m[0]||=e=>N.value=e,disabled:_(p).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:_(n)(`settings.live2d.change-model.from-url-placeholder`)},null,8,J),[[T,N.value]]),c(U,{class:`form-control`,onClick:m[1]||=e=>M.value=N.value},{default:D(()=>[s(g(_(n)(`settings.live2d.change-model.from-url`)),1)]),_:1})]),c(U,{class:`form-control place-self-end`,onClick:m[2]||=e=>_(l).open()},{default:D(()=>[s(g(_(n)(`settings.live2d.change-model.from-file`))+`... `,1)]),_:1}),c(U,{class:`form-control`,onClick:m[3]||=e=>d.$emit(`extractColorsFromModel`)},{default:D(()=>m[4]||=[s(` Extract colors from model `)]),_:1,__:[4]}),c(R,{colors:t.palette.map(e=>({hex:e,name:e}))},null,8,[`colors`])]),_:1},8,[`title`]),_(p).live2dLoadSource===`file`?(u(),i(_(j),{key:0,title:_(n)(`settings.live2d.edit-motion-map.title`),icon:`i-solar:face-scan-circle-bold-duotone`},{default:D(()=>{var t;return[(u(!0),o(e,null,f(_(p).availableLive2dMotions,t=>(u(),o(`div`,{key:t.fileName,flex:``,"items-center":``,"justify-between":``,"text-sm":``},[r(`span`,Y,g(t.fileName),1),r(`div`,X,[O(r(`select`,{"onUpdate:modelValue":e=>_(p).live2dMotionMap[t.fileName]=e},[(u(!0),o(e,null,f(Object.keys(_(P)),e=>(u(),o(`option`,{key:e},g(e),1))),128))],8,Z),[[w,_(p).live2dMotionMap[t.fileName]]]),c(U,{class:`form-control`,onClick:e=>_(p).live2dCurrentMotion={group:t.motionName,index:t.motionIndex}},{default:D(()=>m[5]||=[s(` Play `)]),_:2,__:[5]},1032,[`onClick`])])]))),128)),c(U,{onClick:L},{default:D(()=>m[6]||=[s(` Save and patch `)]),_:1,__:[6]}),r(`a`,{"mt-2":``,block:``,href:_(z),download:`${(t=_(p).live2dModelFile)?.name||`live2d`}-motion-edited.zip`},[c(U,{"w-full":``},{default:D(()=>m[7]||=[s(`Export`)]),_:1,__:[7]})],8,Q)]}),_:1},8,[`title`])):a(``,!0)]))}}),te=t(ee,[[`__scopeId`,`data-v-9302a7ae`]]);const ne={flex:``,class:`flex-col-reverse sm:flex-row`},re={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":``};var $=l({__name:`index`,setup(t){let n=d(),a=d(),{width:s,height:l}=v(n),f=d([]);async function p(){if(!a.value)return;let e=await a.value.captureFrame();if(!e){console.error(`No frame captured`);return}let t=URL.createObjectURL(e);try{let e=new L(t),n=await e.getPalette();f.value=Object.values(n).map(e=>e?.hex).filter(e=>typeof e==`string`)}finally{URL.revokeObjectURL(t)}}let{iconAnimationStarted:h,showIconAnimation:g,animationIcon:y}=B(`i-solar:people-nearby-bold-duotone`),b=x();return(t,d)=>{let v=m(`motion`);return u(),o(e,null,[r(`div`,ne,[r(`div`,{ref_key:`live2dContainerRef`,ref:n,w:`100% sm:50%`,h:`50dvh sm:80dvh`},[c(_(k),{ref_key:`live2dCanvasRef`,ref:a,width:_(s),height:_(l),resolution:2,"max-h":`100dvh`},{default:D(({app:e})=>[c(_(A),{app:e,"mouth-open-size":0,width:_(s),height:_(l),paused:!1,"focus-at":{x:_(b).x.value,y:_(b).y.value}},null,8,[`app`,`width`,`height`,`focus-at`])]),_:1},8,[`width`,`height`])],512),c(te,{w:`100% sm:50%`,h:`50dvh sm:80dvh`,palette:f.value,onExtractColorsFromModel:p},null,8,[`palette`])]),_(g)?(u(),i(z,{key:0,"z-index":-1,icon:_(y),"icon-size":12,duration:1e3,started:_(h),"is-reverse":!0,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`},null,8,[`icon`,`started`])):O((u(),o(`div`,re,d[0]||=[r(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)])),[[v]])],64)}}});typeof I==`function`&&I($);var ie=$;export{ie as default}; \ No newline at end of file +import{Fragment as e,__plugin_vue_export_helper_default as t,__toESM as n,createBaseVNode as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createTextVNode as s,createVNode as c,defineComponent as l,openBlock as u,ref as d,renderList as f,renderSlot as p,resolveDirective as m,storeToRefs as h,toDisplayString as g,unref as _,useElementBounding as v,useFileDialog as y,useI18n as b,useMouse as x,useObjectUrl as S,useSettings as C,vModelSelect as w,vModelText as T,watch as E,withCtx as D,withDirectives as O}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import"./dist-BeDGrW0v.js";import{Canvas_default as k,Model_default as A,Section_default as j,require_jszip_min as M,require_localforage as N}from"./components-DaLVZOhF.js";import{Emotion as P,EmotionNeutralMotionName as F}from"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as I}from"./route-block--T8TG4is.js";import{Vibrant as L}from"./browser-BP4AmG4D.js";import{ColorPalette_default as R}from"./ColorPalette-C8KIoKTf.js";import{IconAnimation_default as z}from"./IconAnimation-9WCWiV-Y.js";import{useIconAnimation as B}from"./icon-animation-DJ14_q6r.js";const V=[`disabled`];var H=l({__name:`Live2DModelControlButton`,emits:[`click`],setup(e){let t=C();return(e,n)=>(u(),o(`button`,{disabled:_(t).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]||=t=>e.$emit(`click`)},[p(e.$slots,`default`)],8,V))}}),U=H,W=n(M()),G=n(N());const K={flex:`~ col gap-2`},q={flex:``,"items-center":``,"gap-2":``},J=[`disabled`,`placeholder`],Y={"font-medium":``,"font-mono":``},X={flex:``,"gap-2":``},Z=[`onUpdate:modelValue`],Q=[`href`,`download`];var ee=l({__name:`Live2DSettings`,props:{palette:null},emits:[`extractColorsFromModel`],setup(t){let{t:n}=b(),l=y({accept:`application/zip`}),p=C(),{live2dModelFile:m,live2dMotionMap:v,live2dLoadSource:x,loadingLive2dModel:k,availableLive2dMotions:A,live2dModelUrl:M}=h(p),N=d(M.value);l.onChange(e=>{e&&e.length>0&&(v.value={},m.value=e[0],x.value=`file`,k.value=!0)}),E(()=>p.loadingLive2dModel,e=>{e||x.value===`file`&&A.value.forEach(e=>{e.motionName in P?v.value[e.fileName]=e.motionName:v.value[e.fileName]=F})});async function I(e,t){if(!Object.keys(t).length)return e;let n=new W.default,r=await n.loadAsync(e),i=Object.keys(r.files).find(e=>e.endsWith(`model3.json`));if(!i)throw Error(`model3.json not found`);let a=await r.file(i).async(`string`),o=JSON.parse(a),s={};Object.entries(t).forEach(([e,t])=>{if(s[t]){s[t].push({File:e});return}s[t]=[{File:e}]}),o.FileReferences.Motions=s,r.file(i,JSON.stringify(o,null,2));let c=await r.generateAsync({type:`blob`});return new File([c],e.name,{type:e.type,lastModified:e.lastModified})}async function L(){let e=await G.default.getItem(`live2dModel`);if(!e)return;let t=await I(e,v.value);m.value=t,x.value=`file`,k.value=!0}let z=S(m);return(d,m)=>(u(),o(`div`,K,[c(_(j),{title:_(n)(`settings.live2d.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`},{default:D(()=>[r(`div`,q,[O(r(`input`,{"onUpdate:modelValue":m[0]||=e=>N.value=e,disabled:_(p).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:_(n)(`settings.live2d.change-model.from-url-placeholder`)},null,8,J),[[T,N.value]]),c(U,{class:`form-control`,onClick:m[1]||=e=>M.value=N.value},{default:D(()=>[s(g(_(n)(`settings.live2d.change-model.from-url`)),1)]),_:1})]),c(U,{class:`form-control place-self-end`,onClick:m[2]||=e=>_(l).open()},{default:D(()=>[s(g(_(n)(`settings.live2d.change-model.from-file`))+`... `,1)]),_:1}),c(U,{class:`form-control`,onClick:m[3]||=e=>d.$emit(`extractColorsFromModel`)},{default:D(()=>m[4]||=[s(` Extract colors from model `)]),_:1,__:[4]}),c(R,{colors:t.palette.map(e=>({hex:e,name:e}))},null,8,[`colors`])]),_:1},8,[`title`]),_(p).live2dLoadSource===`file`?(u(),i(_(j),{key:0,title:_(n)(`settings.live2d.edit-motion-map.title`),icon:`i-solar:face-scan-circle-bold-duotone`},{default:D(()=>{var t;return[(u(!0),o(e,null,f(_(p).availableLive2dMotions,t=>(u(),o(`div`,{key:t.fileName,flex:``,"items-center":``,"justify-between":``,"text-sm":``},[r(`span`,Y,g(t.fileName),1),r(`div`,X,[O(r(`select`,{"onUpdate:modelValue":e=>_(p).live2dMotionMap[t.fileName]=e},[(u(!0),o(e,null,f(Object.keys(_(P)),e=>(u(),o(`option`,{key:e},g(e),1))),128))],8,Z),[[w,_(p).live2dMotionMap[t.fileName]]]),c(U,{class:`form-control`,onClick:e=>_(p).live2dCurrentMotion={group:t.motionName,index:t.motionIndex}},{default:D(()=>m[5]||=[s(` Play `)]),_:2,__:[5]},1032,[`onClick`])])]))),128)),c(U,{onClick:L},{default:D(()=>m[6]||=[s(` Save and patch `)]),_:1,__:[6]}),r(`a`,{"mt-2":``,block:``,href:_(z),download:`${(t=_(p).live2dModelFile)?.name||`live2d`}-motion-edited.zip`},[c(U,{"w-full":``},{default:D(()=>m[7]||=[s(`Export`)]),_:1,__:[7]})],8,Q)]}),_:1},8,[`title`])):a(``,!0)]))}}),te=t(ee,[[`__scopeId`,`data-v-9302a7ae`]]);const ne={flex:``,class:`flex-col-reverse sm:flex-row`},re={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":``};var $=l({__name:`index`,setup(t){let n=d(),a=d(),{width:s,height:l}=v(n),f=d([]);async function p(){if(!a.value)return;let e=await a.value.captureFrame();if(!e){console.error(`No frame captured`);return}let t=URL.createObjectURL(e);try{let e=new L(t),n=await e.getPalette();f.value=Object.values(n).map(e=>e?.hex).filter(e=>typeof e==`string`)}finally{URL.revokeObjectURL(t)}}let{iconAnimationStarted:h,showIconAnimation:g,animationIcon:y}=B(`i-solar:people-nearby-bold-duotone`),b=x();return(t,d)=>{let v=m(`motion`);return u(),o(e,null,[r(`div`,ne,[r(`div`,{ref_key:`live2dContainerRef`,ref:n,w:`100% sm:50%`,h:`50dvh sm:80dvh`},[c(_(k),{ref_key:`live2dCanvasRef`,ref:a,width:_(s),height:_(l),resolution:2,"max-h":`100dvh`},{default:D(({app:e})=>[c(_(A),{app:e,"mouth-open-size":0,width:_(s),height:_(l),paused:!1,"focus-at":{x:_(b).x.value,y:_(b).y.value}},null,8,[`app`,`width`,`height`,`focus-at`])]),_:1},8,[`width`,`height`])],512),c(te,{w:`100% sm:50%`,h:`50dvh sm:80dvh`,palette:f.value,onExtractColorsFromModel:p},null,8,[`palette`])]),_(g)?(u(),i(z,{key:0,"z-index":-1,icon:_(y),"icon-size":12,duration:1e3,started:_(h),"is-reverse":!0,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`},null,8,[`icon`,`started`])):O((u(),o(`div`,re,d[0]||=[r(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)])),[[v]])],64)}}});typeof I==`function`&&I($);var ie=$;export{ie as default}; \ No newline at end of file diff --git a/assets/modules-B4NyxInC.js b/assets/modules-B_WFNh94.js similarity index 86% rename from assets/modules-B4NyxInC.js rename to assets/modules-B_WFNh94.js index b5ea62091f643c275ed0f02ee375b38750181582..b81aa6a5f1778728ac58735fd41b393faa42dd0b 100644 --- a/assets/modules-B4NyxInC.js +++ b/assets/modules-B_WFNh94.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,openBlock as o,renderList as s,resolveDirective as c,unref as l,useI18n as u,withDirectives as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{IconStatusItem_default as f}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as p}from"./route-block--T8TG4is.js";import{IconAnimation_default as m}from"./IconAnimation-DNjwD43A.js";import{useIconAnimation as h}from"./icon-animation-BMPmq1VP.js";const g={grid:`~ cols-1 sm:cols-2 gap-4`},_={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":``};var v=a({__name:`index`,setup(a){let{t:p}=u(),v=t(()=>[{id:`consciousness`,name:p(`settings.pages.modules.consciousness.title`),description:p(`settings.pages.modules.consciousness.description`),icon:`i-solar:ghost-bold-duotone`,to:`/settings/modules/consciousness`,configured:!1},{id:`speech`,name:p(`settings.pages.modules.speech.title`),description:p(`settings.pages.modules.speech.description`),icon:`i-solar:user-speak-rounded-bold-duotone`,to:`/settings/modules/speech`,configured:!1},{id:`hearing`,name:p(`settings.pages.modules.hearing.title`),description:p(`settings.pages.modules.hearing.description`),icon:`i-solar:microphone-3-bold-duotone`,to:`/settings/modules/hearing`,configured:!1},{id:`vision`,name:p(`settings.pages.modules.vision.title`),description:p(`settings.pages.modules.vision.description`),icon:`i-solar:eye-closed-bold-duotone`,to:``,configured:!1},{id:`memory-short-term`,name:p(`settings.pages.modules.memory-short-term.title`),description:p(`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:p(`settings.pages.modules.memory-long-term.title`),description:p(`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:p(`settings.pages.modules.messaging-discord.title`),description:p(`settings.pages.modules.messaging-discord.description`),icon:`i-simple-icons:discord`,to:``,configured:!1},{id:`x`,name:p(`settings.pages.modules.x.title`),description:p(`settings.pages.modules.x.description`),icon:`i-simple-icons:x`,to:``,configured:!1},{id:`game-minecraft`,name:p(`settings.pages.modules.gaming-minecraft.title`),description:p(`settings.pages.modules.gaming-minecraft.description`),iconColor:`i-vscode-icons:file-type-minecraft`,to:``,configured:!1},{id:`game-factorio`,name:p(`settings.pages.modules.gaming-factorio.title`),description:p(`settings.pages.modules.gaming-factorio.description`),iconImage:``,to:``,configured:!1}]),{iconAnimationStarted:y,showIconAnimation:b,animationIcon:x}=h(`i-solar:layers-bold-duotone`);return(t,a)=>{let u=c(`motion`);return o(),i(e,null,[n(`div`,g,[(o(!0),i(e,null,s(v.value,(e,t)=>d((o(),r(l(f),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:t*50,title:e.name,description:e.description,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:e.to,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[u]])),128))]),l(b)?(o(),r(m,{key:0,icon:l(x),"icon-size":12,duration:1e3,started:l(y),"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`])):d((o(),i(`div`,_,a[0]||=[n(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof p==`function`&&p(v);var y=v;export{y as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,openBlock as o,renderList as s,resolveDirective as c,unref as l,useI18n as u,withDirectives as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{IconStatusItem_default as f}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as p}from"./route-block--T8TG4is.js";import{IconAnimation_default as m}from"./IconAnimation-9WCWiV-Y.js";import{useIconAnimation as h}from"./icon-animation-DJ14_q6r.js";const g={grid:`~ cols-1 sm:cols-2 gap-4`},_={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":``};var v=a({__name:`index`,setup(a){let{t:p}=u(),v=t(()=>[{id:`consciousness`,name:p(`settings.pages.modules.consciousness.title`),description:p(`settings.pages.modules.consciousness.description`),icon:`i-solar:ghost-bold-duotone`,to:`/settings/modules/consciousness`,configured:!1},{id:`speech`,name:p(`settings.pages.modules.speech.title`),description:p(`settings.pages.modules.speech.description`),icon:`i-solar:user-speak-rounded-bold-duotone`,to:`/settings/modules/speech`,configured:!1},{id:`hearing`,name:p(`settings.pages.modules.hearing.title`),description:p(`settings.pages.modules.hearing.description`),icon:`i-solar:microphone-3-bold-duotone`,to:`/settings/modules/hearing`,configured:!1},{id:`vision`,name:p(`settings.pages.modules.vision.title`),description:p(`settings.pages.modules.vision.description`),icon:`i-solar:eye-closed-bold-duotone`,to:``,configured:!1},{id:`memory-short-term`,name:p(`settings.pages.modules.memory-short-term.title`),description:p(`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:p(`settings.pages.modules.memory-long-term.title`),description:p(`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:p(`settings.pages.modules.messaging-discord.title`),description:p(`settings.pages.modules.messaging-discord.description`),icon:`i-simple-icons:discord`,to:``,configured:!1},{id:`x`,name:p(`settings.pages.modules.x.title`),description:p(`settings.pages.modules.x.description`),icon:`i-simple-icons:x`,to:``,configured:!1},{id:`game-minecraft`,name:p(`settings.pages.modules.gaming-minecraft.title`),description:p(`settings.pages.modules.gaming-minecraft.description`),iconColor:`i-vscode-icons:file-type-minecraft`,to:``,configured:!1},{id:`game-factorio`,name:p(`settings.pages.modules.gaming-factorio.title`),description:p(`settings.pages.modules.gaming-factorio.description`),iconImage:``,to:``,configured:!1}]),{iconAnimationStarted:y,showIconAnimation:b,animationIcon:x}=h(`i-solar:layers-bold-duotone`);return(t,a)=>{let u=c(`motion`);return o(),i(e,null,[n(`div`,g,[(o(!0),i(e,null,s(v.value,(e,t)=>d((o(),r(l(f),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:t*50,title:e.name,description:e.description,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:e.to,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[u]])),128))]),l(b)?(o(),r(m,{key:0,icon:l(x),"icon-size":12,duration:1e3,started:l(y),"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`])):d((o(),i(`div`,_,a[0]||=[n(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof p==`function`&&p(v);var y=v;export{y as default}; \ No newline at end of file diff --git a/assets/moonshot-ai-DQXpgnTx.js b/assets/moonshot-ai-CPxUGdzM.js similarity index 82% rename from assets/moonshot-ai-DQXpgnTx.js rename to assets/moonshot-ai-CPxUGdzM.js index 76e7c2a482a0e6c9163e8d43f61c69dfaf832d0a..5f1dbac955dbe8524ed561e1a142d1798ab84951 100644 --- a/assets/moonshot-ai-DQXpgnTx.js +++ b/assets/moonshot-ai-CPxUGdzM.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`moonshot-ai`;var x=r({__name:`moonshot-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`ms-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.moonshot.cn/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`moonshot-ai`;var x=r({__name:`moonshot-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`ms-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.moonshot.cn/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/novita-ai-utW-azgn.js b/assets/novita-ai-BHu56LyQ.js similarity index 82% rename from assets/novita-ai-utW-azgn.js rename to assets/novita-ai-BHu56LyQ.js index b2d61ba27c0a27baa548cca493bdbd73dd1056e7..263dcc77f1e1320d4d20494f90cfd8192bb91e3b 100644 --- a/assets/novita-ai-utW-azgn.js +++ b/assets/novita-ai-BHu56LyQ.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`novita-ai`;var x=r({__name:`novita-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`nvt-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.novita.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`novita-ai`;var x=r({__name:`novita-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`nvt-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.novita.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/ollama-CHn_CRdf.js b/assets/ollama-CbGvZQLV.js similarity index 84% rename from assets/ollama-CHn_CRdf.js rename to assets/ollama-CbGvZQLV.js index cc7ad745a760f50010acbc6863e484f920d933f9..6dd7ca46a6afc620f423ca0536ab18b3119d9879 100644 --- a/assets/ollama-CHn_CRdf.js +++ b/assets/ollama-CbGvZQLV.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,ref as o,storeToRefs as s,unref as c,useI18n as l,useRouter as u,watch as d,withCtx as f}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import{FieldKeyValues_default as m}from"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as h,ProviderBaseUrlInput_default as g,ProviderBasicSettings_default as _,ProviderSettingsContainer_default as v,ProviderSettingsLayout_default as y}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as b}from"./route-block--T8TG4is.js";const x=`ollama`;var S=r({__name:`ollama`,setup(r){let{t:b}=l(),S=u(),C=p(),{providers:w}=s(C),T=e(()=>C.getProviderMetadata(x)),E=e({get:()=>{var e,t,n;return(e=w.value[x])?.baseUrl||((t=T.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``},set:e=>{w.value[x]||(w.value[x]={}),w.value[x].baseUrl=e}});i(()=>{var e,t,n,r;C.initializeProvider(x),E.value=(e=w.value[x])?.baseUrl||((t=T.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``,(r=w.value[x])?.headers||(w.value[x].headers={})});function D(){var e;w.value[x]={...(e=T.value)?.defaultOptions}}let O=o([{key:``,value:``}]);function k(e,t,n){e&&e.push({key:t,value:n})}function A(e,t){t&&(t.length===1?(t[0].key=``,t[0].value=``):t.splice(e,1))}return d(O,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``})},{deep:!0,immediate:!0}),(e,r)=>{var i,o;return a(),t(c(y),{"provider-name":(i=T.value)?.localizedName,"provider-icon":(o=T.value)?.icon,"on-back":()=>c(S).back()},{default:f(()=>[n(c(v),null,{default:f(()=>[n(c(_),{title:c(b)(`settings.pages.providers.common.section.basic.title`),description:c(b)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:f(()=>{var e,t;return[n(c(g),{modelValue:E.value,"onUpdate:modelValue":r[0]||=e=>E.value=e,placeholder:((e=T.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``,required:``},null,8,[`modelValue`,`placeholder`])]}),_:1},8,[`title`,`description`]),n(c(h),{title:c(b)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[n(c(m),{modelValue:O.value,"onUpdate:modelValue":r[1]||=e=>O.value=e,label:c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:r[2]||=(e,t)=>k(O.value,e,t),onRemove:r[3]||=e=>A(e,O.value)},null,8,[`modelValue`,`label`,`description`,`key-placeholder`,`value-placeholder`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof b==`function`&&b(S);var C=S;export{C as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,ref as o,storeToRefs as s,unref as c,useI18n as l,useRouter as u,watch as d,withCtx as f}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import{FieldKeyValues_default as m}from"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as h,ProviderBaseUrlInput_default as g,ProviderBasicSettings_default as _,ProviderSettingsContainer_default as v,ProviderSettingsLayout_default as y}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as b}from"./route-block--T8TG4is.js";const x=`ollama`;var S=r({__name:`ollama`,setup(r){let{t:b}=l(),S=u(),C=p(),{providers:w}=s(C),T=e(()=>C.getProviderMetadata(x)),E=e({get:()=>{var e,t,n;return(e=w.value[x])?.baseUrl||((t=T.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``},set:e=>{w.value[x]||(w.value[x]={}),w.value[x].baseUrl=e}});i(()=>{var e,t,n,r;C.initializeProvider(x),E.value=(e=w.value[x])?.baseUrl||((t=T.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``,(r=w.value[x])?.headers||(w.value[x].headers={})});function D(){var e;w.value[x]={...(e=T.value)?.defaultOptions}}let O=o([{key:``,value:``}]);function k(e,t,n){e&&e.push({key:t,value:n})}function A(e,t){t&&(t.length===1?(t[0].key=``,t[0].value=``):t.splice(e,1))}return d(O,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``})},{deep:!0,immediate:!0}),(e,r)=>{var i,o;return a(),t(c(y),{"provider-name":(i=T.value)?.localizedName,"provider-icon":(o=T.value)?.icon,"on-back":()=>c(S).back()},{default:f(()=>[n(c(v),null,{default:f(()=>[n(c(_),{title:c(b)(`settings.pages.providers.common.section.basic.title`),description:c(b)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:f(()=>{var e,t;return[n(c(g),{modelValue:E.value,"onUpdate:modelValue":r[0]||=e=>E.value=e,placeholder:((e=T.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``,required:``},null,8,[`modelValue`,`placeholder`])]}),_:1},8,[`title`,`description`]),n(c(h),{title:c(b)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[n(c(m),{modelValue:O.value,"onUpdate:modelValue":r[1]||=e=>O.value=e,label:c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:r[2]||=(e,t)=>k(O.value,e,t),onRemove:r[3]||=e=>A(e,O.value)},null,8,[`modelValue`,`label`,`description`,`key-placeholder`,`value-placeholder`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof b==`function`&&b(S);var C=S;export{C as default}; \ No newline at end of file diff --git a/assets/openai-D78WUN50.js b/assets/openai-CFrJH41X.js similarity index 83% rename from assets/openai-D78WUN50.js rename to assets/openai-CFrJH41X.js index 262ff9c7a442e75795a7183d61b6c173d256f9ec..1ddfadd03c40f3cfad6312044b1209eb8d1c7aa9 100644 --- a/assets/openai-D78WUN50.js +++ b/assets/openai-CFrJH41X.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`openai`;var x=r({__name:`openai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`openai`;var x=r({__name:`openai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/openai-audio-speech-CIhpAE_g.js b/assets/openai-audio-speech-CQnlHz-h.js similarity index 83% rename from assets/openai-audio-speech-CIhpAE_g.js rename to assets/openai-audio-speech-CQnlHz-h.js index 8ce2c101104751262c8d773afb8899124669399f..cc382645269fdcf2b407a7ce3cdfae6cb5112b2f 100644 --- a/assets/openai-audio-speech-CIhpAE_g.js +++ b/assets/openai-audio-speech-CQnlHz-h.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`openai`;var x=r({__name:`openai-audio-speech`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`openai`;var x=r({__name:`openai-audio-speech`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/openai-audio-transcription-BQWhP4fg.js b/assets/openai-audio-transcription-COj7c5f3.js similarity index 83% rename from assets/openai-audio-transcription-BQWhP4fg.js rename to assets/openai-audio-transcription-COj7c5f3.js index 2d9d3ec3434f7f01f10e924353ee2575b6bee979..195b155d695bb910798e743d174e874f45fe910c 100644 --- a/assets/openai-audio-transcription-BQWhP4fg.js +++ b/assets/openai-audio-transcription-COj7c5f3.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`openai`;var x=r({__name:`openai-audio-transcription`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`openai`;var x=r({__name:`openai-audio-transcription`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/openrouter-ai-B5FAPnom.js b/assets/openrouter-ai-B3LA44lL.js similarity index 84% rename from assets/openrouter-ai-B5FAPnom.js rename to assets/openrouter-ai-B3LA44lL.js index a545efa5b796b3691d23dc4aefbf6c6c05484deb..cc3298b9aca40c5c1e4edeb65ae1e50c14a03e08 100644 --- a/assets/openrouter-ai-B5FAPnom.js +++ b/assets/openrouter-ai-B3LA44lL.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`openrouter-ai`;var x=r({__name:`openrouter-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e,t,n;return(e=C.value[b])?.baseUrl||((t=w.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t,n,r;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||((n=w.value)==null||(r=n.defaultOptions)==null?void 0:r.call(n).baseUrl)||``}),u([T,E],()=>{var e,t;C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||((e=w.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`sk-or-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>{var e,t;return[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:((e=w.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``},null,8,[`modelValue`,`placeholder`])]}),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`openrouter-ai`;var x=r({__name:`openrouter-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e,t,n;return(e=C.value[b])?.baseUrl||((t=w.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t,n,r;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||((n=w.value)==null||(r=n.defaultOptions)==null?void 0:r.call(n).baseUrl)||``}),u([T,E],()=>{var e,t;C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||((e=w.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`sk-or-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>{var e,t;return[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:((e=w.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``},null,8,[`modelValue`,`placeholder`])]}),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/pages-C4YaFCau.js b/assets/pages-BohMTnhi.js similarity index 72% rename from assets/pages-C4YaFCau.js rename to assets/pages-BohMTnhi.js index d373a8febedb263263ed78b58e1542b5b046b49c..1c95c0c76d680a6936a73ce0f5bd18232c269c08 100644 --- a/assets/pages-C4YaFCau.js +++ b/assets/pages-BohMTnhi.js @@ -1 +1 @@ -import{createBaseVNode as e,createBlock as t,createVNode as n,defineComponent as r,openBlock as i,ref as a,unref as o,useDark as s,useMouse as c,withCtx as l}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./HeaderLink-BN-EJFUu.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import"./Basic-CbvQnFR9.js";import{Stage_default as u}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as d}from"./route-block--T8TG4is.js";import{AnimatedWave_default as f,Cross_default as p,Header_default as m,InteractiveArea_default as h,MobileInteractiveArea_default as g}from"./AnimatedWave-BwQ8RHQR.js";const _={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},v={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 (i(),t(p,null,{default:l(()=>[n(f,{"fill-color":o(d)?`oklch(35% calc(var(--chromatic-chroma) * 0.6) var(--chromatic-hue))`:`color-mix(in srgb, oklch(95% calc(var(--chromatic-chroma-50) * 0.5) var(--chromatic-hue)) 80%, oklch(100% 0 360))`},{default:l(()=>[e(`div`,_,[e(`div`,null,[n(m,{class:`flex`,p2:``})]),e(`div`,v,[n(o(u),{"flex-1":``,"min-w":`1/2`,paused:y.value,"focus-at":{x:o(x).x.value,y:o(x).y.value}},null,8,[`paused`,`focus-at`]),n(h,{class:`flex (i(),t(p,null,{default:l(()=>[n(f,{"fill-color":o(d)?`oklch(35% calc(var(--chromatic-chroma) * 0.6) var(--chromatic-hue))`:`color-mix(in srgb, oklch(95% calc(var(--chromatic-chroma-50) * 0.5) var(--chromatic-hue)) 80%, oklch(100% 0 360))`},{default:l(()=>[e(`div`,_,[e(`div`,null,[n(m,{class:`flex`,p2:``})]),e(`div`,v,[n(o(u),{"flex-1":``,"min-w":`1/2`,paused:y.value,"focus-at":{x:o(x).x.value,y:o(x).y.value}},null,8,[`paused`,`focus-at`]),n(h,{class:`flex E.getProviderMetadata(w)),k=t({get:()=>{var e;return(e=D.value[w])?.baseUrl||``},set:e=>{D.value[w]||(D.value[w]={}),D.value[w].baseUrl=e}}),A=u(!0);c(async()=>{var e;E.initializeProvider(w),k.value=(e=D.value[w])?.baseUrl||``;try{let e=await fetch(`${k.value}health`,{method:`GET`,headers:{"player2-game-key":`airi`}});A.value=e.status===200}catch(e){console.error(e),A.value=!1}}),g([k],()=>{D.value[w]={...D.value[w],baseUrl:k.value||``}});function j(){var e;D.value[w]={...(e=O.value)?.defaultOptions}}return(t,s)=>{var c,u;let f=d(`ProviderBasicSettings`);return l(),i(e,null,[A.value?r(``,!0):(l(),i(`div`,C,s[1]||=[n(`div`,null,[a(` Please download and run the Player2 App: `),n(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),n(`div`,null,[a(` After downloading, if you still are having trouble, please reach out to us on Discord: `),n(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),a(`. `)])],-1)])),o(p(x),{"provider-name":(c=O.value)?.localizedName,"provider-icon":(u=O.value)?.icon,"on-back":()=>p(T).back()},{default:_(()=>[o(p(b),null,{default:_(()=>[o(f,{title:p(S)(`settings.pages.providers.common.section.basic.title`),description:p(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":j},{default:_(()=>[o(p(y),{modelValue:k.value,"onUpdate:modelValue":s[0]||=e=>k.value=e,placeholder:`http://localhost:4315/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`,`description`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])],64)}}});typeof S==`function`&&S(T);var E=T;export{E as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,onMounted as c,openBlock as l,ref as u,resolveComponent as d,storeToRefs as f,unref as p,useI18n as m,useRouter as h,watch as g,withCtx as _}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as v}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderBaseUrlInput_default as y,ProviderSettingsContainer_default as b,ProviderSettingsLayout_default as x}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as S}from"./route-block--T8TG4is.js";const C={key:0,style:{color:`red`,"margin-bottom":`1rem`}},w=`player2`;var T=s({__name:`player2`,setup(s){let{t:S}=m(),T=h(),E=v(),{providers:D}=f(E),O=t(()=>E.getProviderMetadata(w)),k=t({get:()=>{var e;return(e=D.value[w])?.baseUrl||``},set:e=>{D.value[w]||(D.value[w]={}),D.value[w].baseUrl=e}}),A=u(!0);c(async()=>{var e;E.initializeProvider(w),k.value=(e=D.value[w])?.baseUrl||``;try{let e=await fetch(`${k.value}health`,{method:`GET`,headers:{"player2-game-key":`airi`}});A.value=e.status===200}catch(e){console.error(e),A.value=!1}}),g([k],()=>{D.value[w]={...D.value[w],baseUrl:k.value||``}});function j(){var e;D.value[w]={...(e=O.value)?.defaultOptions}}return(t,s)=>{var c,u;let f=d(`ProviderBasicSettings`);return l(),i(e,null,[A.value?r(``,!0):(l(),i(`div`,C,s[1]||=[n(`div`,null,[a(` Please download and run the Player2 App: `),n(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),n(`div`,null,[a(` After downloading, if you still are having trouble, please reach out to us on Discord: `),n(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),a(`. `)])],-1)])),o(p(x),{"provider-name":(c=O.value)?.localizedName,"provider-icon":(u=O.value)?.icon,"on-back":()=>p(T).back()},{default:_(()=>[o(p(b),null,{default:_(()=>[o(f,{title:p(S)(`settings.pages.providers.common.section.basic.title`),description:p(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":j},{default:_(()=>[o(p(y),{modelValue:k.value,"onUpdate:modelValue":s[0]||=e=>k.value=e,placeholder:`http://localhost:4315/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`,`description`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])],64)}}});typeof S==`function`&&S(T);var E=T;export{E as default}; \ No newline at end of file diff --git a/assets/player2-speech-DdGKDDVO.js b/assets/player2-speech-D3f8DqIF.js similarity index 84% rename from assets/player2-speech-DdGKDDVO.js rename to assets/player2-speech-D3f8DqIF.js index ef90d927e1f774a88b97edfe109d094175cd8db0..587bb17556abbd239fccc4b40d6fab831a086729 100644 --- a/assets/player2-speech-DdGKDDVO.js +++ b/assets/player2-speech-D3f8DqIF.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,onMounted as c,openBlock as l,ref as u,unref as d,useI18n as f,watch as p,withCtx as m}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as h,useSpeechStore as g}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import{FieldRange_default as _}from"./src-BnFQ5wFr.js";import{SpeechPlayground_default as v,SpeechProviderSettings_default as y}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as b}from"./route-block--T8TG4is.js";const x={key:0,style:{color:`red`,"margin-bottom":`1rem`}},S=`player2-speech`,C=`v1`;var w=s({__name:`player2-speech`,setup(s){let b=u(1),w=g(),T=h(),{t:E}=f(),D=t(()=>w.availableVoices[S]||[]);async function O(e,t,n){let r=T.getProviderInstance(S);if(!r)throw Error(`Failed to initialize speech provider`);let i=T.getProviderConfig(S),a=i.model||C;return await w.speech(r,a,e,t,{...i})}let k=u(!0);return c(async()=>{let e=T.getProviderConfig(S),t=T.getProviderMetadata(S);await t.validators.validateProviderConfig(e)?await w.loadVoicesForProvider(S):console.error(`Failed to validate provider config`,e);try{let e=await fetch(`http://localhost:4315/v1/health`,{method:`GET`,headers:{"player2-game-key":`airi`}});k.value=e.status===200}catch(e){console.error(e),k.value=!1}}),p(b,async()=>{let e=T.getProviderConfig(S);e.speed=b.value}),(t,s)=>(l(),i(e,null,[k.value?r(``,!0):(l(),i(`div`,x,s[1]||=[n(`div`,null,[a(` Please download and run the Player2 App: `),n(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),n(`div`,null,[a(` After downloading, if you still are having trouble, please reach out to us on Discord: `),n(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),a(`. `)])],-1)])),o(d(y),{"provider-id":S,"default-model":C},{"voice-settings":m(()=>[o(d(_),{modelValue:b.value,"onUpdate:modelValue":s[0]||=e=>b.value=e,label:d(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:d(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:5,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:m(()=>[o(d(v),{"available-voices":D.value,"generate-speech":O,"api-key-configured":!0,"default-text":`Hello! This is a test of the Player 2 voice synthesis.`},null,8,[`available-voices`])]),_:1})],64))}});typeof b==`function`&&b(w);var T=w;export{T as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,onMounted as c,openBlock as l,ref as u,unref as d,useI18n as f,watch as p,withCtx as m}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as h,useSpeechStore as g}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import{FieldRange_default as _}from"./src-B9Iy8991.js";import{SpeechPlayground_default as v,SpeechProviderSettings_default as y}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as b}from"./route-block--T8TG4is.js";const x={key:0,style:{color:`red`,"margin-bottom":`1rem`}},S=`player2-speech`,C=`v1`;var w=s({__name:`player2-speech`,setup(s){let b=u(1),w=g(),T=h(),{t:E}=f(),D=t(()=>w.availableVoices[S]||[]);async function O(e,t,n){let r=T.getProviderInstance(S);if(!r)throw Error(`Failed to initialize speech provider`);let i=T.getProviderConfig(S),a=i.model||C;return await w.speech(r,a,e,t,{...i})}let k=u(!0);return c(async()=>{let e=T.getProviderConfig(S),t=T.getProviderMetadata(S);await t.validators.validateProviderConfig(e)?await w.loadVoicesForProvider(S):console.error(`Failed to validate provider config`,e);try{let e=await fetch(`http://localhost:4315/v1/health`,{method:`GET`,headers:{"player2-game-key":`airi`}});k.value=e.status===200}catch(e){console.error(e),k.value=!1}}),p(b,async()=>{let e=T.getProviderConfig(S);e.speed=b.value}),(t,s)=>(l(),i(e,null,[k.value?r(``,!0):(l(),i(`div`,x,s[1]||=[n(`div`,null,[a(` Please download and run the Player2 App: `),n(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),n(`div`,null,[a(` After downloading, if you still are having trouble, please reach out to us on Discord: `),n(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),a(`. `)])],-1)])),o(d(y),{"provider-id":S,"default-model":C},{"voice-settings":m(()=>[o(d(_),{modelValue:b.value,"onUpdate:modelValue":s[0]||=e=>b.value=e,label:d(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:d(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:5,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:m(()=>[o(d(v),{"available-voices":D.value,"generate-speech":O,"api-key-configured":!0,"default-text":`Hello! This is a test of the Player 2 voice synthesis.`},null,8,[`available-voices`])]),_:1})],64))}});typeof b==`function`&&b(w);var T=w;export{T as default}; \ No newline at end of file diff --git a/assets/polaroid-DPAymSNw.js b/assets/polaroid-HVdbjIQr.js similarity index 78% rename from assets/polaroid-DPAymSNw.js rename to assets/polaroid-HVdbjIQr.js index 4d71400e79642cd7360c84625f9ef76420a00337..ebee0f23949a63b0686ebd65b8faa115549c0822 100644 --- a/assets/polaroid-DPAymSNw.js +++ b/assets/polaroid-HVdbjIQr.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l,vModelSelect as u,watch as d,withCtx as f,withDirectives as p}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{Canvas_default as m,Model_default as h,Screen_default as g}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";const _={flex:``,"flex-col":``,"items-center":``,"gap-4":``},v={"h-full":``,"w-full":``},y=[`value`];var b=i({__name:`polaroid`,setup(i){let b=o(),x=o(),S=o(`idle`),C=o([]);function w(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function T(e){var t;(t=x.value)?.setMotion(e)}d(x,e=>{C.value=e?.listMotionGroups()||[]},{immediate:!0});function E(){x.value&&(x.value.setMotion(S.value),C.value=x.value.listMotionGroups())}function D(){if(!b.value||!x.value)return;let e=b.value.canvasElement(),t=e.toDataURL(`image/png`);w(t,`live2d-screenshot.png`)}return(i,o)=>(a(),n(`div`,_,[t(`div`,v,[r(l(g),{relative:``,"min-h-70dvh":``},{default:f(({width:e,height:t})=>[r(l(m),{ref_key:`live2dCanvasRef`,ref:b,width:e,height:t,resolution:3,"rounded-full":``},{default:f(({app:n})=>[r(l(h),{ref_key:`live2dModelRef`,ref:x,app:n,width:e,height:t,"focus-at":{x:e/2,y:t/2},onModelLoaded:E},null,8,[`app`,`width`,`height`,`focus-at`])]),_:2},1032,[`width`,`height`])]),_:1})]),t(`div`,null,[p(t(`select`,{"onUpdate:modelValue":o[0]||=e=>S.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:o[1]||=e=>T(S.value)},[(a(!0),n(e,null,s(C.value,e=>(a(),n(`option`,{key:e.motionIndex,value:e.motionName},c(e.fileName),9,y))),128))],544),[[u,S.value]])]),t(`div`,{border:`2px solid white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[t(`button`,{"h-18":``,"w-18":``,"rounded-full":``,bg:`white active:gray-50`,"outline-none":``,"transition-colors":``,"duration-200":``,"ease-in-out":``,onClick:D})])]))}}),x=b;export{x as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l,vModelSelect as u,watch as d,withCtx as f,withDirectives as p}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{Canvas_default as m,Model_default as h,Screen_default as g}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";const _={flex:``,"flex-col":``,"items-center":``,"gap-4":``},v={"h-full":``,"w-full":``},y=[`value`];var b=i({__name:`polaroid`,setup(i){let b=o(),x=o(),S=o(`idle`),C=o([]);function w(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function T(e){var t;(t=x.value)?.setMotion(e)}d(x,e=>{C.value=e?.listMotionGroups()||[]},{immediate:!0});function E(){x.value&&(x.value.setMotion(S.value),C.value=x.value.listMotionGroups())}function D(){if(!b.value||!x.value)return;let e=b.value.canvasElement(),t=e.toDataURL(`image/png`);w(t,`live2d-screenshot.png`)}return(i,o)=>(a(),n(`div`,_,[t(`div`,v,[r(l(g),{relative:``,"min-h-70dvh":``},{default:f(({width:e,height:t})=>[r(l(m),{ref_key:`live2dCanvasRef`,ref:b,width:e,height:t,resolution:3,"rounded-full":``},{default:f(({app:n})=>[r(l(h),{ref_key:`live2dModelRef`,ref:x,app:n,width:e,height:t,"focus-at":{x:e/2,y:t/2},onModelLoaded:E},null,8,[`app`,`width`,`height`,`focus-at`])]),_:2},1032,[`width`,`height`])]),_:1})]),t(`div`,null,[p(t(`select`,{"onUpdate:modelValue":o[0]||=e=>S.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:o[1]||=e=>T(S.value)},[(a(!0),n(e,null,s(C.value,e=>(a(),n(`option`,{key:e.motionIndex,value:e.motionName},c(e.fileName),9,y))),128))],544),[[u,S.value]])]),t(`div`,{border:`2px solid white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[t(`button`,{"h-18":``,"w-18":``,"rounded-full":``,bg:`white active:gray-50`,"outline-none":``,"transition-colors":``,"duration-200":``,"ease-in-out":``,onClick:D})])]))}}),x=b;export{x as default}; \ No newline at end of file diff --git a/assets/providers-D-_VRMeK.js b/assets/providers-BQTY_iJ9.js similarity index 89% rename from assets/providers-D-_VRMeK.js rename to assets/providers-BQTY_iJ9.js index cb7858680ba8e2b8ac2c2d9a1b56a19b35d3fbe3..a2bd4af15dee97929873eeb737bafc32b2ff4651 100644 --- a/assets/providers-D-_VRMeK.js +++ b/assets/providers-BQTY_iJ9.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createBlock as n,createElementBlock as r,createVNode as i,defineComponent as a,openBlock as o,renderList as s,resolveComponent as c,resolveDirective as l,storeToRefs as u,toDisplayString as d,unref as f,useI18n as p,withCtx as m,withDirectives as h}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as g}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{IconStatusItem_default as _}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as v}from"./route-block--T8TG4is.js";import{IconAnimation_default as y}from"./IconAnimation-DNjwD43A.js";import{useIconAnimation as b}from"./icon-animation-BMPmq1VP.js";const x={flex:``,"flex-col":``,"gap-5":``},S={class:`rounded-lg bg-primary-500/10 p-4 dark:bg-primary-800/25`},C={class:`mb-2 text-xl text-primary-800 font-semibold dark:text-primary-100`},w={class:`text-primary-700 dark:text-primary-300`},T={flex:`~ row items-center gap-2`},E={text:`neutral-300 dark:neutral-500`},D={grid:`~ cols-2 gap-4`},O={flex:`~ row items-center gap-2`,"my-5":``},k={text:`neutral-300 dark:neutral-500`},A={grid:`~ cols-2 gap-4`},j={flex:`~ row items-center gap-2`,"my-5":``},M={text:`neutral-300 dark:neutral-500`},N={grid:`~ cols-2 gap-4`},P={key:1,text:`neutral-500/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var F=a({__name:`index`,setup(a){let{t:v}=p(),F=g(),{allChatProvidersMetadata:I,allAudioSpeechProvidersMetadata:L,allAudioTranscriptionProvidersMetadata:R}=u(F),{iconAnimationStarted:z,showIconAnimation:B,animationIcon:V}=b(`i-solar:box-minimalistic-bold-duotone`);return(a,u)=>{let p=c(`i18n-t`),g=l(`motion`);return o(),r(e,null,[t(`div`,x,[t(`div`,S,[t(`div`,C,d(a.$t(`settings.pages.providers.helpinfo.title`)),1),t(`div`,w,[i(p,{keypath:`settings.pages.providers.helpinfo.description`},{chat:m(()=>u[0]||=[t(`span`,{class:`inline-flex translate-y-[0.25lh] items-center gap-1 rounded-lg bg-primary-500/10 px-2 py-0.5 dark:bg-primary-800/25`},[t(`div`,{class:`i-solar:chat-square-like-bold-duotone`}),t(`strong`,{class:`font-semibold`},`Chat`)],-1)]),_:1})])]),t(`div`,T,[u[2]||=t(`div`,{"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,E,d(f(v)(`settings.pages.providers.explained.chat`)),1)]),u[1]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Chat `)],-1)])]),t(`div`,D,[(o(!0),r(e,null,s(f(I),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:t*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))]),t(`div`,O,[u[4]||=t(`div`,{"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,k,d(f(v)(`settings.pages.providers.explained.Speech`)),1)]),u[3]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Speech `)],-1)])]),t(`div`,A,[(o(!0),r(e,null,s(f(L),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(f(I).length+t)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))]),t(`div`,j,[u[6]||=t(`div`,{"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,M,d(f(v)(`settings.pages.providers.explained.Transcription`)),1)]),u[5]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Transcription `)],-1)])]),t(`div`,N,[(o(!0),r(e,null,s(f(R),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(f(I).length+f(L).length+t)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))])]),f(B)?(o(),n(y,{key:0,"z-index":-1,icon:f(V),"icon-size":12,duration:1e3,started:f(z),"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`])):h((o(),r(`div`,P,u[7]||=[t(`div`,{text:`60`,"i-solar:box-minimalistic-bold-duotone":``},null,-1)])),[[g]])],64)}}});typeof v==`function`&&v(F);var I=F;export{I as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createBlock as n,createElementBlock as r,createVNode as i,defineComponent as a,openBlock as o,renderList as s,resolveComponent as c,resolveDirective as l,storeToRefs as u,toDisplayString as d,unref as f,useI18n as p,withCtx as m,withDirectives as h}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as g}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{IconStatusItem_default as _}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as v}from"./route-block--T8TG4is.js";import{IconAnimation_default as y}from"./IconAnimation-9WCWiV-Y.js";import{useIconAnimation as b}from"./icon-animation-DJ14_q6r.js";const x={flex:``,"flex-col":``,"gap-5":``},S={class:`rounded-lg bg-primary-500/10 p-4 dark:bg-primary-800/25`},C={class:`mb-2 text-xl text-primary-800 font-semibold dark:text-primary-100`},w={class:`text-primary-700 dark:text-primary-300`},T={flex:`~ row items-center gap-2`},E={text:`neutral-300 dark:neutral-500`},D={grid:`~ cols-2 gap-4`},O={flex:`~ row items-center gap-2`,"my-5":``},k={text:`neutral-300 dark:neutral-500`},A={grid:`~ cols-2 gap-4`},j={flex:`~ row items-center gap-2`,"my-5":``},M={text:`neutral-300 dark:neutral-500`},N={grid:`~ cols-2 gap-4`},P={key:1,text:`neutral-500/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var F=a({__name:`index`,setup(a){let{t:v}=p(),F=g(),{allChatProvidersMetadata:I,allAudioSpeechProvidersMetadata:L,allAudioTranscriptionProvidersMetadata:R}=u(F),{iconAnimationStarted:z,showIconAnimation:B,animationIcon:V}=b(`i-solar:box-minimalistic-bold-duotone`);return(a,u)=>{let p=c(`i18n-t`),g=l(`motion`);return o(),r(e,null,[t(`div`,x,[t(`div`,S,[t(`div`,C,d(a.$t(`settings.pages.providers.helpinfo.title`)),1),t(`div`,w,[i(p,{keypath:`settings.pages.providers.helpinfo.description`},{chat:m(()=>u[0]||=[t(`span`,{class:`inline-flex translate-y-[0.25lh] items-center gap-1 rounded-lg bg-primary-500/10 px-2 py-0.5 dark:bg-primary-800/25`},[t(`div`,{class:`i-solar:chat-square-like-bold-duotone`}),t(`strong`,{class:`font-semibold`},`Chat`)],-1)]),_:1})])]),t(`div`,T,[u[2]||=t(`div`,{"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,E,d(f(v)(`settings.pages.providers.explained.chat`)),1)]),u[1]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Chat `)],-1)])]),t(`div`,D,[(o(!0),r(e,null,s(f(I),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:t*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))]),t(`div`,O,[u[4]||=t(`div`,{"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,k,d(f(v)(`settings.pages.providers.explained.Speech`)),1)]),u[3]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Speech `)],-1)])]),t(`div`,A,[(o(!0),r(e,null,s(f(L),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(f(I).length+t)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))]),t(`div`,j,[u[6]||=t(`div`,{"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,M,d(f(v)(`settings.pages.providers.explained.Transcription`)),1)]),u[5]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Transcription `)],-1)])]),t(`div`,N,[(o(!0),r(e,null,s(f(R),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(f(I).length+f(L).length+t)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))])]),f(B)?(o(),n(y,{key:0,"z-index":-1,icon:f(V),"icon-size":12,duration:1e3,started:f(z),"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`])):h((o(),r(`div`,P,u[7]||=[t(`div`,{text:`60`,"i-solar:box-minimalistic-bold-duotone":``},null,-1)])),[[g]])],64)}}});typeof v==`function`&&v(F);var I=F;export{I as default}; \ No newline at end of file diff --git a/assets/queue-aUPoxb9G.js b/assets/queue-Bp4D1cP3.js similarity index 92% rename from assets/queue-aUPoxb9G.js rename to assets/queue-Bp4D1cP3.js index 18fa317a8f136d156dbef0b81d7f34bf602fef03..42b249b7b5011f14fd2bd7eb827cec606ff5f0dd 100644 --- a/assets/queue-aUPoxb9G.js +++ b/assets/queue-Bp4D1cP3.js @@ -1 +1 @@ -import{ref as e}from"./index-Dor8PgzM.js";function t(t){let n=e([]),r=e(!1),i={add:[],pick:[],processing:[],error:[],processed:[],done:[]},a={};function o(e,t){i[e].push(t)}function s(e,...t){let n=i[e];n.forEach(e=>{e(...t)})}function c(e,t){a[e]=a[e]||[],a[e].push(t)}function l(e,...t){let n=a[e]||[];n.forEach(e=>{e(...t)})}async function u(e){n.value.push(e),s(`add`,e)}function d(){let e=n.value.shift();if(e)return s(`pick`,e),e}async function f(){if(r.value)return;let e=d();if(e){r.value=!0;for(let r of t.handlers){s(`processing`,e,r);try{let t=await r({data:e,itemsToBeProcessed:()=>n.value.length,emit:l});s(`processed`,e,t,r)}catch(t){s(`error`,e,t,r);continue}}r.value=!1,s(`done`,e),n.value.length>0&&f()}}return o(`add`,f),o(`done`,f),{add:u,on:o,onHandlerEvent:c,queue:n}}export{t as useQueue}; \ No newline at end of file +import{ref as e}from"./index-C-t5bjx6.js";function t(t){let n=e([]),r=e(!1),i={add:[],pick:[],processing:[],error:[],processed:[],done:[]},a={};function o(e,t){i[e].push(t)}function s(e,...t){let n=i[e];n.forEach(e=>{e(...t)})}function c(e,t){a[e]=a[e]||[],a[e].push(t)}function l(e,...t){let n=a[e]||[];n.forEach(e=>{e(...t)})}async function u(e){n.value.push(e),s(`add`,e)}function d(){let e=n.value.shift();if(e)return s(`pick`,e),e}async function f(){if(r.value)return;let e=d();if(e){r.value=!0;for(let r of t.handlers){s(`processing`,e,r);try{let t=await r({data:e,itemsToBeProcessed:()=>n.value.length,emit:l});s(`processed`,e,t,r)}catch(t){s(`error`,e,t,r);continue}}r.value=!1,s(`done`,e),n.value.length>0&&f()}}return o(`add`,f),o(`done`,f),{add:u,on:o,onHandlerEvent:c,queue:n}}export{t as useQueue}; \ No newline at end of file diff --git a/assets/queue-BqR-8_EY.js b/assets/queue-DrZb4pfX.js similarity index 85% rename from assets/queue-BqR-8_EY.js rename to assets/queue-DrZb4pfX.js index 1e2f82f1af9e045a8e17efa4376a0cad6ae89f59..688508164bcf788e11074b5f58439e6fc764d2fd 100644 --- a/assets/queue-BqR-8_EY.js +++ b/assets/queue-DrZb4pfX.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,defineComponent as n,onMounted as r,openBlock as i,ref as a}from"./index-Dor8PgzM.js";import{sleep as o}from"./sleep-CvjNLutj.js";import{useQueue as s}from"./queue-aUPoxb9G.js";var c=n({__name:`queue`,setup(n){let c=a(``),l=s({handlers:[async e=>{console.log(`ready to play speech audio for`,e)}]}),u=s({handlers:[async e=>{console.log(`ready to stream speech audio for`,e),l.add(e.data)}]}),d=s({handlers:[async e=>{let t=[`.`,`?`,`!`],n=!1;for(let r of t){if(!e.data.includes(r))continue;let t=e.data.indexOf(r),i=e.data.slice(0,t+1),a=e.data.slice(t+1);c.value+=i,u.add(c.value.trim()),c.value=a,n=!0}n||(c.value+=e.data)}]}),f=`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(?`.split(`(`);async function p(){for(let e of f)await o(100),d.add(e)}async function m(){p()}return r(()=>{m()}),(n,r)=>(i(),t(`div`,null,r[0]||=[e(`div`,null,null,-1)]))}}),l=c;export{l as default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,defineComponent as n,onMounted as r,openBlock as i,ref as a}from"./index-C-t5bjx6.js";import{sleep as o}from"./sleep-CvjNLutj.js";import{useQueue as s}from"./queue-Bp4D1cP3.js";var c=n({__name:`queue`,setup(n){let c=a(``),l=s({handlers:[async e=>{console.log(`ready to play speech audio for`,e)}]}),u=s({handlers:[async e=>{console.log(`ready to stream speech audio for`,e),l.add(e.data)}]}),d=s({handlers:[async e=>{let t=[`.`,`?`,`!`],n=!1;for(let r of t){if(!e.data.includes(r))continue;let t=e.data.indexOf(r),i=e.data.slice(0,t+1),a=e.data.slice(t+1);c.value+=i,u.add(c.value.trim()),c.value=a,n=!0}n||(c.value+=e.data)}]}),f=`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(?`.split(`(`);async function p(){for(let e of f)await o(100),d.add(e)}async function m(){p()}return r(()=>{m()}),(n,r)=>(i(),t(`div`,null,r[0]||=[e(`div`,null,null,-1)]))}}),l=c;export{l as default}; \ No newline at end of file diff --git a/assets/queues-BTBffrrj.js b/assets/queues-DD1Fxfss.js similarity index 94% rename from assets/queues-BTBffrrj.js rename to assets/queues-DD1Fxfss.js index 70ec670b4328abd4bf41183b1bb0f860fc3f93d7..baea2eec24c60f1f7503cfdc48737aeedc7d9cc7 100644 --- a/assets/queues-BTBffrrj.js +++ b/assets/queues-DD1Fxfss.js @@ -1,4 +1,4 @@ -import{ref as e}from"./index-Dor8PgzM.js";import{sleep as t}from"./sleep-CvjNLutj.js";import{useQueue as n}from"./queue-aUPoxb9G.js";let r=function(e){return e.Idle=`<|EMOTE_NEUTRAL|>`,e.Happy=`<|EMOTE_HAPPY|>`,e.Sad=`<|EMOTE_SAD|>`,e.Angry=`<|EMOTE_ANGRY|>`,e.Think=`<|EMOTE_THINK|>`,e.Surprise=`<|EMOTE_SURPRISE|>`,e.Awkward=`<|EMOTE_AWKWARD|>`,e.Question=`<|EMOTE_QUESTION|>`,e}({});const i=Object.values(r),a=`Happy`,o=`Sad`,s=`Angry`,c=`Awkward`,l=`Think`,u=`Surprise`,d=`Question`,f=`Idle`,p={[r.Happy]:a,[r.Sad]:o,[r.Angry]:s,[r.Think]:l,[r.Surprise]:u,[r.Awkward]:c,[r.Question]:d,[r.Idle]:f},m={[r.Happy]:`happy`,[r.Sad]:`sad`,[r.Angry]:`angry`,[r.Think]:void 0,[r.Surprise]:`surprised`,[r.Awkward]:void 0,[r.Question]:void 0,[r.Idle]:void 0},h=Symbol(`@proj-airi/chromatic-hue`);function g(e,t){return{role:`system`,content:[e,i.map(e=>`- ${e}`).join(` +import{ref as e}from"./index-C-t5bjx6.js";import{sleep as t}from"./sleep-CvjNLutj.js";import{useQueue as n}from"./queue-Bp4D1cP3.js";let r=function(e){return e.Idle=`<|EMOTE_NEUTRAL|>`,e.Happy=`<|EMOTE_HAPPY|>`,e.Sad=`<|EMOTE_SAD|>`,e.Angry=`<|EMOTE_ANGRY|>`,e.Think=`<|EMOTE_THINK|>`,e.Surprise=`<|EMOTE_SURPRISE|>`,e.Awkward=`<|EMOTE_AWKWARD|>`,e.Question=`<|EMOTE_QUESTION|>`,e}({});const i=Object.values(r),a=`Happy`,o=`Sad`,s=`Angry`,c=`Awkward`,l=`Think`,u=`Surprise`,d=`Question`,f=`Idle`,p={[r.Happy]:a,[r.Sad]:o,[r.Angry]:s,[r.Think]:l,[r.Surprise]:u,[r.Awkward]:c,[r.Question]:d,[r.Idle]:f},m={[r.Happy]:`happy`,[r.Sad]:`sad`,[r.Angry]:`angry`,[r.Think]:void 0,[r.Surprise]:`surprised`,[r.Awkward]:void 0,[r.Question]:void 0,[r.Idle]:void 0},h=Symbol(`@proj-airi/chromatic-hue`);function g(e,t){return{role:`system`,content:[e,i.map(e=>`- ${e}`).join(` `),t].join(` `)}}var _=g;const v=220.44,y=`<|llm_inference_end|>`;function b(e){function t(e){for(let t of i){if(!e.includes(t))continue;return{ok:!0,emotion:t}}return{ok:!1,emotion:``}}return n({handlers:[async n=>{if(i.includes(n.data)){n.emit(`emotion`,n.data),await e.add(n.data);return}{let{ok:r,emotion:i}=t(n.data);r&&(n.emit(`emotion`,i),await e.add(i))}}]})}function x(){function e(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};let t=/<\|DELAY:(\d+)\|>/i.exec(e),n=t?.[1];if(!n)return{ok:!1,delay:0};let r=Number.parseFloat(n);return r<=0||Number.isNaN(r)?{ok:!0,delay:0}:{ok:!0,delay:r}}return n({handlers:[async n=>{let{ok:r,delay:i}=e(n.data);r&&(n.emit(`delay`,i),await t(i*1e3))}]})}function S(t){let r=e(``);return n({handlers:[async e=>{if(e.data===y){let e=r.value.trim();e&&await t.add(e),r.value=``;return}let n=/[.?!]/;for(r.value+=e.data;r.value;){let e=n.exec(r.value);if(!e||e.index===void 0)break;let i=r.value.slice(0,e.index+1),a=r.value.slice(e.index+1);await t.add(i),r.value=a}}]})}export{p as EMOTION_EmotionMotionName_value,m as EMOTION_VRMExpressionName_value,r as Emotion,f as EmotionNeutralMotionName,l as EmotionThinkMotionName,h as chromaticHue,v as chromaticHueDefault,y as llmInferenceEndToken,_ as system_v2_default,x as useDelayMessageQueue,b as useEmotionsMessageQueue,S as useMessageContentQueue}; \ No newline at end of file diff --git a/assets/scene-Bait6ok6.js b/assets/scene-BMgC1HoG.js similarity index 71% rename from assets/scene-Bait6ok6.js rename to assets/scene-BMgC1HoG.js index cc941ce19f8eba2aa40087b0891ec14c64842186..9213536af169850b04af5a21c4e5eb28a1657dca 100644 --- a/assets/scene-Bait6ok6.js +++ b/assets/scene-BMgC1HoG.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createBlock as n,createElementBlock as r,defineComponent as i,openBlock as a,resolveDirective as o,unref as s,withDirectives as c}from"./index-Dor8PgzM.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as l}from"./route-block--T8TG4is.js";import{IconAnimation_default as u}from"./IconAnimation-DNjwD43A.js";import{useIconAnimation as d}from"./icon-animation-BMPmq1VP.js";const f={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":``};var p=i({__name:`index`,setup(i){let{iconAnimationStarted:l,showIconAnimation:p,animationIcon:m}=d(`i-solar:armchair-2-bold-duotone`);return(i,d)=>{let h=o(`motion`);return a(),r(e,null,[d[1]||=t(`div`,null,` Scene `,-1),s(p)?(a(),n(u,{key:0,"z-index":-1,icon:s(m),"icon-size":12,duration:1e3,started:s(l),"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`])):c((a(),r(`div`,f,d[0]||=[t(`div`,{text:`60`,"i-solar:armchair-2-bold-duotone":``},null,-1)])),[[h]])],64)}}});typeof l==`function`&&l(p);var m=p;export{m as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createBlock as n,createElementBlock as r,defineComponent as i,openBlock as a,resolveDirective as o,unref as s,withDirectives as c}from"./index-C-t5bjx6.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as l}from"./route-block--T8TG4is.js";import{IconAnimation_default as u}from"./IconAnimation-9WCWiV-Y.js";import{useIconAnimation as d}from"./icon-animation-DJ14_q6r.js";const f={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":``};var p=i({__name:`index`,setup(i){let{iconAnimationStarted:l,showIconAnimation:p,animationIcon:m}=d(`i-solar:armchair-2-bold-duotone`);return(i,d)=>{let h=o(`motion`);return a(),r(e,null,[d[1]||=t(`div`,null,` Scene `,-1),s(p)?(a(),n(u,{key:0,"z-index":-1,icon:s(m),"icon-size":12,duration:1e3,started:s(l),"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`])):c((a(),r(`div`,f,d[0]||=[t(`div`,{text:`60`,"i-solar:armchair-2-bold-duotone":``},null,-1)])),[[h]])],64)}}});typeof l==`function`&&l(p);var m=p;export{m as default}; \ No newline at end of file diff --git a/assets/settings-7Adg0ndZ.js b/assets/settings-D244O10q.js similarity index 84% rename from assets/settings-7Adg0ndZ.js rename to assets/settings-D244O10q.js index f9eeec2d3559c25b421dc09f59333bcf90450bfa..1788f664704d631d3b7d373093d73af95dbbbb86 100644 --- a/assets/settings-7Adg0ndZ.js +++ b/assets/settings-D244O10q.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,nextTick as o,normalizeStyle as s,openBlock as c,ref as l,renderList as u,resolveDirective as d,unref as f,useI18n as p,useRouter as m,useSettings as h,withDirectives as g}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{IconItem_default as _}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as v}from"./route-block--T8TG4is.js";import{IconAnimation_default as y}from"./IconAnimation-DNjwD43A.js";const b={flex:`~ col gap-4`,"font-normal":``},x={flex:`~ col gap-4`},S={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":``},C={text:`60`,"i-solar:settings-bold-duotone":``};var w=a({__name:`index`,setup(a){let v=m(),w=l(!1),T=l(),E=l(),{t:D}=p(),O=l(``),k=l(``),A=l(!1),j=h();function M(){var e;(e=E.value)?.call(E)}async function N(e,t){let n=e.currentTarget,r=n.querySelector(`.menu-icon-item-icon`);if(!r)return;let i=r.getBoundingClientRect(),a=`${i.left}px, ${i.top}px`;O.value=t.icon,k.value=a,A.value=!0,await o(),w.value=!0}let P=v.beforeEach(async(e,t,n)=>{if(!j.usePageSpecificTransitions||j.disableTransitions){n();return}await new Promise(e=>{E.value=e}),P(),n()}),F=t(()=>[{title:D(`settings.pages.card.title`),description:D(`settings.pages.card.description`),icon:`i-solar:emoji-funny-square-bold-duotone`,to:`/settings/airi-card`},{title:D(`settings.pages.modules.title`),description:D(`settings.pages.modules.description`),icon:`i-solar:layers-bold-duotone`,to:`/settings/modules`},{title:D(`settings.pages.scene.title`),description:D(`settings.pages.scene.description`),icon:`i-solar:armchair-2-bold-duotone`,to:`/settings/scene`},{title:D(`settings.pages.models.title`),description:D(`settings.pages.models.description`),icon:`i-solar:people-nearby-bold-duotone`,to:`/settings/models`},{title:D(`settings.pages.memory.title`),description:D(`settings.pages.memory.description`),icon:`i-solar:leaf-bold-duotone`,to:`/settings/memory`},{title:D(`settings.pages.providers.title`),description:D(`settings.pages.providers.description`),icon:`i-solar:box-minimalistic-bold-duotone`,to:`/settings/providers`},{title:D(`settings.pages.themes.title`),description:D(`settings.pages.themes.description`),icon:`i-solar:filters-bold-duotone`,to:`/settings/appearance`}]);return(t,a)=>{let o=d(`motion`);return c(),i(`div`,b,[a[0]||=n(`div`,null,null,-1),n(`div`,x,[(c(!0),i(e,null,u(F.value,(e,t)=>g((c(),r(f(_),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:s({transitionDelay:`${t*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:t=>N(t,e)},null,8,[`style`,`title`,`description`,`icon`,`to`,`onClick`])),[[o]])),128))]),A.value&&!f(j).disableTransitions&&f(j).usePageSpecificTransitions?(c(),r(y,{key:0,ref_key:`iconAnimation`,ref:T,icon:O.value,"icon-size":6*1.2,position:k.value,duration:1e3,"text-color":`text-neutral-400/50 dark:text-neutral-600/20`,started:w.value,onAnimationEndedOnce:M},null,8,[`icon`,`position`,`started`])):g((c(),i(`div`,S,[g(n(`div`,C,null,512),[[o]])])),[[o]])])}}});typeof v==`function`&&v(w);var T=w;export{T as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,nextTick as o,normalizeStyle as s,openBlock as c,ref as l,renderList as u,resolveDirective as d,unref as f,useI18n as p,useRouter as m,useSettings as h,withDirectives as g}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{IconItem_default as _}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as v}from"./route-block--T8TG4is.js";import{IconAnimation_default as y}from"./IconAnimation-9WCWiV-Y.js";const b={flex:`~ col gap-4`,"font-normal":``},x={flex:`~ col gap-4`},S={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":``},C={text:`60`,"i-solar:settings-bold-duotone":``};var w=a({__name:`index`,setup(a){let v=m(),w=l(!1),T=l(),E=l(),{t:D}=p(),O=l(``),k=l(``),A=l(!1),j=h();function M(){var e;(e=E.value)?.call(E)}async function N(e,t){let n=e.currentTarget,r=n.querySelector(`.menu-icon-item-icon`);if(!r)return;let i=r.getBoundingClientRect(),a=`${i.left}px, ${i.top}px`;O.value=t.icon,k.value=a,A.value=!0,await o(),w.value=!0}let P=v.beforeEach(async(e,t,n)=>{if(!j.usePageSpecificTransitions||j.disableTransitions){n();return}await new Promise(e=>{E.value=e}),P(),n()}),F=t(()=>[{title:D(`settings.pages.card.title`),description:D(`settings.pages.card.description`),icon:`i-solar:emoji-funny-square-bold-duotone`,to:`/settings/airi-card`},{title:D(`settings.pages.modules.title`),description:D(`settings.pages.modules.description`),icon:`i-solar:layers-bold-duotone`,to:`/settings/modules`},{title:D(`settings.pages.scene.title`),description:D(`settings.pages.scene.description`),icon:`i-solar:armchair-2-bold-duotone`,to:`/settings/scene`},{title:D(`settings.pages.models.title`),description:D(`settings.pages.models.description`),icon:`i-solar:people-nearby-bold-duotone`,to:`/settings/models`},{title:D(`settings.pages.memory.title`),description:D(`settings.pages.memory.description`),icon:`i-solar:leaf-bold-duotone`,to:`/settings/memory`},{title:D(`settings.pages.providers.title`),description:D(`settings.pages.providers.description`),icon:`i-solar:box-minimalistic-bold-duotone`,to:`/settings/providers`},{title:D(`settings.pages.themes.title`),description:D(`settings.pages.themes.description`),icon:`i-solar:filters-bold-duotone`,to:`/settings/appearance`}]);return(t,a)=>{let o=d(`motion`);return c(),i(`div`,b,[a[0]||=n(`div`,null,null,-1),n(`div`,x,[(c(!0),i(e,null,u(F.value,(e,t)=>g((c(),r(f(_),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:s({transitionDelay:`${t*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:t=>N(t,e)},null,8,[`style`,`title`,`description`,`icon`,`to`,`onClick`])),[[o]])),128))]),A.value&&!f(j).disableTransitions&&f(j).usePageSpecificTransitions?(c(),r(y,{key:0,ref_key:`iconAnimation`,ref:T,icon:O.value,"icon-size":6*1.2,position:k.value,duration:1e3,"text-color":`text-neutral-400/50 dark:text-neutral-600/20`,started:w.value,onAnimationEndedOnce:M},null,8,[`icon`,`position`,`started`])):g((c(),i(`div`,S,[g(n(`div`,C,null,512),[[o]])])),[[o]])])}}});typeof v==`function`&&v(w);var T=w;export{T as default}; \ No newline at end of file diff --git a/assets/settings-B5qvHxHm.js b/assets/settings-Nn2AwpUk.js similarity index 98% rename from assets/settings-B5qvHxHm.js rename to assets/settings-Nn2AwpUk.js index aba7828d85b08f571da825f563cfa1a1f440e4bc..4a189f7a38ce110da889681ee8d13b6051ff9937 100644 --- a/assets/settings-B5qvHxHm.js +++ b/assets/settings-Nn2AwpUk.js @@ -1 +1 @@ -var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{Fragment as t,RouterView as n,alpha as r,animate as i,anticipate as a,backIn as o,backInOut as s,backOut as c,bounceIn as l,bounceInOut as u,bounceOut as ee,circIn as te,circInOut as ne,circOut as re,color as d,complex as ie,computed as f,createBaseVNode as p,createCommentVNode as m,createElementBlock as h,createVNode as g,cubicBezier as ae,defineComponent as _,defu as oe,degrees as v,easeIn as se,easeInOut as ce,easeOut as le,es_default as ue,filter as y,getFrameData as de,h as b,inertia as fe,inject as pe,isObject as me,linear as he,nextTick as ge,normalizeClass as _e,number as ve,onMounted as ye,onUnmounted as be,openBlock as x,progressPercentage as S,px as C,reactive as w,ref as T,scale as E,storeToRefs as xe,toDisplayString as D,toRaw as Se,tryOnUnmounted as Ce,unref as O,unrefElement as we,useEventListener as k,useI18n as Te,useIntersectionObserver as Ee,useRoute as A,useRouter as De,useSlots as j,velocityPerSecond as Oe,watch as M}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as ke}from"./stores-BVVBBF04.js";import{HeaderLink_default as Ae}from"./HeaderLink-BN-EJFUu.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";const N={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`};var je=class{constructor(){e.defineProperty(this,`subscriptions`,new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,n){if(this.subscriptions.size)for(let r of this.subscriptions)r(e,t,n)}clear(){this.subscriptions.clear()}};function P(e){return!Number.isNaN(Number.parseFloat(e))}var Me=class{constructor(t){e.defineProperty(this,`current`,void 0),e.defineProperty(this,`prev`,void 0),e.defineProperty(this,`timeDelta`,0),e.defineProperty(this,`lastUpdated`,0),e.defineProperty(this,`updateSubscribers`,new je),e.defineProperty(this,`stopAnimation`,void 0),e.defineProperty(this,`canTrackVelocity`,!1),e.defineProperty(this,`updateAndNotify`,e=>{this.prev=this.current,this.current=e;let{delta:t,timestamp:n}=de();this.lastUpdated!==n&&(this.timeDelta=t,this.lastUpdated=n),ue.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)}),e.defineProperty(this,`scheduleVelocityCheck`,()=>ue.postRender(this.velocityCheck)),e.defineProperty(this,`velocityCheck`,({timestamp:e})=>{this.canTrackVelocity||=P(this.current),e!==this.lastUpdated&&(this.prev=this.current)}),this.prev=this.current=t,this.canTrackVelocity=P(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?Oe(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{let{stop:n}=e(t);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 Ne(e){return new Me(e)}const{isArray:Pe}=Array;function Fe(){let e=T({}),t=t=>{let n=t=>{e.value[t]&&(e.value[t].stop(),e.value[t].destroy(),delete e.value[t])};t?Pe(t)?t.forEach(n):n(t):Object.keys(e.value).forEach(n)},n=(t,n,r)=>{if(e.value[t])return e.value[t];let i=Ne(n);return i.onChange(e=>r[t]=e),e.value[t]=i,i};return Ce(t),{motionValues:e,get:n,stop:t}}function Ie(e){return Array.isArray(e)}function F(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function I(e){return{type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function Le(e){return{type:`spring`,stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function L(){return{type:`keyframes`,ease:`linear`,duration:300}}function Re(e){return{type:`keyframes`,duration:800,values:e}}const R={default:Le,x:F,y:F,z:F,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scaleX:I,scaleY:I,scale:I,backgroundColor:L,color:L,opacity:L};function z(e,t){let n;return n=Ie(t)?Re:R[e]||R.default,{to:t,...n(t)}}const B={...ve,transform:Math.round},V={color:d,backgroundColor:d,outlineColor:d,fill:d,stroke:d,borderColor:d,borderTopColor:d,borderRightColor:d,borderBottomColor:d,borderLeftColor:d,borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,radius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,size:C,top:C,right:C,bottom:C,left:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,rotate:v,rotateX:v,rotateY:v,rotateZ:v,scale:E,scaleX:E,scaleY:E,scaleZ:E,skew:v,skewX:v,skewY:v,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:r,originX:S,originY:S,originZ:C,zIndex:B,filter:y,WebkitFilter:y,fillOpacity:r,strokeOpacity:r,numOctaves:B},H=e=>V[e];function U(e,t){return t&&typeof e==`number`&&t.transform?t.transform(e):e}function ze(e,t){let n=H(e);return n!==y&&(n=ie),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Be={linear:he,easeIn:se,easeInOut:ce,easeOut:le,circIn:te,circInOut:ne,circOut:re,backIn:o,backInOut:s,backOut:c,anticipate:a,bounceIn:l,bounceInOut:u,bounceOut:ee};function W(e){if(Array.isArray(e)){let[t,n,r,i]=e;return ae(t,n,r,i)}else if(typeof e==`string`)return Be[e];return e}function Ve(e){return Array.isArray(e)&&typeof e[0]!=`number`}function G(e,t){return e===`zIndex`?!1:!!(typeof t==`number`||Array.isArray(t)||typeof t==`string`&&ie.test(t)&&!t.startsWith(`url(`))}function He(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ue({ease:e,times:t,delay:n,...r}){let i={...r};return t&&(i.offset=t),e&&(i.ease=Ve(e)?e.map(W):W(e)),n&&(i.elapsed=-n),i}function We(e,t,n){return Array.isArray(t.to)&&(e.duration||=800),He(t),Ge(e)||(e={...e,...z(n,t.to)}),{...t,...Ue(e)}}function Ge({delay:e,repeat:t,repeatType:n,repeatDelay:r,from:i,...a}){return!!Object.keys(a).length}function Ke(e,t){return e[t]||e.default||e}function qe(e,t,n,r,a){let o=Ke(r,e),s=o.from===null||o.from===void 0?t.get():o.from,c=G(e,n);s===`none`&&c&&typeof n==`string`&&(s=ze(e,n));let l=G(e,s);function u(c){let l={from:s,to:n,velocity:r.velocity?r.velocity:t.getVelocity(),onUpdate:e=>t.set(e)};return o.type===`inertia`||o.type===`decay`?fe({...l,...o}):i({...We(o,l,e),onUpdate:e=>{l.onUpdate(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{a&&a(),c&&c()}})}function ee(e){return t.set(n),a&&a(),e&&e(),{stop:()=>{}}}return!l||!c||o.type===!1?ee:u}function Je(){let{motionValues:e,stop:t,get:n}=Fe(),r=(e,t,r,i={},a)=>{let o=r[e],s=n(e,o,r);if(i&&i.immediate){s.set(t);return}let c=qe(e,s,t,i,a);s.start(c)};return{motionValues:e,stop:t,push:r}}function Ye(e,t={},{motionValues:n,push:r,stop:i}=Je()){let a=O(t),o=T(!1);M(n,e=>{o.value=Object.values(e).filter(e=>e.isAnimating()).length>0},{immediate:!0,deep:!0});let s=e=>{if(!a||!a[e])throw Error(`The variant ${e} does not exist.`);return a[e]},c=t=>{typeof t==`string`&&(t=s(t));let n=Object.entries(t).map(([n,i])=>{if(n!==`transition`)return new Promise(a=>r(n,i,e,t.transition||z(n,t[n]),a))}).filter(Boolean);async function i(){var e,r;await Promise.all(n),(e=t.transition)==null||(r=e.onComplete)==null||r.call(e)}return Promise.all([i()])},l=t=>{let n=me(t)?t:s(t);Object.entries(n).forEach(([t,n])=>{t!==`transition`&&r(t,n,e,{immediate:!0})})},u=async e=>{let t;if(a&&(a.leave&&(t=a.leave),!a.leave&&a.initial&&(t=a.initial)),!t){e();return}await c(t),e()};return{isAnimating:o,apply:c,set:l,leave:u,stop:i}}const K=typeof window<`u`,Xe=()=>K&&(window.onpointerdown===null||N?.TEST),Ze=()=>K&&(window.ontouchstart===null||N?.TEST),Qe=()=>K&&(window.onmousedown===null||N?.TEST);function $e({target:e,state:t,variants:n,apply:r}){let i=O(n),a=T(!1),o=T(!1),s=T(!1),c=f(()=>{let e=[...Object.keys(t.value||{})];return i?(i.hovered&&(e=[...e,...Object.keys(i.hovered)]),i.tapped&&(e=[...e,...Object.keys(i.tapped)]),i.focused&&(e=[...e,...Object.keys(i.focused)]),e):e}),l=f(()=>{let e={};for(let n in Object.assign(e,t.value),a.value&&i.hovered&&Object.assign(e,i.hovered),o.value&&i.tapped&&Object.assign(e,i.tapped),s.value&&i.focused&&Object.assign(e,i.focused),e)c.value.includes(n)||delete e[n];return e});i.hovered&&(k(e,`mouseenter`,()=>a.value=!0),k(e,`mouseleave`,()=>{a.value=!1,o.value=!1})),i.tapped&&(Qe()&&(k(e,`mousedown`,()=>o.value=!0),k(e,`mouseup`,()=>o.value=!1)),Xe()&&(k(e,`pointerdown`,()=>o.value=!0),k(e,`pointerup`,()=>o.value=!1)),Ze()&&(k(e,`touchstart`,()=>o.value=!0),k(e,`touchend`,()=>o.value=!1))),i.focused&&(k(e,`focus`,()=>s.value=!0),k(e,`blur`,()=>s.value=!1)),M([a,o,s],()=>{r(l.value)})}function et({set:e,target:t,variants:n,variant:r}){let i=O(n);M(()=>t,()=>{i&&(i.initial&&(e(`initial`),r.value=`initial`),i.enter&&(r.value=`enter`))},{immediate:!0,flush:`pre`})}function tt({state:e,apply:t}){M(e,e=>{e&&t(e)},{immediate:!0})}function nt({target:e,variants:t,variant:n}){let r=O(t);r&&(r.visible||r.visibleOnce)&&Ee(e,([{isIntersecting:e}])=>{r.visible?e?n.value=`visible`:n.value=`initial`:r.visibleOnce&&(e&&n.value!==`visibleOnce`?n.value=`visibleOnce`:n.value||=`initial`)})}function rt(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&et(e),t.syncVariants&&tt(e),t.visibilityHooks&&nt(e),t.eventListeners&&$e(e)}function q(e={}){let t=w({...e}),n=T({});return M(t,()=>{let e={};for(let[n,r]of Object.entries(t)){let t=H(n),i=U(r,t);e[n]=i}n.value=e},{immediate:!0,deep:!0}),{state:t,style:n}}function J(e,t){M(()=>we(e),e=>{e&&t(e)},{immediate:!0})}const it={x:`translateX`,y:`translateY`,z:`translateZ`};function Y(e={},t=!0){let n=w({...e}),r=T(``);return M(n,e=>{let n=``,i=!1;if(t&&(e.x||e.y||e.z)){let t=[e.x||0,e.y||0,e.z||0].map(e=>U(e,C)).join(`,`);n+=`translate3d(${t}) `,i=!0}for(let[r,i]of Object.entries(e)){if(t&&(r===`x`||r===`y`||r===`z`))continue;let e=H(r),a=U(i,e);n+=`${it[r]||r}(${a}) `}t&&!i&&(n+=`translateZ(0px) `),r.value=n.trim()},{immediate:!0,deep:!0}),{state:n,transform:r}}const at=[``,`X`,`Y`,`Z`],ot=[`perspective`,`translate`,`scale`,`rotate`,`skew`],X=[`transformPerspective`,`x`,`y`,`z`];ot.forEach(e=>{at.forEach(t=>{let n=e+t;X.push(n)})});const st=new Set(X);function Z(e){return st.has(e)}const ct=new Set([`originX`,`originY`,`originZ`]);function lt(e){return ct.has(e)}function ut(e){let t={},n={};return Object.entries(e).forEach(([e,r])=>{Z(e)||lt(e)?t[e]=r:n[e]=r}),{transform:t,style:n}}function Q(e){let{transform:t,style:n}=ut(e),{transform:r}=Y(t),{style:i}=q(n);return r.value&&(i.value.transform=r.value),i.value}function dt(e,t){let n,r,{state:i,style:a}=q();return J(e,e=>{r=e;for(let t of Object.keys(V)){if(e.style[t]===null||e.style[t]===``||Z(t)||lt(t))continue;i[t]=e.style[t]}n&&Object.entries(n).forEach(([t,n])=>e.style[t]=n),t&&t(i)}),M(a,e=>{if(!r){n=e;return}for(let t in e)r.style[t]=e[t]},{immediate:!0}),{style:i}}function ft(e){let t=e.trim().split(/\) |\)/);if(t.length===1)return{};let n=e=>e.endsWith(`px`)||e.endsWith(`deg`)?Number.parseFloat(e):Number.isNaN(Number(e))?Number(e):e;return t.reduce((e,t)=>{if(!t)return e;let[r,i]=t.split(`(`),a=i.split(`,`),o=a.map(e=>n(e.endsWith(`)`)?e.replace(`)`,``):e.trim())),s=o.length===1?o[0]:o;return{...e,[r]:s}},{})}function pt(e,t){Object.entries(ft(t)).forEach(([t,n])=>{let r=[`x`,`y`,`z`];if(t===`translate3d`){if(n===0){r.forEach(t=>e[t]=0);return}n.forEach((t,n)=>e[r[n]]=t);return}if(n=Number.parseFloat(`${n}`),t===`translateX`){e.x=n;return}if(t===`translateY`){e.y=n;return}if(t===`translateZ`){e.z=n;return}e[t]=n})}function mt(e,t){let n,r,{state:i,transform:a}=Y();return J(e,e=>{r=e,e.style.transform&&pt(i,e.style.transform),n&&(e.style.transform=n),t&&t(i)}),M(a,e=>{if(!r){n=e;return}r.style.transform=e},{immediate:!0}),{transform:i}}function ht(e){return Object.entries(e)}function gt(e,t){let n=w({}),r=e=>Object.entries(e).forEach(([e,t])=>n[e]=t),{style:i}=dt(e,r),{transform:a}=mt(e,r);return M(n,e=>{ht(e).forEach(([e,t])=>{let n=Z(e)?a:i;n[e]&&n[e]===t||(n[e]=t)})},{immediate:!0,deep:!0}),J(e,()=>t&&r(t)),{motionProperties:n,style:i,transform:a}}function _t(e={}){let t=O(e),n=T(),r=f(()=>{if(n.value)return t[n.value]});return{state:r,variant:n}}function vt(e,t={},n){let{motionProperties:r}=gt(e),{variant:i,state:a}=_t(t),o=Ye(r,t),s={target:e,variant:i,variants:t,state:a,motionProperties:r,...o};return rt(s,n),s}const yt=[`delay`,`duration`],bt=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...yt],xt={initial:{opacity:0},enter:{opacity:1}},St={initial:{opacity:0},visible:{opacity:1}},Ct={initial:{opacity:0},visibleOnce:{opacity:1}},wt={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},Tt={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},Et={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},Dt={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},Ot={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},kt={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},At={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},jt={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},Mt={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},Nt={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Pt={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Ft={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},It={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Lt={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Rt={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},zt={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},Bt={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},Vt={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},Ht={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},Ut={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},Wt={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},Gt={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},Kt={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},qt={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},Jt={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},Yt={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},Xt={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Zt={__proto__:null,fade:xt,fadeVisible:St,fadeVisibleOnce:Ct,pop:wt,popVisible:Tt,popVisibleOnce:Et,rollBottom:It,rollLeft:Dt,rollRight:At,rollTop:Nt,rollVisibleBottom:Lt,rollVisibleLeft:Ot,rollVisibleOnceBottom:Rt,rollVisibleOnceLeft:kt,rollVisibleOnceRight:Mt,rollVisibleOnceTop:Ft,rollVisibleRight:jt,rollVisibleTop:Pt,slideBottom:Jt,slideLeft:zt,slideRight:Ht,slideTop:Gt,slideVisibleBottom:Yt,slideVisibleLeft:Bt,slideVisibleOnceBottom:Xt,slideVisibleOnceLeft:Vt,slideVisibleOnceRight:Wt,slideVisibleOnceTop:qt,slideVisibleRight:Ut,slideVisibleTop:Kt},Qt=Symbol(``),$t={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 en(e){return Object.prototype.toString.call(e)===`[object Object]`}function $(e){if(Array.isArray(e))return e.map($);if(en(e)){let t={};for(let n in e)t[n]=$(e[n]);return t}return e}function tn(e){let t=w({}),n=pe(Qt,{}),r=f(()=>e.preset==null?{}:n!=null&&e.preset in n?structuredClone(Se(n)[e.preset]):e.preset in Zt?structuredClone(Zt[e.preset]):{}),i=f(()=>({initial:e.initial,enter:e.enter,leave:e.leave,visible:e.visible,visibleOnce:e.visibleOnce,hovered:e.hovered,tapped:e.tapped,focused:e.focused}));function a(e,t){for(let n of[`delay`,`duration`]){if(t[n]==null)continue;let r=Number.parseInt(t[n]);for(let t of[`enter`,`visible`,`visibleOnce`]){let i=e[t];if(i==null)continue;i.transition??={},i.transition[n]=r}}return e}let o=f(()=>{let t=oe({},i.value,r.value,e.variants||{});return a({...t},e)});function s(e,n,r){var i;e.props??={},(i=e.props).style??(i.style={}),e.props.style={...e.props.style,...r};let s=a($(o.value),e.props);return e.props.onVnodeMounted=({el:e})=>{t[n]=vt(e,s)},e.props.onVnodeUpdated=({el:e})=>{let r=Q(t[n].state);for(let[t,n]of Object.entries(r))e.style[t]=n},e}return{motionConfig:o,setNodeInstance:s}}const nn=_({name:`Motion`,props:{...$t,is:{type:[String,Object],default:`div`}},setup(e){let t=j(),{motionConfig:n,setNodeInstance:r}=tn(e);return()=>{let i=Q(n.value.initial||{}),a=b(e.is,void 0,t);return r(a,0,i),a}}}),rn=_({name:`MotionGroup`,props:{...$t,is:{type:[String,Object],required:!1}},setup(e){let n=j(),{motionConfig:r,setNodeInstance:i}=tn(e);return()=>{var a;let o=Q(r.value.initial||{}),s=(a=n.default)?.call(n)||[];for(let e=0;e{await c(`initial`),await c(`enter`)}),be(async()=>{await c(`leave`),s.value=!0}),M([()=>t.title,()=>t.subtitle,r],async()=>{await c(`leave`),await ge(),s.value=t.disableBackButton,a.value=t.title,o.value=t.subtitle,await ge(),await c(`initial`),await c(`enter`)}),(t,r)=>(x(),h(`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`},[p(`button`,{onClick:r[0]||=e=>O(n).back()},[s.value?m(``,!0):(x(),h(`div`,{key:0,"i-solar:alt-arrow-left-line-duotone":``,"text-2xl":``,class:_e({"pointer-events-none op-0":!e.showBackButton})},null,2))]),p(`h1`,an,[o.value?(x(),h(`div`,on,[p(`span`,sn,D(o.value),1)])):m(``,!0),p(`div`,cn,D(a.value),1)])],512))}}),un=ln;const dn={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)`}},fn={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},pn={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"mx-auto":``,"max-w-screen-xl":``};var mn=_({__name:`settings`,setup(e){let t=A(),{t:r}=Te(),i=ke(),{allProvidersMetadata:a}=xe(i),o=f(()=>{let e={"/settings/airi-card":{subtitle:r(`settings.title`),title:r(`settings.pages.card.title`)},"/settings/appearance":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.title`)},"/settings/appearance/general":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.general.title`)},"/settings/appearance/color-scheme":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.color-scheme.title`)},"/settings/appearance/developer":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.developer.title`)},"/settings/memory":{subtitle:r(`settings.title`),title:r(`settings.pages.memory.title`)},"/settings/models":{subtitle:r(`settings.title`),title:r(`settings.pages.models.title`)},"/settings/modules":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.title`)},"/settings/modules/consciousness":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.consciousness.title`)},"/settings/modules/speech":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.speech.title`)},"/settings/modules/hearing":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.hearing.title`)},"/settings/modules/memory-short-term":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.memory-short-term.title`)},"/settings/modules/memory-long-term":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.memory-long-term.title`)},"/settings/modules/messaging-discord":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.messaging-discord.title`)},"/settings/modules/x":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.x.title`)},"/settings/modules/gaming-minecraft":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.gaming-minecraft.title`)},"/settings/modules/gaming-factorio":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.gaming-factorio.title`)},"/settings/providers":{subtitle:r(`settings.title`),title:r(`settings.pages.providers.title`)},"/settings/scene":{subtitle:r(`settings.title`),title:r(`settings.pages.scene.title`)},"/settings":{title:r(`settings.title`)}};for(let t of a.value)e[`/settings/providers/${t.id}`]={subtitle:r(`settings.title`),title:r(t.nameKey)};return e}),s=f(()=>o.value[t.path]);return(e,t)=>{var r,i;return x(),h(`div`,dn,[p(`div`,fn,[g(Ae)]),p(`div`,pn,[g(O(un),{title:(r=s.value)?.title,subtitle:(i=s.value)?.subtitle},null,8,[`title`,`subtitle`]),g(O(n))])])}}}),hn=mn;export{hn as default}; \ No newline at end of file +var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{Fragment as t,RouterView as n,alpha as r,animate as i,anticipate as a,backIn as o,backInOut as s,backOut as c,bounceIn as l,bounceInOut as u,bounceOut as ee,circIn as te,circInOut as ne,circOut as re,color as d,complex as ie,computed as f,createBaseVNode as p,createCommentVNode as m,createElementBlock as h,createVNode as g,cubicBezier as ae,defineComponent as _,defu as oe,degrees as v,easeIn as se,easeInOut as ce,easeOut as le,es_default as ue,filter as y,getFrameData as de,h as b,inertia as fe,inject as pe,isObject as me,linear as he,nextTick as ge,normalizeClass as _e,number as ve,onMounted as ye,onUnmounted as be,openBlock as x,progressPercentage as S,px as C,reactive as w,ref as T,scale as E,storeToRefs as xe,toDisplayString as D,toRaw as Se,tryOnUnmounted as Ce,unref as O,unrefElement as we,useEventListener as k,useI18n as Te,useIntersectionObserver as Ee,useRoute as A,useRouter as De,useSlots as j,velocityPerSecond as Oe,watch as M}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as ke}from"./stores-BW_6w_OI.js";import{HeaderLink_default as Ae}from"./HeaderLink-CyWWkOPU.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";const N={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`};var je=class{constructor(){e.defineProperty(this,`subscriptions`,new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,n){if(this.subscriptions.size)for(let r of this.subscriptions)r(e,t,n)}clear(){this.subscriptions.clear()}};function P(e){return!Number.isNaN(Number.parseFloat(e))}var Me=class{constructor(t){e.defineProperty(this,`current`,void 0),e.defineProperty(this,`prev`,void 0),e.defineProperty(this,`timeDelta`,0),e.defineProperty(this,`lastUpdated`,0),e.defineProperty(this,`updateSubscribers`,new je),e.defineProperty(this,`stopAnimation`,void 0),e.defineProperty(this,`canTrackVelocity`,!1),e.defineProperty(this,`updateAndNotify`,e=>{this.prev=this.current,this.current=e;let{delta:t,timestamp:n}=de();this.lastUpdated!==n&&(this.timeDelta=t,this.lastUpdated=n),ue.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)}),e.defineProperty(this,`scheduleVelocityCheck`,()=>ue.postRender(this.velocityCheck)),e.defineProperty(this,`velocityCheck`,({timestamp:e})=>{this.canTrackVelocity||=P(this.current),e!==this.lastUpdated&&(this.prev=this.current)}),this.prev=this.current=t,this.canTrackVelocity=P(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?Oe(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{let{stop:n}=e(t);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 Ne(e){return new Me(e)}const{isArray:Pe}=Array;function Fe(){let e=T({}),t=t=>{let n=t=>{e.value[t]&&(e.value[t].stop(),e.value[t].destroy(),delete e.value[t])};t?Pe(t)?t.forEach(n):n(t):Object.keys(e.value).forEach(n)},n=(t,n,r)=>{if(e.value[t])return e.value[t];let i=Ne(n);return i.onChange(e=>r[t]=e),e.value[t]=i,i};return Ce(t),{motionValues:e,get:n,stop:t}}function Ie(e){return Array.isArray(e)}function F(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function I(e){return{type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function Le(e){return{type:`spring`,stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function L(){return{type:`keyframes`,ease:`linear`,duration:300}}function Re(e){return{type:`keyframes`,duration:800,values:e}}const R={default:Le,x:F,y:F,z:F,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scaleX:I,scaleY:I,scale:I,backgroundColor:L,color:L,opacity:L};function z(e,t){let n;return n=Ie(t)?Re:R[e]||R.default,{to:t,...n(t)}}const B={...ve,transform:Math.round},V={color:d,backgroundColor:d,outlineColor:d,fill:d,stroke:d,borderColor:d,borderTopColor:d,borderRightColor:d,borderBottomColor:d,borderLeftColor:d,borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,radius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,size:C,top:C,right:C,bottom:C,left:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,rotate:v,rotateX:v,rotateY:v,rotateZ:v,scale:E,scaleX:E,scaleY:E,scaleZ:E,skew:v,skewX:v,skewY:v,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:r,originX:S,originY:S,originZ:C,zIndex:B,filter:y,WebkitFilter:y,fillOpacity:r,strokeOpacity:r,numOctaves:B},H=e=>V[e];function U(e,t){return t&&typeof e==`number`&&t.transform?t.transform(e):e}function ze(e,t){let n=H(e);return n!==y&&(n=ie),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Be={linear:he,easeIn:se,easeInOut:ce,easeOut:le,circIn:te,circInOut:ne,circOut:re,backIn:o,backInOut:s,backOut:c,anticipate:a,bounceIn:l,bounceInOut:u,bounceOut:ee};function W(e){if(Array.isArray(e)){let[t,n,r,i]=e;return ae(t,n,r,i)}else if(typeof e==`string`)return Be[e];return e}function Ve(e){return Array.isArray(e)&&typeof e[0]!=`number`}function G(e,t){return e===`zIndex`?!1:!!(typeof t==`number`||Array.isArray(t)||typeof t==`string`&&ie.test(t)&&!t.startsWith(`url(`))}function He(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ue({ease:e,times:t,delay:n,...r}){let i={...r};return t&&(i.offset=t),e&&(i.ease=Ve(e)?e.map(W):W(e)),n&&(i.elapsed=-n),i}function We(e,t,n){return Array.isArray(t.to)&&(e.duration||=800),He(t),Ge(e)||(e={...e,...z(n,t.to)}),{...t,...Ue(e)}}function Ge({delay:e,repeat:t,repeatType:n,repeatDelay:r,from:i,...a}){return!!Object.keys(a).length}function Ke(e,t){return e[t]||e.default||e}function qe(e,t,n,r,a){let o=Ke(r,e),s=o.from===null||o.from===void 0?t.get():o.from,c=G(e,n);s===`none`&&c&&typeof n==`string`&&(s=ze(e,n));let l=G(e,s);function u(c){let l={from:s,to:n,velocity:r.velocity?r.velocity:t.getVelocity(),onUpdate:e=>t.set(e)};return o.type===`inertia`||o.type===`decay`?fe({...l,...o}):i({...We(o,l,e),onUpdate:e=>{l.onUpdate(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{a&&a(),c&&c()}})}function ee(e){return t.set(n),a&&a(),e&&e(),{stop:()=>{}}}return!l||!c||o.type===!1?ee:u}function Je(){let{motionValues:e,stop:t,get:n}=Fe(),r=(e,t,r,i={},a)=>{let o=r[e],s=n(e,o,r);if(i&&i.immediate){s.set(t);return}let c=qe(e,s,t,i,a);s.start(c)};return{motionValues:e,stop:t,push:r}}function Ye(e,t={},{motionValues:n,push:r,stop:i}=Je()){let a=O(t),o=T(!1);M(n,e=>{o.value=Object.values(e).filter(e=>e.isAnimating()).length>0},{immediate:!0,deep:!0});let s=e=>{if(!a||!a[e])throw Error(`The variant ${e} does not exist.`);return a[e]},c=t=>{typeof t==`string`&&(t=s(t));let n=Object.entries(t).map(([n,i])=>{if(n!==`transition`)return new Promise(a=>r(n,i,e,t.transition||z(n,t[n]),a))}).filter(Boolean);async function i(){var e,r;await Promise.all(n),(e=t.transition)==null||(r=e.onComplete)==null||r.call(e)}return Promise.all([i()])},l=t=>{let n=me(t)?t:s(t);Object.entries(n).forEach(([t,n])=>{t!==`transition`&&r(t,n,e,{immediate:!0})})},u=async e=>{let t;if(a&&(a.leave&&(t=a.leave),!a.leave&&a.initial&&(t=a.initial)),!t){e();return}await c(t),e()};return{isAnimating:o,apply:c,set:l,leave:u,stop:i}}const K=typeof window<`u`,Xe=()=>K&&(window.onpointerdown===null||N?.TEST),Ze=()=>K&&(window.ontouchstart===null||N?.TEST),Qe=()=>K&&(window.onmousedown===null||N?.TEST);function $e({target:e,state:t,variants:n,apply:r}){let i=O(n),a=T(!1),o=T(!1),s=T(!1),c=f(()=>{let e=[...Object.keys(t.value||{})];return i?(i.hovered&&(e=[...e,...Object.keys(i.hovered)]),i.tapped&&(e=[...e,...Object.keys(i.tapped)]),i.focused&&(e=[...e,...Object.keys(i.focused)]),e):e}),l=f(()=>{let e={};for(let n in Object.assign(e,t.value),a.value&&i.hovered&&Object.assign(e,i.hovered),o.value&&i.tapped&&Object.assign(e,i.tapped),s.value&&i.focused&&Object.assign(e,i.focused),e)c.value.includes(n)||delete e[n];return e});i.hovered&&(k(e,`mouseenter`,()=>a.value=!0),k(e,`mouseleave`,()=>{a.value=!1,o.value=!1})),i.tapped&&(Qe()&&(k(e,`mousedown`,()=>o.value=!0),k(e,`mouseup`,()=>o.value=!1)),Xe()&&(k(e,`pointerdown`,()=>o.value=!0),k(e,`pointerup`,()=>o.value=!1)),Ze()&&(k(e,`touchstart`,()=>o.value=!0),k(e,`touchend`,()=>o.value=!1))),i.focused&&(k(e,`focus`,()=>s.value=!0),k(e,`blur`,()=>s.value=!1)),M([a,o,s],()=>{r(l.value)})}function et({set:e,target:t,variants:n,variant:r}){let i=O(n);M(()=>t,()=>{i&&(i.initial&&(e(`initial`),r.value=`initial`),i.enter&&(r.value=`enter`))},{immediate:!0,flush:`pre`})}function tt({state:e,apply:t}){M(e,e=>{e&&t(e)},{immediate:!0})}function nt({target:e,variants:t,variant:n}){let r=O(t);r&&(r.visible||r.visibleOnce)&&Ee(e,([{isIntersecting:e}])=>{r.visible?e?n.value=`visible`:n.value=`initial`:r.visibleOnce&&(e&&n.value!==`visibleOnce`?n.value=`visibleOnce`:n.value||=`initial`)})}function rt(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&et(e),t.syncVariants&&tt(e),t.visibilityHooks&&nt(e),t.eventListeners&&$e(e)}function q(e={}){let t=w({...e}),n=T({});return M(t,()=>{let e={};for(let[n,r]of Object.entries(t)){let t=H(n),i=U(r,t);e[n]=i}n.value=e},{immediate:!0,deep:!0}),{state:t,style:n}}function J(e,t){M(()=>we(e),e=>{e&&t(e)},{immediate:!0})}const it={x:`translateX`,y:`translateY`,z:`translateZ`};function Y(e={},t=!0){let n=w({...e}),r=T(``);return M(n,e=>{let n=``,i=!1;if(t&&(e.x||e.y||e.z)){let t=[e.x||0,e.y||0,e.z||0].map(e=>U(e,C)).join(`,`);n+=`translate3d(${t}) `,i=!0}for(let[r,i]of Object.entries(e)){if(t&&(r===`x`||r===`y`||r===`z`))continue;let e=H(r),a=U(i,e);n+=`${it[r]||r}(${a}) `}t&&!i&&(n+=`translateZ(0px) `),r.value=n.trim()},{immediate:!0,deep:!0}),{state:n,transform:r}}const at=[``,`X`,`Y`,`Z`],ot=[`perspective`,`translate`,`scale`,`rotate`,`skew`],X=[`transformPerspective`,`x`,`y`,`z`];ot.forEach(e=>{at.forEach(t=>{let n=e+t;X.push(n)})});const st=new Set(X);function Z(e){return st.has(e)}const ct=new Set([`originX`,`originY`,`originZ`]);function lt(e){return ct.has(e)}function ut(e){let t={},n={};return Object.entries(e).forEach(([e,r])=>{Z(e)||lt(e)?t[e]=r:n[e]=r}),{transform:t,style:n}}function Q(e){let{transform:t,style:n}=ut(e),{transform:r}=Y(t),{style:i}=q(n);return r.value&&(i.value.transform=r.value),i.value}function dt(e,t){let n,r,{state:i,style:a}=q();return J(e,e=>{r=e;for(let t of Object.keys(V)){if(e.style[t]===null||e.style[t]===``||Z(t)||lt(t))continue;i[t]=e.style[t]}n&&Object.entries(n).forEach(([t,n])=>e.style[t]=n),t&&t(i)}),M(a,e=>{if(!r){n=e;return}for(let t in e)r.style[t]=e[t]},{immediate:!0}),{style:i}}function ft(e){let t=e.trim().split(/\) |\)/);if(t.length===1)return{};let n=e=>e.endsWith(`px`)||e.endsWith(`deg`)?Number.parseFloat(e):Number.isNaN(Number(e))?Number(e):e;return t.reduce((e,t)=>{if(!t)return e;let[r,i]=t.split(`(`),a=i.split(`,`),o=a.map(e=>n(e.endsWith(`)`)?e.replace(`)`,``):e.trim())),s=o.length===1?o[0]:o;return{...e,[r]:s}},{})}function pt(e,t){Object.entries(ft(t)).forEach(([t,n])=>{let r=[`x`,`y`,`z`];if(t===`translate3d`){if(n===0){r.forEach(t=>e[t]=0);return}n.forEach((t,n)=>e[r[n]]=t);return}if(n=Number.parseFloat(`${n}`),t===`translateX`){e.x=n;return}if(t===`translateY`){e.y=n;return}if(t===`translateZ`){e.z=n;return}e[t]=n})}function mt(e,t){let n,r,{state:i,transform:a}=Y();return J(e,e=>{r=e,e.style.transform&&pt(i,e.style.transform),n&&(e.style.transform=n),t&&t(i)}),M(a,e=>{if(!r){n=e;return}r.style.transform=e},{immediate:!0}),{transform:i}}function ht(e){return Object.entries(e)}function gt(e,t){let n=w({}),r=e=>Object.entries(e).forEach(([e,t])=>n[e]=t),{style:i}=dt(e,r),{transform:a}=mt(e,r);return M(n,e=>{ht(e).forEach(([e,t])=>{let n=Z(e)?a:i;n[e]&&n[e]===t||(n[e]=t)})},{immediate:!0,deep:!0}),J(e,()=>t&&r(t)),{motionProperties:n,style:i,transform:a}}function _t(e={}){let t=O(e),n=T(),r=f(()=>{if(n.value)return t[n.value]});return{state:r,variant:n}}function vt(e,t={},n){let{motionProperties:r}=gt(e),{variant:i,state:a}=_t(t),o=Ye(r,t),s={target:e,variant:i,variants:t,state:a,motionProperties:r,...o};return rt(s,n),s}const yt=[`delay`,`duration`],bt=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...yt],xt={initial:{opacity:0},enter:{opacity:1}},St={initial:{opacity:0},visible:{opacity:1}},Ct={initial:{opacity:0},visibleOnce:{opacity:1}},wt={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},Tt={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},Et={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},Dt={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},Ot={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},kt={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},At={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},jt={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},Mt={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},Nt={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Pt={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Ft={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},It={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Lt={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Rt={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},zt={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},Bt={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},Vt={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},Ht={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},Ut={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},Wt={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},Gt={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},Kt={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},qt={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},Jt={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},Yt={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},Xt={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Zt={__proto__:null,fade:xt,fadeVisible:St,fadeVisibleOnce:Ct,pop:wt,popVisible:Tt,popVisibleOnce:Et,rollBottom:It,rollLeft:Dt,rollRight:At,rollTop:Nt,rollVisibleBottom:Lt,rollVisibleLeft:Ot,rollVisibleOnceBottom:Rt,rollVisibleOnceLeft:kt,rollVisibleOnceRight:Mt,rollVisibleOnceTop:Ft,rollVisibleRight:jt,rollVisibleTop:Pt,slideBottom:Jt,slideLeft:zt,slideRight:Ht,slideTop:Gt,slideVisibleBottom:Yt,slideVisibleLeft:Bt,slideVisibleOnceBottom:Xt,slideVisibleOnceLeft:Vt,slideVisibleOnceRight:Wt,slideVisibleOnceTop:qt,slideVisibleRight:Ut,slideVisibleTop:Kt},Qt=Symbol(``),$t={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 en(e){return Object.prototype.toString.call(e)===`[object Object]`}function $(e){if(Array.isArray(e))return e.map($);if(en(e)){let t={};for(let n in e)t[n]=$(e[n]);return t}return e}function tn(e){let t=w({}),n=pe(Qt,{}),r=f(()=>e.preset==null?{}:n!=null&&e.preset in n?structuredClone(Se(n)[e.preset]):e.preset in Zt?structuredClone(Zt[e.preset]):{}),i=f(()=>({initial:e.initial,enter:e.enter,leave:e.leave,visible:e.visible,visibleOnce:e.visibleOnce,hovered:e.hovered,tapped:e.tapped,focused:e.focused}));function a(e,t){for(let n of[`delay`,`duration`]){if(t[n]==null)continue;let r=Number.parseInt(t[n]);for(let t of[`enter`,`visible`,`visibleOnce`]){let i=e[t];if(i==null)continue;i.transition??={},i.transition[n]=r}}return e}let o=f(()=>{let t=oe({},i.value,r.value,e.variants||{});return a({...t},e)});function s(e,n,r){var i;e.props??={},(i=e.props).style??(i.style={}),e.props.style={...e.props.style,...r};let s=a($(o.value),e.props);return e.props.onVnodeMounted=({el:e})=>{t[n]=vt(e,s)},e.props.onVnodeUpdated=({el:e})=>{let r=Q(t[n].state);for(let[t,n]of Object.entries(r))e.style[t]=n},e}return{motionConfig:o,setNodeInstance:s}}const nn=_({name:`Motion`,props:{...$t,is:{type:[String,Object],default:`div`}},setup(e){let t=j(),{motionConfig:n,setNodeInstance:r}=tn(e);return()=>{let i=Q(n.value.initial||{}),a=b(e.is,void 0,t);return r(a,0,i),a}}}),rn=_({name:`MotionGroup`,props:{...$t,is:{type:[String,Object],required:!1}},setup(e){let n=j(),{motionConfig:r,setNodeInstance:i}=tn(e);return()=>{var a;let o=Q(r.value.initial||{}),s=(a=n.default)?.call(n)||[];for(let e=0;e{await c(`initial`),await c(`enter`)}),be(async()=>{await c(`leave`),s.value=!0}),M([()=>t.title,()=>t.subtitle,r],async()=>{await c(`leave`),await ge(),s.value=t.disableBackButton,a.value=t.title,o.value=t.subtitle,await ge(),await c(`initial`),await c(`enter`)}),(t,r)=>(x(),h(`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`},[p(`button`,{onClick:r[0]||=e=>O(n).back()},[s.value?m(``,!0):(x(),h(`div`,{key:0,"i-solar:alt-arrow-left-line-duotone":``,"text-2xl":``,class:_e({"pointer-events-none op-0":!e.showBackButton})},null,2))]),p(`h1`,an,[o.value?(x(),h(`div`,on,[p(`span`,sn,D(o.value),1)])):m(``,!0),p(`div`,cn,D(a.value),1)])],512))}}),un=ln;const dn={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)`}},fn={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},pn={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"mx-auto":``,"max-w-screen-xl":``};var mn=_({__name:`settings`,setup(e){let t=A(),{t:r}=Te(),i=ke(),{allProvidersMetadata:a}=xe(i),o=f(()=>{let e={"/settings/airi-card":{subtitle:r(`settings.title`),title:r(`settings.pages.card.title`)},"/settings/appearance":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.title`)},"/settings/appearance/general":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.general.title`)},"/settings/appearance/color-scheme":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.color-scheme.title`)},"/settings/appearance/developer":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.developer.title`)},"/settings/memory":{subtitle:r(`settings.title`),title:r(`settings.pages.memory.title`)},"/settings/models":{subtitle:r(`settings.title`),title:r(`settings.pages.models.title`)},"/settings/modules":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.title`)},"/settings/modules/consciousness":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.consciousness.title`)},"/settings/modules/speech":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.speech.title`)},"/settings/modules/hearing":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.hearing.title`)},"/settings/modules/memory-short-term":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.memory-short-term.title`)},"/settings/modules/memory-long-term":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.memory-long-term.title`)},"/settings/modules/messaging-discord":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.messaging-discord.title`)},"/settings/modules/x":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.x.title`)},"/settings/modules/gaming-minecraft":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.gaming-minecraft.title`)},"/settings/modules/gaming-factorio":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.gaming-factorio.title`)},"/settings/providers":{subtitle:r(`settings.title`),title:r(`settings.pages.providers.title`)},"/settings/scene":{subtitle:r(`settings.title`),title:r(`settings.pages.scene.title`)},"/settings":{title:r(`settings.title`)}};for(let t of a.value)e[`/settings/providers/${t.id}`]={subtitle:r(`settings.title`),title:r(t.nameKey)};return e}),s=f(()=>o.value[t.path]);return(e,t)=>{var r,i;return x(),h(`div`,dn,[p(`div`,fn,[g(Ae)]),p(`div`,pn,[g(O(un),{title:(r=s.value)?.title,subtitle:(i=s.value)?.subtitle},null,8,[`title`,`subtitle`]),g(O(n))])])}}}),hn=mn;export{hn as default}; \ No newline at end of file diff --git a/assets/speech-ByP1uYEY.js b/assets/speech-D4NcUzWM.js similarity index 96% rename from assets/speech-ByP1uYEY.js rename to assets/speech-D4NcUzWM.js index 3bfbc6b81c880f9fa420bed53170fc69e1946643..cb91e0497df2e6666cf308769f43b08dd9afe329 100644 --- a/assets/speech-ByP1uYEY.js +++ b/assets/speech-D4NcUzWM.js @@ -1 +1 @@ -import{Fragment as e,RouterLink as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as o,defineComponent as ee,isRef as s,normalizeClass as te,onMounted as c,onUnmounted as l,openBlock as u,ref as d,renderList as ne,resolveDirective as re,storeToRefs as f,toDisplayString as p,unref as m,useI18n as ie,vModelSelect as ae,vModelText as oe,watch as se,withCtx as h,withDirectives as g}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{generateSpeech as ce,useProvidersStore as le,useSpeechStore as ue}from"./stores-BVVBBF04.js";import{Skeleton_default as _}from"./Button-C9y21VLy.js";import{FieldCheckbox_default as v,FieldInput_default as de,FieldRange_default as y}from"./src-BnFQ5wFr.js";import"./Basic-CbvQnFR9.js";import{Textarea_default as fe}from"./Textarea-D5jZ5rL5.js";import{RadioCardManySelect_default as pe,RadioCardSimple_default as me,TestDummyMarker_default as he,VoiceCardManySelect_default as ge}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as b}from"./route-block--T8TG4is.js";const _e={flex:`~ col md:row gap-6`},ve={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`w-full md:w-[40%]`},ye={flex:`~ col gap-4`},be={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},xe={text:`neutral-400 dark:neutral-500`},Se={"max-w-full":``},Ce={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},we={key:1},Te={key:0},x={flex:`~ col gap-4`},S={class:`text-lg md:text-2xl`},C={text:`neutral-400 dark:neutral-400`},w={key:0,class:`flex items-center justify-center py-4`},T={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`},E={class:`flex flex-col`},D={class:`font-medium`},O={class:`text-sm text-red-600 dark:text-red-400`},Ee={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`},De={class:`flex flex-col`},Oe={class:`font-medium`},ke={class:`text-sm text-amber-600 dark:text-amber-400`},Ae={key:0},je={flex:`~ col gap-4`},Me={key:0},Ne={class:`flex flex-col gap-4`},Pe={flex:`~ row gap-4`},Fe={key:1,class:`space-y-6`},Ie={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`},Le={class:`flex flex-col`},Re={class:`text-sm text-red-600 dark:text-red-400`},ze={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`},Be={flex:`~ col gap-4`},Ve={key:4,class:`mt-2 space-y-6`},He={key:0},Ue={flex:`~ col gap-4`},We={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Ge={"w-full":``,"rounded-xl":``},k={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`},qe={flex:`~ col gap-4`},Je={flex:`~ row`,"gap-4":``},Ye=[`disabled`],Xe={flex:`~ row`,"items-center":``,"gap-2":``},Ze=[`src`],Qe={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":``};var A=ee({__name:`speech`,setup(ee){let{t:b}=ie(),A=le(),j=ue(),{configuredSpeechProvidersMetadata:M}=f(A),{activeSpeechProvider:N,activeSpeechModel:P,activeSpeechVoice:F,activeSpeechVoiceId:I,pitch:L,isLoadingSpeechProviderVoices:$e,supportsModelListing:et,providerModels:R,isLoadingActiveProviderModels:z,activeProviderModelError:B,modelSearchQuery:V,speechProviderError:H,ssmlEnabled:U,availableVoices:W}=f(j),G=d(``),K=d(!1),q=d(`Hello, my name is AI Assistant`),J=d(``),Y=d(!1),X=d(``),Z=d(null),Q=d(``);c(async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)}),se(N,async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)});async function tt(){if(!q.value.trim()&&!K.value||K.value&&!J.value.trim())return;if(!P.value){console.error(`No model selected`);return}if(!F.value){console.error(`No voice selected`);return}let e=A.getProviderInstance(N.value);if(!e){console.error(`Failed to initialize speech provider`);return}let t=A.getProviderConfig(N.value);Y.value=!0,Q.value=``;try{X.value&&$();let n=K.value?J.value:j.supportsSSML?j.generateSSML(q.value,F.value,{...t,pitch:L.value}):q.value,r=await ce({...e.speech(P.value,t),input:n,voice:F.value.id});X.value=URL.createObjectURL(new Blob([r])),setTimeout(()=>{Z.value&&Z.value.play()},100)}catch(e){console.error(`Error generating speech:`,e),Q.value=e instanceof Error?e.message:`An unknown error occurred`}finally{Y.value=!1}}function $(){Z.value&&(Z.value.pause(),Z.value.currentTime=0),X.value&&(URL.revokeObjectURL(X.value),X.value=``)}l(()=>{X.value&&URL.revokeObjectURL(X.value)});function nt(e){F.value={id:e,name:e,description:e,previewURL:e,languages:[{code:`en`,title:`English`}],provider:N.value,gender:`male`}}function rt(e){P.value=e}return(ee,c)=>{var l;let d=re(`motion`);return u(),a(e,null,[n(`div`,_e,[n(`div`,ve,[n(`div`,null,[n(`div`,ye,[n(`div`,null,[n(`h2`,be,p(m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.title`)),1),n(`div`,xe,[n(`span`,null,p(m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.description`)),1)])]),n(`div`,Se,[m(M).length>0?(u(),a(`fieldset`,Ce,[(u(!0),a(e,null,ne(m(M),e=>(u(),r(m(me),{id:e.id,key:e.id,modelValue:m(N),"onUpdate:modelValue":c[0]||=e=>s(N)?N.value=e:null,name:`speech-provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(u(),a(`div`,we,[o(m(t),{class:`flex items-center gap-3 rounded-lg p-4`,border:`2 dashed neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-800`,transition:`colors duration-200 ease-in-out`,to:`/settings/providers`},{default:h(()=>c[13]||=[n(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No Speech Providers Configured`),n(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your speech providers`)],-1),n(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[13]})]))])]),n(`div`,null,[m(N)&&m(et)?(u(),a(`div`,Te,[n(`div`,x,[n(`div`,null,[n(`h2`,S,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,C,[n(`span`,null,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),m(z)?(u(),a(`div`,w,[c[14]||=n(`div`,{class:`mr-2 animate-spin`},[n(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),n(`span`,null,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):m(B)?(u(),a(`div`,T,[c[15]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,E,[n(`span`,D,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),n(`span`,O,p(m(B)),1)])])):m(R).length===0&&!m(z)?(u(),a(`div`,Ee,[c[16]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,De,[n(`span`,Oe,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),n(`span`,ke,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):m(R).length>0?(u(),r(m(pe),{key:3,modelValue:m(P),"onUpdate:modelValue":c[1]||=e=>s(P)?P.value=e:null,"search-query":m(V),"onUpdate:searchQuery":c[2]||=e=>s(V)?V.value=e:null,items:m(R),searchable:!0,"search-placeholder":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:m(V)}),"search-results-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":rt},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`])):i(``,!0)])])):i(``,!0)])]),m(N)?(u(),a(`div`,Ae,[n(`div`,je,[c[27]||=n(`div`,null,[n(`h2`,{class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},` Voice Configuration `),n(`div`,{text:`neutral-400 dark:neutral-500`},[n(`span`,null,`Customize how your AI assistant speaks`)])],-1),m($e)?(u(),a(`div`,Me,[n(`div`,Ne,[o(m(_),{class:`w-full rounded-lg p-2.5 text-sm`},{default:h(()=>c[17]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[17]}),n(`div`,Pe,[o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[18]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[18]}),o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[19]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[19]}),o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[20]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[20]})]),o(m(_),{class:`w-full rounded-lg p-3 text-sm`},{default:h(()=>c[21]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[21]})])])):m(W)[m(N)]&&m(W)[m(N)].length>0?(u(),a(`div`,Fe,[o(m(ge),{"search-query":G.value,"onUpdate:searchQuery":c[3]||=e=>G.value=e,"voice-id":m(I),"onUpdate:voiceId":c[4]||=e=>s(I)?I.value=e:null,voices:(l=m(W)[m(N)])?.map(e=>({id:e.id,name:e.name,description:e.description,previewURL:e.previewURL,customizable:!1})),searchable:!0,"search-placeholder":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder`),"search-no-results-title":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices`),"search-no-results-description":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description`),"search-results-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results`,{count:0,total:0}),"custom-input-placeholder":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder`),"expand-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_more`),"collapse-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_less`),"play-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample`),"pause-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.pause`),"onUpdate:customValue":nt},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`])])):m(H)?(u(),a(`div`,Ie,[c[23]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,Le,[c[22]||=n(`span`,{class:`font-medium`},`Error loading voices`,-1),n(`span`,Re,p(m(H)),1)])])):(u(),a(`div`,ze,c[24]||=[n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No voices available`),n(`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)])),n(`div`,Be,[o(m(y),{modelValue:m(L),"onUpdate:modelValue":c[5]||=e=>s(L)?L.value=e:null,label:`Pitch`,description:`Tune the pitch of the voice`,min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`]),o(m(v),{modelValue:m(U),"onUpdate:modelValue":c[6]||=e=>s(U)?U.value=e:null,label:`Enable SSML`,description:`Enable Speech Synthesis Markup Language for more control over speech output`},null,8,[`modelValue`])]),!m(W)[m(N)]||m(W)[m(N)].length===0?(u(),a(`div`,Ve,[o(m(de),{modelValue:m(I),"onUpdate:modelValue":c[7]||=e=>s(I)?I.value=e: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`]),m(N)===`elevenlabs`?(u(),a(`div`,He,[c[26]||=n(`label`,{class:`mb-1 block text-sm font-medium`},` Model `,-1),g(n(`select`,{"onUpdate:modelValue":c[8]||=e=>s(P)?P.value=e:null,class:`w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900`},c[25]||=[n(`option`,{value:`eleven_monolingual_v1`},` Monolingual v1 `,-1),n(`option`,{value:`eleven_multilingual_v1`},` Multilingual v1 `,-1),n(`option`,{value:`eleven_multilingual_v2`},` Multilingual v2 `,-1)],512),[[ae,m(P)]])])):i(``,!0),n(`div`,Ue,[o(m(y),{modelValue:m(L),"onUpdate:modelValue":c[9]||=e=>s(L)?L.value=e:null,label:`Pitch`,description:`Tune the pitch of the voice`,min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])])):i(``,!0)])])):i(``,!0)]),n(`div`,We,[n(`div`,Ge,[n(`h2`,k,[n(`div`,Ke,[o(m(he)),n(`div`,null,p(m(b)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),n(`div`,qe,[o(m(v),{modelValue:K.value,"onUpdate:modelValue":c[10]||=e=>K.value=e,label:`Use Custom SSML`,description:`Enable to input raw SSML instead of plain text`},null,8,[`modelValue`]),K.value?g((u(),a(`textarea`,{key:1,"onUpdate:modelValue":c[12]||=e=>J.value=e,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)),[[oe,J.value]]):(u(),r(m(fe),{key:0,modelValue:q.value,"onUpdate:modelValue":c[11]||=e=>q.value=e,"h-24":``,"w-full":``,placeholder:m(b)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`)},null,8,[`modelValue`,`placeholder`])),n(`div`,Je,[n(`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:Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!m(F),class:te({"opacity-50 cursor-not-allowed":Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!m(F)}),bg:`neutral-700 dark:neutral-300`,onClick:tt},[n(`div`,Xe,[c[28]||=n(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),n(`span`,null,p(Y.value?m(b)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):m(b)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,Ye),X.value?(u(),a(`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:$},c[29]||=[n(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[n(`div`,{"i-solar:stop-circle-bold-duotone":``}),n(`span`,null,`Stop`)],-1)])):i(``,!0)]),X.value?(u(),a(`audio`,{key:2,ref_key:`audioPlayer`,ref:Z,src:X.value,controls:``,class:`mt-2 w-full`},null,8,Ze)):i(``,!0)])])])]),g((u(),a(`div`,Qe,c[30]||=[n(`div`,{text:`60`,"i-solar:user-speak-rounded-bold-duotone":``},null,-1)])),[[d]])],64)}}});typeof b==`function`&&b(A);var j=A;export{j as default}; \ No newline at end of file +import{Fragment as e,RouterLink as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as o,defineComponent as ee,isRef as s,normalizeClass as te,onMounted as c,onUnmounted as l,openBlock as u,ref as d,renderList as ne,resolveDirective as re,storeToRefs as f,toDisplayString as p,unref as m,useI18n as ie,vModelSelect as ae,vModelText as oe,watch as se,withCtx as h,withDirectives as g}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{generateSpeech as ce,useProvidersStore as le,useSpeechStore as ue}from"./stores-BW_6w_OI.js";import{Skeleton_default as _}from"./Button-DE0e46lv.js";import{FieldCheckbox_default as v,FieldInput_default as de,FieldRange_default as y}from"./src-B9Iy8991.js";import"./Basic-DnBqne8U.js";import{Textarea_default as fe}from"./Textarea-SRGnauY5.js";import{RadioCardManySelect_default as pe,RadioCardSimple_default as me,TestDummyMarker_default as he,VoiceCardManySelect_default as ge}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as b}from"./route-block--T8TG4is.js";const _e={flex:`~ col md:row gap-6`},ve={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`w-full md:w-[40%]`},ye={flex:`~ col gap-4`},be={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},xe={text:`neutral-400 dark:neutral-500`},Se={"max-w-full":``},Ce={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},we={key:1},Te={key:0},x={flex:`~ col gap-4`},S={class:`text-lg md:text-2xl`},C={text:`neutral-400 dark:neutral-400`},w={key:0,class:`flex items-center justify-center py-4`},T={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`},E={class:`flex flex-col`},D={class:`font-medium`},O={class:`text-sm text-red-600 dark:text-red-400`},Ee={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`},De={class:`flex flex-col`},Oe={class:`font-medium`},ke={class:`text-sm text-amber-600 dark:text-amber-400`},Ae={key:0},je={flex:`~ col gap-4`},Me={key:0},Ne={class:`flex flex-col gap-4`},Pe={flex:`~ row gap-4`},Fe={key:1,class:`space-y-6`},Ie={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`},Le={class:`flex flex-col`},Re={class:`text-sm text-red-600 dark:text-red-400`},ze={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`},Be={flex:`~ col gap-4`},Ve={key:4,class:`mt-2 space-y-6`},He={key:0},Ue={flex:`~ col gap-4`},We={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Ge={"w-full":``,"rounded-xl":``},k={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`},qe={flex:`~ col gap-4`},Je={flex:`~ row`,"gap-4":``},Ye=[`disabled`],Xe={flex:`~ row`,"items-center":``,"gap-2":``},Ze=[`src`],Qe={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":``};var A=ee({__name:`speech`,setup(ee){let{t:b}=ie(),A=le(),j=ue(),{configuredSpeechProvidersMetadata:M}=f(A),{activeSpeechProvider:N,activeSpeechModel:P,activeSpeechVoice:F,activeSpeechVoiceId:I,pitch:L,isLoadingSpeechProviderVoices:$e,supportsModelListing:et,providerModels:R,isLoadingActiveProviderModels:z,activeProviderModelError:B,modelSearchQuery:V,speechProviderError:H,ssmlEnabled:U,availableVoices:W}=f(j),G=d(``),K=d(!1),q=d(`Hello, my name is AI Assistant`),J=d(``),Y=d(!1),X=d(``),Z=d(null),Q=d(``);c(async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)}),se(N,async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)});async function tt(){if(!q.value.trim()&&!K.value||K.value&&!J.value.trim())return;if(!P.value){console.error(`No model selected`);return}if(!F.value){console.error(`No voice selected`);return}let e=A.getProviderInstance(N.value);if(!e){console.error(`Failed to initialize speech provider`);return}let t=A.getProviderConfig(N.value);Y.value=!0,Q.value=``;try{X.value&&$();let n=K.value?J.value:j.supportsSSML?j.generateSSML(q.value,F.value,{...t,pitch:L.value}):q.value,r=await ce({...e.speech(P.value,t),input:n,voice:F.value.id});X.value=URL.createObjectURL(new Blob([r])),setTimeout(()=>{Z.value&&Z.value.play()},100)}catch(e){console.error(`Error generating speech:`,e),Q.value=e instanceof Error?e.message:`An unknown error occurred`}finally{Y.value=!1}}function $(){Z.value&&(Z.value.pause(),Z.value.currentTime=0),X.value&&(URL.revokeObjectURL(X.value),X.value=``)}l(()=>{X.value&&URL.revokeObjectURL(X.value)});function nt(e){F.value={id:e,name:e,description:e,previewURL:e,languages:[{code:`en`,title:`English`}],provider:N.value,gender:`male`}}function rt(e){P.value=e}return(ee,c)=>{var l;let d=re(`motion`);return u(),a(e,null,[n(`div`,_e,[n(`div`,ve,[n(`div`,null,[n(`div`,ye,[n(`div`,null,[n(`h2`,be,p(m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.title`)),1),n(`div`,xe,[n(`span`,null,p(m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.description`)),1)])]),n(`div`,Se,[m(M).length>0?(u(),a(`fieldset`,Ce,[(u(!0),a(e,null,ne(m(M),e=>(u(),r(m(me),{id:e.id,key:e.id,modelValue:m(N),"onUpdate:modelValue":c[0]||=e=>s(N)?N.value=e:null,name:`speech-provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(u(),a(`div`,we,[o(m(t),{class:`flex items-center gap-3 rounded-lg p-4`,border:`2 dashed neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-800`,transition:`colors duration-200 ease-in-out`,to:`/settings/providers`},{default:h(()=>c[13]||=[n(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No Speech Providers Configured`),n(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your speech providers`)],-1),n(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[13]})]))])]),n(`div`,null,[m(N)&&m(et)?(u(),a(`div`,Te,[n(`div`,x,[n(`div`,null,[n(`h2`,S,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,C,[n(`span`,null,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),m(z)?(u(),a(`div`,w,[c[14]||=n(`div`,{class:`mr-2 animate-spin`},[n(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),n(`span`,null,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):m(B)?(u(),a(`div`,T,[c[15]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,E,[n(`span`,D,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),n(`span`,O,p(m(B)),1)])])):m(R).length===0&&!m(z)?(u(),a(`div`,Ee,[c[16]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,De,[n(`span`,Oe,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),n(`span`,ke,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):m(R).length>0?(u(),r(m(pe),{key:3,modelValue:m(P),"onUpdate:modelValue":c[1]||=e=>s(P)?P.value=e:null,"search-query":m(V),"onUpdate:searchQuery":c[2]||=e=>s(V)?V.value=e:null,items:m(R),searchable:!0,"search-placeholder":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:m(V)}),"search-results-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":rt},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`])):i(``,!0)])])):i(``,!0)])]),m(N)?(u(),a(`div`,Ae,[n(`div`,je,[c[27]||=n(`div`,null,[n(`h2`,{class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},` Voice Configuration `),n(`div`,{text:`neutral-400 dark:neutral-500`},[n(`span`,null,`Customize how your AI assistant speaks`)])],-1),m($e)?(u(),a(`div`,Me,[n(`div`,Ne,[o(m(_),{class:`w-full rounded-lg p-2.5 text-sm`},{default:h(()=>c[17]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[17]}),n(`div`,Pe,[o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[18]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[18]}),o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[19]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[19]}),o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[20]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[20]})]),o(m(_),{class:`w-full rounded-lg p-3 text-sm`},{default:h(()=>c[21]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[21]})])])):m(W)[m(N)]&&m(W)[m(N)].length>0?(u(),a(`div`,Fe,[o(m(ge),{"search-query":G.value,"onUpdate:searchQuery":c[3]||=e=>G.value=e,"voice-id":m(I),"onUpdate:voiceId":c[4]||=e=>s(I)?I.value=e:null,voices:(l=m(W)[m(N)])?.map(e=>({id:e.id,name:e.name,description:e.description,previewURL:e.previewURL,customizable:!1})),searchable:!0,"search-placeholder":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder`),"search-no-results-title":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices`),"search-no-results-description":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description`),"search-results-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results`,{count:0,total:0}),"custom-input-placeholder":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder`),"expand-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_more`),"collapse-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_less`),"play-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample`),"pause-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.pause`),"onUpdate:customValue":nt},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`])])):m(H)?(u(),a(`div`,Ie,[c[23]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,Le,[c[22]||=n(`span`,{class:`font-medium`},`Error loading voices`,-1),n(`span`,Re,p(m(H)),1)])])):(u(),a(`div`,ze,c[24]||=[n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No voices available`),n(`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)])),n(`div`,Be,[o(m(y),{modelValue:m(L),"onUpdate:modelValue":c[5]||=e=>s(L)?L.value=e:null,label:`Pitch`,description:`Tune the pitch of the voice`,min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`]),o(m(v),{modelValue:m(U),"onUpdate:modelValue":c[6]||=e=>s(U)?U.value=e:null,label:`Enable SSML`,description:`Enable Speech Synthesis Markup Language for more control over speech output`},null,8,[`modelValue`])]),!m(W)[m(N)]||m(W)[m(N)].length===0?(u(),a(`div`,Ve,[o(m(de),{modelValue:m(I),"onUpdate:modelValue":c[7]||=e=>s(I)?I.value=e: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`]),m(N)===`elevenlabs`?(u(),a(`div`,He,[c[26]||=n(`label`,{class:`mb-1 block text-sm font-medium`},` Model `,-1),g(n(`select`,{"onUpdate:modelValue":c[8]||=e=>s(P)?P.value=e:null,class:`w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900`},c[25]||=[n(`option`,{value:`eleven_monolingual_v1`},` Monolingual v1 `,-1),n(`option`,{value:`eleven_multilingual_v1`},` Multilingual v1 `,-1),n(`option`,{value:`eleven_multilingual_v2`},` Multilingual v2 `,-1)],512),[[ae,m(P)]])])):i(``,!0),n(`div`,Ue,[o(m(y),{modelValue:m(L),"onUpdate:modelValue":c[9]||=e=>s(L)?L.value=e:null,label:`Pitch`,description:`Tune the pitch of the voice`,min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])])):i(``,!0)])])):i(``,!0)]),n(`div`,We,[n(`div`,Ge,[n(`h2`,k,[n(`div`,Ke,[o(m(he)),n(`div`,null,p(m(b)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),n(`div`,qe,[o(m(v),{modelValue:K.value,"onUpdate:modelValue":c[10]||=e=>K.value=e,label:`Use Custom SSML`,description:`Enable to input raw SSML instead of plain text`},null,8,[`modelValue`]),K.value?g((u(),a(`textarea`,{key:1,"onUpdate:modelValue":c[12]||=e=>J.value=e,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)),[[oe,J.value]]):(u(),r(m(fe),{key:0,modelValue:q.value,"onUpdate:modelValue":c[11]||=e=>q.value=e,"h-24":``,"w-full":``,placeholder:m(b)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`)},null,8,[`modelValue`,`placeholder`])),n(`div`,Je,[n(`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:Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!m(F),class:te({"opacity-50 cursor-not-allowed":Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!m(F)}),bg:`neutral-700 dark:neutral-300`,onClick:tt},[n(`div`,Xe,[c[28]||=n(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),n(`span`,null,p(Y.value?m(b)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):m(b)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,Ye),X.value?(u(),a(`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:$},c[29]||=[n(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[n(`div`,{"i-solar:stop-circle-bold-duotone":``}),n(`span`,null,`Stop`)],-1)])):i(``,!0)]),X.value?(u(),a(`audio`,{key:2,ref_key:`audioPlayer`,ref:Z,src:X.value,controls:``,class:`mt-2 w-full`},null,8,Ze)):i(``,!0)])])])]),g((u(),a(`div`,Qe,c[30]||=[n(`div`,{text:`60`,"i-solar:user-speak-rounded-bold-duotone":``},null,-1)])),[[d]])],64)}}});typeof b==`function`&&b(A);var j=A;export{j as default}; \ No newline at end of file diff --git a/assets/src-BnFQ5wFr.js b/assets/src-B9Iy8991.js similarity index 99% rename from assets/src-BnFQ5wFr.js rename to assets/src-B9Iy8991.js index 01a67013053853c1c3a180d34526007869b6f7be..a75cc7f1a32a265e63aee967c7b8a30ecf0f8ecc 100644 --- a/assets/src-BnFQ5wFr.js +++ b/assets/src-B9Iy8991.js @@ -1 +1 @@ -import{Comment as e,Fragment as t,__plugin_vue_export_helper_default as n,cloneVNode as r,computed as i,createApp as a,createBaseVNode as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createTextVNode as u,createVNode as d,defineComponent as f,getCurrentInstance as p,guardReactiveProps as m,h,inject as g,mergeModels as _,mergeProps as v,nextTick as y,normalizeClass as b,normalizeProps as x,normalizeStyle as S,onMounted as C,openBlock as w,popScopeId as T,provide as E,pushScopeId as ee,ref as D,renderList as O,renderSlot as k,resolveComponent as A,resolveDirective as te,toDisplayString as j,toRefs as ne,toValue as re,unref as M,unrefElement$1 as ie,useModel as N,useVModel as ae,vModelDynamic as oe,vModelText as se,watch as ce,withCtx as P,withDirectives as F,withKeys as le,withModifiers as ue,withScopeId as de}from"./index-Dor8PgzM.js";const fe=[`top`,`right`,`bottom`,`left`],pe=[`start`,`end`],me=fe.reduce((e,t)=>e.concat(t,t+`-`+pe[0],t+`-`+pe[1]),[]),he=Math.min,I=Math.max,ge=Math.round,_e=Math.floor,ve=e=>({x:e,y:e}),ye={left:`right`,right:`left`,bottom:`top`,top:`bottom`},be={start:`end`,end:`start`};function xe(e,t,n){return I(e,he(t,n))}function L(e,t){return typeof e==`function`?e(t):e}function R(e){return e.split(`-`)[0]}function z(e){return e.split(`-`)[1]}function Se(e){return e===`x`?`y`:`x`}function Ce(e){return e===`y`?`height`:`width`}function B(e){return[`top`,`bottom`].includes(R(e))?`y`:`x`}function we(e){return Se(B(e))}function Te(e,t,n){n===void 0&&(n=!1);let r=z(e),i=we(e),a=Ce(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ae(o)),[o,Ae(o)]}function Ee(e){let t=Ae(e);return[De(e),t,De(t)]}function De(e){return e.replace(/start|end/g,e=>be[e])}function Oe(e,t,n){let r=[`left`,`right`],i=[`right`,`left`],a=[`top`,`bottom`],o=[`bottom`,`top`];switch(e){case`top`:case`bottom`:return n?t?i:r:t?r:i;case`left`:case`right`:return t?a:o;default:return[]}}function ke(e,t,n,r){let i=z(e),a=Oe(R(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(De)))),a}function Ae(e){return e.replace(/left|right|bottom|top/g,e=>ye[e])}function je(e){return{top:0,right:0,bottom:0,left:0,...e}}function Me(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:je(e)}function Ne(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Pe(e,t,n){let{reference:r,floating:i}=e,a=B(t),o=we(t),s=Ce(o),c=R(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(z(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}const Fe=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Pe(l,r,c),f=r,p={},m=0;for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=L(e,t)||{};if(l==null)return{};let d=Me(u),f={x:n,y:r},p=we(i),m=Ce(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=he(d[_],T),ee=he(d[v],T),D=E,O=C-h[m]-ee,k=C/2-h[m]/2+w,A=xe(D,k,O),te=!c.arrow&&z(i)!=null&&k!==A&&a.reference[m]/2-(kz(t)===e),...n.filter(t=>z(t)!==e)]:n.filter(e=>R(e)===e);return r.filter(n=>e?z(n)===e||(t?De(n)!==n:!1):!0)}const Re=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){var n,r,i;let{rects:a,middlewareData:o,placement:s,platform:c,elements:l}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=me,autoAlignment:p=!0,...m}=L(e,t),h=d!==void 0||f===me?Le(d||null,p,f):f,g=await V(t,m),_=(n=o.autoPlacement)?.index||0,v=h[_];if(v==null)return{};let y=Te(v,a,await(c.isRTL==null?void 0:c.isRTL(l.floating)));if(s!==v)return{reset:{placement:h[0]}};let b=[g[R(v)],g[y[0]],g[y[1]]],x=[...(r=o.autoPlacement)?.overflows||[],{placement:v,overflows:b}],S=h[_+1];if(S)return{data:{index:_+1,overflows:x},reset:{placement:S}};let C=x.map(e=>{let t=z(e.placement);return[e.placement,t&&u?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),w=C.filter(e=>e[2].slice(0,z(e[0])?2:3).every(e=>e<=0)),T=(i=w[0])?.[0]||C[0][0];return T===s?{}:{data:{index:_+1,overflows:x},reset:{placement:T}}}}},ze=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n,r;let{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p=`bestFit`,fallbackAxisSideDirection:m=`none`,flipAlignment:h=!0,...g}=L(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let _=R(i),v=B(s),y=R(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=f||(y||!h?[Ae(s)]:Ee(s)),S=m!==`none`;!f&&S&&x.push(...ke(s,h,m,b));let C=[s,...x],w=await V(t,g),T=[],E=(r=a.flip)?.overflows||[];if(u&&T.push(w[_]),d){let e=Te(i,o,b);T.push(w[e[0]],w[e[1]])}if(E=[...E,{placement:i,overflows:T}],!T.every(e=>e<=0)){var ee,D;let e=((ee=a.flip)?.index||0)+1,t=C[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=(D=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?.placement;if(!n)switch(p){case`bestFit`:{var O;let e=(O=E.filter(e=>{if(S){let t=B(e.placement);return t===v||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?.[0];e&&(n=e);break}case`initialPlacement`:n=s;break}if(i!==n)return{reset:{placement:n}}}return{}}}};function Be(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ve(e){return fe.some(t=>e[t]>=0)}const He=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=L(e,t);switch(r){case`referenceHidden`:{let e=await V(t,{...i,elementContext:`reference`}),r=Be(e,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Ve(r)}}}case`escaped`:{let e=await V(t,{...i,altBoundary:!0}),r=Be(e,n.floating);return{data:{escapedOffsets:r,escaped:Ve(r)}}}default:return{}}}}};async function Ue(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=R(n),s=z(n),c=B(n)===`y`,l=[`left`,`top`].includes(o)?-1:1,u=a&&c?-1:1,d=L(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}const We=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,c=await Ue(t,e);return o===(n=s.offset)?.placement&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},Ge=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=L(e,t),l={x:n,y:r},u=await V(t,c),d=B(R(i)),f=Se(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=xe(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=xe(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Ke=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=L(e,t),u={x:n,y:r},d=B(i),f=Se(d),p=u[f],m=u[d],h=L(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){var _,v;let e=f===`y`?`width`:`height`,t=[`top`,`left`].includes(R(i)),n=a.reference[d]-a.floating[e]+(t&&(_=o.offset)?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(v=o.offset)?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},qe=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=L(e,t),u=await V(t,l),d=R(i),f=z(i),p=B(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=he(h-u[g],v),x=he(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=I(u.left,0),t=I(u.right,0),n=I(u.top,0),r=I(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:I(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:I(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Je(e){return e?e.flatMap(e=>e.type===t?Je(e.children):[e]):[]}const Ye=f({name:`PrimitiveSlot`,inheritAttrs:!1,setup(t,{attrs:n,slots:i}){return()=>{var t;if(!i.default)return null;let a=Je(i.default()),o=a.findIndex(t=>t.type!==e);if(o===-1)return a;let s=a[o];(t=s.props)==null||delete t.ref;let c=s.props?v(n,s.props):n,l=r({...s,props:{}},c);return a.length===1?l:(a[o]=l,a)}}}),Xe=[`area`,`img`,`input`],Ze=f({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&Xe.includes(r)?()=>h(r,t):r===`template`?()=>h(Ye,t,{default:n.default}):()=>h(e.as,t,{default:n.default})}}),Qe=f({__name:`VisuallyHidden`,props:{feature:{default:`focusable`},asChild:{type:Boolean},as:{default:`span`}},setup(e){return(e,t)=>(w(),s(M(Ze),{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:P(()=>[k(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}});function $e(e,t){let n=typeof e==`string`&&!t?`${e}Context`:t,r=Symbol(n),i=t=>{let n=g(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},a=e=>(E(r,e),e);return[i,a]}function et(){let e=p(),t=D(),n=i(()=>{var e,n;return[`#text`,`#comment`].includes((e=t.value)?.$el.nodeName)?(n=t.value)?.$el.nextElementSibling:ie(t)}),r=Object.assign({},e.exposed),a={};for(let t in e.props)Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(a,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(a,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function o(n){t.value=n,n&&(Object.defineProperty(a,`$el`,{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),e.exposed=a)}return{forwardRef:o,currentRef:t,currentElement:n}}function tt(){let e=D(),t=i(()=>{var t,n;return[`#text`,`#comment`].includes((t=e.value)?.$el.nodeName)?(n=e.value)?.$el.nextElementSibling:ie(e)});return{primitiveElement:e,currentElement:t}}function nt(e){return i(()=>{var t;return re(e)?!!(t=ie(e))?.closest(`form`):!0})}const rt=f({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(e){let t=e,{primitiveElement:n,currentElement:r}=tt(),a=i(()=>t.checked??t.value);return ce(a,(e,t)=>{if(!r.value)return;let n=r.value,i=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(i,`value`),o=a.set;if(o&&e!==t){let t=new Event(`input`,{bubbles:!0}),r=new Event(`change`,{bubbles:!0});o.call(n,e),n.dispatchEvent(t),n.dispatchEvent(r)}}),(e,r)=>(w(),s(Qe,v({ref_key:`primitiveElement`,ref:n},{...t,...e.$attrs},{as:`input`}),null,16))}}),it=f({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(e){let n=e,r=i(()=>typeof n.value==`object`&&Array.isArray(n.value)&&n.value.length===0&&n.required),a=i(()=>typeof n.value==`string`||typeof n.value==`number`||typeof n.value==`boolean`?[{name:n.name,value:n.value}]:typeof n.value==`object`&&Array.isArray(n.value)?n.value.flatMap((e,t)=>typeof e==`object`?Object.entries(e).map(([e,r])=>({name:`[${n.name}][${t}][${e}]`,value:r})):{name:`[${n.name}][${t}]`,value:e}):n.value!==null&&typeof n.value==`object`&&!Array.isArray(n.value)?Object.entries(n.value).map(([e,t])=>({name:`[${n.name}][${e}]`,value:t})):[]);return(e,i)=>r.value?(w(),s(rt,v({key:e.name},{...n,...e.$attrs},{name:e.name,value:e.value}),null,16,[`name`,`value`])):(w(!0),l(t,{key:1},O(a.value,t=>(w(),s(rt,v({key:t.name,ref_for:!0},{...n,...e.$attrs},{name:t.name,value:t.value}),null,16,[`name`,`value`]))),128))}}),[at,ot]=$e(`SwitchRoot`),st=f({__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(e,{emit:t}){let n=e,r=t,{disabled:a}=ne(n),o=ae(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function l(){a.value||(o.value=!o.value)}let{forwardRef:u,currentElement:d}=et(),f=nt(d),p=i(()=>{var e;return n.id&&d.value?(e=document.querySelector(`[for="${n.id}"]`))?.innerText:void 0});return ot({modelValue:o,toggleCheck:l,disabled:a}),(e,t)=>(w(),s(M(Ze),v(e.$attrs,{id:e.id,ref:M(u),role:`switch`,type:e.as===`button`?`button`:void 0,value:e.value,"aria-label":e.$attrs[`aria-label`]||p.value,"aria-checked":M(o),"aria-required":e.required,"data-state":M(o)?`checked`:`unchecked`,"data-disabled":M(a)?``:void 0,"as-child":e.asChild,as:e.as,disabled:M(a),onClick:l,onKeydown:le(ue(l,[`prevent`]),[`enter`])}),{default:P(()=>[k(e.$slots,`default`,{modelValue:M(o)}),M(f)&&e.name?(w(),s(M(it),{key:0,type:`checkbox`,name:e.name,disabled:M(a),required:e.required,value:e.value,checked:!!M(o)},null,8,[`name`,`disabled`,`required`,`value`,`checked`])):c(``,!0)]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]))}}),ct=f({__name:`SwitchThumb`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(e){let t=at();return et(),(e,n)=>{var r;return w(),s(M(Ze),{"data-state":(r=M(t).modelValue)?.value?`checked`:`unchecked`,"data-disabled":M(t).disabled.value?``:void 0,"as-child":e.asChild,as:e.as},{default:P(()=>[k(e.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`])}}});var lt=f({__name:`Checkbox`,props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let t=N(e,`modelValue`);return(e,n)=>(w(),s(M(st),{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,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:P(()=>[d(M(ct),{"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`]))}}),ut=lt;const dt={flex:`~ col gap-4`},ft={flex:`~ row`,"items-center":``,"gap-2":``},pt={flex:`1`},mt={class:`flex items-center gap-1 text-sm font-medium`},ht={class:`text-xs text-neutral-500 dark:text-neutral-400`};var gt=f({__name:`FieldCheckbox`,props:_({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(e,r)=>(w(),l(`label`,dt,[o(`div`,ft,[o(`div`,pt,[o(`div`,mt,j(t.label),1),o(`div`,ht,j(t.description),1)]),d(ut,{modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e},null,8,[`modelValue`])])]))}}),_t=gt;const vt=[`type`];var yt=f({__name:`Input`,props:_({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(e,r)=>F((w(),l(`input`,{"onUpdate:modelValue":r[0]||=e=>n.value=e,type:t.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,vt)),[[oe,n.value]])}}),bt=yt;const xt={"max-w-full":``},St={flex:`~ col gap-4`},Ct={class:`flex items-center gap-1 text-sm font-medium`},wt={key:0,class:`text-red-500`},Tt={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},Et=[`type`,`placeholder`];var Dt=f({__name:`FieldInput`,props:_({label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null,singleLine:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(r,i)=>(w(),l(`div`,xt,[o(`label`,St,[o(`div`,null,[o(`div`,Ct,[u(j(t.label)+` `,1),t.required===!1?c(``,!0):(w(),l(`span`,wt,`*`))]),o(`div`,Tt,j(t.description),1)]),e.singleLine?(w(),s(bt,{key:0,modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,type:t.type,placeholder:t.placeholder,class:b(t.inputClass)},null,8,[`modelValue`,`type`,`placeholder`,`class`])):F((w(),l(`textarea`,{key:1,"onUpdate:modelValue":i[1]||=e=>n.value=e,type:t.type,placeholder:t.placeholder,class:b(t.inputClass),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,10,Et)),[[se,n.value]])])]))}}),Ot=Dt;const kt={flex:`~ gap-2`};var At=f({__name:`InputKeyValue`,props:_({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:[`update:propertyKey`,`update:propertyValue`],setup(e){let t=e,n=N(e,`propertyKey`),r=N(e,`propertyValue`);return(e,i)=>(w(),l(`div`,kt,[d(bt,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,placeholder:t.keyPlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`]),d(bt,{modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,placeholder:t.valuePlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`])]))}}),jt=At;const Mt={"max-w-full":``},Nt={flex:`~ col gap-2`},Pt={class:`flex items-center gap-1 text-sm font-medium`},Ft={key:0,class:`text-red-500`},It={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},Lt={flex:`~ col gap-2`},Rt=[`onClick`];var zt=f({__name:`FieldKeyValues`,props:_({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:_([`remove`,`add`],[`update:modelValue`]),setup(e,{emit:n}){let r=e,i=n,a=N(e,`modelValue`),s=D(``),f=D(``);return ce([s,f],()=>{i(`add`,s.value,f.value)}),(e,n)=>{let s=te(`auto-animate`);return w(),l(`div`,Mt,[o(`label`,Nt,[o(`div`,null,[o(`div`,Pt,[u(j(r.label)+` `,1),r.required===!1?c(``,!0):(w(),l(`span`,Ft,`*`))]),o(`div`,It,j(r.description),1)]),F((w(),l(`div`,Lt,[(w(!0),l(t,null,O(a.value,(e,t)=>(w(),l(`div`,{key:t,"w-full":``,flex:``,"items-center":``,"gap-2":``},[d(jt,{"property-key":e.key,"onUpdate:propertyKey":t=>e.key=t,"property-value":e.value,"onUpdate:propertyValue":t=>e.value=t,"key-placeholder":r.keyPlaceholder,"value-placeholder":r.valuePlaceholder,"w-full":``},null,8,[`property-key`,`onUpdate:propertyKey`,`property-value`,`onUpdate:propertyValue`,`key-placeholder`,`value-placeholder`]),o(`button`,{onClick:e=>i(`remove`,t)},n[0]||=[o(`div`,{"i-solar:minus-circle-line-duotone":``,size:`6`},null,-1)],8,Rt)]))),128))])),[[s]])])])}}}),Bt=zt;const Vt=[`min`,`max`,`step`];var Ht=f({__name:`Range`,props:_({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(e){let t=e,n=N(e,`modelValue`),r=i(()=>t.min*1e4),a=i(()=>t.max*1e4),o=i(()=>t.step*1e4),s=D(),c=i({get:()=>n.value*1e4,set:e=>{n.value=e/1e4,u()}});C(()=>{u()});function u(){s.value&&(s.value.style.setProperty(`--value`,s.value.value),s.value.style.setProperty(`--min`,s.value.min?s.value.min:t.min.toString()),s.value.style.setProperty(`--max`,s.value.max?s.value.max:t.max.toString()))}function d(e){let t=e.target;t.style.setProperty(`--value`,t.value)}return(e,t)=>F((w(),l(`input`,{ref_key:`sliderRef`,ref:s,"onUpdate:modelValue":t[0]||=e=>c.value=e,type:`range`,min:r.value,max:a.value,step:o.value,class:`slider-progress form_input-range`,onInput:d},null,40,Vt)),[[se,c.value,void 0,{number:!0}]])}}),Ut=n(Ht,[[`__scopeId`,`data-v-c59a94f0`]]);const Wt={flex:`~ col gap-4`},Gt={flex:`~ row`,"items-center":``,"gap-2":``},Kt={flex:`1`},qt={class:`flex items-center gap-1 text-sm font-medium`},Jt={class:`text-xs text-neutral-500 dark:text-neutral-400`},Yt={"font-mono":``},Xt={flex:`~ row`,"items-center":``,"gap-2":``};var Zt=f({__name:`FieldRange`,props:_({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(r,i)=>{var a;return w(),l(`label`,Wt,[o(`div`,Gt,[o(`div`,Kt,[o(`div`,qt,j(e.label),1),o(`div`,Jt,j(e.description),1)]),o(`span`,Yt,j((a=t.formatValue)?.call(t,n.value)||n.value),1)]),o(`div`,Xt,[d(Ut,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,min:e.min||0,max:e.max||1,step:e.step||.01,"w-full":``},null,8,[`modelValue`,`min`,`max`,`step`])])])}}}),Qt=Zt;const $t={flex:`~ col gap-4`},en={flex:`1`},tn={class:`flex items-center gap-1 text-sm font-medium`},nn={class:`text-xs text-neutral-500 dark:text-neutral-400`};var rn=f({__name:`FieldSelect`,props:_({label:null,description:null,options:null,placeholder:null,disabled:{type:Boolean},layout:null},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(r,i)=>(w(),l(`label`,$t,[o(`div`,{class:b([t.layout===`horizontal`?`flex flex-row items-center justify-between gap-2`:`flex flex-col items-start justify-center gap-2`])},[o(`div`,en,[o(`div`,tn,j(t.label),1),o(`div`,nn,j(t.description),1)]),k(r.$slots,`default`,{},()=>[d(M(Mi),{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,options:t.options,placeholder:t.placeholder,disabled:t.disabled,title:e.label},{default:P(({value:e})=>{var n;return[u(j(((n=t.options)==null||(n=n.find(t=>t.value===e))==null?void 0:n.label)||t.placeholder),1)]}),_:1},8,[`modelValue`,`options`,`placeholder`,`disabled`,`title`])])],2)]))}}),an=rn;const on={class:`max-w-full`},sn={class:`flex flex-col gap-2`},cn={class:`flex items-center gap-1 text-sm font-medium`},ln={key:0,class:`text-red-500`},un={class:`text-nowrap text-xs text-neutral-500 dark:text-neutral-400`},dn={class:`~ col gap-2`},fn=[`onClick`];var pn=f({__name:`FieldValues`,props:_({label:null,description:null,name:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:_([`remove`,`add`],[`update:modelValue`]),setup(e,{emit:n}){let r=e,i=n,a=N(e,`modelValue`);function s(){a.value.push(``),i(`add`)}function f(e){a.value.splice(e,1),i(`remove`,e)}return(e,n)=>{let i=te(`auto-animate`);return w(),l(`div`,on,[o(`label`,sn,[o(`div`,null,[o(`div`,cn,[u(j(r.label)+` `,1),r.required===!1?c(``,!0):(w(),l(`span`,ln,`*`))]),o(`div`,un,j(r.description),1)]),F((w(),l(`div`,dn,[(w(!0),l(t,null,O(a.value,(e,t)=>(w(),l(`div`,{key:t,class:`w-full flex items-center gap-2`},[d(bt,{modelValue:a.value[t],"onUpdate:modelValue":e=>a.value[t]=e,placeholder:r.valuePlaceholder,class:`w-90%`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`]),o(`button`,{"i-solar:minus-circle-line-duotone":``,size:`6`,class:`min-w-20px w-10% flex text-red-500`,onClick:e=>f(t)},null,8,fn)]))),128)),o(`div`,{"i-solar:add-circle-line-duotone":``,size:`6`,class:`mt-2 w-4/5 text-blue-500`,onClick:s})])),[[i]])])])}}}),mn=pn;const hn=[`disabled`];var gn=f({__name:`ColorHueRange`,props:_({disabled:{type:Boolean},class:null},{colorValue:{type:String,default:``},colorValueModifiers:{}}),emits:[`update:colorValue`],setup(e){let t=e,n=N(e,`colorValue`);return(e,r)=>F((w(),l(`input`,{"onUpdate:modelValue":r[0]||=e=>n.value=e,type:`range`,min:`0`,max:`360`,step:`0.01`,class:b([`color-hue-range`,[t.disabled?`opacity-25 cursor-not-allowed`:`cursor-pointer`,t.class||``]]),transition:`all ease-in-out duration-250`,disabled:t.disabled},null,10,hn)),[[se,n.value]])}}),_n=n(gn,[[`__scopeId`,`data-v-ae80cb9d`]]),vn=f({__name:`Option`,props:{value:null,label:null,active:{type:Boolean}},setup(e){let t=e,n=g(`selectOption`),r=g(`hide`);return(e,i)=>(w(),l(`div`,v({...e.$attrs,class:null,style:null},{class:[`cursor-pointer rounded px-2 py-1 text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800`,{"bg-neutral-100 dark:bg-neutral-800":t.active}],"line-clamp-1":``,"overflow-hidden":``,"text-ellipsis":``,"whitespace-pre-wrap":``,"text-xs":``,"transition-colors":``,"duration-150":``,"ease-in-out":``,"will-change-background-color":``,"will-change-color":``,onClick:i[0]||=()=>{M(n)(t.value),M(r)()}}),[k(e.$slots,`default`,{},()=>[u(j(t.label),1)])],16))}}),yn=vn;function H(e){var t;return(t=e.ownerDocument)?.defaultView||window}function U(e){return H(e).getComputedStyle(e)}const bn=Math.min,xn=Math.max,Sn=Math.round;function Cn(e){let t=U(e),n=parseFloat(t.width),r=parseFloat(t.height),i=e.offsetWidth,a=e.offsetHeight,o=Sn(n)!==i||Sn(r)!==a;return o&&(n=i,r=a),{width:n,height:r,fallback:o}}function W(e){return En(e)?(e.nodeName||``).toLowerCase():``}let wn;function Tn(){if(wn)return wn;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(wn=e.brands.map(e=>e.brand+`/`+e.version).join(` `),wn):navigator.userAgent}function G(e){return e instanceof H(e).HTMLElement}function K(e){return e instanceof H(e).Element}function En(e){return e instanceof H(e).Node}function Dn(e){return typeof ShadowRoot>`u`?!1:e instanceof H(e).ShadowRoot||e instanceof ShadowRoot}function On(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function kn(e){return[`table`,`td`,`th`].includes(W(e))}function An(e){let t=/firefox/i.test(Tn()),n=U(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!==`none`||n.perspective!==`none`||!!r&&r!==`none`||t&&n.willChange===`filter`||t&&!!n.filter&&n.filter!==`none`||[`transform`,`perspective`].some(e=>n.willChange.includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>{let t=n.contain;return t!=null&&t.includes(e)})}function jn(){return!/^((?!chrome|android).)*safari/i.test(Tn())}function Mn(e){return[`html`,`body`,`#document`].includes(W(e))}function Nn(e){return K(e)?e:e.contextElement}const Pn={x:1,y:1};function Fn(e){let t=Nn(e);if(!G(t))return Pn;let n=t.getBoundingClientRect(),{width:r,height:i,fallback:a}=Cn(t),o=(a?Sn(n.width):n.width)/r,s=(a?Sn(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}function In(e,t,n,r){var i,a;t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),s=Nn(e),c=Pn;t&&(r?K(r)&&(c=Fn(r)):c=Fn(e));let l=s?H(s):window,u=!jn()&&n,d=(o.left+(u&&(i=l.visualViewport)?.offsetLeft||0))/c.x,f=(o.top+(u&&(a=l.visualViewport)?.offsetTop||0))/c.y,p=o.width/c.x,m=o.height/c.y;if(s){let e=H(s),t=r&&K(r)?H(r):r,n=e.frameElement;for(;n&&r&&t!==e;){let e=Fn(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,d*=e.x,f*=e.y,p*=e.x,m*=e.y,d+=t.x,f+=t.y,n=H(n).frameElement}}return{width:p,height:m,top:f,right:d+p,bottom:f+m,left:d,x:d,y:f}}function q(e){return((En(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ln(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Rn(e){return In(q(e)).left+Ln(e).scrollLeft}function zn(e){if(W(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Dn(e)&&e.host||q(e);return Dn(t)?t.host:t}function Bn(e){let t=zn(e);return Mn(t)?t.ownerDocument.body:G(t)&&On(t)?t:Bn(t)}function Vn(e,t){var n;t===void 0&&(t=[]);let r=Bn(e),i=r===(n=e.ownerDocument)?.body,a=H(r);return i?t.concat(a,a.visualViewport||[],On(r)?r:[]):t.concat(r,Vn(r))}function Hn(e,t,n){return t===`viewport`?Ne(function(e,t){let n=H(e),r=q(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=jn();(e||!e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}(e,n)):K(t)?Ne(function(e,t){let n=In(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=G(e)?Fn(e):{x:1,y:1};return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}(t,n)):Ne(function(e){let t=q(e),n=Ln(e),r=e.ownerDocument.body,i=xn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=xn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Rn(e),s=-n.scrollTop;return U(r).direction===`rtl`&&(o+=xn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}(q(e)))}function Un(e){return G(e)&&U(e).position!==`fixed`?e.offsetParent:null}function Wn(e){let t=H(e),n=Un(e);for(;n&&kn(n)&&U(n).position===`static`;)n=Un(n);return n&&(W(n)===`html`||W(n)===`body`&&U(n).position===`static`&&!An(n))?t:n||function(e){let t=zn(e);for(;G(t)&&!Mn(t);){if(An(t))return t;t=zn(t)}return null}(e)||t}function Gn(e,t,n){let r=G(t),i=q(t),a=In(e,!0,n===`fixed`,t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&n!==`fixed`)if((W(t)!==`body`||On(i))&&(o=Ln(t)),G(t)){let e=In(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=Rn(i));return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}const Kn={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=n===`clippingAncestors`?function(e,t){let n=t.get(e);if(n)return n;let r=Vn(e).filter(e=>K(e)&&W(e)!==`body`),i=null,a=U(e).position===`fixed`,o=a?zn(e):e;for(;K(o)&&!Mn(o);){let e=U(o),t=An(o);(a?t||i:t||e.position!==`static`||!i||![`absolute`,`fixed`].includes(i.position))?i=e:r=r.filter(e=>e!==o),o=zn(o)}return t.set(e,r),r}(t,this._c):[].concat(n),o=[...a,r],s=o[0],c=o.reduce((e,n)=>{let r=Hn(t,n,i);return e.top=xn(r.top,e.top),e.right=bn(r.right,e.right),e.bottom=bn(r.bottom,e.bottom),e.left=xn(r.left,e.left),e},Hn(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=G(n),a=q(n);if(n===a)return t;let o={scrollLeft:0,scrollTop:0},s={x:1,y:1},c={x:0,y:0};if((i||!i&&r!==`fixed`)&&((W(n)!==`body`||On(a))&&(o=Ln(n)),G(n))){let e=In(n);s=Fn(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-o.scrollLeft*s.x+c.x,y:t.y*s.y-o.scrollTop*s.y+c.y}},isElement:K,getDimensions:function(e){return G(e)?Cn(e):e.getBoundingClientRect()},getOffsetParent:Wn,getDocumentElement:q,getScale:Fn,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e,i=this.getOffsetParent||Wn,a=this.getDimensions;return{reference:Gn(t,await i(n),r),floating:{x:0,y:0,...await a(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>U(e).direction===`rtl`},qn=(e,t,n)=>{let r=new Map,i={platform:Kn,...n},a={...i.platform,_c:r};return Fe(e,t,{...i,platform:a})},J={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 Jn(e,t){let n=J.themes[e]||{},r;do r=n[t],typeof r>`u`?n.$extend?n=J.themes[n.$extend]||{}:(n=null,r=J[t]):n=null;while(n);return r}function Yn(e){let t=[e],n=J.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=J.themes[n.$extend]||{}):n=null;while(n);return t.map(e=>`v-popper--theme-${e}`)}function Xn(e){let t=[e],n=J.themes[e]||{};do n.$extend?(t.push(n.$extend),n=J.themes[n.$extend]||{}):n=null;while(n);return t}let Zn=!1;if(typeof window<`u`){Zn=!1;try{let e=Object.defineProperty({},`passive`,{get(){Zn=!0}});window.addEventListener(`test`,null,e)}catch{}}let Qn=!1;typeof window<`u`&&typeof navigator<`u`&&(Qn=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const $n=[`auto`,`top`,`bottom`,`left`,`right`].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),er={hover:`mouseenter`,focus:`focus`,click:`click`,touch:`touchstart`,pointer:`pointerdown`},tr={hover:`mouseleave`,focus:`blur`,click:`click`,touch:`touchend`,pointer:`pointerup`};function nr(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}function rr(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const Y=[];let X=null;const ir={};function ar(e){let t=ir[e];return t||=ir[e]=[],t}let or=function(){};typeof window<`u`&&(or=window.Element);function Z(e){return function(t){return Jn(t.theme,e)}}const sr=`__floating-vue__popper`,cr=()=>f({name:`VPopper`,provide(){return{[sr]:{parentPopper:this}}},inject:{[sr]:{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:Z(`disabled`)},positioningDisabled:{type:Boolean,default:Z(`positioningDisabled`)},placement:{type:String,default:Z(`placement`),validator:e=>$n.includes(e)},delay:{type:[String,Number,Object],default:Z(`delay`)},distance:{type:[Number,String],default:Z(`distance`)},skidding:{type:[Number,String],default:Z(`skidding`)},triggers:{type:Array,default:Z(`triggers`)},showTriggers:{type:[Array,Function],default:Z(`showTriggers`)},hideTriggers:{type:[Array,Function],default:Z(`hideTriggers`)},popperTriggers:{type:Array,default:Z(`popperTriggers`)},popperShowTriggers:{type:[Array,Function],default:Z(`popperShowTriggers`)},popperHideTriggers:{type:[Array,Function],default:Z(`popperHideTriggers`)},container:{type:[String,Object,or,Boolean],default:Z(`container`)},boundary:{type:[String,or],default:Z(`boundary`)},strategy:{type:String,validator:e=>[`absolute`,`fixed`].includes(e),default:Z(`strategy`)},autoHide:{type:[Boolean,Function],default:Z(`autoHide`)},handleResize:{type:Boolean,default:Z(`handleResize`)},instantMove:{type:Boolean,default:Z(`instantMove`)},eagerMount:{type:Boolean,default:Z(`eagerMount`)},popperClass:{type:[String,Array,Object],default:Z(`popperClass`)},computeTransformOrigin:{type:Boolean,default:Z(`computeTransformOrigin`)},autoMinSize:{type:Boolean,default:Z(`autoMinSize`)},autoSize:{type:[Boolean,String],default:Z(`autoSize`)},autoMaxSize:{type:Boolean,default:Z(`autoMaxSize`)},autoBoundaryMaxSize:{type:Boolean,default:Z(`autoBoundaryMaxSize`)},preventOverflow:{type:Boolean,default:Z(`preventOverflow`)},overflowPadding:{type:[Number,String],default:Z(`overflowPadding`)},arrowPadding:{type:[Number,String],default:Z(`arrowPadding`)},arrowOverflow:{type:Boolean,default:Z(`arrowOverflow`)},flip:{type:Boolean,default:Z(`flip`)},shift:{type:Boolean,default:Z(`shift`)},shiftCrossAxis:{type:Boolean,default:Z(`shiftCrossAxis`)},noAutoFocus:{type:Boolean,default:Z(`noAutoFocus`)},disposeTimeout:{type:Number,default:Z(`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.randomId:this.ariaId},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[sr])?.parentPopper},hasPopperShowTriggerHover(){var e,t;return(e=this.popperTriggers)?.includes(`hover`)||(t=this.popperShowTriggers)?.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:n=!1}={}){var r,i;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&((i=this.parentPopper)?.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 n;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}(n=this.parentPopper)?.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)?.call(this)??this.$el,this.$_targetNodes=this.targetNodes().filter(e=>e.nodeType===e.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;let e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(We({mainAxis:this.distance,crossAxis:this.skidding}));let t=this.placement.startsWith(`auto`);if(t?e.middleware.push(Re({alignment:this.placement.split(`-`)[1]??``})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(Ge({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(ze({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Ie({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:`arrowOverflow`,fn:({placement:e,rects:t,middlewareData:n})=>{let r,{centerOffset:i}=n.arrow;return r=e.startsWith(`top`)||e.startsWith(`bottom`)?Math.abs(i)>t.reference.width/2:Math.abs(i)>t.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){let t=this.autoSize?this.autoSize:this.autoMinSize?`min`:null;e.middleware.push({name:`autoSize`,fn:({rects:e,placement:n,middlewareData:r})=>{var i;if((i=r.autoSize)!=null&&i.skip)return{};let a,o;return n.startsWith(`top`)||n.startsWith(`bottom`)?a=e.reference.width:o=e.reference.height,this.$_innerNode.style[t===`min`?`minWidth`:t===`max`?`maxWidth`:`width`]=a==null?null:`${a}px`,this.$_innerNode.style[t===`min`?`minHeight`:t===`max`?`maxHeight`:`height`]=o==null?null:`${o}px`,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(qe({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:e,availableHeight:t})=>{this.$_innerNode.style.maxWidth=e==null?null:`${e}px`,this.$_innerNode.style.maxHeight=t==null?null:`${t}px`}})));let n=await qn(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),X&&this.instantMove&&X.instantMove&&X!==this.parentPopper){X.$_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&&(X=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay(`hide`))},$_computeDelay(e){let 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 rr(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Vn(this.$_referenceNode),...Vn(this.$_popperNode)],`scroll`,()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){let e=this.$_referenceNode.getBoundingClientRect(),t=this.$_popperNode.querySelector(`.v-popper__wrapper`),n=t.parentNode.getBoundingClientRect(),r=e.x+e.width/2-(n.left+t.offsetLeft),i=e.y+e.height/2-(n.top+t.offsetTop);this.result.transformOrigin=`${r}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":``});let e=this.showGroup;if(e){let t;for(let n=0;n0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,nr(Y,this),Y.length===0&&document.body.classList.remove(`v-popper--some-open`);for(let e of Xn(this.theme)){let t=ar(e);nr(t,this),t.length===0&&document.body.classList.remove(`v-popper--some-open--${e}`)}X===this&&(X=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);let 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 rr(),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 Error(`No container for popover: `+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){let e=e=>{this.isShown&&!this.$_hideInProgress||(e.usedByTooltip=!0,!this.$_preventShow&&this.show({event:e}))};this.$_registerTriggerListeners(this.$_targetNodes,er,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],er,this.popperTriggers,this.popperShowTriggers,e);let t=e=>{e.usedByTooltip||this.hide({event:e})};this.$_registerTriggerListeners(this.$_targetNodes,tr,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],tr,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(e=>e.addEventListener(t,n,Zn?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,r,i){let a=n;r!=null&&(a=typeof r==`function`?r(a):r),a.forEach(n=>{let r=t[n];r&&this.$_registerEventListeners(e,r,i)})},$_removeEventListeners(e){let t=[];this.$_events.forEach(n=>{let{targetNodes:r,eventType:i,handler:a}=n;!e||e===i?r.forEach(e=>e.removeEventListener(i,a)):t.push(n)}),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(let n of this.$_targetNodes){let r=n.getAttribute(e);r&&(n.removeAttribute(e),n.setAttribute(t,r))}},$_applyAttrsToTarget(e){for(let t of this.$_targetNodes)for(let n in e){let r=e[n];r==null?t.removeAttribute(n):t.setAttribute(n,r)}},$_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(){let e=this.$_referenceNode.getBoundingClientRect();if(hr>=e.left&&hr<=e.right&&gr>=e.top&&gr<=e.bottom){let e=this.$_popperNode.getBoundingClientRect(),t=hr-Q,n=gr-$,r=e.left+e.width/2-Q+(e.top+e.height/2)-$+e.width+e.height,i=Q+t*r,a=$+n*r;return _r(Q,$,i,a,e.left,e.top,e.left,e.bottom)||_r(Q,$,i,a,e.left,e.top,e.right,e.top)||_r(Q,$,i,a,e.right,e.top,e.right,e.bottom)||_r(Q,$,i,a,e.left,e.bottom,e.right,e.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<`u`&&typeof window<`u`){if(Qn){let e=Zn?{passive:!0,capture:!0}:!0;document.addEventListener(`touchstart`,e=>lr(e,!0),e),document.addEventListener(`touchend`,e=>ur(e,!0),e)}else window.addEventListener(`mousedown`,e=>lr(e,!1),!0),window.addEventListener(`click`,e=>ur(e,!1),!0);window.addEventListener(`resize`,mr)}function lr(e,t){if(J.autoHideOnMousedown)dr(e,t);else for(let t=0;t=0;r--){let i=Y[r];try{let r=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(e.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&fr(i,r,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&r){let e=i.parentPopper;for(;e;)n[e.randomId]=!0,e=e.parentPopper;return}let a=i.parentPopper;for(;a&&fr(a,a.containsGlobalTarget,e);)a.$_handleGlobalClose(e,t),a=a.parentPopper}})}catch{}}}function fr(e,t,n){return n.closeAllPopover||n.closePopover&&t||pr(e,n)&&!t}function pr(e,t){if(typeof e.autoHide==`function`){let n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function mr(){for(let e=0;e{Q=hr,$=gr,hr=e.clientX,gr=e.clientY},Zn?{passive:!0}:void 0);function _r(e,t,n,r,i,a,o,s){let c=((o-i)*(t-a)-(s-a)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t)),l=((n-e)*(t-a)-(r-t)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t));return c>=0&&c<=1&&l>=0&&l<=1}const vr={extends:cr()},yr=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function br(e,t,n,r,i,a){return w(),l(`div`,{ref:`reference`,class:b([`v-popper`,{"v-popper--shown":e.slotData.isShown}])},[k(e.$slots,`default`,x(m(e.slotData)))],2)}const xr=yr(vr,[[`render`,br]]);function Sr(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);var n=e.indexOf(`Trident/`);if(n>0){var r=e.indexOf(`rv:`);return parseInt(e.substring(r+3,e.indexOf(`.`,r)),10)}var i=e.indexOf(`Edge/`);return i>0?parseInt(e.substring(i+5,e.indexOf(`.`,i)),10):-1}let Cr;function wr(){wr.init||(wr.init=!0,Cr=Sr()!==-1)}var Tr={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){wr(),y(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,Cr&&this.$el.appendChild(e),e.data=`about:blank`,Cr||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&&(!Cr&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Er=de(`data-v-b329ee4c`);ee(`data-v-b329ee4c`);const Dr={class:`resize-observer`,tabindex:`-1`};T();const Or=Er((e,t,n,r,i,a)=>(w(),s(`div`,Dr)));Tr.render=Or,Tr.__scopeId=`data-v-b329ee4c`,Tr.__file=`src/components/ResizeObserver.vue`;const kr=(e=`theme`)=>({computed:{themeClass(){return Yn(this[e])}}}),Ar=f({name:`VPopperContent`,components:{ResizeObserver:Tr},mixins:[kr()],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}}}),jr=[`id`,`aria-hidden`,`tabindex`,`data-popper-placement`],Mr={ref:`inner`,class:`v-popper__inner`},Nr=o(`div`,{class:`v-popper__arrow-outer`},null,-1),Pr=o(`div`,{class:`v-popper__arrow-inner`},null,-1),Fr=[Nr,Pr];function Ir(e,n,r,i,a,u){let d=A(`ResizeObserver`);return w(),l(`div`,{id:e.popperId,ref:`popover`,class:b([`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:S(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:n[2]||=le(t=>e.autoHide&&e.$emit(`hide`),[`esc`])},[o(`div`,{class:`v-popper__backdrop`,onClick:n[0]||=t=>e.autoHide&&e.$emit(`hide`)}),o(`div`,{class:`v-popper__wrapper`,style:S(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[o(`div`,Mr,[e.mounted?(w(),l(t,{key:0},[o(`div`,null,[k(e.$slots,`default`)]),e.handleResize?(w(),s(d,{key:0,onNotify:n[1]||=t=>e.$emit(`resize`,t)})):c(``,!0)],64)):c(``,!0)],512),o(`div`,{ref:`arrow`,class:`v-popper__arrow-container`,style:S(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Fr,4)],4)],46,jr)}const Lr=yr(Ar,[[`render`,Ir]]),Rr={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 zr=function(){};typeof window<`u`&&(zr=window.Element);const Br=f({name:`VPopperWrapper`,components:{Popper:xr,PopperContent:Lr},mixins:[Rr,kr(`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,zr,Boolean],default:void 0},boundary:{type:[String,zr],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 Vr(e,t,n,r,i,a){let o=A(`PopperContent`),c=A(`Popper`);return w(),s(c,v({ref:`popper`},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||=()=>e.$emit(`show`),onHide:t[1]||=()=>e.$emit(`hide`),"onUpdate:shown":t[2]||=t=>e.$emit(`update:shown`,t),onApplyShow:t[3]||=()=>e.$emit(`apply-show`),onApplyHide:t[4]||=()=>e.$emit(`apply-hide`),onCloseGroup:t[5]||=()=>e.$emit(`close-group`),onCloseDirective:t[6]||=()=>e.$emit(`close-directive`),onAutoHide:t[7]||=()=>e.$emit(`auto-hide`),onResize:t[8]||=()=>e.$emit(`resize`)}),{default:P(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,show:s,hide:c,handleResize:l,onResize:u,classes:f,result:p})=>[k(e.$slots,`default`,{shown:n,show:s,hide:c}),d(o,{ref:`popperContent`,"popper-id":t,theme:e.finalTheme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":l,classes:f,result:p,onHide:c,onResize:u},{default:P(()=>[k(e.$slots,`popper`,{shown:n,hide:c})]),_: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 Hr=yr(Br,[[`render`,Vr]]),Ur={...Hr,name:`VDropdown`,vPopperTheme:`dropdown`},Wr={...Hr,name:`VMenu`,vPopperTheme:`menu`},Gr={...Hr,name:`VTooltip`,vPopperTheme:`tooltip`},Kr=f({name:`VTooltipDirective`,components:{Popper:cr(),PopperContent:Lr},mixins:[Rr],inheritAttrs:!1,props:{theme:{type:String,default:`tooltip`},html:{type:Boolean,default:e=>Jn(e.theme,`html`)},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Jn(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;let e=++this.$_fetchId,t=this.content(this);t.then?t.then(t=>this.onResult(e,t)):this.onResult(e,t)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),qr=[`innerHTML`],Jr=[`textContent`];function Yr(e,t,n,r,i,a){let o=A(`PopperContent`),c=A(`Popper`);return w(),s(c,v({ref:`popper`},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:P(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,hide:s,handleResize:c,onResize:u,classes:f,result:p})=>[d(o,{ref:`popperContent`,class:b({"v-popper--tooltip-loading":e.loading}),"popper-id":t,theme:e.theme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":c,classes:f,result:p,onHide:s,onResize:u},{default:P(()=>[e.html?(w(),l(`div`,{key:0,innerHTML:e.finalContent},null,8,qr)):(w(),l(`div`,{key:1,textContent:j(e.finalContent)},null,8,Jr))]),_:2},1032,[`class`,`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:1},16,[`theme`,`target-nodes`,`popper-node`,`onApplyShow`,`onApplyHide`])}const Xr=yr(Kr,[[`render`,Yr]]),Zr=`v-popper--has-tooltip`;function Qr(e,t){let n=e.placement;if(!n&&t)for(let e of $n)t[e]&&(n=e);return n||=Jn(e.theme||`tooltip`,`placement`),n}function $r(e,t,n){let r,i=typeof t;return r=i===`string`?{content:t}:t&&i===`object`?t:{content:!1},r.placement=Qr(r,n),r.targetNodes=()=>[e],r.referenceNode=()=>e,r}let ei,ti,ni=0;function ri(){if(ei)return;ti=D([]),ei=a({name:`VTooltipDirectiveApp`,setup(){return{directives:ti}},render(){return this.directives.map(e=>h(Xr,{...e.options,shown:e.shown||e.options.shown,key:e.id}))},devtools:{hide:!0}});let e=document.createElement(`div`);document.body.appendChild(e),ei.mount(e)}function ii(e,t,n){ri();let r=D($r(e,t,n)),i=D(!1),a={id:ni++,options:r,shown:i};return ti.value.push(a),e.classList&&e.classList.add(Zr),e.$_popper={options:r,item:a,show(){i.value=!0},hide(){i.value=!1}}}function ai(e){if(e.$_popper){let t=ti.value.indexOf(e.$_popper.item);t!==-1&&ti.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Zr)}function oi(e,{value:t,modifiers:n}){let r=$r(e,t,n);if(!r.content||Jn(r.theme||`tooltip`,`disabled`))ai(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=r):i=ii(e,t,n),typeof t.shown<`u`&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}const si={beforeMount:oi,updated:oi,beforeUnmount(e){ai(e)}};function ci(e){e.addEventListener(`mousedown`,ui),e.addEventListener(`click`,ui),e.addEventListener(`touchstart`,di,Zn?{passive:!0}:!1)}function li(e){e.removeEventListener(`mousedown`,ui),e.removeEventListener(`click`,ui),e.removeEventListener(`touchstart`,di),e.removeEventListener(`touchend`,fi),e.removeEventListener(`touchcancel`,pi)}function ui(e){let t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function di(e){if(e.changedTouches.length===1){let t=e.currentTarget;t.$_vclosepopover_touch=!0;let n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener(`touchend`,fi),t.addEventListener(`touchcancel`,pi)}}function fi(e){let t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){let n=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function pi(e){let t=e.currentTarget;t.$_vclosepopover_touch=!1}const mi={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>`u`||t)&&ci(e)},updated(e,{value:t,oldValue:n,modifiers:r}){e.$_closePopoverModifiers=r,t!==n&&(typeof t>`u`||t?ci(e):li(e))},beforeUnmount(e){li(e)}},hi=J,gi=si,_i=si,vi=mi,yi=mi,bi=Ur,xi=Wr,Si=cr,Ci=Lr,wi=Rr,Ti=Hr,Ei=kr,Di=Gr,Oi=Xr,ki={class:`flex-1 truncate`},Ai={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`};var ji=f({__name:`Select`,props:_({options:null,placeholder:null,disabled:{type:Boolean},title:null,layout:null},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=D(!1),i=N(e,`modelValue`);function a(e){i.value=e}function u(){r.value=!1}return E(`selectOption`,a),E(`hide`,u),(e,r)=>(w(),s(M(bi),{"auto-size":``,"auto-boundary-max-size":``,"w-full":``},{popper:P(({hide:r})=>[o(`div`,Ai,[k(e.$slots,`options`,{hide:r},()=>[n.options&&n.options.length?(w(!0),l(t,{key:0},O(n.options,e=>(w(),s(yn,{key:e.value,value:e.value,label:e.label,active:i.value===e.value,onClick:t=>{a(e.value),r()}},null,8,[`value`,`label`,`active`,`onClick`]))),128)):c(``,!0)])])]),default:P(()=>[o(`div`,{"min-w":`[160px]`,p:`2.5`,"w-full":``,class:b([`focus:ring-2 focus:ring-black/10`,[n.disabled?`pointer-events-none`:``]]),border:`~ dark:border-neutral-800`,text:`xs dark:neutral-200 disabled:neutral-400 dark:disabled:text-neutral-600 text-neutral-700`,bg:`white dark:neutral-900 disabled:neutral-100 hover:neutral-50 dark:disabled:neutral-800 dark:hover:neutral-800 `,cursor:`disabled:not-allowed pointer`,flex:``,"items-center":``,"gap-2":``,"rounded-lg":``,"shadow-sm":``,"outline-none":``,"transition-colors":``,"duration-150":``,"ease-in-out":``},[o(`div`,ki,[k(e.$slots,`default`,{value:i.value})]),r[0]||=o(`div`,{"i-solar:alt-arrow-down-linear":``,class:`h-3.5 w-3.5 text-neutral-500 dark:text-neutral-400`},null,-1)],2)]),_:3}))}}),Mi=ji;export{_n as ColorHueRange_default,_t as FieldCheckbox_default,Ot as FieldInput_default,Bt as FieldKeyValues_default,Qt as FieldRange_default,an as FieldSelect_default,mn as FieldValues_default,bt as Input_default,yn as Option_default,Mi as Select_default,Ie as arrow,Fe as computePosition,ve as createCoords,ze as flip,_e as floor,He as hide,Ke as limitShift,I as max,he as min,We as offset,Ne as rectToClientRect,ge as round,Ge as shift,qe as size}; \ No newline at end of file +import{Comment as e,Fragment as t,__plugin_vue_export_helper_default as n,cloneVNode as r,computed as i,createApp as a,createBaseVNode as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createTextVNode as u,createVNode as d,defineComponent as f,getCurrentInstance as p,guardReactiveProps as m,h,inject as g,mergeModels as _,mergeProps as v,nextTick as y,normalizeClass as b,normalizeProps as x,normalizeStyle as S,onMounted as C,openBlock as w,popScopeId as T,provide as E,pushScopeId as ee,ref as D,renderList as O,renderSlot as k,resolveComponent as A,resolveDirective as te,toDisplayString as j,toRefs as ne,toValue as re,unref as M,unrefElement$1 as ie,useModel as N,useVModel as ae,vModelDynamic as oe,vModelText as se,watch as ce,withCtx as P,withDirectives as F,withKeys as le,withModifiers as ue,withScopeId as de}from"./index-C-t5bjx6.js";const fe=[`top`,`right`,`bottom`,`left`],pe=[`start`,`end`],me=fe.reduce((e,t)=>e.concat(t,t+`-`+pe[0],t+`-`+pe[1]),[]),he=Math.min,I=Math.max,ge=Math.round,_e=Math.floor,ve=e=>({x:e,y:e}),ye={left:`right`,right:`left`,bottom:`top`,top:`bottom`},be={start:`end`,end:`start`};function xe(e,t,n){return I(e,he(t,n))}function L(e,t){return typeof e==`function`?e(t):e}function R(e){return e.split(`-`)[0]}function z(e){return e.split(`-`)[1]}function Se(e){return e===`x`?`y`:`x`}function Ce(e){return e===`y`?`height`:`width`}function B(e){return[`top`,`bottom`].includes(R(e))?`y`:`x`}function we(e){return Se(B(e))}function Te(e,t,n){n===void 0&&(n=!1);let r=z(e),i=we(e),a=Ce(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ae(o)),[o,Ae(o)]}function Ee(e){let t=Ae(e);return[De(e),t,De(t)]}function De(e){return e.replace(/start|end/g,e=>be[e])}function Oe(e,t,n){let r=[`left`,`right`],i=[`right`,`left`],a=[`top`,`bottom`],o=[`bottom`,`top`];switch(e){case`top`:case`bottom`:return n?t?i:r:t?r:i;case`left`:case`right`:return t?a:o;default:return[]}}function ke(e,t,n,r){let i=z(e),a=Oe(R(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(De)))),a}function Ae(e){return e.replace(/left|right|bottom|top/g,e=>ye[e])}function je(e){return{top:0,right:0,bottom:0,left:0,...e}}function Me(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:je(e)}function Ne(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Pe(e,t,n){let{reference:r,floating:i}=e,a=B(t),o=we(t),s=Ce(o),c=R(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(z(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}const Fe=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Pe(l,r,c),f=r,p={},m=0;for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=L(e,t)||{};if(l==null)return{};let d=Me(u),f={x:n,y:r},p=we(i),m=Ce(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=he(d[_],T),ee=he(d[v],T),D=E,O=C-h[m]-ee,k=C/2-h[m]/2+w,A=xe(D,k,O),te=!c.arrow&&z(i)!=null&&k!==A&&a.reference[m]/2-(kz(t)===e),...n.filter(t=>z(t)!==e)]:n.filter(e=>R(e)===e);return r.filter(n=>e?z(n)===e||(t?De(n)!==n:!1):!0)}const Re=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){var n,r,i;let{rects:a,middlewareData:o,placement:s,platform:c,elements:l}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=me,autoAlignment:p=!0,...m}=L(e,t),h=d!==void 0||f===me?Le(d||null,p,f):f,g=await V(t,m),_=(n=o.autoPlacement)?.index||0,v=h[_];if(v==null)return{};let y=Te(v,a,await(c.isRTL==null?void 0:c.isRTL(l.floating)));if(s!==v)return{reset:{placement:h[0]}};let b=[g[R(v)],g[y[0]],g[y[1]]],x=[...(r=o.autoPlacement)?.overflows||[],{placement:v,overflows:b}],S=h[_+1];if(S)return{data:{index:_+1,overflows:x},reset:{placement:S}};let C=x.map(e=>{let t=z(e.placement);return[e.placement,t&&u?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),w=C.filter(e=>e[2].slice(0,z(e[0])?2:3).every(e=>e<=0)),T=(i=w[0])?.[0]||C[0][0];return T===s?{}:{data:{index:_+1,overflows:x},reset:{placement:T}}}}},ze=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n,r;let{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p=`bestFit`,fallbackAxisSideDirection:m=`none`,flipAlignment:h=!0,...g}=L(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let _=R(i),v=B(s),y=R(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=f||(y||!h?[Ae(s)]:Ee(s)),S=m!==`none`;!f&&S&&x.push(...ke(s,h,m,b));let C=[s,...x],w=await V(t,g),T=[],E=(r=a.flip)?.overflows||[];if(u&&T.push(w[_]),d){let e=Te(i,o,b);T.push(w[e[0]],w[e[1]])}if(E=[...E,{placement:i,overflows:T}],!T.every(e=>e<=0)){var ee,D;let e=((ee=a.flip)?.index||0)+1,t=C[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=(D=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?.placement;if(!n)switch(p){case`bestFit`:{var O;let e=(O=E.filter(e=>{if(S){let t=B(e.placement);return t===v||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?.[0];e&&(n=e);break}case`initialPlacement`:n=s;break}if(i!==n)return{reset:{placement:n}}}return{}}}};function Be(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ve(e){return fe.some(t=>e[t]>=0)}const He=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=L(e,t);switch(r){case`referenceHidden`:{let e=await V(t,{...i,elementContext:`reference`}),r=Be(e,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Ve(r)}}}case`escaped`:{let e=await V(t,{...i,altBoundary:!0}),r=Be(e,n.floating);return{data:{escapedOffsets:r,escaped:Ve(r)}}}default:return{}}}}};async function Ue(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=R(n),s=z(n),c=B(n)===`y`,l=[`left`,`top`].includes(o)?-1:1,u=a&&c?-1:1,d=L(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}const We=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,c=await Ue(t,e);return o===(n=s.offset)?.placement&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},Ge=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=L(e,t),l={x:n,y:r},u=await V(t,c),d=B(R(i)),f=Se(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=xe(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=xe(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Ke=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=L(e,t),u={x:n,y:r},d=B(i),f=Se(d),p=u[f],m=u[d],h=L(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){var _,v;let e=f===`y`?`width`:`height`,t=[`top`,`left`].includes(R(i)),n=a.reference[d]-a.floating[e]+(t&&(_=o.offset)?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(v=o.offset)?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},qe=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=L(e,t),u=await V(t,l),d=R(i),f=z(i),p=B(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=he(h-u[g],v),x=he(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=I(u.left,0),t=I(u.right,0),n=I(u.top,0),r=I(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:I(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:I(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Je(e){return e?e.flatMap(e=>e.type===t?Je(e.children):[e]):[]}const Ye=f({name:`PrimitiveSlot`,inheritAttrs:!1,setup(t,{attrs:n,slots:i}){return()=>{var t;if(!i.default)return null;let a=Je(i.default()),o=a.findIndex(t=>t.type!==e);if(o===-1)return a;let s=a[o];(t=s.props)==null||delete t.ref;let c=s.props?v(n,s.props):n,l=r({...s,props:{}},c);return a.length===1?l:(a[o]=l,a)}}}),Xe=[`area`,`img`,`input`],Ze=f({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&Xe.includes(r)?()=>h(r,t):r===`template`?()=>h(Ye,t,{default:n.default}):()=>h(e.as,t,{default:n.default})}}),Qe=f({__name:`VisuallyHidden`,props:{feature:{default:`focusable`},asChild:{type:Boolean},as:{default:`span`}},setup(e){return(e,t)=>(w(),s(M(Ze),{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:P(()=>[k(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}});function $e(e,t){let n=typeof e==`string`&&!t?`${e}Context`:t,r=Symbol(n),i=t=>{let n=g(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},a=e=>(E(r,e),e);return[i,a]}function et(){let e=p(),t=D(),n=i(()=>{var e,n;return[`#text`,`#comment`].includes((e=t.value)?.$el.nodeName)?(n=t.value)?.$el.nextElementSibling:ie(t)}),r=Object.assign({},e.exposed),a={};for(let t in e.props)Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(a,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(a,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function o(n){t.value=n,n&&(Object.defineProperty(a,`$el`,{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),e.exposed=a)}return{forwardRef:o,currentRef:t,currentElement:n}}function tt(){let e=D(),t=i(()=>{var t,n;return[`#text`,`#comment`].includes((t=e.value)?.$el.nodeName)?(n=e.value)?.$el.nextElementSibling:ie(e)});return{primitiveElement:e,currentElement:t}}function nt(e){return i(()=>{var t;return re(e)?!!(t=ie(e))?.closest(`form`):!0})}const rt=f({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(e){let t=e,{primitiveElement:n,currentElement:r}=tt(),a=i(()=>t.checked??t.value);return ce(a,(e,t)=>{if(!r.value)return;let n=r.value,i=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(i,`value`),o=a.set;if(o&&e!==t){let t=new Event(`input`,{bubbles:!0}),r=new Event(`change`,{bubbles:!0});o.call(n,e),n.dispatchEvent(t),n.dispatchEvent(r)}}),(e,r)=>(w(),s(Qe,v({ref_key:`primitiveElement`,ref:n},{...t,...e.$attrs},{as:`input`}),null,16))}}),it=f({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(e){let n=e,r=i(()=>typeof n.value==`object`&&Array.isArray(n.value)&&n.value.length===0&&n.required),a=i(()=>typeof n.value==`string`||typeof n.value==`number`||typeof n.value==`boolean`?[{name:n.name,value:n.value}]:typeof n.value==`object`&&Array.isArray(n.value)?n.value.flatMap((e,t)=>typeof e==`object`?Object.entries(e).map(([e,r])=>({name:`[${n.name}][${t}][${e}]`,value:r})):{name:`[${n.name}][${t}]`,value:e}):n.value!==null&&typeof n.value==`object`&&!Array.isArray(n.value)?Object.entries(n.value).map(([e,t])=>({name:`[${n.name}][${e}]`,value:t})):[]);return(e,i)=>r.value?(w(),s(rt,v({key:e.name},{...n,...e.$attrs},{name:e.name,value:e.value}),null,16,[`name`,`value`])):(w(!0),l(t,{key:1},O(a.value,t=>(w(),s(rt,v({key:t.name,ref_for:!0},{...n,...e.$attrs},{name:t.name,value:t.value}),null,16,[`name`,`value`]))),128))}}),[at,ot]=$e(`SwitchRoot`),st=f({__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(e,{emit:t}){let n=e,r=t,{disabled:a}=ne(n),o=ae(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function l(){a.value||(o.value=!o.value)}let{forwardRef:u,currentElement:d}=et(),f=nt(d),p=i(()=>{var e;return n.id&&d.value?(e=document.querySelector(`[for="${n.id}"]`))?.innerText:void 0});return ot({modelValue:o,toggleCheck:l,disabled:a}),(e,t)=>(w(),s(M(Ze),v(e.$attrs,{id:e.id,ref:M(u),role:`switch`,type:e.as===`button`?`button`:void 0,value:e.value,"aria-label":e.$attrs[`aria-label`]||p.value,"aria-checked":M(o),"aria-required":e.required,"data-state":M(o)?`checked`:`unchecked`,"data-disabled":M(a)?``:void 0,"as-child":e.asChild,as:e.as,disabled:M(a),onClick:l,onKeydown:le(ue(l,[`prevent`]),[`enter`])}),{default:P(()=>[k(e.$slots,`default`,{modelValue:M(o)}),M(f)&&e.name?(w(),s(M(it),{key:0,type:`checkbox`,name:e.name,disabled:M(a),required:e.required,value:e.value,checked:!!M(o)},null,8,[`name`,`disabled`,`required`,`value`,`checked`])):c(``,!0)]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]))}}),ct=f({__name:`SwitchThumb`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(e){let t=at();return et(),(e,n)=>{var r;return w(),s(M(Ze),{"data-state":(r=M(t).modelValue)?.value?`checked`:`unchecked`,"data-disabled":M(t).disabled.value?``:void 0,"as-child":e.asChild,as:e.as},{default:P(()=>[k(e.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`])}}});var lt=f({__name:`Checkbox`,props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let t=N(e,`modelValue`);return(e,n)=>(w(),s(M(st),{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,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:P(()=>[d(M(ct),{"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`]))}}),ut=lt;const dt={flex:`~ col gap-4`},ft={flex:`~ row`,"items-center":``,"gap-2":``},pt={flex:`1`},mt={class:`flex items-center gap-1 text-sm font-medium`},ht={class:`text-xs text-neutral-500 dark:text-neutral-400`};var gt=f({__name:`FieldCheckbox`,props:_({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(e,r)=>(w(),l(`label`,dt,[o(`div`,ft,[o(`div`,pt,[o(`div`,mt,j(t.label),1),o(`div`,ht,j(t.description),1)]),d(ut,{modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e},null,8,[`modelValue`])])]))}}),_t=gt;const vt=[`type`];var yt=f({__name:`Input`,props:_({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(e,r)=>F((w(),l(`input`,{"onUpdate:modelValue":r[0]||=e=>n.value=e,type:t.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,vt)),[[oe,n.value]])}}),bt=yt;const xt={"max-w-full":``},St={flex:`~ col gap-4`},Ct={class:`flex items-center gap-1 text-sm font-medium`},wt={key:0,class:`text-red-500`},Tt={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},Et=[`type`,`placeholder`];var Dt=f({__name:`FieldInput`,props:_({label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null,singleLine:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(r,i)=>(w(),l(`div`,xt,[o(`label`,St,[o(`div`,null,[o(`div`,Ct,[u(j(t.label)+` `,1),t.required===!1?c(``,!0):(w(),l(`span`,wt,`*`))]),o(`div`,Tt,j(t.description),1)]),e.singleLine?(w(),s(bt,{key:0,modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,type:t.type,placeholder:t.placeholder,class:b(t.inputClass)},null,8,[`modelValue`,`type`,`placeholder`,`class`])):F((w(),l(`textarea`,{key:1,"onUpdate:modelValue":i[1]||=e=>n.value=e,type:t.type,placeholder:t.placeholder,class:b(t.inputClass),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,10,Et)),[[se,n.value]])])]))}}),Ot=Dt;const kt={flex:`~ gap-2`};var At=f({__name:`InputKeyValue`,props:_({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:[`update:propertyKey`,`update:propertyValue`],setup(e){let t=e,n=N(e,`propertyKey`),r=N(e,`propertyValue`);return(e,i)=>(w(),l(`div`,kt,[d(bt,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,placeholder:t.keyPlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`]),d(bt,{modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,placeholder:t.valuePlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`])]))}}),jt=At;const Mt={"max-w-full":``},Nt={flex:`~ col gap-2`},Pt={class:`flex items-center gap-1 text-sm font-medium`},Ft={key:0,class:`text-red-500`},It={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},Lt={flex:`~ col gap-2`},Rt=[`onClick`];var zt=f({__name:`FieldKeyValues`,props:_({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:_([`remove`,`add`],[`update:modelValue`]),setup(e,{emit:n}){let r=e,i=n,a=N(e,`modelValue`),s=D(``),f=D(``);return ce([s,f],()=>{i(`add`,s.value,f.value)}),(e,n)=>{let s=te(`auto-animate`);return w(),l(`div`,Mt,[o(`label`,Nt,[o(`div`,null,[o(`div`,Pt,[u(j(r.label)+` `,1),r.required===!1?c(``,!0):(w(),l(`span`,Ft,`*`))]),o(`div`,It,j(r.description),1)]),F((w(),l(`div`,Lt,[(w(!0),l(t,null,O(a.value,(e,t)=>(w(),l(`div`,{key:t,"w-full":``,flex:``,"items-center":``,"gap-2":``},[d(jt,{"property-key":e.key,"onUpdate:propertyKey":t=>e.key=t,"property-value":e.value,"onUpdate:propertyValue":t=>e.value=t,"key-placeholder":r.keyPlaceholder,"value-placeholder":r.valuePlaceholder,"w-full":``},null,8,[`property-key`,`onUpdate:propertyKey`,`property-value`,`onUpdate:propertyValue`,`key-placeholder`,`value-placeholder`]),o(`button`,{onClick:e=>i(`remove`,t)},n[0]||=[o(`div`,{"i-solar:minus-circle-line-duotone":``,size:`6`},null,-1)],8,Rt)]))),128))])),[[s]])])])}}}),Bt=zt;const Vt=[`min`,`max`,`step`];var Ht=f({__name:`Range`,props:_({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(e){let t=e,n=N(e,`modelValue`),r=i(()=>t.min*1e4),a=i(()=>t.max*1e4),o=i(()=>t.step*1e4),s=D(),c=i({get:()=>n.value*1e4,set:e=>{n.value=e/1e4,u()}});C(()=>{u()});function u(){s.value&&(s.value.style.setProperty(`--value`,s.value.value),s.value.style.setProperty(`--min`,s.value.min?s.value.min:t.min.toString()),s.value.style.setProperty(`--max`,s.value.max?s.value.max:t.max.toString()))}function d(e){let t=e.target;t.style.setProperty(`--value`,t.value)}return(e,t)=>F((w(),l(`input`,{ref_key:`sliderRef`,ref:s,"onUpdate:modelValue":t[0]||=e=>c.value=e,type:`range`,min:r.value,max:a.value,step:o.value,class:`slider-progress form_input-range`,onInput:d},null,40,Vt)),[[se,c.value,void 0,{number:!0}]])}}),Ut=n(Ht,[[`__scopeId`,`data-v-c59a94f0`]]);const Wt={flex:`~ col gap-4`},Gt={flex:`~ row`,"items-center":``,"gap-2":``},Kt={flex:`1`},qt={class:`flex items-center gap-1 text-sm font-medium`},Jt={class:`text-xs text-neutral-500 dark:text-neutral-400`},Yt={"font-mono":``},Xt={flex:`~ row`,"items-center":``,"gap-2":``};var Zt=f({__name:`FieldRange`,props:_({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(r,i)=>{var a;return w(),l(`label`,Wt,[o(`div`,Gt,[o(`div`,Kt,[o(`div`,qt,j(e.label),1),o(`div`,Jt,j(e.description),1)]),o(`span`,Yt,j((a=t.formatValue)?.call(t,n.value)||n.value),1)]),o(`div`,Xt,[d(Ut,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,min:e.min||0,max:e.max||1,step:e.step||.01,"w-full":``},null,8,[`modelValue`,`min`,`max`,`step`])])])}}}),Qt=Zt;const $t={flex:`~ col gap-4`},en={flex:`1`},tn={class:`flex items-center gap-1 text-sm font-medium`},nn={class:`text-xs text-neutral-500 dark:text-neutral-400`};var rn=f({__name:`FieldSelect`,props:_({label:null,description:null,options:null,placeholder:null,disabled:{type:Boolean},layout:null},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(r,i)=>(w(),l(`label`,$t,[o(`div`,{class:b([t.layout===`horizontal`?`flex flex-row items-center justify-between gap-2`:`flex flex-col items-start justify-center gap-2`])},[o(`div`,en,[o(`div`,tn,j(t.label),1),o(`div`,nn,j(t.description),1)]),k(r.$slots,`default`,{},()=>[d(M(Mi),{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,options:t.options,placeholder:t.placeholder,disabled:t.disabled,title:e.label},{default:P(({value:e})=>{var n;return[u(j(((n=t.options)==null||(n=n.find(t=>t.value===e))==null?void 0:n.label)||t.placeholder),1)]}),_:1},8,[`modelValue`,`options`,`placeholder`,`disabled`,`title`])])],2)]))}}),an=rn;const on={class:`max-w-full`},sn={class:`flex flex-col gap-2`},cn={class:`flex items-center gap-1 text-sm font-medium`},ln={key:0,class:`text-red-500`},un={class:`text-nowrap text-xs text-neutral-500 dark:text-neutral-400`},dn={class:`~ col gap-2`},fn=[`onClick`];var pn=f({__name:`FieldValues`,props:_({label:null,description:null,name:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:_([`remove`,`add`],[`update:modelValue`]),setup(e,{emit:n}){let r=e,i=n,a=N(e,`modelValue`);function s(){a.value.push(``),i(`add`)}function f(e){a.value.splice(e,1),i(`remove`,e)}return(e,n)=>{let i=te(`auto-animate`);return w(),l(`div`,on,[o(`label`,sn,[o(`div`,null,[o(`div`,cn,[u(j(r.label)+` `,1),r.required===!1?c(``,!0):(w(),l(`span`,ln,`*`))]),o(`div`,un,j(r.description),1)]),F((w(),l(`div`,dn,[(w(!0),l(t,null,O(a.value,(e,t)=>(w(),l(`div`,{key:t,class:`w-full flex items-center gap-2`},[d(bt,{modelValue:a.value[t],"onUpdate:modelValue":e=>a.value[t]=e,placeholder:r.valuePlaceholder,class:`w-90%`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`]),o(`button`,{"i-solar:minus-circle-line-duotone":``,size:`6`,class:`min-w-20px w-10% flex text-red-500`,onClick:e=>f(t)},null,8,fn)]))),128)),o(`div`,{"i-solar:add-circle-line-duotone":``,size:`6`,class:`mt-2 w-4/5 text-blue-500`,onClick:s})])),[[i]])])])}}}),mn=pn;const hn=[`disabled`];var gn=f({__name:`ColorHueRange`,props:_({disabled:{type:Boolean},class:null},{colorValue:{type:String,default:``},colorValueModifiers:{}}),emits:[`update:colorValue`],setup(e){let t=e,n=N(e,`colorValue`);return(e,r)=>F((w(),l(`input`,{"onUpdate:modelValue":r[0]||=e=>n.value=e,type:`range`,min:`0`,max:`360`,step:`0.01`,class:b([`color-hue-range`,[t.disabled?`opacity-25 cursor-not-allowed`:`cursor-pointer`,t.class||``]]),transition:`all ease-in-out duration-250`,disabled:t.disabled},null,10,hn)),[[se,n.value]])}}),_n=n(gn,[[`__scopeId`,`data-v-ae80cb9d`]]),vn=f({__name:`Option`,props:{value:null,label:null,active:{type:Boolean}},setup(e){let t=e,n=g(`selectOption`),r=g(`hide`);return(e,i)=>(w(),l(`div`,v({...e.$attrs,class:null,style:null},{class:[`cursor-pointer rounded px-2 py-1 text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800`,{"bg-neutral-100 dark:bg-neutral-800":t.active}],"line-clamp-1":``,"overflow-hidden":``,"text-ellipsis":``,"whitespace-pre-wrap":``,"text-xs":``,"transition-colors":``,"duration-150":``,"ease-in-out":``,"will-change-background-color":``,"will-change-color":``,onClick:i[0]||=()=>{M(n)(t.value),M(r)()}}),[k(e.$slots,`default`,{},()=>[u(j(t.label),1)])],16))}}),yn=vn;function H(e){var t;return(t=e.ownerDocument)?.defaultView||window}function U(e){return H(e).getComputedStyle(e)}const bn=Math.min,xn=Math.max,Sn=Math.round;function Cn(e){let t=U(e),n=parseFloat(t.width),r=parseFloat(t.height),i=e.offsetWidth,a=e.offsetHeight,o=Sn(n)!==i||Sn(r)!==a;return o&&(n=i,r=a),{width:n,height:r,fallback:o}}function W(e){return En(e)?(e.nodeName||``).toLowerCase():``}let wn;function Tn(){if(wn)return wn;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(wn=e.brands.map(e=>e.brand+`/`+e.version).join(` `),wn):navigator.userAgent}function G(e){return e instanceof H(e).HTMLElement}function K(e){return e instanceof H(e).Element}function En(e){return e instanceof H(e).Node}function Dn(e){return typeof ShadowRoot>`u`?!1:e instanceof H(e).ShadowRoot||e instanceof ShadowRoot}function On(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function kn(e){return[`table`,`td`,`th`].includes(W(e))}function An(e){let t=/firefox/i.test(Tn()),n=U(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!==`none`||n.perspective!==`none`||!!r&&r!==`none`||t&&n.willChange===`filter`||t&&!!n.filter&&n.filter!==`none`||[`transform`,`perspective`].some(e=>n.willChange.includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>{let t=n.contain;return t!=null&&t.includes(e)})}function jn(){return!/^((?!chrome|android).)*safari/i.test(Tn())}function Mn(e){return[`html`,`body`,`#document`].includes(W(e))}function Nn(e){return K(e)?e:e.contextElement}const Pn={x:1,y:1};function Fn(e){let t=Nn(e);if(!G(t))return Pn;let n=t.getBoundingClientRect(),{width:r,height:i,fallback:a}=Cn(t),o=(a?Sn(n.width):n.width)/r,s=(a?Sn(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}function In(e,t,n,r){var i,a;t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),s=Nn(e),c=Pn;t&&(r?K(r)&&(c=Fn(r)):c=Fn(e));let l=s?H(s):window,u=!jn()&&n,d=(o.left+(u&&(i=l.visualViewport)?.offsetLeft||0))/c.x,f=(o.top+(u&&(a=l.visualViewport)?.offsetTop||0))/c.y,p=o.width/c.x,m=o.height/c.y;if(s){let e=H(s),t=r&&K(r)?H(r):r,n=e.frameElement;for(;n&&r&&t!==e;){let e=Fn(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,d*=e.x,f*=e.y,p*=e.x,m*=e.y,d+=t.x,f+=t.y,n=H(n).frameElement}}return{width:p,height:m,top:f,right:d+p,bottom:f+m,left:d,x:d,y:f}}function q(e){return((En(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ln(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Rn(e){return In(q(e)).left+Ln(e).scrollLeft}function zn(e){if(W(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Dn(e)&&e.host||q(e);return Dn(t)?t.host:t}function Bn(e){let t=zn(e);return Mn(t)?t.ownerDocument.body:G(t)&&On(t)?t:Bn(t)}function Vn(e,t){var n;t===void 0&&(t=[]);let r=Bn(e),i=r===(n=e.ownerDocument)?.body,a=H(r);return i?t.concat(a,a.visualViewport||[],On(r)?r:[]):t.concat(r,Vn(r))}function Hn(e,t,n){return t===`viewport`?Ne(function(e,t){let n=H(e),r=q(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=jn();(e||!e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}(e,n)):K(t)?Ne(function(e,t){let n=In(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=G(e)?Fn(e):{x:1,y:1};return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}(t,n)):Ne(function(e){let t=q(e),n=Ln(e),r=e.ownerDocument.body,i=xn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=xn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Rn(e),s=-n.scrollTop;return U(r).direction===`rtl`&&(o+=xn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}(q(e)))}function Un(e){return G(e)&&U(e).position!==`fixed`?e.offsetParent:null}function Wn(e){let t=H(e),n=Un(e);for(;n&&kn(n)&&U(n).position===`static`;)n=Un(n);return n&&(W(n)===`html`||W(n)===`body`&&U(n).position===`static`&&!An(n))?t:n||function(e){let t=zn(e);for(;G(t)&&!Mn(t);){if(An(t))return t;t=zn(t)}return null}(e)||t}function Gn(e,t,n){let r=G(t),i=q(t),a=In(e,!0,n===`fixed`,t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&n!==`fixed`)if((W(t)!==`body`||On(i))&&(o=Ln(t)),G(t)){let e=In(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=Rn(i));return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}const Kn={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=n===`clippingAncestors`?function(e,t){let n=t.get(e);if(n)return n;let r=Vn(e).filter(e=>K(e)&&W(e)!==`body`),i=null,a=U(e).position===`fixed`,o=a?zn(e):e;for(;K(o)&&!Mn(o);){let e=U(o),t=An(o);(a?t||i:t||e.position!==`static`||!i||![`absolute`,`fixed`].includes(i.position))?i=e:r=r.filter(e=>e!==o),o=zn(o)}return t.set(e,r),r}(t,this._c):[].concat(n),o=[...a,r],s=o[0],c=o.reduce((e,n)=>{let r=Hn(t,n,i);return e.top=xn(r.top,e.top),e.right=bn(r.right,e.right),e.bottom=bn(r.bottom,e.bottom),e.left=xn(r.left,e.left),e},Hn(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=G(n),a=q(n);if(n===a)return t;let o={scrollLeft:0,scrollTop:0},s={x:1,y:1},c={x:0,y:0};if((i||!i&&r!==`fixed`)&&((W(n)!==`body`||On(a))&&(o=Ln(n)),G(n))){let e=In(n);s=Fn(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-o.scrollLeft*s.x+c.x,y:t.y*s.y-o.scrollTop*s.y+c.y}},isElement:K,getDimensions:function(e){return G(e)?Cn(e):e.getBoundingClientRect()},getOffsetParent:Wn,getDocumentElement:q,getScale:Fn,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e,i=this.getOffsetParent||Wn,a=this.getDimensions;return{reference:Gn(t,await i(n),r),floating:{x:0,y:0,...await a(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>U(e).direction===`rtl`},qn=(e,t,n)=>{let r=new Map,i={platform:Kn,...n},a={...i.platform,_c:r};return Fe(e,t,{...i,platform:a})},J={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 Jn(e,t){let n=J.themes[e]||{},r;do r=n[t],typeof r>`u`?n.$extend?n=J.themes[n.$extend]||{}:(n=null,r=J[t]):n=null;while(n);return r}function Yn(e){let t=[e],n=J.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=J.themes[n.$extend]||{}):n=null;while(n);return t.map(e=>`v-popper--theme-${e}`)}function Xn(e){let t=[e],n=J.themes[e]||{};do n.$extend?(t.push(n.$extend),n=J.themes[n.$extend]||{}):n=null;while(n);return t}let Zn=!1;if(typeof window<`u`){Zn=!1;try{let e=Object.defineProperty({},`passive`,{get(){Zn=!0}});window.addEventListener(`test`,null,e)}catch{}}let Qn=!1;typeof window<`u`&&typeof navigator<`u`&&(Qn=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const $n=[`auto`,`top`,`bottom`,`left`,`right`].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),er={hover:`mouseenter`,focus:`focus`,click:`click`,touch:`touchstart`,pointer:`pointerdown`},tr={hover:`mouseleave`,focus:`blur`,click:`click`,touch:`touchend`,pointer:`pointerup`};function nr(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}function rr(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const Y=[];let X=null;const ir={};function ar(e){let t=ir[e];return t||=ir[e]=[],t}let or=function(){};typeof window<`u`&&(or=window.Element);function Z(e){return function(t){return Jn(t.theme,e)}}const sr=`__floating-vue__popper`,cr=()=>f({name:`VPopper`,provide(){return{[sr]:{parentPopper:this}}},inject:{[sr]:{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:Z(`disabled`)},positioningDisabled:{type:Boolean,default:Z(`positioningDisabled`)},placement:{type:String,default:Z(`placement`),validator:e=>$n.includes(e)},delay:{type:[String,Number,Object],default:Z(`delay`)},distance:{type:[Number,String],default:Z(`distance`)},skidding:{type:[Number,String],default:Z(`skidding`)},triggers:{type:Array,default:Z(`triggers`)},showTriggers:{type:[Array,Function],default:Z(`showTriggers`)},hideTriggers:{type:[Array,Function],default:Z(`hideTriggers`)},popperTriggers:{type:Array,default:Z(`popperTriggers`)},popperShowTriggers:{type:[Array,Function],default:Z(`popperShowTriggers`)},popperHideTriggers:{type:[Array,Function],default:Z(`popperHideTriggers`)},container:{type:[String,Object,or,Boolean],default:Z(`container`)},boundary:{type:[String,or],default:Z(`boundary`)},strategy:{type:String,validator:e=>[`absolute`,`fixed`].includes(e),default:Z(`strategy`)},autoHide:{type:[Boolean,Function],default:Z(`autoHide`)},handleResize:{type:Boolean,default:Z(`handleResize`)},instantMove:{type:Boolean,default:Z(`instantMove`)},eagerMount:{type:Boolean,default:Z(`eagerMount`)},popperClass:{type:[String,Array,Object],default:Z(`popperClass`)},computeTransformOrigin:{type:Boolean,default:Z(`computeTransformOrigin`)},autoMinSize:{type:Boolean,default:Z(`autoMinSize`)},autoSize:{type:[Boolean,String],default:Z(`autoSize`)},autoMaxSize:{type:Boolean,default:Z(`autoMaxSize`)},autoBoundaryMaxSize:{type:Boolean,default:Z(`autoBoundaryMaxSize`)},preventOverflow:{type:Boolean,default:Z(`preventOverflow`)},overflowPadding:{type:[Number,String],default:Z(`overflowPadding`)},arrowPadding:{type:[Number,String],default:Z(`arrowPadding`)},arrowOverflow:{type:Boolean,default:Z(`arrowOverflow`)},flip:{type:Boolean,default:Z(`flip`)},shift:{type:Boolean,default:Z(`shift`)},shiftCrossAxis:{type:Boolean,default:Z(`shiftCrossAxis`)},noAutoFocus:{type:Boolean,default:Z(`noAutoFocus`)},disposeTimeout:{type:Number,default:Z(`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.randomId:this.ariaId},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[sr])?.parentPopper},hasPopperShowTriggerHover(){var e,t;return(e=this.popperTriggers)?.includes(`hover`)||(t=this.popperShowTriggers)?.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:n=!1}={}){var r,i;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&((i=this.parentPopper)?.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 n;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}(n=this.parentPopper)?.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)?.call(this)??this.$el,this.$_targetNodes=this.targetNodes().filter(e=>e.nodeType===e.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;let e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(We({mainAxis:this.distance,crossAxis:this.skidding}));let t=this.placement.startsWith(`auto`);if(t?e.middleware.push(Re({alignment:this.placement.split(`-`)[1]??``})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(Ge({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(ze({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Ie({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:`arrowOverflow`,fn:({placement:e,rects:t,middlewareData:n})=>{let r,{centerOffset:i}=n.arrow;return r=e.startsWith(`top`)||e.startsWith(`bottom`)?Math.abs(i)>t.reference.width/2:Math.abs(i)>t.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){let t=this.autoSize?this.autoSize:this.autoMinSize?`min`:null;e.middleware.push({name:`autoSize`,fn:({rects:e,placement:n,middlewareData:r})=>{var i;if((i=r.autoSize)!=null&&i.skip)return{};let a,o;return n.startsWith(`top`)||n.startsWith(`bottom`)?a=e.reference.width:o=e.reference.height,this.$_innerNode.style[t===`min`?`minWidth`:t===`max`?`maxWidth`:`width`]=a==null?null:`${a}px`,this.$_innerNode.style[t===`min`?`minHeight`:t===`max`?`maxHeight`:`height`]=o==null?null:`${o}px`,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(qe({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:e,availableHeight:t})=>{this.$_innerNode.style.maxWidth=e==null?null:`${e}px`,this.$_innerNode.style.maxHeight=t==null?null:`${t}px`}})));let n=await qn(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),X&&this.instantMove&&X.instantMove&&X!==this.parentPopper){X.$_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&&(X=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay(`hide`))},$_computeDelay(e){let 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 rr(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Vn(this.$_referenceNode),...Vn(this.$_popperNode)],`scroll`,()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){let e=this.$_referenceNode.getBoundingClientRect(),t=this.$_popperNode.querySelector(`.v-popper__wrapper`),n=t.parentNode.getBoundingClientRect(),r=e.x+e.width/2-(n.left+t.offsetLeft),i=e.y+e.height/2-(n.top+t.offsetTop);this.result.transformOrigin=`${r}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":``});let e=this.showGroup;if(e){let t;for(let n=0;n0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,nr(Y,this),Y.length===0&&document.body.classList.remove(`v-popper--some-open`);for(let e of Xn(this.theme)){let t=ar(e);nr(t,this),t.length===0&&document.body.classList.remove(`v-popper--some-open--${e}`)}X===this&&(X=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);let 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 rr(),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 Error(`No container for popover: `+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){let e=e=>{this.isShown&&!this.$_hideInProgress||(e.usedByTooltip=!0,!this.$_preventShow&&this.show({event:e}))};this.$_registerTriggerListeners(this.$_targetNodes,er,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],er,this.popperTriggers,this.popperShowTriggers,e);let t=e=>{e.usedByTooltip||this.hide({event:e})};this.$_registerTriggerListeners(this.$_targetNodes,tr,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],tr,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(e=>e.addEventListener(t,n,Zn?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,r,i){let a=n;r!=null&&(a=typeof r==`function`?r(a):r),a.forEach(n=>{let r=t[n];r&&this.$_registerEventListeners(e,r,i)})},$_removeEventListeners(e){let t=[];this.$_events.forEach(n=>{let{targetNodes:r,eventType:i,handler:a}=n;!e||e===i?r.forEach(e=>e.removeEventListener(i,a)):t.push(n)}),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(let n of this.$_targetNodes){let r=n.getAttribute(e);r&&(n.removeAttribute(e),n.setAttribute(t,r))}},$_applyAttrsToTarget(e){for(let t of this.$_targetNodes)for(let n in e){let r=e[n];r==null?t.removeAttribute(n):t.setAttribute(n,r)}},$_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(){let e=this.$_referenceNode.getBoundingClientRect();if(hr>=e.left&&hr<=e.right&&gr>=e.top&&gr<=e.bottom){let e=this.$_popperNode.getBoundingClientRect(),t=hr-Q,n=gr-$,r=e.left+e.width/2-Q+(e.top+e.height/2)-$+e.width+e.height,i=Q+t*r,a=$+n*r;return _r(Q,$,i,a,e.left,e.top,e.left,e.bottom)||_r(Q,$,i,a,e.left,e.top,e.right,e.top)||_r(Q,$,i,a,e.right,e.top,e.right,e.bottom)||_r(Q,$,i,a,e.left,e.bottom,e.right,e.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<`u`&&typeof window<`u`){if(Qn){let e=Zn?{passive:!0,capture:!0}:!0;document.addEventListener(`touchstart`,e=>lr(e,!0),e),document.addEventListener(`touchend`,e=>ur(e,!0),e)}else window.addEventListener(`mousedown`,e=>lr(e,!1),!0),window.addEventListener(`click`,e=>ur(e,!1),!0);window.addEventListener(`resize`,mr)}function lr(e,t){if(J.autoHideOnMousedown)dr(e,t);else for(let t=0;t=0;r--){let i=Y[r];try{let r=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(e.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&fr(i,r,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&r){let e=i.parentPopper;for(;e;)n[e.randomId]=!0,e=e.parentPopper;return}let a=i.parentPopper;for(;a&&fr(a,a.containsGlobalTarget,e);)a.$_handleGlobalClose(e,t),a=a.parentPopper}})}catch{}}}function fr(e,t,n){return n.closeAllPopover||n.closePopover&&t||pr(e,n)&&!t}function pr(e,t){if(typeof e.autoHide==`function`){let n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function mr(){for(let e=0;e{Q=hr,$=gr,hr=e.clientX,gr=e.clientY},Zn?{passive:!0}:void 0);function _r(e,t,n,r,i,a,o,s){let c=((o-i)*(t-a)-(s-a)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t)),l=((n-e)*(t-a)-(r-t)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t));return c>=0&&c<=1&&l>=0&&l<=1}const vr={extends:cr()},yr=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function br(e,t,n,r,i,a){return w(),l(`div`,{ref:`reference`,class:b([`v-popper`,{"v-popper--shown":e.slotData.isShown}])},[k(e.$slots,`default`,x(m(e.slotData)))],2)}const xr=yr(vr,[[`render`,br]]);function Sr(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);var n=e.indexOf(`Trident/`);if(n>0){var r=e.indexOf(`rv:`);return parseInt(e.substring(r+3,e.indexOf(`.`,r)),10)}var i=e.indexOf(`Edge/`);return i>0?parseInt(e.substring(i+5,e.indexOf(`.`,i)),10):-1}let Cr;function wr(){wr.init||(wr.init=!0,Cr=Sr()!==-1)}var Tr={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){wr(),y(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,Cr&&this.$el.appendChild(e),e.data=`about:blank`,Cr||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&&(!Cr&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Er=de(`data-v-b329ee4c`);ee(`data-v-b329ee4c`);const Dr={class:`resize-observer`,tabindex:`-1`};T();const Or=Er((e,t,n,r,i,a)=>(w(),s(`div`,Dr)));Tr.render=Or,Tr.__scopeId=`data-v-b329ee4c`,Tr.__file=`src/components/ResizeObserver.vue`;const kr=(e=`theme`)=>({computed:{themeClass(){return Yn(this[e])}}}),Ar=f({name:`VPopperContent`,components:{ResizeObserver:Tr},mixins:[kr()],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}}}),jr=[`id`,`aria-hidden`,`tabindex`,`data-popper-placement`],Mr={ref:`inner`,class:`v-popper__inner`},Nr=o(`div`,{class:`v-popper__arrow-outer`},null,-1),Pr=o(`div`,{class:`v-popper__arrow-inner`},null,-1),Fr=[Nr,Pr];function Ir(e,n,r,i,a,u){let d=A(`ResizeObserver`);return w(),l(`div`,{id:e.popperId,ref:`popover`,class:b([`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:S(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:n[2]||=le(t=>e.autoHide&&e.$emit(`hide`),[`esc`])},[o(`div`,{class:`v-popper__backdrop`,onClick:n[0]||=t=>e.autoHide&&e.$emit(`hide`)}),o(`div`,{class:`v-popper__wrapper`,style:S(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[o(`div`,Mr,[e.mounted?(w(),l(t,{key:0},[o(`div`,null,[k(e.$slots,`default`)]),e.handleResize?(w(),s(d,{key:0,onNotify:n[1]||=t=>e.$emit(`resize`,t)})):c(``,!0)],64)):c(``,!0)],512),o(`div`,{ref:`arrow`,class:`v-popper__arrow-container`,style:S(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Fr,4)],4)],46,jr)}const Lr=yr(Ar,[[`render`,Ir]]),Rr={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 zr=function(){};typeof window<`u`&&(zr=window.Element);const Br=f({name:`VPopperWrapper`,components:{Popper:xr,PopperContent:Lr},mixins:[Rr,kr(`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,zr,Boolean],default:void 0},boundary:{type:[String,zr],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 Vr(e,t,n,r,i,a){let o=A(`PopperContent`),c=A(`Popper`);return w(),s(c,v({ref:`popper`},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||=()=>e.$emit(`show`),onHide:t[1]||=()=>e.$emit(`hide`),"onUpdate:shown":t[2]||=t=>e.$emit(`update:shown`,t),onApplyShow:t[3]||=()=>e.$emit(`apply-show`),onApplyHide:t[4]||=()=>e.$emit(`apply-hide`),onCloseGroup:t[5]||=()=>e.$emit(`close-group`),onCloseDirective:t[6]||=()=>e.$emit(`close-directive`),onAutoHide:t[7]||=()=>e.$emit(`auto-hide`),onResize:t[8]||=()=>e.$emit(`resize`)}),{default:P(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,show:s,hide:c,handleResize:l,onResize:u,classes:f,result:p})=>[k(e.$slots,`default`,{shown:n,show:s,hide:c}),d(o,{ref:`popperContent`,"popper-id":t,theme:e.finalTheme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":l,classes:f,result:p,onHide:c,onResize:u},{default:P(()=>[k(e.$slots,`popper`,{shown:n,hide:c})]),_: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 Hr=yr(Br,[[`render`,Vr]]),Ur={...Hr,name:`VDropdown`,vPopperTheme:`dropdown`},Wr={...Hr,name:`VMenu`,vPopperTheme:`menu`},Gr={...Hr,name:`VTooltip`,vPopperTheme:`tooltip`},Kr=f({name:`VTooltipDirective`,components:{Popper:cr(),PopperContent:Lr},mixins:[Rr],inheritAttrs:!1,props:{theme:{type:String,default:`tooltip`},html:{type:Boolean,default:e=>Jn(e.theme,`html`)},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Jn(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;let e=++this.$_fetchId,t=this.content(this);t.then?t.then(t=>this.onResult(e,t)):this.onResult(e,t)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),qr=[`innerHTML`],Jr=[`textContent`];function Yr(e,t,n,r,i,a){let o=A(`PopperContent`),c=A(`Popper`);return w(),s(c,v({ref:`popper`},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:P(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,hide:s,handleResize:c,onResize:u,classes:f,result:p})=>[d(o,{ref:`popperContent`,class:b({"v-popper--tooltip-loading":e.loading}),"popper-id":t,theme:e.theme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":c,classes:f,result:p,onHide:s,onResize:u},{default:P(()=>[e.html?(w(),l(`div`,{key:0,innerHTML:e.finalContent},null,8,qr)):(w(),l(`div`,{key:1,textContent:j(e.finalContent)},null,8,Jr))]),_:2},1032,[`class`,`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:1},16,[`theme`,`target-nodes`,`popper-node`,`onApplyShow`,`onApplyHide`])}const Xr=yr(Kr,[[`render`,Yr]]),Zr=`v-popper--has-tooltip`;function Qr(e,t){let n=e.placement;if(!n&&t)for(let e of $n)t[e]&&(n=e);return n||=Jn(e.theme||`tooltip`,`placement`),n}function $r(e,t,n){let r,i=typeof t;return r=i===`string`?{content:t}:t&&i===`object`?t:{content:!1},r.placement=Qr(r,n),r.targetNodes=()=>[e],r.referenceNode=()=>e,r}let ei,ti,ni=0;function ri(){if(ei)return;ti=D([]),ei=a({name:`VTooltipDirectiveApp`,setup(){return{directives:ti}},render(){return this.directives.map(e=>h(Xr,{...e.options,shown:e.shown||e.options.shown,key:e.id}))},devtools:{hide:!0}});let e=document.createElement(`div`);document.body.appendChild(e),ei.mount(e)}function ii(e,t,n){ri();let r=D($r(e,t,n)),i=D(!1),a={id:ni++,options:r,shown:i};return ti.value.push(a),e.classList&&e.classList.add(Zr),e.$_popper={options:r,item:a,show(){i.value=!0},hide(){i.value=!1}}}function ai(e){if(e.$_popper){let t=ti.value.indexOf(e.$_popper.item);t!==-1&&ti.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Zr)}function oi(e,{value:t,modifiers:n}){let r=$r(e,t,n);if(!r.content||Jn(r.theme||`tooltip`,`disabled`))ai(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=r):i=ii(e,t,n),typeof t.shown<`u`&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}const si={beforeMount:oi,updated:oi,beforeUnmount(e){ai(e)}};function ci(e){e.addEventListener(`mousedown`,ui),e.addEventListener(`click`,ui),e.addEventListener(`touchstart`,di,Zn?{passive:!0}:!1)}function li(e){e.removeEventListener(`mousedown`,ui),e.removeEventListener(`click`,ui),e.removeEventListener(`touchstart`,di),e.removeEventListener(`touchend`,fi),e.removeEventListener(`touchcancel`,pi)}function ui(e){let t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function di(e){if(e.changedTouches.length===1){let t=e.currentTarget;t.$_vclosepopover_touch=!0;let n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener(`touchend`,fi),t.addEventListener(`touchcancel`,pi)}}function fi(e){let t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){let n=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function pi(e){let t=e.currentTarget;t.$_vclosepopover_touch=!1}const mi={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>`u`||t)&&ci(e)},updated(e,{value:t,oldValue:n,modifiers:r}){e.$_closePopoverModifiers=r,t!==n&&(typeof t>`u`||t?ci(e):li(e))},beforeUnmount(e){li(e)}},hi=J,gi=si,_i=si,vi=mi,yi=mi,bi=Ur,xi=Wr,Si=cr,Ci=Lr,wi=Rr,Ti=Hr,Ei=kr,Di=Gr,Oi=Xr,ki={class:`flex-1 truncate`},Ai={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`};var ji=f({__name:`Select`,props:_({options:null,placeholder:null,disabled:{type:Boolean},title:null,layout:null},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=D(!1),i=N(e,`modelValue`);function a(e){i.value=e}function u(){r.value=!1}return E(`selectOption`,a),E(`hide`,u),(e,r)=>(w(),s(M(bi),{"auto-size":``,"auto-boundary-max-size":``,"w-full":``},{popper:P(({hide:r})=>[o(`div`,Ai,[k(e.$slots,`options`,{hide:r},()=>[n.options&&n.options.length?(w(!0),l(t,{key:0},O(n.options,e=>(w(),s(yn,{key:e.value,value:e.value,label:e.label,active:i.value===e.value,onClick:t=>{a(e.value),r()}},null,8,[`value`,`label`,`active`,`onClick`]))),128)):c(``,!0)])])]),default:P(()=>[o(`div`,{"min-w":`[160px]`,p:`2.5`,"w-full":``,class:b([`focus:ring-2 focus:ring-black/10`,[n.disabled?`pointer-events-none`:``]]),border:`~ dark:border-neutral-800`,text:`xs dark:neutral-200 disabled:neutral-400 dark:disabled:text-neutral-600 text-neutral-700`,bg:`white dark:neutral-900 disabled:neutral-100 hover:neutral-50 dark:disabled:neutral-800 dark:hover:neutral-800 `,cursor:`disabled:not-allowed pointer`,flex:``,"items-center":``,"gap-2":``,"rounded-lg":``,"shadow-sm":``,"outline-none":``,"transition-colors":``,"duration-150":``,"ease-in-out":``},[o(`div`,ki,[k(e.$slots,`default`,{value:i.value})]),r[0]||=o(`div`,{"i-solar:alt-arrow-down-linear":``,class:`h-3.5 w-3.5 text-neutral-500 dark:text-neutral-400`},null,-1)],2)]),_:3}))}}),Mi=ji;export{_n as ColorHueRange_default,_t as FieldCheckbox_default,Ot as FieldInput_default,Bt as FieldKeyValues_default,Qt as FieldRange_default,an as FieldSelect_default,mn as FieldValues_default,bt as Input_default,yn as Option_default,Mi as Select_default,Ie as arrow,Fe as computePosition,ve as createCoords,ze as flip,_e as floor,He as hide,Ke as limitShift,I as max,he as min,We as offset,Ne as rectToClientRect,ge as round,Ge as shift,qe as size}; \ No newline at end of file diff --git a/assets/stage-CVXzpwpy.js b/assets/stage-DU1LZDda.js similarity index 72% rename from assets/stage-CVXzpwpy.js rename to assets/stage-DU1LZDda.js index d373a8febedb263263ed78b58e1542b5b046b49c..1c95c0c76d680a6936a73ce0f5bd18232c269c08 100644 --- a/assets/stage-CVXzpwpy.js +++ b/assets/stage-DU1LZDda.js @@ -1 +1 @@ -import{createBaseVNode as e,createBlock as t,createVNode as n,defineComponent as r,openBlock as i,ref as a,unref as o,useDark as s,useMouse as c,withCtx as l}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import"./stores-BVVBBF04.js";import"./HeaderLink-BN-EJFUu.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import"./Basic-CbvQnFR9.js";import{Stage_default as u}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as d}from"./route-block--T8TG4is.js";import{AnimatedWave_default as f,Cross_default as p,Header_default as m,InteractiveArea_default as h,MobileInteractiveArea_default as g}from"./AnimatedWave-BwQ8RHQR.js";const _={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},v={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 (i(),t(p,null,{default:l(()=>[n(f,{"fill-color":o(d)?`oklch(35% calc(var(--chromatic-chroma) * 0.6) var(--chromatic-hue))`:`color-mix(in srgb, oklch(95% calc(var(--chromatic-chroma-50) * 0.5) var(--chromatic-hue)) 80%, oklch(100% 0 360))`},{default:l(()=>[e(`div`,_,[e(`div`,null,[n(m,{class:`flex`,p2:``})]),e(`div`,v,[n(o(u),{"flex-1":``,"min-w":`1/2`,paused:y.value,"focus-at":{x:o(x).x.value,y:o(x).y.value}},null,8,[`paused`,`focus-at`]),n(h,{class:`flex (i(),t(p,null,{default:l(()=>[n(f,{"fill-color":o(d)?`oklch(35% calc(var(--chromatic-chroma) * 0.6) var(--chromatic-hue))`:`color-mix(in srgb, oklch(95% calc(var(--chromatic-chroma-50) * 0.5) var(--chromatic-hue)) 80%, oklch(100% 0 360))`},{default:l(()=>[e(`div`,_,[e(`div`,null,[n(m,{class:`flex`,p2:``})]),e(`div`,v,[n(o(u),{"flex-1":``,"min-w":`1/2`,paused:y.value,"focus-at":{x:o(x).x.value,y:o(x).y.value}},null,8,[`paused`,`focus-at`]),n(h,{class:`flex {let f=a(`RouterView`);return i(),e(`main`,{text:`gray-700 dark:gray-200`,"h-full":``,"font-cuteen":``,style:r({paddingTop:`${o(c)}px`,paddingRight:`${o(l)}px`,paddingBottom:`${o(u)}px`,paddingLeft:`${o(d)}px`})},[t(f)],4)}}}),l=c;export{l as default}; \ No newline at end of file +import{createElementBlock as e,createVNode as t,defineComponent as n,normalizeStyle as r,openBlock as i,resolveComponent as a,unref as o,useScreenSafeArea as s}from"./index-C-t5bjx6.js";var c=n({__name:`stage`,setup(n){let{top:c,right:l,bottom:u,left:d}=s();return(n,s)=>{let f=a(`RouterView`);return i(),e(`main`,{text:`gray-700 dark:gray-200`,"h-full":``,"font-cuteen":``,style:r({paddingTop:`${o(c)}px`,paddingRight:`${o(l)}px`,paddingBottom:`${o(u)}px`,paddingLeft:`${o(d)}px`})},[t(f)],4)}}}),l=c;export{l as default}; \ No newline at end of file diff --git a/assets/stores-BVVBBF04.js b/assets/stores-BW_6w_OI.js similarity index 99% rename from assets/stores-BVVBBF04.js rename to assets/stores-BW_6w_OI.js index e1a516b73ff1b3d02b9f7a5273ad6391c357f6fc..eb3b8460cc795bf6fc586c886f325613057921bd 100644 --- a/assets/stores-BVVBBF04.js +++ b/assets/stores-BW_6w_OI.js @@ -1,4 +1,4 @@ -var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{computed as t,computedAsync as n,defineStore as r,onMounted as i,ref as a,storeToRefs as o,toRaw as s,useI18n as c,useLocalStorage as l,watch as u}from"./index-Dor8PgzM.js";import{toJsonSchema as d}from"./index-CISmcbXk-DJz-iwh0.js";import{arrayType as f,booleanType as p,numberType as m,objectType as h,stringType as g,unionType as _}from"./types-AwjH7X1C.js";import{system_v2_default as v}from"./queues-BTBffrrj.js";import{ccount as y,stringifyEntitiesLight as b,useLlmmarkerParser as x}from"./composables-BOdj-CMj.js";import{useQueue as S}from"./queue-aUPoxb9G.js";import{objCamelToSnake as C,requestBody as w,requestHeaders as T,requestURL as E,responseCatch as D,responseJSON as O,streamText as k}from"./dist-F6JCieW1.js";import{isWebGPUSupported as ee}from"./webgpu-aYTuek9b.js";function te(e){let t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);let n=[];for(let e=0;e<700;e+=80)n.push(t[e]);let r=t.map(e=>e**1.2).map(e=>e*1.2).reduce((e,t)=>e+t,0);return r/t.length/100}function ne(e){let t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);let n=[];for(let e=0;e<700;e+=80)n.push(t[e]);let r=t.map(e=>e**1.5),i=Math.min(...r),a=Math.max(...r),o=a-i,s;s=o===0?r.map(()=>0):r.map(e=>(e-i)/o);let c=s.reduce((e,t)=>e+t,0);return c/t.length}function re(e,t=`linear`){switch(t){case`linear`:return te(e);case`minmax`:return ne(e)}}const ie=r(`AudioContext`,()=>{let e=new AudioContext;return{audioContext:e,calculateVolume:re}}),ae=r(`SpeakingStore`,()=>{let e=30,n=100,r=a(0),i=a(!1),o=t(()=>i.value?(e+(n-e)*r.value)/100:e);return{mouthOpenSize:r,nowSpeaking:i,nowSpeakingAvatarBorderOpacity:o}});async function*oe(e,t){let n=e.getReader();try{for(;;){let{done:e,value:r}=await n.read();if(e)return;yield t(r)}}finally{n.releaseLock()}}const A=async e=>(e.fetch??globalThis.fetch)(E(`models`,e.baseURL),{headers:T(e.headers,e.apiKey),signal:e.abortSignal}).then(O).then(({data:e})=>e),j=async({description:e,execute:t,name:n,parameters:r})=>{let i=await d(r);return{execute:t,function:{description:e,name:n,parameters:{...i,additionalProperties:!1},strict:!0},type:`function`}},se=[j({name:`debug_random_number`,description:`Generate a random number between 0 and 1`,execute:async()=>new Promise(e=>{setTimeout(()=>{e(Math.random().toString())},1e3)}),parameters:h({})})],ce=async()=>Promise.all(se);function M(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function N(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}var P,F,I,L,le;const ue=`__TAURI_TO_IPC_KEY__`;function de(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}var fe=class{constructor(e){P.set(this,void 0),F.set(this,0),I.set(this,[]),L.set(this,void 0),N(this,P,e||(()=>{}),`f`),this.id=de(e=>{let t=e.index;if(`end`in e){t==M(this,F,`f`)?this.cleanupCallback():N(this,L,t,`f`);return}let n=e.message;if(t==M(this,F,`f`)){for(M(this,P,`f`).call(this,n),N(this,F,M(this,F,`f`)+1,`f`);M(this,F,`f`)in M(this,I,`f`);){let e=M(this,I,`f`)[M(this,F,`f`)];M(this,P,`f`).call(this,e),delete M(this,I,`f`)[M(this,F,`f`)],N(this,F,M(this,F,`f`)+1,`f`)}M(this,F,`f`)===M(this,L,`f`)&&this.cleanupCallback()}else M(this,I,`f`)[t]=n})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){N(this,P,e,`f`)}get onmessage(){return M(this,P,`f`)}[(P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,ue)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[ue]()}};async function R(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}le=new WeakMap;async function pe(e,t){await R(`plugin:mcp|connect_server`,{command:e,args:t})}async function me(){await R(`plugin:mcp|disconnect_server`)}async function he(){return await R(`plugin:mcp|list_tools`)}async function ge(e,t){return await R(`plugin:mcp|call_tool`,{name:e,args:t})}const _e=[j({name:`mcp_list_tools`,description:`List all tools available on the MCP server`,execute:async(e,t)=>await he(),parameters:h({})}),j({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:e,args:t})=>(await pe(e,t),`success`),parameters:h({command:g().describe(`The command to connect to the MCP server`),args:f(g()).describe(`The arguments to pass to the MCP server`)})}),j({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 me(),`success`),parameters:h({})}),j({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:e,parameters:t})=>{let n=Object.fromEntries(t.map(({name:e,value:t})=>[e,t])),r=await ge(e,n);return r},parameters:h({name:g().describe(`The name of the tool to call`),parameters:f(h({name:g().describe(`The name of the parameter`),value:_([g(),m(),p(),h({})]).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`)})})],ve=async()=>Promise.all(_e),ye=r(`llm`,()=>{async function e(e,t,n,r){let i=r?.headers;return await k({...t.chat(e),maxSteps:10,messages:n.map(e=>({...e,content:e.role===`error`?`User encountered error: ${e.content}`:e.content,role:e.role===`error`?`user`:e.role})),headers:i,tools:[...await ve(),...await ce()],onEvent(e){var t,n;e.type===`tool-call`?r==null||(t=r.onToolCall)==null||t.call(r,e.toolCall):e.type===`tool-call-result`&&(r==null||(n=r.onToolCallResult)==null||n.call(r,{id:e.id,result:e.result}))}})}async function t(e,t){if(e===``)return[];try{return await A({baseURL:e.endsWith(`/`)?e:`${e}/`,apiKey:t})}catch(e){if(String(e).includes(`Failed to construct 'URL': Invalid URL`))return[];throw e}}return{models:t,stream:e}}),z=e=>({chat:t=>Object.assign(e,{model:t})}),B=e=>({embed:t=>Object.assign(e,{model:t})}),be=e=>({image:t=>Object.assign(e,{model:t})}),V=e=>({model:()=>e}),xe=e=>({speech:t=>Object.assign(e,{model:t})}),Se=e=>({transcription:t=>Object.assign(e,{model:t})}),H=(e,t)=>({metadata:{id:e,...t}}),U=(...e)=>Object.assign(e[0],...e.slice(1)),Ce=(e,t=`https://api.anthropic.com/v1/`)=>U(H(`anthropic`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),we=(e,t=`https://api.deepseek.com/`)=>U(H(`deepseek`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Te=(e,t=`https://api.fireworks.ai/inference/v1/`)=>U(H(`fireworks`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Ee=(e,t=`https://generativelanguage.googleapis.com/v1beta/openai/`)=>U(H(`google-generative-ai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),De=(e,t=`https://api.mistral.ai/v1/`)=>U(H(`mistral`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Oe=(e,t=`https://api.moonshot.cn/v1/`)=>U(H(`moonshot`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),ke=(e,t=`https://api.novita.ai/v3/openai/`)=>U(H(`novita`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),W=(e,t=`https://api.openai.com/v1/`)=>U(H(`openai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),be({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t}),xe({apiKey:e,baseURL:t}),Se({apiKey:e,baseURL:t})),Ae=(e,t=``)=>U(H(`openrouter`),{chat:(n,r)=>{let i={apiKey:e,baseURL:t,model:n},a=({extraHeaders:e,models:t,provider:n})=>{e!=null&&(i.headers??={},Object.assign(i.headers,e));let r;return n!=null&&(r=C(n)),C({models:t,provider:r})};return{...r?a(r):{},...i}}},V({apiKey:e,baseURL:t})),je=(e,t=`https://api.perplexity.ai/`)=>U(H(`perplexity`),z({apiKey:e,baseURL:t})),Me=(e,t=`https://api.together.xyz/v1/`)=>U(H(`together-ai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t,fetch:async(...e)=>globalThis.fetch(...e).then(async e=>e.json()).then(e=>Response.json({data:e,object:`list`}))})),Ne=(e,t)=>{let n=`https://api.cloudflare.com/client/v4/accounts/${t}/ai/v1/`;return U(H(`workers-ai`),z({apiKey:e,baseURL:n}),B({apiKey:e,baseURL:n}))},Pe=(e,t=`https://api.x.ai/v1/`)=>U(H(`xai`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),G=(e=`http://localhost:11434/v1/`)=>U(H(`ollama`),z({baseURL:e}),B({baseURL:e}),V({baseURL:e})),Fe=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;eU(H(`player2`),z({baseURL:e,headers:{"player2-game-key":t}}),xe({baseURL:e,fetch:async(e,t)=>{let n=`${e.toString().slice(0,-12)}tts/speak`;try{let{input:e,response_format:n,speed:r,voice:i,...a}=JSON.parse(t?.body),o={audio_format:n,play_in_app:!1,speed:r??1,text:e,voice_ids:i==null?[]:[i],...a};t&&(t.body=JSON.stringify(o))}catch(e){console.warn(`Could not parse body as JSON:`,e)}return globalThis.fetch(n,t).then(async e=>e.json()).then(e=>{let t=e.data??``,n=Fe(t);return new Response(n,{headers:{"Content-Type":`audio/mpeg`},status:200})})},headers:{"player2-game-key":t}})),K=(...e)=>Object.assign(e[0],...e.slice(1));var q=class extends Error{constructor(t,n){super(t),e.defineProperty(this,`response`,void 0),this.name=`XSAIError`,this.response=n}};const Le=e=>e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),J=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[Le(e),t])),Re=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)),ze=(e,t)=>Re({Authorization:t===void 0?void 0:`Bearer ${t}`,...e}),Be=(e,t)=>{let n=t.toString();return new URL(e,n.endsWith(`/`)?n:`${n}/`)},Ve=async e=>{if(!e.ok)throw new q(`Remote sent ${e.status} response: ${await e.text()}`,e);if(!e.body)throw new q(`Response body is empty from remote server`,e);if(!(e.body instanceof ReadableStream))throw new q(`Expected Response body to be a ReadableStream, but got ${String(e.body)}; Content Type is ${e.headers.get(`Content-Type`)}`,e);return e},He=async e=>Ve(e).then(async e=>{let t=await e.text();try{return JSON.parse(t)}catch{throw Error(`Failed to parse response, response body: ${t}`)}});var Ue=(e,t=`http://localhost:5933/v1/`)=>{let n=({applyTextNormalization:e,languageCode:t,nextRequestIds:n,nextText:r,previousRequestIds:i,previousText:a,pronunciationDictionaryLocators:o,seed:s,voiceSettings:c})=>({extraBody:J({applyTextNormalization:e,languageCode:t,nextRequestIds:n,nextText:r,previousRequestIds:i,previousText:a,pronunciationDictionaryLocators:o?o.map(e=>J(e)):void 0,seed:s,voiceSettings:J(c??{similarityBoost:.75,stability:.5})})}),r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`elevenlabs/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`provider=elevenlabs`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},We=(e,t=`http://localhost:5933/v1/`)=>{let n=e=>{let{deploymentId:t,region:n,sampleRate:r}=e,i={deploymentId:t,region:n,sampleRate:r};return`disableSsml`in e?i.disableSsml=e.disableSsml:`lang`in e&&(i.lang=e.lang,i.gender=e.gender,i.voice=e.voice),{extraBody:J(i)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`microsoft/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`region=${r?.region}&provider=microsoft`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},Ge=(e,t=`http://localhost:5933/v1/`)=>{let n=t=>{var n,r;let i={app:{appid:(n=t.app)?.appId,token:e}};return t.app!==void 0&&(i.app={...t.app,appid:(r=t.app)?.appId,token:e}),t.user!==void 0&&(i.user=t.user),t.audio!==void 0&&(i.audio=t.audio),{extraBody:J(i)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`volcengine/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`provider=volcengine`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},Ke=(e,t=`http://localhost:5933/v1/`)=>{let n=e=>{let{sampleRate:t,volume:n,rate:r,pitch:i}=e,a={sampleRate:t,volume:n,rate:r,pitch:i};return Object.keys(a).forEach(e=>a[e]===void 0&&delete a[e]),{extraBody:J(a)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`alibaba/${r}`})},i={voice:r=>{let i=t;return i.endsWith(`v1/`)?i=i.slice(0,-3):i.endsWith(`v1`)&&(i=i.slice(0,-2)),{query:`provider=alibaba`,...r?n(r):{},apiKey:e,baseURL:i}}};return K(r,i)},Y=async e=>(e.fetch??globalThis.fetch)(Be(e.query?`api/voices?${e.query}`:`api/voices`,e.baseURL),{headers:ze({...e.headers},e.apiKey),method:`GET`,signal:e.abortSignal}).then(He).then(({voices:e})=>e);const qe=[{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`}],X=r(`providers`,()=>{let e=l(`settings/credentials/providers`,{}),{t:r}=c();async function i(e){try{let t=await fetch(`https://openrouter.ai/api/v1/models`,{headers:{Authorization:`Bearer ${e.apiKey.trim()}`,"Content-Type":`application/json`}});if(!t.ok)throw Error(`Failed to fetch OpenRouter models: ${t.statusText}`);let n=await t.json();return n.data.map(e=>({id:e.id,name:e.name||e.id,provider:`openrouter-ai`,description:e.description||``,contextLength:e.context_length,deprecated:!1}))}catch(e){throw console.error(`Error fetching OpenRouter models:`,e),e}}let o={player2:{id:`player2`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.player2.title`,name:`Player2`,descriptionKey:`settings.pages.providers.provider.player2.description`,description:`player2.game`,icon:`i-lobe-icons:player2`,defaultOptions:()=>({baseUrl:`http://localhost:4315/v1/`}),createProvider:e=>Ie(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`player2-model`,name:`Player2 Model`,provider:`player2`}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},"player2-speech":{id:`player2-speech`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.player2.title`,name:`Player2 Speech`,descriptionKey:`settings.pages.providers.provider.player2.description`,description:`player2.game`,icon:`i-lobe-icons:player2`,defaultOptions:()=>({baseUrl:`http://localhost:4315/v1/`}),createProvider:e=>Ie(e.baseUrl.trim(),`airi`),capabilities:{listVoices:async()=>await fetch(`http://localhost:4315/v1/tts/voices`).then(e=>e.json()).then(({voices:e})=>e.map(({id:e,language:t,name:n,gender:r})=>({id:e,name:n,provider:`player2-speech`,gender:r,languages:[{american_english:{code:`en`,title:`English`},british_english:{code:`en`,title:`English`},japanese:{code:`ja`,title:`Japanese`},mandarin_chinese:{code:`zh`,title:`Chinese`},spanish:{code:`es`,title:`Spanish`},french:{code:`fr`,title:`French`},hindi:{code:`hi`,title:`Hindi`},italian:{code:`it`,title:`Italian`},brazilian_portuguese:{code:`pt`,title:`Portuguese`}}[t]]})))},validators:{validateProviderConfig:e=>!!e.baseUrl}},"openrouter-ai":{id:`openrouter-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.openrouter.title`,name:`OpenRouter`,descriptionKey:`settings.pages.providers.provider.openrouter.description`,description:`openrouter.ai`,icon:`i-lobe-icons:openrouter`,defaultOptions:()=>({baseUrl:`https://openrouter.ai/api/v1/`}),createProvider:e=>Ae(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>i(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"app-local-audio-speech":{id:`app-local-audio-speech`,category:`speech`,tasks:[`text-to-speech`,`tts`],isAvailableBy:async()=>`window`in globalThis&&globalThis.window!=null&&`__TAURI__`in globalThis.window&&globalThis.window.__TAURI__!=null,nameKey:`settings.pages.providers.provider.app-local-audio-speech.title`,name:`App (Local)`,descriptionKey:`settings.pages.providers.provider.app-local-audio-speech.description`,description:`https://github.com/huggingface/candle`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"app-local-audio-transcription":{id:`app-local-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],isAvailableBy:async()=>`window`in globalThis&&globalThis.window!=null&&`__TAURI__`in globalThis.window&&globalThis.window.__TAURI__!=null,nameKey:`settings.pages.providers.provider.app-local-audio-transcription.title`,name:`App (Local)`,descriptionKey:`settings.pages.providers.provider.app-local-audio-transcription.description`,description:`https://github.com/huggingface/candle`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"browser-local-audio-speech":{id:`browser-local-audio-speech`,category:`speech`,tasks:[`text-to-speech`,`tts`],isAvailableBy:async()=>{let e=await ee();if(e)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let e=globalThis.navigator.deviceMemory;if(e>=8)return!0}return!1},nameKey:`settings.pages.providers.provider.browser-local-audio-speech.title`,name:`Browser (Local)`,descriptionKey:`settings.pages.providers.provider.browser-local-audio-speech.description`,description:`https://github.com/moeru-ai/xsai-transformers`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"browser-local-audio-transcription":{id:`browser-local-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],isAvailableBy:async()=>{let e=await ee();if(e)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let e=globalThis.navigator.deviceMemory;if(e>=8)return!0}return!1},nameKey:`settings.pages.providers.provider.browser-local-audio-transcription.title`,name:`Browser (Local)`,descriptionKey:`settings.pages.providers.provider.browser-local-audio-transcription.description`,description:`https://github.com/moeru-ai/xsai-transformers`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},ollama:{id:`ollama`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.ollama.title`,name:`Ollama`,descriptionKey:`settings.pages.providers.provider.ollama.description`,description:`ollama.com`,icon:`i-lobe-icons:ollama`,defaultOptions:()=>({baseUrl:`http://localhost:11434/v1/`}),createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...G(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"ollama-embedding":{id:`ollama-embedding`,category:`embed`,tasks:[`text-feature-extraction`],nameKey:`settings.pages.providers.provider.ollama.title`,name:`Ollama`,descriptionKey:`settings.pages.providers.provider.ollama.description`,description:`ollama.com`,icon:`i-lobe-icons:ollama`,defaultOptions:()=>({baseUrl:`http://localhost:11434/v1/`}),createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...G(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},vllm:{id:`vllm`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.vllm.title`,name:`vLLM`,descriptionKey:`settings.pages.providers.provider.vllm.description`,description:`vllm.ai`,iconColor:`i-lobe-icons:vllm`,createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`llama-2-7b`,name:`Llama 2 (7B)`,provider:`vllm`,description:`Meta's Llama 2 7B parameter model`,contextLength:4096},{id:`llama-2-13b`,name:`Llama 2 (13B)`,provider:`vllm`,description:`Meta's Llama 2 13B parameter model`,contextLength:4096},{id:`llama-2-70b`,name:`Llama 2 (70B)`,provider:`vllm`,description:`Meta's Llama 2 70B parameter model`,contextLength:4096},{id:`mistral-7b`,name:`Mistral (7B)`,provider:`vllm`,description:`Mistral AI's 7B parameter model`,contextLength:8192},{id:`mixtral-8x7b`,name:`Mixtral (8x7B)`,provider:`vllm`,description:`Mistral AI's Mixtral 8x7B MoE model`,contextLength:32768},{id:`custom`,name:`Custom Model`,provider:`vllm`,description:`Specify a custom model name`,contextLength:0}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},openai:{id:`openai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.openai.title`,name:`OpenAI`,descriptionKey:`settings.pages.providers.provider.openai.description`,description:`openai.com`,icon:`i-lobe-icons:openai`,defaultOptions:()=>({baseUrl:`https://api.openai.com/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"openai-audio-speech":{id:`openai-audio-speech`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.openai.title`,name:`OpenAI`,descriptionKey:`settings.pages.providers.provider.openai.description`,description:`openai.com`,icon:`i-lobe-icons:openai`,defaultOptions:()=>({baseUrl:`https://api.openai.com/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"openai-audio-transcription":{id:`openai-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],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=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},anthropic:{id:`anthropic`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.anthropic.title`,name:`Anthropic`,descriptionKey:`settings.pages.providers.provider.anthropic.description`,description:`anthropic.com`,icon:`i-lobe-icons:anthropic`,defaultOptions:()=>({baseUrl:`https://api.anthropic.com/v1/`}),createProvider:e=>Ce(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`claude-3-7-sonnet-20250219`,name:`Claude 3.7 Sonnet`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-sonnet-20241022`,name:`Claude 3.5 Sonnet (New)`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-haiku-20241022`,name:`Claude 3.5 Haiku`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-sonnet-20240620`,name:`Claude 3.5 Sonnet (Old)`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-haiku-20240307`,name:`Claude 3 Haiku`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-opus-20240229`,name:`Claude 3 Opus`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"google-generative-ai":{id:`google-generative-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.google-generative-ai.title`,name:`Google Gemini`,descriptionKey:`settings.pages.providers.provider.google-generative-ai.description`,description:`ai.google.dev`,icon:`i-lobe-icons:gemini`,defaultOptions:()=>({baseUrl:`https://generativelanguage.googleapis.com/v1beta/openai/`}),createProvider:e=>Ee(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Ee(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`google-generative-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},xai:{id:`xai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.xai.title`,name:`xAI`,descriptionKey:`settings.pages.providers.provider.xai.description`,description:`x.ai`,icon:`i-lobe-icons:xai`,createProvider:e=>Pe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Pe(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`xai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},deepseek:{id:`deepseek`,category:`chat`,tasks:[`text-generation`],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=>we(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...we(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`deepseek`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},elevenlabs:{id:`elevenlabs`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.elevenlabs.title`,name:`ElevenLabs`,descriptionKey:`settings.pages.providers.provider.elevenlabs.description`,description:`elevenlabs.io`,icon:`i-simple-icons:elevenlabs`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`,voiceSettings:{similarityBoost:.75,stability:.5}}),createProvider:e=>Ue(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>qe.map(e=>({id:e.model_id,name:e.name,provider:`elevenlabs`,description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{let t=Ue(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()}),r=n.findIndex(e=>e.name.includes(`Aria`)),i=n.findIndex(e=>e.name.includes(`Bill`)),a=r===-1?0:r,o=i===-1?n.length-1:i,s=Math.min(a,o),c=Math.max(a,o),l=[...n.slice(0,s),...n.slice(c+1),...n.slice(s,c+1)];return l.map(e=>({id:e.id,name:e.name,provider:`elevenlabs`,previewURL:e.preview_audio_url,languages:e.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:`microsoft-speech`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.microsoft-speech.title`,name:`Microsoft / Azure Speech`,descriptionKey:`settings.pages.providers.provider.microsoft-speech.description`,description:`speech.microsoft.com`,iconColor:`i-lobe-icons:microsoft`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>We(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`v1`,name:`v1`,provider:`microsoft-speech`,description:``,contextLength:0,deprecated:!1}],listVoices:async e=>{let t=We(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice({region:e.region})});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`microsoft-speech`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:`alibaba-cloud-model-studio`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.alibaba-cloud-model-studio.title`,name:`Alibaba Cloud Model Studio`,descriptionKey:`settings.pages.providers.provider.alibaba-cloud-model-studio.description`,description:`bailian.console.aliyun.com`,iconColor:`i-lobe-icons:alibabacloud`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>Ke(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{let t=Ke(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`alibaba-cloud-model-studio`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})},listModels:async()=>[{id:`cozyvoice-v1`,name:`CozyVoice`,provider:`alibaba-cloud-model-studio`,description:``,contextLength:0,deprecated:!1},{id:`cozyvoice-v2`,name:`CozyVoice (New)`,provider:`alibaba-cloud-model-studio`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},volcengine:{id:`volcengine`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.volcengine.title`,name:`settings.pages.providers.provider.volcengine.title`,descriptionKey:`settings.pages.providers.provider.volcengine.description`,description:`volcengine.com`,iconColor:`i-lobe-icons:volcengine`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>Ge(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{let t=Ge(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`volcano-engine`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})},listModels:async()=>[{id:`v1`,name:`v1`,provider:`volcano-engine`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl&&!!e.app&&!!e.app.appId}},"together-ai":{id:`together-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.together.title`,name:`Together.ai`,descriptionKey:`settings.pages.providers.provider.together.description`,description:`together.ai`,iconColor:`i-lobe-icons:together`,createProvider:e=>Me(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Me(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`together-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"novita-ai":{id:`novita-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.novita.title`,name:`Novita`,descriptionKey:`settings.pages.providers.provider.novita.description`,description:`novita.ai`,iconColor:`i-lobe-icons:novita`,createProvider:e=>ke(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...ke(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`novita-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"fireworks-ai":{id:`fireworks-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.fireworks.title`,name:`Fireworks.ai`,descriptionKey:`settings.pages.providers.provider.fireworks.description`,description:`fireworks.ai`,icon:`i-lobe-icons:fireworks`,createProvider:e=>Te(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Te(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`fireworks-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"featherless-ai":{id:`featherless-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.featherless.title`,name:`Featherless.ai`,descriptionKey:`settings.pages.providers.provider.featherless.description`,description:`featherless.ai`,icon:`i-lobe-icons:featherless-ai`,defaultOptions:()=>({baseUrl:`https://api.featherless.ai/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`featherless-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"cloudflare-workers-ai":{id:`cloudflare-workers-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.cloudflare-workers-ai.title`,name:`Cloudflare Workers AI`,descriptionKey:`settings.pages.providers.provider.cloudflare-workers-ai.description`,description:`cloudflare.com`,iconColor:`i-lobe-icons:cloudflare`,createProvider:e=>Ne(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"perplexity-ai":{id:`perplexity-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.perplexity.title`,name:`Perplexity`,descriptionKey:`settings.pages.providers.provider.perplexity.description`,description:`perplexity.ai`,icon:`i-lobe-icons:perplexity`,defaultOptions:()=>({baseUrl:`https://api.perplexity.ai`}),createProvider:e=>je(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`sonar-small-online`,name:`Sonar Small (Online)`,provider:`perplexity-ai`,description:`Efficient model with online search capabilities`,contextLength:12e3},{id:`sonar-medium-online`,name:`Sonar Medium (Online)`,provider:`perplexity-ai`,description:`Balanced model with online search capabilities`,contextLength:12e3},{id:`sonar-large-online`,name:`Sonar Large (Online)`,provider:`perplexity-ai`,description:`Powerful model with online search capabilities`,contextLength:12e3},{id:`codey-small`,name:`Codey Small`,provider:`perplexity-ai`,description:`Specialized for code generation and understanding`,contextLength:12e3},{id:`codey-large`,name:`Codey Large`,provider:`perplexity-ai`,description:`Advanced code generation and understanding`,contextLength:12e3}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"mistral-ai":{id:`mistral-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.mistral.title`,name:`Mistral`,descriptionKey:`settings.pages.providers.provider.mistral.description`,description:`mistral.ai`,iconColor:`i-lobe-icons:mistral`,createProvider:e=>De(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...De(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`mistral-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"moonshot-ai":{id:`moonshot-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.moonshot.title`,name:`Moonshot AI`,descriptionKey:`settings.pages.providers.provider.moonshot.description`,description:`moonshot.ai`,icon:`i-lobe-icons:moonshot`,createProvider:e=>Oe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Oe(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`moonshot-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}}};async function s(t){let n=e.value[t];if(!n)return!1;let r=o[t];return r?await r.validators.validateProviderConfig(n):!1}let d=a({});function f(t){if(!e.value[t]){var n;let r=o[t],i=(n=r.defaultOptions)?.call(r)||{};e.value[t]={baseUrl:i.baseUrl||``}}}Object.keys(o).forEach(f);async function p(){await Promise.all(Object.keys(o).map(async e=>{d.value[e]=await s(e)}))}p(),u(e,p,{deep:!0});let m=t(()=>Object.keys(o).filter(e=>d.value[e])),h=a({}),g=a({}),_=a({});async function v(t){let n=e.value[t];if(!n)return[];let r=o[t];if(!r)return[];g.value[t]=!0,_.value[t]=null;try{let e=r.capabilities.listModels?await r.capabilities.listModels(n):[];return h.value[t]=e.map(e=>({id:e.id,name:e.name,description:e.description,contextLength:e.contextLength,deprecated:e.deprecated,provider:t})),h.value[t]}catch(e){return console.error(`Error fetching models for ${t}:`,e),_.value[t]=e instanceof Error?e.message:`Unknown error`,[]}finally{g.value[t]=!1}}function y(e){return h.value[e]||[]}let b=t(()=>{let e=[];for(let t of m.value)e.push(...h.value[t]||[]);return e});async function x(){for(let e of m.value)o[e].capabilities.listModels&&await v(e)}function S(e){let t=o[e];if(!t)throw Error(`Provider metadata for ${e} not found`);return{...t,localizedName:r(t.nameKey,t.name),localizedDescription:r(t.descriptionKey,t.description)}}let C=t(()=>Object.values(o).map(e=>({...e,localizedName:r(e.nameKey,e.name),localizedDescription:r(e.descriptionKey,e.description),configured:d.value[e.id]||!1})));function w(t){let n=e.value[t];if(!n)throw Error(`Provider credentials for ${t} not found`);let r=o[t];if(!r)throw Error(`Provider metadata for ${t} not found`);try{return r.createProvider(n)}catch(e){throw console.error(`Error creating provider instance for ${t}:`,e),e}}let T=n(async()=>{let e=[];for(let t of C.value){let n=S(t.id),r=n.isAvailableBy||(()=>!0),i=await r();i&&e.push(t)}return e},[]),E=t(()=>T.value.filter(e=>e.category===`chat`)),D=t(()=>T.value.filter(e=>e.category===`speech`)),O=t(()=>T.value.filter(e=>e.category===`transcription`)),k=t(()=>E.value.filter(e=>d.value[e.id])),te=t(()=>D.value.filter(e=>d.value[e.id])),ne=t(()=>O.value.filter(e=>d.value[e.id]));function re(t){return e.value[t]}return{providers:e,getProviderConfig:re,availableProviders:m,configuredProviders:d,providerMetadata:o,getProviderMetadata:S,allProvidersMetadata:C,initializeProvider:f,validateProvider:s,availableModels:h,isLoadingModels:g,modelLoadError:_,fetchModelsForProvider:v,getModelsForProvider:y,allAvailableModels:b,loadModelsForConfiguredProviders:x,getProviderInstance:w,availableProvidersMetadata:T,allChatProvidersMetadata:E,allAudioSpeechProvidersMetadata:D,allAudioTranscriptionProvidersMetadata:O,configuredChatProvidersMetadata:k,configuredSpeechProvidersMetadata:te,configuredTranscriptionProvidersMetadata:ne}}),Je=r(`consciousness`,()=>{let e=X(),n=l(`settings/consciousness/active-provider`,``),r=l(`settings/consciousness/active-model`,``),i=l(`settings/consciousness/active-custom-model`,``),o=a({}),s=a(``),c=t(()=>{var t;return(t=e.getProviderMetadata(n.value))?.capabilities.listModels!==void 0}),d=t(()=>e.getModelsForProvider(n.value)),f=t(()=>e.isLoadingModels[n.value]||!1),p=t(()=>e.modelLoadError[n.value]||null),m=t(()=>{if(!s.value.trim())return d.value;let e=s.value.toLowerCase().trim();return d.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function h(){r.value=``,i.value=``,o.value={},s.value=``}async function g(t){var r;t&&(r=e.getProviderMetadata(n.value))?.capabilities.listModels!==void 0&&e.getModelsForProvider(t).length===0&&await e.fetchModelsForProvider(t)}let _;return u(n,async e=>{await g(e),h(),e===`player2`?_=setInterval(()=>{console.log(`Sending Player2 Health check if it is being used`),fetch(`localhost:4315/v1/health`,{method:`GET`,headers:{"player2-game-key":`airi`}}).catch(()=>{})},6e4):(_&&clearInterval(_),_=void 0)}),{activeProvider:n,activeModel:r,customModelName:i,expandedDescriptions:o,modelSearchQuery:s,supportsModelListing:c,providerModels:d,isLoadingActiveProviderModels:f,activeProviderModelError:p,filteredModels:m,resetModelSelection:h,loadModelsForProvider:g}}),Ye=async e=>(e.fetch??globalThis.fetch)(E(`audio/speech`,e.baseURL),{body:w(e),headers:T({"Content-Type":`application/json`,...e.headers},e.apiKey),method:`POST`,signal:e.abortSignal}).then(D).then(async e=>e.arrayBuffer()),Xe=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;function Z(e,t,n){let r=Ze(e);return n?r.replace(n,i):i(r);function i(e){return b(e,{subset:t})}}function Ze(e){return String(e||``).replace(Xe,``)}const Qe=/]]>/g,$e=[`>`];function et(e){return``}function tt(e){return``}const nt=[` `,` +var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{computed as t,computedAsync as n,defineStore as r,onMounted as i,ref as a,storeToRefs as o,toRaw as s,useI18n as c,useLocalStorage as l,watch as u}from"./index-C-t5bjx6.js";import{toJsonSchema as d}from"./index-CISmcbXk-BKEuzw_9.js";import{arrayType as f,booleanType as p,numberType as m,objectType as h,stringType as g,unionType as _}from"./types-AwjH7X1C.js";import{system_v2_default as v}from"./queues-DD1Fxfss.js";import{ccount as y,stringifyEntitiesLight as b,useLlmmarkerParser as x}from"./composables-CEnUnIM2.js";import{useQueue as S}from"./queue-Bp4D1cP3.js";import{objCamelToSnake as C,requestBody as w,requestHeaders as T,requestURL as E,responseCatch as D,responseJSON as O,streamText as k}from"./dist-F6JCieW1.js";import{isWebGPUSupported as ee}from"./webgpu-aYTuek9b.js";function te(e){let t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);let n=[];for(let e=0;e<700;e+=80)n.push(t[e]);let r=t.map(e=>e**1.2).map(e=>e*1.2).reduce((e,t)=>e+t,0);return r/t.length/100}function ne(e){let t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);let n=[];for(let e=0;e<700;e+=80)n.push(t[e]);let r=t.map(e=>e**1.5),i=Math.min(...r),a=Math.max(...r),o=a-i,s;s=o===0?r.map(()=>0):r.map(e=>(e-i)/o);let c=s.reduce((e,t)=>e+t,0);return c/t.length}function re(e,t=`linear`){switch(t){case`linear`:return te(e);case`minmax`:return ne(e)}}const ie=r(`AudioContext`,()=>{let e=new AudioContext;return{audioContext:e,calculateVolume:re}}),ae=r(`SpeakingStore`,()=>{let e=30,n=100,r=a(0),i=a(!1),o=t(()=>i.value?(e+(n-e)*r.value)/100:e);return{mouthOpenSize:r,nowSpeaking:i,nowSpeakingAvatarBorderOpacity:o}});async function*oe(e,t){let n=e.getReader();try{for(;;){let{done:e,value:r}=await n.read();if(e)return;yield t(r)}}finally{n.releaseLock()}}const A=async e=>(e.fetch??globalThis.fetch)(E(`models`,e.baseURL),{headers:T(e.headers,e.apiKey),signal:e.abortSignal}).then(O).then(({data:e})=>e),j=async({description:e,execute:t,name:n,parameters:r})=>{let i=await d(r);return{execute:t,function:{description:e,name:n,parameters:{...i,additionalProperties:!1},strict:!0},type:`function`}},se=[j({name:`debug_random_number`,description:`Generate a random number between 0 and 1`,execute:async()=>new Promise(e=>{setTimeout(()=>{e(Math.random().toString())},1e3)}),parameters:h({})})],ce=async()=>Promise.all(se);function M(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function N(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}var P,F,I,L,le;const ue=`__TAURI_TO_IPC_KEY__`;function de(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}var fe=class{constructor(e){P.set(this,void 0),F.set(this,0),I.set(this,[]),L.set(this,void 0),N(this,P,e||(()=>{}),`f`),this.id=de(e=>{let t=e.index;if(`end`in e){t==M(this,F,`f`)?this.cleanupCallback():N(this,L,t,`f`);return}let n=e.message;if(t==M(this,F,`f`)){for(M(this,P,`f`).call(this,n),N(this,F,M(this,F,`f`)+1,`f`);M(this,F,`f`)in M(this,I,`f`);){let e=M(this,I,`f`)[M(this,F,`f`)];M(this,P,`f`).call(this,e),delete M(this,I,`f`)[M(this,F,`f`)],N(this,F,M(this,F,`f`)+1,`f`)}M(this,F,`f`)===M(this,L,`f`)&&this.cleanupCallback()}else M(this,I,`f`)[t]=n})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){N(this,P,e,`f`)}get onmessage(){return M(this,P,`f`)}[(P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,ue)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[ue]()}};async function R(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}le=new WeakMap;async function pe(e,t){await R(`plugin:mcp|connect_server`,{command:e,args:t})}async function me(){await R(`plugin:mcp|disconnect_server`)}async function he(){return await R(`plugin:mcp|list_tools`)}async function ge(e,t){return await R(`plugin:mcp|call_tool`,{name:e,args:t})}const _e=[j({name:`mcp_list_tools`,description:`List all tools available on the MCP server`,execute:async(e,t)=>await he(),parameters:h({})}),j({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:e,args:t})=>(await pe(e,t),`success`),parameters:h({command:g().describe(`The command to connect to the MCP server`),args:f(g()).describe(`The arguments to pass to the MCP server`)})}),j({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 me(),`success`),parameters:h({})}),j({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:e,parameters:t})=>{let n=Object.fromEntries(t.map(({name:e,value:t})=>[e,t])),r=await ge(e,n);return r},parameters:h({name:g().describe(`The name of the tool to call`),parameters:f(h({name:g().describe(`The name of the parameter`),value:_([g(),m(),p(),h({})]).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`)})})],ve=async()=>Promise.all(_e),ye=r(`llm`,()=>{async function e(e,t,n,r){let i=r?.headers;return await k({...t.chat(e),maxSteps:10,messages:n.map(e=>({...e,content:e.role===`error`?`User encountered error: ${e.content}`:e.content,role:e.role===`error`?`user`:e.role})),headers:i,tools:[...await ve(),...await ce()],onEvent(e){var t,n;e.type===`tool-call`?r==null||(t=r.onToolCall)==null||t.call(r,e.toolCall):e.type===`tool-call-result`&&(r==null||(n=r.onToolCallResult)==null||n.call(r,{id:e.id,result:e.result}))}})}async function t(e,t){if(e===``)return[];try{return await A({baseURL:e.endsWith(`/`)?e:`${e}/`,apiKey:t})}catch(e){if(String(e).includes(`Failed to construct 'URL': Invalid URL`))return[];throw e}}return{models:t,stream:e}}),z=e=>({chat:t=>Object.assign(e,{model:t})}),B=e=>({embed:t=>Object.assign(e,{model:t})}),be=e=>({image:t=>Object.assign(e,{model:t})}),V=e=>({model:()=>e}),xe=e=>({speech:t=>Object.assign(e,{model:t})}),Se=e=>({transcription:t=>Object.assign(e,{model:t})}),H=(e,t)=>({metadata:{id:e,...t}}),U=(...e)=>Object.assign(e[0],...e.slice(1)),Ce=(e,t=`https://api.anthropic.com/v1/`)=>U(H(`anthropic`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),we=(e,t=`https://api.deepseek.com/`)=>U(H(`deepseek`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Te=(e,t=`https://api.fireworks.ai/inference/v1/`)=>U(H(`fireworks`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Ee=(e,t=`https://generativelanguage.googleapis.com/v1beta/openai/`)=>U(H(`google-generative-ai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),De=(e,t=`https://api.mistral.ai/v1/`)=>U(H(`mistral`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Oe=(e,t=`https://api.moonshot.cn/v1/`)=>U(H(`moonshot`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),ke=(e,t=`https://api.novita.ai/v3/openai/`)=>U(H(`novita`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),W=(e,t=`https://api.openai.com/v1/`)=>U(H(`openai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),be({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t}),xe({apiKey:e,baseURL:t}),Se({apiKey:e,baseURL:t})),Ae=(e,t=``)=>U(H(`openrouter`),{chat:(n,r)=>{let i={apiKey:e,baseURL:t,model:n},a=({extraHeaders:e,models:t,provider:n})=>{e!=null&&(i.headers??={},Object.assign(i.headers,e));let r;return n!=null&&(r=C(n)),C({models:t,provider:r})};return{...r?a(r):{},...i}}},V({apiKey:e,baseURL:t})),je=(e,t=`https://api.perplexity.ai/`)=>U(H(`perplexity`),z({apiKey:e,baseURL:t})),Me=(e,t=`https://api.together.xyz/v1/`)=>U(H(`together-ai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t,fetch:async(...e)=>globalThis.fetch(...e).then(async e=>e.json()).then(e=>Response.json({data:e,object:`list`}))})),Ne=(e,t)=>{let n=`https://api.cloudflare.com/client/v4/accounts/${t}/ai/v1/`;return U(H(`workers-ai`),z({apiKey:e,baseURL:n}),B({apiKey:e,baseURL:n}))},Pe=(e,t=`https://api.x.ai/v1/`)=>U(H(`xai`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),G=(e=`http://localhost:11434/v1/`)=>U(H(`ollama`),z({baseURL:e}),B({baseURL:e}),V({baseURL:e})),Fe=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;eU(H(`player2`),z({baseURL:e,headers:{"player2-game-key":t}}),xe({baseURL:e,fetch:async(e,t)=>{let n=`${e.toString().slice(0,-12)}tts/speak`;try{let{input:e,response_format:n,speed:r,voice:i,...a}=JSON.parse(t?.body),o={audio_format:n,play_in_app:!1,speed:r??1,text:e,voice_ids:i==null?[]:[i],...a};t&&(t.body=JSON.stringify(o))}catch(e){console.warn(`Could not parse body as JSON:`,e)}return globalThis.fetch(n,t).then(async e=>e.json()).then(e=>{let t=e.data??``,n=Fe(t);return new Response(n,{headers:{"Content-Type":`audio/mpeg`},status:200})})},headers:{"player2-game-key":t}})),K=(...e)=>Object.assign(e[0],...e.slice(1));var q=class extends Error{constructor(t,n){super(t),e.defineProperty(this,`response`,void 0),this.name=`XSAIError`,this.response=n}};const Le=e=>e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),J=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[Le(e),t])),Re=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)),ze=(e,t)=>Re({Authorization:t===void 0?void 0:`Bearer ${t}`,...e}),Be=(e,t)=>{let n=t.toString();return new URL(e,n.endsWith(`/`)?n:`${n}/`)},Ve=async e=>{if(!e.ok)throw new q(`Remote sent ${e.status} response: ${await e.text()}`,e);if(!e.body)throw new q(`Response body is empty from remote server`,e);if(!(e.body instanceof ReadableStream))throw new q(`Expected Response body to be a ReadableStream, but got ${String(e.body)}; Content Type is ${e.headers.get(`Content-Type`)}`,e);return e},He=async e=>Ve(e).then(async e=>{let t=await e.text();try{return JSON.parse(t)}catch{throw Error(`Failed to parse response, response body: ${t}`)}});var Ue=(e,t=`http://localhost:5933/v1/`)=>{let n=({applyTextNormalization:e,languageCode:t,nextRequestIds:n,nextText:r,previousRequestIds:i,previousText:a,pronunciationDictionaryLocators:o,seed:s,voiceSettings:c})=>({extraBody:J({applyTextNormalization:e,languageCode:t,nextRequestIds:n,nextText:r,previousRequestIds:i,previousText:a,pronunciationDictionaryLocators:o?o.map(e=>J(e)):void 0,seed:s,voiceSettings:J(c??{similarityBoost:.75,stability:.5})})}),r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`elevenlabs/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`provider=elevenlabs`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},We=(e,t=`http://localhost:5933/v1/`)=>{let n=e=>{let{deploymentId:t,region:n,sampleRate:r}=e,i={deploymentId:t,region:n,sampleRate:r};return`disableSsml`in e?i.disableSsml=e.disableSsml:`lang`in e&&(i.lang=e.lang,i.gender=e.gender,i.voice=e.voice),{extraBody:J(i)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`microsoft/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`region=${r?.region}&provider=microsoft`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},Ge=(e,t=`http://localhost:5933/v1/`)=>{let n=t=>{var n,r;let i={app:{appid:(n=t.app)?.appId,token:e}};return t.app!==void 0&&(i.app={...t.app,appid:(r=t.app)?.appId,token:e}),t.user!==void 0&&(i.user=t.user),t.audio!==void 0&&(i.audio=t.audio),{extraBody:J(i)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`volcengine/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`provider=volcengine`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},Ke=(e,t=`http://localhost:5933/v1/`)=>{let n=e=>{let{sampleRate:t,volume:n,rate:r,pitch:i}=e,a={sampleRate:t,volume:n,rate:r,pitch:i};return Object.keys(a).forEach(e=>a[e]===void 0&&delete a[e]),{extraBody:J(a)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`alibaba/${r}`})},i={voice:r=>{let i=t;return i.endsWith(`v1/`)?i=i.slice(0,-3):i.endsWith(`v1`)&&(i=i.slice(0,-2)),{query:`provider=alibaba`,...r?n(r):{},apiKey:e,baseURL:i}}};return K(r,i)},Y=async e=>(e.fetch??globalThis.fetch)(Be(e.query?`api/voices?${e.query}`:`api/voices`,e.baseURL),{headers:ze({...e.headers},e.apiKey),method:`GET`,signal:e.abortSignal}).then(He).then(({voices:e})=>e);const qe=[{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`}],X=r(`providers`,()=>{let e=l(`settings/credentials/providers`,{}),{t:r}=c();async function i(e){try{let t=await fetch(`https://openrouter.ai/api/v1/models`,{headers:{Authorization:`Bearer ${e.apiKey.trim()}`,"Content-Type":`application/json`}});if(!t.ok)throw Error(`Failed to fetch OpenRouter models: ${t.statusText}`);let n=await t.json();return n.data.map(e=>({id:e.id,name:e.name||e.id,provider:`openrouter-ai`,description:e.description||``,contextLength:e.context_length,deprecated:!1}))}catch(e){throw console.error(`Error fetching OpenRouter models:`,e),e}}let o={player2:{id:`player2`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.player2.title`,name:`Player2`,descriptionKey:`settings.pages.providers.provider.player2.description`,description:`player2.game`,icon:`i-lobe-icons:player2`,defaultOptions:()=>({baseUrl:`http://localhost:4315/v1/`}),createProvider:e=>Ie(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`player2-model`,name:`Player2 Model`,provider:`player2`}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},"player2-speech":{id:`player2-speech`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.player2.title`,name:`Player2 Speech`,descriptionKey:`settings.pages.providers.provider.player2.description`,description:`player2.game`,icon:`i-lobe-icons:player2`,defaultOptions:()=>({baseUrl:`http://localhost:4315/v1/`}),createProvider:e=>Ie(e.baseUrl.trim(),`airi`),capabilities:{listVoices:async()=>await fetch(`http://localhost:4315/v1/tts/voices`).then(e=>e.json()).then(({voices:e})=>e.map(({id:e,language:t,name:n,gender:r})=>({id:e,name:n,provider:`player2-speech`,gender:r,languages:[{american_english:{code:`en`,title:`English`},british_english:{code:`en`,title:`English`},japanese:{code:`ja`,title:`Japanese`},mandarin_chinese:{code:`zh`,title:`Chinese`},spanish:{code:`es`,title:`Spanish`},french:{code:`fr`,title:`French`},hindi:{code:`hi`,title:`Hindi`},italian:{code:`it`,title:`Italian`},brazilian_portuguese:{code:`pt`,title:`Portuguese`}}[t]]})))},validators:{validateProviderConfig:e=>!!e.baseUrl}},"openrouter-ai":{id:`openrouter-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.openrouter.title`,name:`OpenRouter`,descriptionKey:`settings.pages.providers.provider.openrouter.description`,description:`openrouter.ai`,icon:`i-lobe-icons:openrouter`,defaultOptions:()=>({baseUrl:`https://openrouter.ai/api/v1/`}),createProvider:e=>Ae(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>i(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"app-local-audio-speech":{id:`app-local-audio-speech`,category:`speech`,tasks:[`text-to-speech`,`tts`],isAvailableBy:async()=>`window`in globalThis&&globalThis.window!=null&&`__TAURI__`in globalThis.window&&globalThis.window.__TAURI__!=null,nameKey:`settings.pages.providers.provider.app-local-audio-speech.title`,name:`App (Local)`,descriptionKey:`settings.pages.providers.provider.app-local-audio-speech.description`,description:`https://github.com/huggingface/candle`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"app-local-audio-transcription":{id:`app-local-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],isAvailableBy:async()=>`window`in globalThis&&globalThis.window!=null&&`__TAURI__`in globalThis.window&&globalThis.window.__TAURI__!=null,nameKey:`settings.pages.providers.provider.app-local-audio-transcription.title`,name:`App (Local)`,descriptionKey:`settings.pages.providers.provider.app-local-audio-transcription.description`,description:`https://github.com/huggingface/candle`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"browser-local-audio-speech":{id:`browser-local-audio-speech`,category:`speech`,tasks:[`text-to-speech`,`tts`],isAvailableBy:async()=>{let e=await ee();if(e)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let e=globalThis.navigator.deviceMemory;if(e>=8)return!0}return!1},nameKey:`settings.pages.providers.provider.browser-local-audio-speech.title`,name:`Browser (Local)`,descriptionKey:`settings.pages.providers.provider.browser-local-audio-speech.description`,description:`https://github.com/moeru-ai/xsai-transformers`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"browser-local-audio-transcription":{id:`browser-local-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],isAvailableBy:async()=>{let e=await ee();if(e)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let e=globalThis.navigator.deviceMemory;if(e>=8)return!0}return!1},nameKey:`settings.pages.providers.provider.browser-local-audio-transcription.title`,name:`Browser (Local)`,descriptionKey:`settings.pages.providers.provider.browser-local-audio-transcription.description`,description:`https://github.com/moeru-ai/xsai-transformers`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},ollama:{id:`ollama`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.ollama.title`,name:`Ollama`,descriptionKey:`settings.pages.providers.provider.ollama.description`,description:`ollama.com`,icon:`i-lobe-icons:ollama`,defaultOptions:()=>({baseUrl:`http://localhost:11434/v1/`}),createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...G(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"ollama-embedding":{id:`ollama-embedding`,category:`embed`,tasks:[`text-feature-extraction`],nameKey:`settings.pages.providers.provider.ollama.title`,name:`Ollama`,descriptionKey:`settings.pages.providers.provider.ollama.description`,description:`ollama.com`,icon:`i-lobe-icons:ollama`,defaultOptions:()=>({baseUrl:`http://localhost:11434/v1/`}),createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...G(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},vllm:{id:`vllm`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.vllm.title`,name:`vLLM`,descriptionKey:`settings.pages.providers.provider.vllm.description`,description:`vllm.ai`,iconColor:`i-lobe-icons:vllm`,createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`llama-2-7b`,name:`Llama 2 (7B)`,provider:`vllm`,description:`Meta's Llama 2 7B parameter model`,contextLength:4096},{id:`llama-2-13b`,name:`Llama 2 (13B)`,provider:`vllm`,description:`Meta's Llama 2 13B parameter model`,contextLength:4096},{id:`llama-2-70b`,name:`Llama 2 (70B)`,provider:`vllm`,description:`Meta's Llama 2 70B parameter model`,contextLength:4096},{id:`mistral-7b`,name:`Mistral (7B)`,provider:`vllm`,description:`Mistral AI's 7B parameter model`,contextLength:8192},{id:`mixtral-8x7b`,name:`Mixtral (8x7B)`,provider:`vllm`,description:`Mistral AI's Mixtral 8x7B MoE model`,contextLength:32768},{id:`custom`,name:`Custom Model`,provider:`vllm`,description:`Specify a custom model name`,contextLength:0}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},openai:{id:`openai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.openai.title`,name:`OpenAI`,descriptionKey:`settings.pages.providers.provider.openai.description`,description:`openai.com`,icon:`i-lobe-icons:openai`,defaultOptions:()=>({baseUrl:`https://api.openai.com/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"openai-audio-speech":{id:`openai-audio-speech`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.openai.title`,name:`OpenAI`,descriptionKey:`settings.pages.providers.provider.openai.description`,description:`openai.com`,icon:`i-lobe-icons:openai`,defaultOptions:()=>({baseUrl:`https://api.openai.com/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"openai-audio-transcription":{id:`openai-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],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=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},anthropic:{id:`anthropic`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.anthropic.title`,name:`Anthropic`,descriptionKey:`settings.pages.providers.provider.anthropic.description`,description:`anthropic.com`,icon:`i-lobe-icons:anthropic`,defaultOptions:()=>({baseUrl:`https://api.anthropic.com/v1/`}),createProvider:e=>Ce(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`claude-3-7-sonnet-20250219`,name:`Claude 3.7 Sonnet`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-sonnet-20241022`,name:`Claude 3.5 Sonnet (New)`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-haiku-20241022`,name:`Claude 3.5 Haiku`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-sonnet-20240620`,name:`Claude 3.5 Sonnet (Old)`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-haiku-20240307`,name:`Claude 3 Haiku`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-opus-20240229`,name:`Claude 3 Opus`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"google-generative-ai":{id:`google-generative-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.google-generative-ai.title`,name:`Google Gemini`,descriptionKey:`settings.pages.providers.provider.google-generative-ai.description`,description:`ai.google.dev`,icon:`i-lobe-icons:gemini`,defaultOptions:()=>({baseUrl:`https://generativelanguage.googleapis.com/v1beta/openai/`}),createProvider:e=>Ee(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Ee(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`google-generative-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},xai:{id:`xai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.xai.title`,name:`xAI`,descriptionKey:`settings.pages.providers.provider.xai.description`,description:`x.ai`,icon:`i-lobe-icons:xai`,createProvider:e=>Pe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Pe(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`xai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},deepseek:{id:`deepseek`,category:`chat`,tasks:[`text-generation`],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=>we(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...we(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`deepseek`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},elevenlabs:{id:`elevenlabs`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.elevenlabs.title`,name:`ElevenLabs`,descriptionKey:`settings.pages.providers.provider.elevenlabs.description`,description:`elevenlabs.io`,icon:`i-simple-icons:elevenlabs`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`,voiceSettings:{similarityBoost:.75,stability:.5}}),createProvider:e=>Ue(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>qe.map(e=>({id:e.model_id,name:e.name,provider:`elevenlabs`,description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{let t=Ue(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()}),r=n.findIndex(e=>e.name.includes(`Aria`)),i=n.findIndex(e=>e.name.includes(`Bill`)),a=r===-1?0:r,o=i===-1?n.length-1:i,s=Math.min(a,o),c=Math.max(a,o),l=[...n.slice(0,s),...n.slice(c+1),...n.slice(s,c+1)];return l.map(e=>({id:e.id,name:e.name,provider:`elevenlabs`,previewURL:e.preview_audio_url,languages:e.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:`microsoft-speech`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.microsoft-speech.title`,name:`Microsoft / Azure Speech`,descriptionKey:`settings.pages.providers.provider.microsoft-speech.description`,description:`speech.microsoft.com`,iconColor:`i-lobe-icons:microsoft`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>We(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`v1`,name:`v1`,provider:`microsoft-speech`,description:``,contextLength:0,deprecated:!1}],listVoices:async e=>{let t=We(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice({region:e.region})});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`microsoft-speech`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:`alibaba-cloud-model-studio`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.alibaba-cloud-model-studio.title`,name:`Alibaba Cloud Model Studio`,descriptionKey:`settings.pages.providers.provider.alibaba-cloud-model-studio.description`,description:`bailian.console.aliyun.com`,iconColor:`i-lobe-icons:alibabacloud`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>Ke(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{let t=Ke(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`alibaba-cloud-model-studio`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})},listModels:async()=>[{id:`cozyvoice-v1`,name:`CozyVoice`,provider:`alibaba-cloud-model-studio`,description:``,contextLength:0,deprecated:!1},{id:`cozyvoice-v2`,name:`CozyVoice (New)`,provider:`alibaba-cloud-model-studio`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},volcengine:{id:`volcengine`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.volcengine.title`,name:`settings.pages.providers.provider.volcengine.title`,descriptionKey:`settings.pages.providers.provider.volcengine.description`,description:`volcengine.com`,iconColor:`i-lobe-icons:volcengine`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>Ge(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{let t=Ge(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`volcano-engine`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})},listModels:async()=>[{id:`v1`,name:`v1`,provider:`volcano-engine`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl&&!!e.app&&!!e.app.appId}},"together-ai":{id:`together-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.together.title`,name:`Together.ai`,descriptionKey:`settings.pages.providers.provider.together.description`,description:`together.ai`,iconColor:`i-lobe-icons:together`,createProvider:e=>Me(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Me(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`together-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"novita-ai":{id:`novita-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.novita.title`,name:`Novita`,descriptionKey:`settings.pages.providers.provider.novita.description`,description:`novita.ai`,iconColor:`i-lobe-icons:novita`,createProvider:e=>ke(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...ke(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`novita-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"fireworks-ai":{id:`fireworks-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.fireworks.title`,name:`Fireworks.ai`,descriptionKey:`settings.pages.providers.provider.fireworks.description`,description:`fireworks.ai`,icon:`i-lobe-icons:fireworks`,createProvider:e=>Te(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Te(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`fireworks-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"featherless-ai":{id:`featherless-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.featherless.title`,name:`Featherless.ai`,descriptionKey:`settings.pages.providers.provider.featherless.description`,description:`featherless.ai`,icon:`i-lobe-icons:featherless-ai`,defaultOptions:()=>({baseUrl:`https://api.featherless.ai/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`featherless-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"cloudflare-workers-ai":{id:`cloudflare-workers-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.cloudflare-workers-ai.title`,name:`Cloudflare Workers AI`,descriptionKey:`settings.pages.providers.provider.cloudflare-workers-ai.description`,description:`cloudflare.com`,iconColor:`i-lobe-icons:cloudflare`,createProvider:e=>Ne(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"perplexity-ai":{id:`perplexity-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.perplexity.title`,name:`Perplexity`,descriptionKey:`settings.pages.providers.provider.perplexity.description`,description:`perplexity.ai`,icon:`i-lobe-icons:perplexity`,defaultOptions:()=>({baseUrl:`https://api.perplexity.ai`}),createProvider:e=>je(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`sonar-small-online`,name:`Sonar Small (Online)`,provider:`perplexity-ai`,description:`Efficient model with online search capabilities`,contextLength:12e3},{id:`sonar-medium-online`,name:`Sonar Medium (Online)`,provider:`perplexity-ai`,description:`Balanced model with online search capabilities`,contextLength:12e3},{id:`sonar-large-online`,name:`Sonar Large (Online)`,provider:`perplexity-ai`,description:`Powerful model with online search capabilities`,contextLength:12e3},{id:`codey-small`,name:`Codey Small`,provider:`perplexity-ai`,description:`Specialized for code generation and understanding`,contextLength:12e3},{id:`codey-large`,name:`Codey Large`,provider:`perplexity-ai`,description:`Advanced code generation and understanding`,contextLength:12e3}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"mistral-ai":{id:`mistral-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.mistral.title`,name:`Mistral`,descriptionKey:`settings.pages.providers.provider.mistral.description`,description:`mistral.ai`,iconColor:`i-lobe-icons:mistral`,createProvider:e=>De(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...De(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`mistral-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"moonshot-ai":{id:`moonshot-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.moonshot.title`,name:`Moonshot AI`,descriptionKey:`settings.pages.providers.provider.moonshot.description`,description:`moonshot.ai`,icon:`i-lobe-icons:moonshot`,createProvider:e=>Oe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Oe(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`moonshot-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}}};async function s(t){let n=e.value[t];if(!n)return!1;let r=o[t];return r?await r.validators.validateProviderConfig(n):!1}let d=a({});function f(t){if(!e.value[t]){var n;let r=o[t],i=(n=r.defaultOptions)?.call(r)||{};e.value[t]={baseUrl:i.baseUrl||``}}}Object.keys(o).forEach(f);async function p(){await Promise.all(Object.keys(o).map(async e=>{d.value[e]=await s(e)}))}p(),u(e,p,{deep:!0});let m=t(()=>Object.keys(o).filter(e=>d.value[e])),h=a({}),g=a({}),_=a({});async function v(t){let n=e.value[t];if(!n)return[];let r=o[t];if(!r)return[];g.value[t]=!0,_.value[t]=null;try{let e=r.capabilities.listModels?await r.capabilities.listModels(n):[];return h.value[t]=e.map(e=>({id:e.id,name:e.name,description:e.description,contextLength:e.contextLength,deprecated:e.deprecated,provider:t})),h.value[t]}catch(e){return console.error(`Error fetching models for ${t}:`,e),_.value[t]=e instanceof Error?e.message:`Unknown error`,[]}finally{g.value[t]=!1}}function y(e){return h.value[e]||[]}let b=t(()=>{let e=[];for(let t of m.value)e.push(...h.value[t]||[]);return e});async function x(){for(let e of m.value)o[e].capabilities.listModels&&await v(e)}function S(e){let t=o[e];if(!t)throw Error(`Provider metadata for ${e} not found`);return{...t,localizedName:r(t.nameKey,t.name),localizedDescription:r(t.descriptionKey,t.description)}}let C=t(()=>Object.values(o).map(e=>({...e,localizedName:r(e.nameKey,e.name),localizedDescription:r(e.descriptionKey,e.description),configured:d.value[e.id]||!1})));function w(t){let n=e.value[t];if(!n)throw Error(`Provider credentials for ${t} not found`);let r=o[t];if(!r)throw Error(`Provider metadata for ${t} not found`);try{return r.createProvider(n)}catch(e){throw console.error(`Error creating provider instance for ${t}:`,e),e}}let T=n(async()=>{let e=[];for(let t of C.value){let n=S(t.id),r=n.isAvailableBy||(()=>!0),i=await r();i&&e.push(t)}return e},[]),E=t(()=>T.value.filter(e=>e.category===`chat`)),D=t(()=>T.value.filter(e=>e.category===`speech`)),O=t(()=>T.value.filter(e=>e.category===`transcription`)),k=t(()=>E.value.filter(e=>d.value[e.id])),te=t(()=>D.value.filter(e=>d.value[e.id])),ne=t(()=>O.value.filter(e=>d.value[e.id]));function re(t){return e.value[t]}return{providers:e,getProviderConfig:re,availableProviders:m,configuredProviders:d,providerMetadata:o,getProviderMetadata:S,allProvidersMetadata:C,initializeProvider:f,validateProvider:s,availableModels:h,isLoadingModels:g,modelLoadError:_,fetchModelsForProvider:v,getModelsForProvider:y,allAvailableModels:b,loadModelsForConfiguredProviders:x,getProviderInstance:w,availableProvidersMetadata:T,allChatProvidersMetadata:E,allAudioSpeechProvidersMetadata:D,allAudioTranscriptionProvidersMetadata:O,configuredChatProvidersMetadata:k,configuredSpeechProvidersMetadata:te,configuredTranscriptionProvidersMetadata:ne}}),Je=r(`consciousness`,()=>{let e=X(),n=l(`settings/consciousness/active-provider`,``),r=l(`settings/consciousness/active-model`,``),i=l(`settings/consciousness/active-custom-model`,``),o=a({}),s=a(``),c=t(()=>{var t;return(t=e.getProviderMetadata(n.value))?.capabilities.listModels!==void 0}),d=t(()=>e.getModelsForProvider(n.value)),f=t(()=>e.isLoadingModels[n.value]||!1),p=t(()=>e.modelLoadError[n.value]||null),m=t(()=>{if(!s.value.trim())return d.value;let e=s.value.toLowerCase().trim();return d.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function h(){r.value=``,i.value=``,o.value={},s.value=``}async function g(t){var r;t&&(r=e.getProviderMetadata(n.value))?.capabilities.listModels!==void 0&&e.getModelsForProvider(t).length===0&&await e.fetchModelsForProvider(t)}let _;return u(n,async e=>{await g(e),h(),e===`player2`?_=setInterval(()=>{console.log(`Sending Player2 Health check if it is being used`),fetch(`localhost:4315/v1/health`,{method:`GET`,headers:{"player2-game-key":`airi`}}).catch(()=>{})},6e4):(_&&clearInterval(_),_=void 0)}),{activeProvider:n,activeModel:r,customModelName:i,expandedDescriptions:o,modelSearchQuery:s,supportsModelListing:c,providerModels:d,isLoadingActiveProviderModels:f,activeProviderModelError:p,filteredModels:m,resetModelSelection:h,loadModelsForProvider:g}}),Ye=async e=>(e.fetch??globalThis.fetch)(E(`audio/speech`,e.baseURL),{body:w(e),headers:T({"Content-Type":`application/json`,...e.headers},e.apiKey),method:`POST`,signal:e.abortSignal}).then(D).then(async e=>e.arrayBuffer()),Xe=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;function Z(e,t,n){let r=Ze(e);return n?r.replace(n,i):i(r);function i(e){return b(e,{subset:t})}}function Ze(e){return String(e||``).replace(Xe,``)}const Qe=/]]>/g,$e=[`>`];function et(e){return``}function tt(e){return``}const nt=[` `,` `,` `,`"`,`&`,`'`,`/`,`<`,`=`,`>`];function Q(e){return Z(e,nt)}function $(e,t){let n=String(e),r=t.options.quote||`"`;if(t.options.quoteSmart){let e=r===`"`?`'`:`"`;y(n,r)>y(n,e)&&(r=e)}return r+Z(n,[`<`,`&`,r])+r}function rt(e,t){let n=Q(e.name),r=e.public,i=e.system,a=``}const it={}.hasOwnProperty;function at(e,t){let n=Q(e.name),r=ht(e,t),i=e.attributes||{},a=r?!1:t.options.closeEmptyElements,o=[],s;for(s in i)if(it.call(i,s)){let e=i[s];e!=null&&o.push(Q(s)+`=`+$(e,t))}return`<`+n+(o.length===0?``:` `+o.join(` `))+(a?(t.options.tightClose?``:` `)+`/`:``)+`>`+r+(a?``:``)}const ot=/\?>/g,st=[`>`];function ct(e){let t=Q(e.name)||`x`,n=Z(e.value,st,ot);return``}const lt=[`&`,`<`];function ut(e){return Z(e.value,lt)}function dt(e,t){return t.options.allowDangerousXml?e.value:ut(e)}const ft={}.hasOwnProperty,pt={cdata:et,comment:tt,doctype:rt,element:at,instruction:ct,raw:dt,root:ht,text:ut};function mt(e,t){let n=e&&e.type;if(!n)throw Error("Expected node, not `"+e+"`");if(!ft.call(pt,n))throw Error("Cannot compile unknown node `"+n+"`");let r=pt[n],i=r(e,t);return i}function ht(e,t){let n=e&&e.children||[],r=-1,i=[];for(;++r{let e=X(),n=l(`settings/speech/active-provider`,``),r=l(`settings/speech/active-model`,`eleven_multilingual_v2`),o=l(`settings/speech/voice`,``),s=a(),c=l(`settings/speech/pitch`,0),d=l(`settings/speech/rate`,1),f=l(`settings/speech/ssml-enabled`,!1),p=a(!1),m=a(null),h=a({}),g=l(`settings/speech/language`,`en-US`),_=a(``),v=t(()=>e.availableProviders.filter(e=>T(e)).map(t=>e.getProviderMetadata(t))),y=t(()=>{var t;return(t=e.getProviderMetadata(n.value))?.capabilities.listModels!==void 0}),b=t(()=>e.getModelsForProvider(n.value)),x=t(()=>e.isLoadingModels[n.value]||!1),S=t(()=>e.modelLoadError[n.value]||null),C=t(()=>{if(!_.value.trim())return b.value;let e=_.value.toLowerCase().trim();return b.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),w=t(()=>[`elevenlabs`,`microsoft-speech`,`azure-speech`,`google`,`alibaba-cloud-model-studio`,`volcengine`].includes(n.value));function T(e){return[`elevenlabs`,`microsoft-speech`,`azure-speech`,`google`,`amazon`,`alibaba-cloud-model-studio`,`volcengine`,`player2-speech`].includes(e)}async function E(t){if(!t||!T(t))return[];p.value=!0,m.value=null;try{var n,r;let i=await(n=(r=e.getProviderMetadata(t).capabilities).listVoices)?.call(r,e.getProviderConfig(t))||[];return h.value[t]=i,i}catch(e){return console.error(`Error fetching voices for ${t}:`,e),m.value=e instanceof Error?e.message:`Unknown error`,[]}finally{p.value=!1}}function D(e){return h.value[e]||[]}u(n,async e=>{e&&await E(e)}),i(()=>{E(n.value).then(()=>{var e;o.value&&(s.value=(e=h.value[n.value])?.find(e=>e.id===o.value))})}),u(o,e=>{var t;e&&(s.value=(t=h.value[n.value])?.find(t=>t.id===e))},{immediate:!0}),u(h,e=>{var t;o.value&&(s.value=(t=e[n.value])?.find(e=>e.id===o.value))},{immediate:!0});async function O(e,t,n,r,i={}){let a=await Ye({...e.speech(t,{...i}),input:n,voice:r});return a}function k(e,t,n){var r;let i=n?.pitch,a=n?.speed,o=n?.volume,s={pitch:i==null?void 0:i>0?`+${i}%`:`-${i}%`,rate:a==null?void 0:a===1?`1`:`${a}`,volume:o==null?void 0:o>0?`+${o}%`:`${o}%`},c=_t(`speak`,{version:`1.0`,xmlns:`http://www.w3.org/2001/10/synthesis`,"xml:lang":(r=t.languages[0])?.code||`en-US`},[_t(`voice`,{name:t.id,gender:t.gender||`neutral`},[Object.entries(s).filter(([e,t])=>t!=null).length>0?_t(`prosody`,{pitch:i==null?void 0:i>0?`+${i}%`:`-${i}%`,rate:a==null?void 0:a===1?`1`:`${a}`,volume:o==null?void 0:o>0?`+${o}%`:`${o}%`},[e]):e])]);return gt(c)}return{activeSpeechProvider:n,activeSpeechModel:r,activeSpeechVoice:s,activeSpeechVoiceId:o,pitch:c,rate:d,ssmlEnabled:f,selectedLanguage:g,isLoadingSpeechProviderVoices:p,speechProviderError:m,availableVoices:h,modelSearchQuery:_,availableSpeechProvidersMetadata:v,supportsSSML:w,supportsModelListing:y,providerModels:b,isLoadingActiveProviderModels:x,activeProviderModelError:S,filteredModels:C,speech:O,loadVoicesForProvider:E,getVoicesForProvider:D,generateSSML:k,isSpeechProvider:T}}),xt=r(`airi-card`,()=>{let e=l(`airi-cards`,new Map),n=l(`airi-card-active-id`,`default`),r=t(()=>e.value.get(n.value)),a=Je(),s=bt(),{activeModel:d}=o(a),{activeSpeechVoiceId:f,activeSpeechModel:p}=o(s),m=t=>{let n=crypto.randomUUID();return e.value.set(n,y(t)),n},h=t=>{e.value.delete(t)},g=t=>e.value.get(t);function _(e){var t,n,r,i,a,o,s,c,l,u,m;let h=`data`in e?(t=e.data)==null||(t=t.extensions)==null?void 0:t.airi:(n=e.extensions)?.airi,g={consciousness:{model:d.value},speech:{model:p.value,voice_id:f.value}};return h?{modules:{consciousness:{model:((r=h.modules)==null||(r=r.consciousness)==null?void 0:r.model)??g.consciousness.model},speech:{model:((i=h.modules)==null||(i=i.speech)==null?void 0:i.model)??g.speech.model,voice_id:((a=h.modules)==null||(a=a.speech)==null?void 0:a.voice_id)??g.speech.voice_id,pitch:(o=h.modules)==null||(o=o.speech)==null?void 0:o.pitch,rate:(s=h.modules)==null||(s=s.speech)==null?void 0:s.rate,ssml:(c=h.modules)==null||(c=c.speech)==null?void 0:c.ssml,language:(l=h.modules)==null||(l=l.speech)==null?void 0:l.language},vrm:(u=h.modules)?.vrm,live2d:(m=h.modules)?.live2d},agents:h.agents??{}}:{modules:g,agents:{}}}function y(e){if(`data`in e){let t=e;return{name:t.data.name,version:t.data.character_version??`1.0.0`,description:t.data.description??``,creator:t.data.creator??``,notes:t.data.creator_notes??``,notesMultilingual:t.data.creator_notes_multilingual,personality:t.data.personality??``,scenario:t.data.scenario??``,greetings:[t.data.first_mes,...t.data.alternate_greetings??[]],greetingsGroupOnly:t.data.group_only_greetings??[],systemPrompt:t.data.system_prompt??``,postHistoryInstructions:t.data.post_history_instructions??``,messageExample:t.data.mes_example?t.data.mes_example.split(` `).filter(Boolean).map(e=>e.split(` `).map(e=>{if(e.startsWith(`{{char}}:`)||e.startsWith(`{{user}}:`))return e;throw Error(`Invalid message example format: ${e}`)})):[],tags:t.data.tags??[],extensions:{airi:_(t),...t.data.extensions}}}return{...e,extensions:{airi:_(e),...e.extensions}}}return i(()=>{let{t}=c();e.value.set(`default`,y({name:`ReLU`,version:`1.0.0`,description:v(t(`prompt.prefix`),t(`prompt.suffix`)).content}))}),u(r,e=>{var t,n,r;if(!e)return;let i=_(e);i&&(d.value=i==null||(t=i.modules)==null||(t=t.consciousness)==null?void 0:t.model,p.value=i==null||(n=i.modules)==null||(n=n.speech)==null?void 0:n.model,f.value=i==null||(r=i.modules)==null||(r=r.speech)==null?void 0:r.voice_id)}),{cards:e,activeCard:r,activeCardId:n,addCard:m,removeCard:h,getCard:g,currentModels:t(()=>({consciousness:{model:d.value},speech:{model:p.value,voice_id:f.value}})),systemPrompt:t(()=>{let e=r.value;if(!e)return``;let t=[e.systemPrompt,e.description,e.personality].filter(Boolean);return t.join(` diff --git a/assets/sury-DmrZ3_Oj-CDnSj_Mc.js b/assets/sury-DmrZ3_Oj-B-4he_YB.js similarity index 54% rename from assets/sury-DmrZ3_Oj-CDnSj_Mc.js rename to assets/sury-DmrZ3_Oj-B-4he_YB.js index 83005b9500160927f912658329855067c0c8342f..ee5817b5bd3b8744d10fb82c47bc8e39a5b2dbd9 100644 --- a/assets/sury-DmrZ3_Oj-CDnSj_Mc.js +++ b/assets/sury-DmrZ3_Oj-B-4he_YB.js @@ -1 +1 @@ -import{__vitePreload as e}from"./index-Dor8PgzM.js";import{tryImport as t}from"./index-CISmcbXk-DJz-iwh0.js";const n=async()=>{let{toJSONSchema:n}=await t(e(()=>import(`./__vite-optional-peer-dep_sury_xsschema-B_lOmKXZ.js`),[]),`sury`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{__vitePreload as e}from"./index-C-t5bjx6.js";import{tryImport as t}from"./index-CISmcbXk-BKEuzw_9.js";const n=async()=>{let{toJSONSchema:n}=await t(e(()=>import(`./__vite-optional-peer-dep_sury_xsschema-B_lOmKXZ.js`),[]),`sury`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/together-ai-GN2N0NkN.js b/assets/together-ai-DLS8TUdj.js similarity index 82% rename from assets/together-ai-GN2N0NkN.js rename to assets/together-ai-DLS8TUdj.js index 63ea039aec740d71182b6f840c07044eda99ebb0..c07a97ab0c8757de0a5b7b2e0271a4ed6b21b9ce 100644 --- a/assets/together-ai-GN2N0NkN.js +++ b/assets/together-ai-DLS8TUdj.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`together-ai`;var x=r({__name:`together-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`togetherapi-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.together.xyz/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`together-ai`;var x=r({__name:`together-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`togetherapi-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.together.xyz/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/transformers.web-WZURbMoG.js b/assets/transformers.web-DB6EOtf2.js similarity index 99% rename from assets/transformers.web-WZURbMoG.js rename to assets/transformers.web-DB6EOtf2.js index d66afe1a897d404761a63a83cf9151df0b2b140d..4a77ba0687bf9eec61f20b0e5223f93aa6d6893d 100644 --- a/assets/transformers.web-WZURbMoG.js +++ b/assets/transformers.web-DB6EOtf2.js @@ -1,4 +1,4 @@ -var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{__export as t,__require as n}from"./index-Dor8PgzM.js";const r=new Map,i=[],a=(e,t,n)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let a=r.get(e);if(a===void 0)r.set(e,{backend:t,priority:n});else if(a.priority>n)return;else if(a.priority===n&&a.backend!==t)throw Error(`cannot register backend "${e}" using priority ${n}`);if(n>=0){let t=i.indexOf(e);t!==-1&&i.splice(t,1);for(let t=0;t{let t=r.get(e);if(!t)return`backend not found.`;if(t.initialized)return t.backend;if(t.aborted)return t.error;{let n=!!t.initPromise;try{return n||(t.initPromise=t.backend.init(e)),await t.initPromise,t.initialized=!0,t.backend}catch(e){return n||(t.error=`${e}`,t.aborted=!0),t.error}finally{delete t.initPromise}}},s=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),r=n.length===0?i:n,a,s=[],c=new Set;for(let e of r){let t=await o(e);typeof t==`string`?s.push({name:e,err:t}):(a||=t,a===t&&c.add(e))}if(!a)throw Error(`no available backend found. ERR: ${s.map(e=>`[${e.name}] ${e.err}`).join(`, `)}`);for(let{name:e,err:t}of s)n.includes(e)&&console.warn(`removing requested execution provider "${e}" from session options because it is not available: ${t}`);let l=t.filter(e=>c.has(typeof e==`string`?e:e.name));return[a,new Proxy(e,{get:(e,t)=>t===`executionProviders`?l:Reflect.get(e,t)})]},c=`1.22.0`;let l=`warning`;const u={wasm:{},webgl:{},webgpu:{},versions:{common:c},set logLevel(e){if(e!==void 0){if(typeof e!=`string`||[`verbose`,`info`,`warning`,`error`,`fatal`].indexOf(e)===-1)throw Error(`Unsupported logging level: ${e}`);l=e}},get logLevel(){return l}};Object.defineProperty(u,`logLevel`,{enumerable:!0});const d=u,f=(e,t)=>{let n=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(1,1);n.width=e.dims[3],n.height=e.dims[2];let r=n.getContext(`2d`);if(r!=null){let i,a;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let o=t?.format===void 0?`RGB`:t.format,s=t?.norm,c,l;s===void 0||s.mean===void 0?c=[255,255,255,255]:typeof s.mean==`number`?c=[s.mean,s.mean,s.mean,s.mean]:(c=[s.mean[0],s.mean[1],s.mean[2],0],s.mean[3]!==void 0&&(c[3]=s.mean[3])),s===void 0||s.bias===void 0?l=[0,0,0,0]:typeof s.bias==`number`?l=[s.bias,s.bias,s.bias,s.bias]:(l=[s.bias[0],s.bias[1],s.bias[2],0],s.bias[3]!==void 0&&(l[3]=s.bias[3]));let u=a*i,d=0,f=u,p=u*2,m=-1;o===`RGBA`?(d=0,f=u,p=u*2,m=u*3):o===`RGB`?(d=0,f=u,p=u*2):o===`RBG`&&(d=0,p=u,f=u*2);for(let t=0;t{let n=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):new OffscreenCanvas(1,1).getContext(`2d`),r;if(n!=null){let i,a,o;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[1],o=e.dims[3]):(i=e.dims[3],a=e.dims[2],o=e.dims[1]);let s=t===void 0||t.format===void 0?`RGB`:t.format,c=t?.norm,l,u;c===void 0||c.mean===void 0?l=[255,255,255,255]:typeof c.mean==`number`?l=[c.mean,c.mean,c.mean,c.mean]:(l=[c.mean[0],c.mean[1],c.mean[2],255],c.mean[3]!==void 0&&(l[3]=c.mean[3])),c===void 0||c.bias===void 0?u=[0,0,0,0]:typeof c.bias==`number`?u=[c.bias,c.bias,c.bias,c.bias]:(u=[c.bias[0],c.bias[1],c.bias[2],0],c.bias[3]!==void 0&&(u[3]=c.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&o===4&&t.format!==`RGBA`||o===3&&t.format!==`RGB`&&t.format!==`BGR`))throw Error(`Tensor format doesn't match input tensor dims`);let f=4,p=0,m=1,h=2,g=3,_=0,v=d,y=d*2,b=-1;s===`RGBA`?(_=0,v=d,y=d*2,b=d*3):s===`RGB`?(_=0,v=d,y=d*2):s===`RBG`&&(_=0,y=d,v=d*2),r=n.createImageData(i,a);for(let t=0;t{if(e===void 0)throw Error(`Image buffer must be defined`);if(t.height===void 0||t.width===void 0)throw Error(`Image height and width must be defined`);if(t.tensorLayout===`NHWC`)throw Error(`NHWC Tensor layout is not supported yet`);let{height:n,width:r}=t,i=t.norm??{mean:255,bias:0},a,o;a=typeof i.mean==`number`?[i.mean,i.mean,i.mean,i.mean]:[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],o=typeof i.bias==`number`?[i.bias,i.bias,i.bias,i.bias]:[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let s=t.format===void 0?`RGBA`:t.format,c=t.tensorFormat===void 0||t.tensorFormat===void 0?`RGB`:t.tensorFormat,l=n*r,u=c===`RGBA`?new Float32Array(l*4):new Float32Array(l*3),d=4,f=0,p=1,m=2,h=3,g=0,_=l,v=l*2,y=-1;s===`RGB`&&(d=3,f=0,p=1,m=2,h=-1),c===`RGBA`?y=l*3:c===`RBG`?(g=0,v=l,_=l*2):c===`BGR`&&(v=0,_=l,g=l*2);for(let t=0;t{let n=typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement,r=typeof ImageData<`u`&&e instanceof ImageData,i=typeof ImageBitmap<`u`&&e instanceof ImageBitmap,a=typeof e==`string`,o,s=t??{},c=()=>{if(typeof document<`u`)return document.createElement(`canvas`);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(1,1);throw Error(`Canvas is not supported`)},l=e=>typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext(`2d`):null;if(n){let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let n=e.height,i=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(n=t.resizedHeight,i=t.resizedWidth),t!==void 0){if(s=t,t.tensorFormat!==void 0)throw Error(`Image input config format must be RGBA for HTMLImageElement`);s.tensorFormat=`RGBA`,s.height=n,s.width=i}else s.tensorFormat=`RGBA`,s.height=n,s.width=i;r.drawImage(e,0,0),o=r.getImageData(0,0,i,n).data}else throw Error(`Can not access image data`)}else if(r){let n,r;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(n=t.resizedHeight,r=t.resizedWidth):(n=e.height,r=e.width),t!==void 0&&(s=t),s.format=`RGBA`,s.height=n,s.width=r,t!==void 0){let t=c();t.width=r,t.height=n;let i=l(t);if(i!=null)i.putImageData(e,0,0),o=i.getImageData(0,0,r,n).data;else throw Error(`Can not access image data`)}else o=e.data}else if(i){if(t===void 0)throw Error(`Please provide image config with format for Imagebitmap`);let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let t=e.height,n=e.width;return r.drawImage(e,0,0,n,t),o=r.getImageData(0,0,n,t).data,s.height=t,s.width=n,m(o,s)}else throw Error(`Can not access image data`)}else if(a)return new Promise((t,n)=>{let r=c(),i=l(r);if(!e||!i)return n();let a=new Image;a.crossOrigin=`Anonymous`,a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,i.drawImage(a,0,0,r.width,r.height);let e=i.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(m(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return m(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},g=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t,o=[1,r,n,4];return new E({location:`texture`,type:`float32`,texture:e,dims:o,download:i,dispose:a})},_=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new E({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},v=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new E({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},y=(e,t,n)=>new E({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),b=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),x=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]);let S=!1;const C=()=>{if(!S){S=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(b.set(`int64`,BigInt64Array),x.set(BigInt64Array,`int64`)),t&&(b.set(`uint64`,BigUint64Array),x.set(BigUint64Array,`uint64`)),r?(b.set(`float16`,n),x.set(n,`float16`)):b.set(`float16`,Uint16Array)}},w=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new E(e.type,e.data,t);case`cpu-pinned`:return new E({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new E({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new E({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new E({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}};var E=class{constructor(e,t,n){C();let r,i;if(typeof e==`object`&&`location`in e)switch(this.dataLocation=e.location,r=e.type,i=e.dims,e.location){case`cpu-pinned`:{let t=b.get(r);if(!t)throw TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof t))throw TypeError(`buffer should be of type ${t.name}`);this.cpuData=e.data;break}case`texture`:if(r!==`float32`)throw TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case`gpu-buffer`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;case`ml-tensor`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint64`&&r!==`int8`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,o;if(typeof e==`string`)if(r=e,o=n,e===`string`){if(!Array.isArray(t))throw TypeError(`A string tensor's data must be a string array.`);a=t}else{let n=b.get(e);if(n===void 0)throw TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e===`float16`&&n===Uint16Array||e===`uint4`||e===`int4`)throw TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${n.name} as data.`);a=e===`uint64`||e===`int64`?n.from(t,BigInt):n.from(t)}else if(t instanceof n)a=t;else if(t instanceof Uint8ClampedArray)if(e===`uint8`)a=Uint8Array.from(t);else throw TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);else if(e===`float16`&&t instanceof Uint16Array&&n!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw TypeError(`A ${r} tensor's data must be type of ${n}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw TypeError(`Tensor type cannot be inferred from an empty array.`);let t=typeof e[0];if(t===`string`)r=`string`,a=e;else if(t===`boolean`)r=`bool`,a=Uint8Array.from(e);else throw TypeError(`Invalid element type of data array: ${t}.`)}else if(e instanceof Uint8ClampedArray)r=`uint8`,a=Uint8Array.from(e);else{let t=x.get(e.constructor);if(t===void 0)throw TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=t,a=e}if(o===void 0)o=[a.length];else if(!Array.isArray(o))throw TypeError(`A tensor's dims must be a number array`);i=o,this.cpuData=a,this.dataLocation=`cpu`}let a=w(i);if(this.cpuData&&a!==this.cpuData.length&&!((r===`uint4`||r===`int4`)&&Math.ceil(a/2)===this.cpuData.length))throw Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=i,this.size=a}static async fromImage(e,t){return h(e,t)}static fromTexture(e,t){return g(e,t)}static fromGpuBuffer(e,t){return _(e,t)}static fromMLTensor(e,t){return v(e,t)}static fromPinnedBuffer(e,t,n){return y(e,t,n)}toDataURL(e){return f(this,e)}toImageData(e){return p(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw 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 Error(`The data is not stored as a WebGL texture.`);return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error(`The data is not stored as a WebGPU buffer.`);return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error(`The data is not stored as a WebNN MLTensor.`);return this.mlTensorData}async getData(e){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 Error(`The current tensor is not created with a specified data downloader.`);if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation=`cpu`,this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw 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 Error(`The tensor is disposed.`)}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw Error(`Cannot reshape a tensor that owns GPU resource.`);return T(this,e)}};const D=E,O=(e,t)=>{(u.trace===void 0?!u.wasm.trace:!u.trace)||console.timeStamp(`${e}::ORT::${t}`)},k=(e,t)=>{var n;let r=(n=Error().stack)?.split(/\r\n|\r|\n/g)||[],i=!1;for(let n=0;n{(u.trace===void 0?!u.wasm.trace:!u.trace)||k(`BEGIN`,e)},ee=e=>{(u.trace===void 0?!u.wasm.trace:!u.trace)||k(`END`,e)};var te=class e{constructor(e){this.handler=e}async run(e,t,n){A();let r={},i={};if(typeof e!=`object`||!e||e instanceof D||Array.isArray(e))throw TypeError(`'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.`);let a=!0;if(typeof t==`object`){if(t===null)throw TypeError(`Unexpected argument[1]: cannot be null.`);if(t instanceof D)throw TypeError(`'fetches' cannot be a Tensor`);if(Array.isArray(t)){if(t.length===0)throw TypeError(`'fetches' cannot be an empty array.`);a=!1;for(let e of t){if(typeof e!=`string`)throw TypeError(`'fetches' must be a string array or an object.`);if(this.outputNames.indexOf(e)===-1)throw RangeError(`'fetches' contains invalid output name: ${e}.`);r[e]=null}if(typeof n==`object`&&n)i=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else{let e=!1,o=Object.getOwnPropertyNames(t);for(let n of this.outputNames)if(o.indexOf(n)!==-1){let i=t[n];(i===null||i instanceof D)&&(e=!0,a=!1,r[n]=i)}if(e){if(typeof n==`object`&&n)i=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else i=t}}else if(t!==void 0)throw TypeError(`Unexpected argument[1]: must be 'fetches' or 'options'.`);for(let t of this.inputNames)if(e[t]===void 0)throw Error(`input '${t}' is missing in 'feeds'.`);if(a)for(let e of this.outputNames)r[e]=null;let o=await this.handler.run(e,r,i),s={};for(let e in o)if(Object.hasOwnProperty.call(o,e)){let t=o[e];t instanceof D?s[e]=t:s[e]=new D(t.type,t.data,t.dims)}return ee(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){A();let a,o={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)o=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else if(t instanceof Uint8Array){if(a=t,typeof n==`object`&&n)o=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&t instanceof SharedArrayBuffer){let e=t,s=0,c=t.byteLength;if(typeof n==`object`&&n)o=n;else if(typeof n==`number`){if(s=n,!Number.isSafeInteger(s))throw RangeError(`'byteOffset' must be an integer.`);if(s<0||s>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-s,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||s+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-s}].`);if(typeof i==`object`&&i)o=i;else if(i!==void 0)throw TypeError(`'options' must be an object.`)}else if(r!==void 0)throw TypeError(`'byteLength' must be a number.`)}else if(n!==void 0)throw TypeError(`'options' must be an object.`);a=new Uint8Array(e,s,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[c,l]=await s(o),u=await c.createInferenceSessionHandler(a,l);return ee(),new e(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 ne=te;var re={};t(re,{InferenceSession:()=>ne,TRACE:()=>O,TRACE_FUNC_BEGIN:()=>A,TRACE_FUNC_END:()=>ee,Tensor:()=>D,env:()=>d,registerBackend:()=>a});var j={};t(j,{InferenceSession:()=>Ke,TRACE:()=>V,TRACE_FUNC_BEGIN:()=>Ve,TRACE_FUNC_END:()=>He,Tensor:()=>Re,default:()=>af,env:()=>z,registerBackend:()=>F}); +var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{__export as t,__require as n}from"./index-C-t5bjx6.js";const r=new Map,i=[],a=(e,t,n)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let a=r.get(e);if(a===void 0)r.set(e,{backend:t,priority:n});else if(a.priority>n)return;else if(a.priority===n&&a.backend!==t)throw Error(`cannot register backend "${e}" using priority ${n}`);if(n>=0){let t=i.indexOf(e);t!==-1&&i.splice(t,1);for(let t=0;t{let t=r.get(e);if(!t)return`backend not found.`;if(t.initialized)return t.backend;if(t.aborted)return t.error;{let n=!!t.initPromise;try{return n||(t.initPromise=t.backend.init(e)),await t.initPromise,t.initialized=!0,t.backend}catch(e){return n||(t.error=`${e}`,t.aborted=!0),t.error}finally{delete t.initPromise}}},s=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),r=n.length===0?i:n,a,s=[],c=new Set;for(let e of r){let t=await o(e);typeof t==`string`?s.push({name:e,err:t}):(a||=t,a===t&&c.add(e))}if(!a)throw Error(`no available backend found. ERR: ${s.map(e=>`[${e.name}] ${e.err}`).join(`, `)}`);for(let{name:e,err:t}of s)n.includes(e)&&console.warn(`removing requested execution provider "${e}" from session options because it is not available: ${t}`);let l=t.filter(e=>c.has(typeof e==`string`?e:e.name));return[a,new Proxy(e,{get:(e,t)=>t===`executionProviders`?l:Reflect.get(e,t)})]},c=`1.22.0`;let l=`warning`;const u={wasm:{},webgl:{},webgpu:{},versions:{common:c},set logLevel(e){if(e!==void 0){if(typeof e!=`string`||[`verbose`,`info`,`warning`,`error`,`fatal`].indexOf(e)===-1)throw Error(`Unsupported logging level: ${e}`);l=e}},get logLevel(){return l}};Object.defineProperty(u,`logLevel`,{enumerable:!0});const d=u,f=(e,t)=>{let n=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(1,1);n.width=e.dims[3],n.height=e.dims[2];let r=n.getContext(`2d`);if(r!=null){let i,a;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let o=t?.format===void 0?`RGB`:t.format,s=t?.norm,c,l;s===void 0||s.mean===void 0?c=[255,255,255,255]:typeof s.mean==`number`?c=[s.mean,s.mean,s.mean,s.mean]:(c=[s.mean[0],s.mean[1],s.mean[2],0],s.mean[3]!==void 0&&(c[3]=s.mean[3])),s===void 0||s.bias===void 0?l=[0,0,0,0]:typeof s.bias==`number`?l=[s.bias,s.bias,s.bias,s.bias]:(l=[s.bias[0],s.bias[1],s.bias[2],0],s.bias[3]!==void 0&&(l[3]=s.bias[3]));let u=a*i,d=0,f=u,p=u*2,m=-1;o===`RGBA`?(d=0,f=u,p=u*2,m=u*3):o===`RGB`?(d=0,f=u,p=u*2):o===`RBG`&&(d=0,p=u,f=u*2);for(let t=0;t{let n=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):new OffscreenCanvas(1,1).getContext(`2d`),r;if(n!=null){let i,a,o;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[1],o=e.dims[3]):(i=e.dims[3],a=e.dims[2],o=e.dims[1]);let s=t===void 0||t.format===void 0?`RGB`:t.format,c=t?.norm,l,u;c===void 0||c.mean===void 0?l=[255,255,255,255]:typeof c.mean==`number`?l=[c.mean,c.mean,c.mean,c.mean]:(l=[c.mean[0],c.mean[1],c.mean[2],255],c.mean[3]!==void 0&&(l[3]=c.mean[3])),c===void 0||c.bias===void 0?u=[0,0,0,0]:typeof c.bias==`number`?u=[c.bias,c.bias,c.bias,c.bias]:(u=[c.bias[0],c.bias[1],c.bias[2],0],c.bias[3]!==void 0&&(u[3]=c.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&o===4&&t.format!==`RGBA`||o===3&&t.format!==`RGB`&&t.format!==`BGR`))throw Error(`Tensor format doesn't match input tensor dims`);let f=4,p=0,m=1,h=2,g=3,_=0,v=d,y=d*2,b=-1;s===`RGBA`?(_=0,v=d,y=d*2,b=d*3):s===`RGB`?(_=0,v=d,y=d*2):s===`RBG`&&(_=0,y=d,v=d*2),r=n.createImageData(i,a);for(let t=0;t{if(e===void 0)throw Error(`Image buffer must be defined`);if(t.height===void 0||t.width===void 0)throw Error(`Image height and width must be defined`);if(t.tensorLayout===`NHWC`)throw Error(`NHWC Tensor layout is not supported yet`);let{height:n,width:r}=t,i=t.norm??{mean:255,bias:0},a,o;a=typeof i.mean==`number`?[i.mean,i.mean,i.mean,i.mean]:[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],o=typeof i.bias==`number`?[i.bias,i.bias,i.bias,i.bias]:[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let s=t.format===void 0?`RGBA`:t.format,c=t.tensorFormat===void 0||t.tensorFormat===void 0?`RGB`:t.tensorFormat,l=n*r,u=c===`RGBA`?new Float32Array(l*4):new Float32Array(l*3),d=4,f=0,p=1,m=2,h=3,g=0,_=l,v=l*2,y=-1;s===`RGB`&&(d=3,f=0,p=1,m=2,h=-1),c===`RGBA`?y=l*3:c===`RBG`?(g=0,v=l,_=l*2):c===`BGR`&&(v=0,_=l,g=l*2);for(let t=0;t{let n=typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement,r=typeof ImageData<`u`&&e instanceof ImageData,i=typeof ImageBitmap<`u`&&e instanceof ImageBitmap,a=typeof e==`string`,o,s=t??{},c=()=>{if(typeof document<`u`)return document.createElement(`canvas`);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(1,1);throw Error(`Canvas is not supported`)},l=e=>typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext(`2d`):null;if(n){let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let n=e.height,i=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(n=t.resizedHeight,i=t.resizedWidth),t!==void 0){if(s=t,t.tensorFormat!==void 0)throw Error(`Image input config format must be RGBA for HTMLImageElement`);s.tensorFormat=`RGBA`,s.height=n,s.width=i}else s.tensorFormat=`RGBA`,s.height=n,s.width=i;r.drawImage(e,0,0),o=r.getImageData(0,0,i,n).data}else throw Error(`Can not access image data`)}else if(r){let n,r;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(n=t.resizedHeight,r=t.resizedWidth):(n=e.height,r=e.width),t!==void 0&&(s=t),s.format=`RGBA`,s.height=n,s.width=r,t!==void 0){let t=c();t.width=r,t.height=n;let i=l(t);if(i!=null)i.putImageData(e,0,0),o=i.getImageData(0,0,r,n).data;else throw Error(`Can not access image data`)}else o=e.data}else if(i){if(t===void 0)throw Error(`Please provide image config with format for Imagebitmap`);let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let t=e.height,n=e.width;return r.drawImage(e,0,0,n,t),o=r.getImageData(0,0,n,t).data,s.height=t,s.width=n,m(o,s)}else throw Error(`Can not access image data`)}else if(a)return new Promise((t,n)=>{let r=c(),i=l(r);if(!e||!i)return n();let a=new Image;a.crossOrigin=`Anonymous`,a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,i.drawImage(a,0,0,r.width,r.height);let e=i.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(m(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return m(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},g=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t,o=[1,r,n,4];return new E({location:`texture`,type:`float32`,texture:e,dims:o,download:i,dispose:a})},_=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new E({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},v=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new E({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},y=(e,t,n)=>new E({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),b=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),x=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]);let S=!1;const C=()=>{if(!S){S=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(b.set(`int64`,BigInt64Array),x.set(BigInt64Array,`int64`)),t&&(b.set(`uint64`,BigUint64Array),x.set(BigUint64Array,`uint64`)),r?(b.set(`float16`,n),x.set(n,`float16`)):b.set(`float16`,Uint16Array)}},w=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new E(e.type,e.data,t);case`cpu-pinned`:return new E({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new E({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new E({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new E({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}};var E=class{constructor(e,t,n){C();let r,i;if(typeof e==`object`&&`location`in e)switch(this.dataLocation=e.location,r=e.type,i=e.dims,e.location){case`cpu-pinned`:{let t=b.get(r);if(!t)throw TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof t))throw TypeError(`buffer should be of type ${t.name}`);this.cpuData=e.data;break}case`texture`:if(r!==`float32`)throw TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case`gpu-buffer`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;case`ml-tensor`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint64`&&r!==`int8`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,o;if(typeof e==`string`)if(r=e,o=n,e===`string`){if(!Array.isArray(t))throw TypeError(`A string tensor's data must be a string array.`);a=t}else{let n=b.get(e);if(n===void 0)throw TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e===`float16`&&n===Uint16Array||e===`uint4`||e===`int4`)throw TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${n.name} as data.`);a=e===`uint64`||e===`int64`?n.from(t,BigInt):n.from(t)}else if(t instanceof n)a=t;else if(t instanceof Uint8ClampedArray)if(e===`uint8`)a=Uint8Array.from(t);else throw TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);else if(e===`float16`&&t instanceof Uint16Array&&n!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw TypeError(`A ${r} tensor's data must be type of ${n}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw TypeError(`Tensor type cannot be inferred from an empty array.`);let t=typeof e[0];if(t===`string`)r=`string`,a=e;else if(t===`boolean`)r=`bool`,a=Uint8Array.from(e);else throw TypeError(`Invalid element type of data array: ${t}.`)}else if(e instanceof Uint8ClampedArray)r=`uint8`,a=Uint8Array.from(e);else{let t=x.get(e.constructor);if(t===void 0)throw TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=t,a=e}if(o===void 0)o=[a.length];else if(!Array.isArray(o))throw TypeError(`A tensor's dims must be a number array`);i=o,this.cpuData=a,this.dataLocation=`cpu`}let a=w(i);if(this.cpuData&&a!==this.cpuData.length&&!((r===`uint4`||r===`int4`)&&Math.ceil(a/2)===this.cpuData.length))throw Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=i,this.size=a}static async fromImage(e,t){return h(e,t)}static fromTexture(e,t){return g(e,t)}static fromGpuBuffer(e,t){return _(e,t)}static fromMLTensor(e,t){return v(e,t)}static fromPinnedBuffer(e,t,n){return y(e,t,n)}toDataURL(e){return f(this,e)}toImageData(e){return p(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw 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 Error(`The data is not stored as a WebGL texture.`);return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error(`The data is not stored as a WebGPU buffer.`);return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error(`The data is not stored as a WebNN MLTensor.`);return this.mlTensorData}async getData(e){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 Error(`The current tensor is not created with a specified data downloader.`);if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation=`cpu`,this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw 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 Error(`The tensor is disposed.`)}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw Error(`Cannot reshape a tensor that owns GPU resource.`);return T(this,e)}};const D=E,O=(e,t)=>{(u.trace===void 0?!u.wasm.trace:!u.trace)||console.timeStamp(`${e}::ORT::${t}`)},k=(e,t)=>{var n;let r=(n=Error().stack)?.split(/\r\n|\r|\n/g)||[],i=!1;for(let n=0;n{(u.trace===void 0?!u.wasm.trace:!u.trace)||k(`BEGIN`,e)},ee=e=>{(u.trace===void 0?!u.wasm.trace:!u.trace)||k(`END`,e)};var te=class e{constructor(e){this.handler=e}async run(e,t,n){A();let r={},i={};if(typeof e!=`object`||!e||e instanceof D||Array.isArray(e))throw TypeError(`'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.`);let a=!0;if(typeof t==`object`){if(t===null)throw TypeError(`Unexpected argument[1]: cannot be null.`);if(t instanceof D)throw TypeError(`'fetches' cannot be a Tensor`);if(Array.isArray(t)){if(t.length===0)throw TypeError(`'fetches' cannot be an empty array.`);a=!1;for(let e of t){if(typeof e!=`string`)throw TypeError(`'fetches' must be a string array or an object.`);if(this.outputNames.indexOf(e)===-1)throw RangeError(`'fetches' contains invalid output name: ${e}.`);r[e]=null}if(typeof n==`object`&&n)i=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else{let e=!1,o=Object.getOwnPropertyNames(t);for(let n of this.outputNames)if(o.indexOf(n)!==-1){let i=t[n];(i===null||i instanceof D)&&(e=!0,a=!1,r[n]=i)}if(e){if(typeof n==`object`&&n)i=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else i=t}}else if(t!==void 0)throw TypeError(`Unexpected argument[1]: must be 'fetches' or 'options'.`);for(let t of this.inputNames)if(e[t]===void 0)throw Error(`input '${t}' is missing in 'feeds'.`);if(a)for(let e of this.outputNames)r[e]=null;let o=await this.handler.run(e,r,i),s={};for(let e in o)if(Object.hasOwnProperty.call(o,e)){let t=o[e];t instanceof D?s[e]=t:s[e]=new D(t.type,t.data,t.dims)}return ee(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){A();let a,o={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)o=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else if(t instanceof Uint8Array){if(a=t,typeof n==`object`&&n)o=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&t instanceof SharedArrayBuffer){let e=t,s=0,c=t.byteLength;if(typeof n==`object`&&n)o=n;else if(typeof n==`number`){if(s=n,!Number.isSafeInteger(s))throw RangeError(`'byteOffset' must be an integer.`);if(s<0||s>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-s,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||s+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-s}].`);if(typeof i==`object`&&i)o=i;else if(i!==void 0)throw TypeError(`'options' must be an object.`)}else if(r!==void 0)throw TypeError(`'byteLength' must be a number.`)}else if(n!==void 0)throw TypeError(`'options' must be an object.`);a=new Uint8Array(e,s,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[c,l]=await s(o),u=await c.createInferenceSessionHandler(a,l);return ee(),new e(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 ne=te;var re={};t(re,{InferenceSession:()=>ne,TRACE:()=>O,TRACE_FUNC_BEGIN:()=>A,TRACE_FUNC_END:()=>ee,Tensor:()=>D,env:()=>d,registerBackend:()=>a});var j={};t(j,{InferenceSession:()=>Ke,TRACE:()=>V,TRACE_FUNC_BEGIN:()=>Ve,TRACE_FUNC_END:()=>He,Tensor:()=>Re,default:()=>af,env:()=>z,registerBackend:()=>F}); /*! * ONNX Runtime Web v1.22.0-dev.20250409-89f8206ba4 * Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/assets/valibot-CQk-M5rL-DabJ-oZi.js b/assets/valibot-CQk-M5rL-CwVUpuNO.js similarity index 52% rename from assets/valibot-CQk-M5rL-DabJ-oZi.js rename to assets/valibot-CQk-M5rL-CwVUpuNO.js index d5a3090af405d74824131b49fa1c6edfbf2f3a8f..c183467a7955562ba8f9510e23d6eae8314e7953 100644 --- a/assets/valibot-CQk-M5rL-DabJ-oZi.js +++ b/assets/valibot-CQk-M5rL-CwVUpuNO.js @@ -1 +1 @@ -import{__vitePreload as e}from"./index-Dor8PgzM.js";import{tryImport as t}from"./index-CISmcbXk-DJz-iwh0.js";const n=async()=>{let{toJsonSchema:n}=await t(e(()=>import(`./dist-CONIs07P.js`),[]),`@valibot/to-json-schema`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{__vitePreload as e}from"./index-C-t5bjx6.js";import{tryImport as t}from"./index-CISmcbXk-BKEuzw_9.js";const n=async()=>{let{toJsonSchema:n}=await t(e(()=>import(`./dist-CONIs07P.js`),[]),`@valibot/to-json-schema`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/vibrant-Bgs02A1a.js b/assets/vibrant-GPCtw0rY.js similarity index 88% rename from assets/vibrant-Bgs02A1a.js rename to assets/vibrant-GPCtw0rY.js index a588e4b607f63eb3354f256facc8bf45de688de5..508e43abe9e75f7fca13e2fd71ae0a4d911062dc 100644 --- a/assets/vibrant-Bgs02A1a.js +++ b/assets/vibrant-GPCtw0rY.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createCommentVNode as n,createElementBlock as r,createVNode as i,defineComponent as a,normalizeStyle as o,openBlock as s,ref as c,renderList as l,toDisplayString as u,unref as d,watch as f}from"./index-Dor8PgzM.js";import"./src-BnFQ5wFr.js";import{InputFile_default as p}from"./InputFile-iVzJ4JTk.js";import{Vibrant as m}from"./browser-BP4AmG4D.js";const h={flex:``,"flex-col":``,"gap-4":``},g={border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"w-full":``,flex:``,"gap-2":``,"rounded-lg":``,"p-4":``},_={border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"w-full":``,flex:``,"gap-2":``,"rounded-lg":``,"p-4":``},v={flex:``,"gap-2":``},y={"h-60":``,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"rounded-lg":``},b=[`src`];var x=a({__name:`vibrant`,setup(a){let x=c([]),S=c(),C=c([]),w=c([]);function T(e){let t=new Image;t.src=URL.createObjectURL(e),t.onload=E,S.value=t}async function E(){if(!S.value)return;let e=new m(S.value),t=await e.getPalette();C.value=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`),w.value=Object.values(t).map(e=>JSON.stringify(e))}return f(x,e=>{T(e[0])},{deep:!0}),(a,c)=>(s(),r(`div`,h,[t(`div`,g,[(s(!0),r(e,null,l(C.value,(e,t)=>(s(),r(`div`,{key:t,style:o({backgroundColor:e}),"size-20":``,"rounded-full":``},null,4))),128))]),t(`div`,_,u(w.value),1),t(`div`,v,[i(d(p),{modelValue:x.value,"onUpdate:modelValue":c[0]||=e=>x.value=e,"h-60":``,"w-full":``},null,8,[`modelValue`])]),t(`div`,y,[S.value?(s(),r(`img`,{key:0,src:S.value.src,"h-full":``,"w-full":``,"object-contain":``},null,8,b)):n(``,!0)])]))}}),S=x;export{S as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createCommentVNode as n,createElementBlock as r,createVNode as i,defineComponent as a,normalizeStyle as o,openBlock as s,ref as c,renderList as l,toDisplayString as u,unref as d,watch as f}from"./index-C-t5bjx6.js";import"./src-B9Iy8991.js";import{InputFile_default as p}from"./InputFile-WiujwxGd.js";import{Vibrant as m}from"./browser-BP4AmG4D.js";const h={flex:``,"flex-col":``,"gap-4":``},g={border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"w-full":``,flex:``,"gap-2":``,"rounded-lg":``,"p-4":``},_={border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"w-full":``,flex:``,"gap-2":``,"rounded-lg":``,"p-4":``},v={flex:``,"gap-2":``},y={"h-60":``,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"rounded-lg":``},b=[`src`];var x=a({__name:`vibrant`,setup(a){let x=c([]),S=c(),C=c([]),w=c([]);function T(e){let t=new Image;t.src=URL.createObjectURL(e),t.onload=E,S.value=t}async function E(){if(!S.value)return;let e=new m(S.value),t=await e.getPalette();C.value=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`),w.value=Object.values(t).map(e=>JSON.stringify(e))}return f(x,e=>{T(e[0])},{deep:!0}),(a,c)=>(s(),r(`div`,h,[t(`div`,g,[(s(!0),r(e,null,l(C.value,(e,t)=>(s(),r(`div`,{key:t,style:o({backgroundColor:e}),"size-20":``,"rounded-full":``},null,4))),128))]),t(`div`,_,u(w.value),1),t(`div`,v,[i(d(p),{modelValue:x.value,"onUpdate:modelValue":c[0]||=e=>x.value=e,"h-60":``,"w-full":``},null,8,[`modelValue`])]),t(`div`,y,[S.value?(s(),r(`img`,{key:0,src:S.value.src,"h-full":``,"w-full":``,"object-contain":``},null,8,b)):n(``,!0)])]))}}),S=x;export{S as default}; \ No newline at end of file diff --git a/assets/volcengine-p6oDJzj5.js b/assets/volcengine-B-dG8mwz.js similarity index 82% rename from assets/volcengine-p6oDJzj5.js rename to assets/volcengine-B-dG8mwz.js index e1ae7295df4973661b7e856f16fec41e7df66654..bd07df4ac87c3ed774bbe156f9b07b043ad0383b 100644 --- a/assets/volcengine-p6oDJzj5.js +++ b/assets/volcengine-B-dG8mwz.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import{FieldInput_default as h,FieldRange_default as g}from"./src-BnFQ5wFr.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b={flex:`~ col gap-4`},x=`volcengine`,S=`v1`;var C=i({__name:`volcengine`,setup(i){let y=s(1),C=m(),w=p(),{providers:T}=c(w),{t:E}=u(),D=e({get:()=>{var e;return((e=T.value[x])==null||(e=e.app)==null?void 0:e.appId)||``},set:e=>{T.value[x]||(T.value[x]={}),T.value[x].app={appId:e}}}),O=e(()=>{var e;return!!(e=T.value[x])?.apiKey}),k=e(()=>C.availableVoices[x]||[]);async function A(e,t,n){let r=w.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=w.getProviderConfig(x),a=i.model||S;return await C.speech(r,a,e,t,{...i})}return a(async()=>{let e=w.getProviderConfig(x),t=w.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await C.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),d(y,async()=>{let e=w.getProviderConfig(x);e.audio||={},e.audio.speedRatio=y.value}),d([T,D],async()=>{let e=w.getProviderConfig(x),t=w.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await C.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S},{"basic-settings":f(()=>[t(`div`,b,[r(l(h),{modelValue:D.value,"onUpdate:modelValue":i[0]||=e=>D.value=e,label:l(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.label`),description:l(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.description`),required:``},null,8,[`modelValue`,`label`,`description`])])]),"voice-settings":f(()=>[r(l(g),{modelValue:y.value,"onUpdate:modelValue":i[1]||=e=>y.value=e,label:l(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:f(()=>[r(l(_),{"available-voices":k.value,"generate-speech":A,"api-key-configured":O.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import{FieldInput_default as h,FieldRange_default as g}from"./src-B9Iy8991.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b={flex:`~ col gap-4`},x=`volcengine`,S=`v1`;var C=i({__name:`volcengine`,setup(i){let y=s(1),C=m(),w=p(),{providers:T}=c(w),{t:E}=u(),D=e({get:()=>{var e;return((e=T.value[x])==null||(e=e.app)==null?void 0:e.appId)||``},set:e=>{T.value[x]||(T.value[x]={}),T.value[x].app={appId:e}}}),O=e(()=>{var e;return!!(e=T.value[x])?.apiKey}),k=e(()=>C.availableVoices[x]||[]);async function A(e,t,n){let r=w.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=w.getProviderConfig(x),a=i.model||S;return await C.speech(r,a,e,t,{...i})}return a(async()=>{let e=w.getProviderConfig(x),t=w.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await C.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),d(y,async()=>{let e=w.getProviderConfig(x);e.audio||={},e.audio.speedRatio=y.value}),d([T,D],async()=>{let e=w.getProviderConfig(x),t=w.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await C.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S},{"basic-settings":f(()=>[t(`div`,b,[r(l(h),{modelValue:D.value,"onUpdate:modelValue":i[0]||=e=>D.value=e,label:l(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.label`),description:l(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.description`),required:``},null,8,[`modelValue`,`label`,`description`])])]),"voice-settings":f(()=>[r(l(g),{modelValue:y.value,"onUpdate:modelValue":i[1]||=e=>y.value=e,label:l(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:f(()=>[r(l(_),{"available-voices":k.value,"generate-speech":A,"api-key-configured":O.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file diff --git a/assets/xai-CNHx3pHj.js b/assets/xai-5DuPupy5.js similarity index 82% rename from assets/xai-CNHx3pHj.js rename to assets/xai-5DuPupy5.js index 0827f2e76aa048354a5eefb8653e20a0d2f900cf..fcc1bc0dd85f62d9d1ff6c6cd39fbfec54555800 100644 --- a/assets/xai-CNHx3pHj.js +++ b/assets/xai-5DuPupy5.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-Dor8PgzM.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-DJz-iwh0.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BVVBBF04.js";import"./Button-C9y21VLy.js";import"./src-BnFQ5wFr.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-1m8YjNRO.js";import"./queues-BTBffrrj.js";import"./composables-BOdj-CMj.js";import"./sleep-CvjNLutj.js";import"./queue-aUPoxb9G.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`xai`;var x=r({__name:`xai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`xai-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.x.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-C-t5bjx6.js";import"./import-url-browser-BPXUaBlv.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BKEuzw_9.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-BW_6w_OI.js";import"./Button-DE0e46lv.js";import"./src-B9Iy8991.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DaLVZOhF.js";import"./queues-DD1Fxfss.js";import"./composables-CEnUnIM2.js";import"./sleep-CvjNLutj.js";import"./queue-Bp4D1cP3.js";import"./dist-F6JCieW1.js";import"./webgpu-aYTuek9b.js";import{route_block_default as y}from"./route-block--T8TG4is.js";const b=`xai`;var x=r({__name:`xai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`xai-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.x.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/zod-Db63SLXj-jXllG_aY.js b/assets/zod-Db63SLXj-BvllDf1x.js similarity index 85% rename from assets/zod-Db63SLXj-jXllG_aY.js rename to assets/zod-Db63SLXj-BvllDf1x.js index d5b22527b56b113e96293ee603c37c02e1453f9e..1ddf0ceb968f246434a8359c45b0d8903a3bf57e 100644 --- a/assets/zod-Db63SLXj-jXllG_aY.js +++ b/assets/zod-Db63SLXj-BvllDf1x.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-BF-DsdBI.js","assets/types-AwjH7X1C.js"])))=>i.map(i=>d[i]); -import{__vitePreload as e}from"./index-Dor8PgzM.js";import{missingDependenciesUrl as t}from"./index-CISmcbXk-DJz-iwh0.js";const n=async()=>{let n=e=>{throw Error(`xsschema: Missing zod v4 dependencies "zod". see ${t}`)},r=e=>{throw Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${t}`)};try{let{toJSONSchema:t}=await e(async()=>{let{toJSONSchema:e}=await import(`./core-DLGqGxHa.js`);return{toJSONSchema:e}},[]);n=t}catch(e){e instanceof Error&&console.error(e.message)}try{let{zodToJsonSchema:t}=await e(async()=>{let{zodToJsonSchema:e}=await import(`./esm-BF-DsdBI.js`);return{zodToJsonSchema:e}},__vite__mapDeps([0,1]));r=t}catch(e){e instanceof Error&&console.error(e.message)}return async e=>`_zod`in e?n(e):r(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{__vitePreload as e}from"./index-C-t5bjx6.js";import{missingDependenciesUrl as t}from"./index-CISmcbXk-BKEuzw_9.js";const n=async()=>{let n=e=>{throw Error(`xsschema: Missing zod v4 dependencies "zod". see ${t}`)},r=e=>{throw Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${t}`)};try{let{toJSONSchema:t}=await e(async()=>{let{toJSONSchema:e}=await import(`./core-DLGqGxHa.js`);return{toJSONSchema:e}},[]);n=t}catch(e){e instanceof Error&&console.error(e.message)}try{let{zodToJsonSchema:t}=await e(async()=>{let{zodToJsonSchema:e}=await import(`./esm-BF-DsdBI.js`);return{zodToJsonSchema:e}},__vite__mapDeps([0,1]));r=t}catch(e){e instanceof Error&&console.error(e.message)}return async e=>`_zod`in e?n(e):r(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/index.html b/index.html index 2d17ab0c8ef3e5556078ca664e4d42d4617bf42a..858aaf68e5f6dd21cddc8f059eb0081abd381b76 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ src="/remote-assets/page-external-data/js/script.js" > - + diff --git a/sw.js b/sw.js index a10948f95cd577071befc790b5d7168eb4ece8c9..1b1562a795a4a07280597ecbe1993120e24348b9 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let u={};const a=s=>l(s,n),o={module:{uri:n},exports:u,require:a};e[n]=Promise.all(r.map(s=>o[s]||a(s))).then(s=>(i(...s),u))}}define(["./workbox-3aa584b4"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/__vite-browser-external-z9j0cN3P.js",revision:null},{url:"assets/__vite-optional-peer-dep_effect_xsschema-DJmQZR04.js",revision:null},{url:"assets/__vite-optional-peer-dep_sury_xsschema-B_lOmKXZ.js",revision:null},{url:"assets/_...all_-Cre4u0Q1.js",revision:null},{url:"assets/airi-card-mw1JngjQ.js",revision:null},{url:"assets/alibaba-cloud-model-studio-CzyJX8a2.js",revision:null},{url:"assets/AnimatedWave-BKRQHFx2.css",revision:null},{url:"assets/AnimatedWave-BwQ8RHQR.js",revision:null},{url:"assets/anthropic-CLnNuWBX.js",revision:null},{url:"assets/appearance-DBeyZLwP.js",revision:null},{url:"assets/arktype-C-GObzDh-BnCES2qI.js",revision:null},{url:"assets/audio-ablSksVU.js",revision:null},{url:"assets/audio-record-D3btUW_B.js",revision:null},{url:"assets/background-remove-Bq9ik3yO.js",revision:null},{url:"assets/Basic-CbvQnFR9.js",revision:null},{url:"assets/browser-BP4AmG4D.js",revision:null},{url:"assets/browser-CMSJHaBF.js",revision:null},{url:"assets/Button-C9y21VLy.js",revision:null},{url:"assets/Button-D6PjaMaR.css",revision:null},{url:"assets/CardCreate-C0oil_xo.js",revision:null},{url:"assets/CardCreate-Cs19blbA.js",revision:null},{url:"assets/CardCreationDialog-C6JidgYK.js",revision:null},{url:"assets/CardCreationDialog-CNtImmVB.css",revision:null},{url:"assets/CardCreationDialog-CYjvvafK.js",revision:null},{url:"assets/CardDetailDialog-BW_jiSws.js",revision:null},{url:"assets/CardDetailDialog-C5WGcTv5.js",revision:null},{url:"assets/CardListItem-DalWAjah.js",revision:null},{url:"assets/CardListItem-DRyTsPsI.js",revision:null},{url:"assets/chat-kDuZ8L8x.js",revision:null},{url:"assets/cloudflare-workers-ai-uldf83tZ.js",revision:null},{url:"assets/color-scheme-BR3byuGg.js",revision:null},{url:"assets/color-scheme-DQ9rzeUD.css",revision:null},{url:"assets/ColorPalette-B5CDhrZt.js",revision:null},{url:"assets/components-1m8YjNRO.js",revision:null},{url:"assets/components-BhgRi_z7.css",revision:null},{url:"assets/composables-BOdj-CMj.js",revision:null},{url:"assets/consciousness-kAj-ksUV.js",revision:null},{url:"assets/core-DLGqGxHa.js",revision:null},{url:"assets/deepseek-p_9m2h9g.js",revision:null},{url:"assets/default-browser-vwqgKA0M.js",revision:null},{url:"assets/default-DK2eGkeE.js",revision:null},{url:"assets/default-node-EA9BojRq.js",revision:null},{url:"assets/delays-CenmsVvX.js",revision:null},{url:"assets/DeleteCardDialog-C72b0_i8.js",revision:null},{url:"assets/DeleteCardDialog-Ca2Mm-16.js",revision:null},{url:"assets/developer-D6LGtcCU.js",revision:null},{url:"assets/dist-B8MUgAeh.js",revision:null},{url:"assets/dist-CONIs07P.js",revision:null},{url:"assets/dist-F6JCieW1.js",revision:null},{url:"assets/duckdb-browser-coi.pthread.worker-WD1J30pV.js",revision:null},{url:"assets/duckdb-browser-coi.worker-Ji2I_m5s.js",revision:null},{url:"assets/duckdb-browser-eh.worker-B2xnDV1H.js",revision:null},{url:"assets/duckdb-browser-mvp.worker-DCs3_EjR.js",revision:null},{url:"assets/duckdb-coi-CSr8FQO4.wasm",revision:null},{url:"assets/duckdb-eh-BJOC5S4x.wasm",revision:null},{url:"assets/duckdb-mvp-8HYqhb4i.wasm",revision:null},{url:"assets/duckdb-mvp-C3i5IjU8.js",revision:null},{url:"assets/effect-WSjEuzC9-B-2N9gqs.js",revision:null},{url:"assets/elevenlabs-wE9VDxlm.js",revision:null},{url:"assets/emotions-BS9jIw56.js",revision:null},{url:"assets/esm-BF-DsdBI.js",revision:null},{url:"assets/featherless-ai-DQPQketQ.js",revision:null},{url:"assets/filter-message-BialTeOq.js",revision:null},{url:"assets/fireworks-ai-BK1JbfzP.js",revision:null},{url:"assets/general-BvsEaIJQ.js",revision:null},{url:"assets/gesture-circle-dEhSZQp3.js",revision:null},{url:"assets/google-generative-ai-BtzrxrfR.js",revision:null},{url:"assets/HeaderLink-BN-EJFUu.js",revision:null},{url:"assets/HeaderLink-DAzsygCR.css",revision:null},{url:"assets/hearing-8DQaE61m.js",revision:null},{url:"assets/home-By88AHp7.js",revision:null},{url:"assets/icon-animation-BMPmq1VP.js",revision:null},{url:"assets/IconAnimation-DNjwD43A.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-BvW9nCQG.js",revision:null},{url:"assets/import-url-browser-BPXUaBlv.js",revision:null},{url:"assets/import-url-browser-D6kI1pk-.js",revision:null},{url:"assets/import-url-node-CDn8y3R9.js",revision:null},{url:"assets/index-BtJ4BQCK.css",revision:null},{url:"assets/index-CISmcbXk-DJz-iwh0.js",revision:null},{url:"assets/index-Dor8PgzM.js",revision:null},{url:"assets/InputFile-iVzJ4JTk.js",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.3/Core/live2dcubismcore.min.js",revision:null},{url:"assets/memory-DTRopWuR.js",revision:null},{url:"assets/memory-long-term-DKciszM5.js",revision:null},{url:"assets/memory-short-term-Bm0Da8ag.js",revision:null},{url:"assets/messages-Bpag3yji.js",revision:null},{url:"assets/microsoft-speech-oHJyYUA3.js",revision:null},{url:"assets/mistral-ai-CSPbz6P7.js",revision:null},{url:"assets/models-AmY2AY0C.js",revision:null},{url:"assets/models-ctVuVUBS.css",revision:null},{url:"assets/modules-B4NyxInC.js",revision:null},{url:"assets/moonshot-ai-DQXpgnTx.js",revision:null},{url:"assets/novita-ai-utW-azgn.js",revision:null},{url:"assets/ollama-CHn_CRdf.js",revision:null},{url:"assets/openai-audio-speech-CIhpAE_g.js",revision:null},{url:"assets/openai-audio-transcription-BQWhP4fg.js",revision:null},{url:"assets/openai-D78WUN50.js",revision:null},{url:"assets/openrouter-ai-B5FAPnom.js",revision:null},{url:"assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",revision:null},{url:"assets/pages-C4YaFCau.js",revision:null},{url:"assets/plain-Cy4loiH2.js",revision:null},{url:"assets/player2-DQr7xDpa.js",revision:null},{url:"assets/player2-speech-DdGKDDVO.js",revision:null},{url:"assets/polaroid-DPAymSNw.js",revision:null},{url:"assets/process.worklet-CF6Ao8XG.js",revision:null},{url:"assets/providers-D-_VRMeK.js",revision:null},{url:"assets/queue-aUPoxb9G.js",revision:null},{url:"assets/queue-BqR-8_EY.js",revision:null},{url:"assets/queues-BTBffrrj.js",revision:null},{url:"assets/route-block--T8TG4is.js",revision:null},{url:"assets/scene-Bait6ok6.js",revision:null},{url:"assets/settings-7Adg0ndZ.js",revision:null},{url:"assets/settings-B5qvHxHm.js",revision:null},{url:"assets/sleep-CvjNLutj.js",revision:null},{url:"assets/speech-ByP1uYEY.js",revision:null},{url:"assets/src-B8Pazang.css",revision:null},{url:"assets/src-BnFQ5wFr.js",revision:null},{url:"assets/stage-CVXzpwpy.js",revision:null},{url:"assets/stage-PUSvLclx.js",revision:null},{url:"assets/stores-BVVBBF04.js",revision:null},{url:"assets/sury-DmrZ3_Oj-CDnSj_Mc.js",revision:null},{url:"assets/Textarea-D5jZ5rL5.js",revision:null},{url:"assets/together-ai-GN2N0NkN.js",revision:null},{url:"assets/transformers.web-WZURbMoG.js",revision:null},{url:"assets/types-AwjH7X1C.js",revision:null},{url:"assets/valibot-CQk-M5rL-DabJ-oZi.js",revision:null},{url:"assets/vibrant-Bgs02A1a.js",revision:null},{url:"assets/volcengine-p6oDJzj5.js",revision:null},{url:"assets/webgpu-aYTuek9b.js",revision:null},{url:"assets/worker-eKZGDR4a.js",revision:null},{url:"assets/xai-CNHx3pHj.js",revision:null},{url:"assets/zod-Db63SLXj-jXllG_aY.js",revision:null},{url:"index.html",revision:"b083c9e6ae29e2570a4884fdbf7bbd32"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"apple-touch-icon.png",revision:"b41f3c1ba3c98364c640fe2b7348bd39"},{url:"favicon.svg",revision:"47d50a7bc31b26d14f3895982906935f"},{url:"maskable_icon_x192.png",revision:"a6ed025fb1491e8b498c9f4c0064d190"},{url:"maskable_icon_x512.png",revision:"b7b2c2d9bda88c74a295695c8a0e7468"},{url:"web-app-manifest-192x192.png",revision:"c9731148ea6befa78a495f63536c82eb"},{url:"web-app-manifest-512x512.png",revision:"bcae855d5ff588b682314fe1c6e530f0"},{url:"manifest.webmanifest",revision:"13ac96785e6c03e0cb109d13086bf9b2"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/docs\//,/^\/ui\//,/^\/remote-assets\//,/^\/api\//]}))}); +if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let u={};const o=s=>l(s,n),a={module:{uri:n},exports:u,require:o};e[n]=Promise.all(r.map(s=>a[s]||o(s))).then(s=>(i(...s),u))}}define(["./workbox-3aa584b4"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/__vite-browser-external-CFsuT-Qx.js",revision:null},{url:"assets/__vite-optional-peer-dep_effect_xsschema-DJmQZR04.js",revision:null},{url:"assets/__vite-optional-peer-dep_sury_xsschema-B_lOmKXZ.js",revision:null},{url:"assets/_...all_-DN80NrxA.js",revision:null},{url:"assets/airi-card-DrWWMwCR.js",revision:null},{url:"assets/alibaba-cloud-model-studio-asn8Gwqn.js",revision:null},{url:"assets/AnimatedWave-BKRQHFx2.css",revision:null},{url:"assets/AnimatedWave-DqKMnZAQ.js",revision:null},{url:"assets/anthropic-CbFYT849.js",revision:null},{url:"assets/appearance-Bl3T7BtW.js",revision:null},{url:"assets/arktype-C-GObzDh-BnCES2qI.js",revision:null},{url:"assets/audio-B0s8-AFI.js",revision:null},{url:"assets/audio-record-COiXC0pt.js",revision:null},{url:"assets/background-remove-DVVfI1Xi.js",revision:null},{url:"assets/Basic-DnBqne8U.js",revision:null},{url:"assets/browser-BP4AmG4D.js",revision:null},{url:"assets/browser-CMSJHaBF.js",revision:null},{url:"assets/Button-8uEw5Afs.css",revision:null},{url:"assets/Button-DE0e46lv.js",revision:null},{url:"assets/CardCreate-B09nhkcM.js",revision:null},{url:"assets/CardCreate-BXajcpvK.js",revision:null},{url:"assets/CardCreationDialog-B1i7X0kT.js",revision:null},{url:"assets/CardCreationDialog-CNtImmVB.css",revision:null},{url:"assets/CardCreationDialog-ohI_4kmP.js",revision:null},{url:"assets/CardDetailDialog-pJ19LoWD.js",revision:null},{url:"assets/CardDetailDialog-RKuCdXg0.js",revision:null},{url:"assets/CardListItem-BXlJ2a3I.js",revision:null},{url:"assets/CardListItem-C5UadVtf.js",revision:null},{url:"assets/chat-C7uR1EUr.js",revision:null},{url:"assets/cloudflare-workers-ai-CYDm84zU.js",revision:null},{url:"assets/color-scheme-CkLbeWU6.js",revision:null},{url:"assets/color-scheme-DQ9rzeUD.css",revision:null},{url:"assets/ColorPalette-C8KIoKTf.js",revision:null},{url:"assets/components-BhgRi_z7.css",revision:null},{url:"assets/components-DaLVZOhF.js",revision:null},{url:"assets/composables-CEnUnIM2.js",revision:null},{url:"assets/consciousness-CEAWA4LX.js",revision:null},{url:"assets/core-DLGqGxHa.js",revision:null},{url:"assets/deepseek-BnI8cEci.js",revision:null},{url:"assets/default-browser-vwqgKA0M.js",revision:null},{url:"assets/default-C1ln69hW.js",revision:null},{url:"assets/default-node-DFUtCPbV.js",revision:null},{url:"assets/delays-CLOrklec.js",revision:null},{url:"assets/DeleteCardDialog-BIO7MxkY.js",revision:null},{url:"assets/DeleteCardDialog-D6RQM-NX.js",revision:null},{url:"assets/developer-CPJ4sT27.js",revision:null},{url:"assets/dist-BeDGrW0v.js",revision:null},{url:"assets/dist-CONIs07P.js",revision:null},{url:"assets/dist-F6JCieW1.js",revision:null},{url:"assets/duckdb-browser-coi.pthread.worker-WD1J30pV.js",revision:null},{url:"assets/duckdb-browser-coi.worker-Ji2I_m5s.js",revision:null},{url:"assets/duckdb-browser-eh.worker-B2xnDV1H.js",revision:null},{url:"assets/duckdb-browser-mvp.worker-DCs3_EjR.js",revision:null},{url:"assets/duckdb-coi-CSr8FQO4.wasm",revision:null},{url:"assets/duckdb-eh-BJOC5S4x.wasm",revision:null},{url:"assets/duckdb-mvp-8HYqhb4i.wasm",revision:null},{url:"assets/duckdb-mvp-C3i5IjU8.js",revision:null},{url:"assets/effect-WSjEuzC9-CJEidUVY.js",revision:null},{url:"assets/elevenlabs-DnbB9bTa.js",revision:null},{url:"assets/emotions-nbudrl-b.js",revision:null},{url:"assets/esm-BF-DsdBI.js",revision:null},{url:"assets/featherless-ai-3KKQQVHb.js",revision:null},{url:"assets/filter-message-DFghiITe.js",revision:null},{url:"assets/fireworks-ai-CfqA2SqF.js",revision:null},{url:"assets/general-D0JKvHDV.js",revision:null},{url:"assets/gesture-circle-BeGjgvNx.js",revision:null},{url:"assets/google-generative-ai-BC2Ukvsi.js",revision:null},{url:"assets/HeaderLink-CyWWkOPU.js",revision:null},{url:"assets/HeaderLink-DAzsygCR.css",revision:null},{url:"assets/hearing-C5OHOeCl.js",revision:null},{url:"assets/home-DMVuOG4M.js",revision:null},{url:"assets/icon-animation-DJ14_q6r.js",revision:null},{url:"assets/IconAnimation-9WCWiV-Y.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-DfeFRFtx.js",revision:null},{url:"assets/import-url-browser-BPXUaBlv.js",revision:null},{url:"assets/import-url-browser-D6kI1pk-.js",revision:null},{url:"assets/import-url-node-CDn8y3R9.js",revision:null},{url:"assets/index-BtJ4BQCK.css",revision:null},{url:"assets/index-C-t5bjx6.js",revision:null},{url:"assets/index-CISmcbXk-BKEuzw_9.js",revision:null},{url:"assets/InputFile-WiujwxGd.js",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.3/Core/live2dcubismcore.min.js",revision:null},{url:"assets/memory-B4tFztnI.js",revision:null},{url:"assets/memory-long-term-CDpPvihx.js",revision:null},{url:"assets/memory-short-term-C8UMWOHr.js",revision:null},{url:"assets/messages-BFRiVTfh.js",revision:null},{url:"assets/microsoft-speech-0I0KtNpM.js",revision:null},{url:"assets/mistral-ai-CxyrZSnm.js",revision:null},{url:"assets/models-BDiVXLbc.js",revision:null},{url:"assets/models-ctVuVUBS.css",revision:null},{url:"assets/modules-B_WFNh94.js",revision:null},{url:"assets/moonshot-ai-CPxUGdzM.js",revision:null},{url:"assets/novita-ai-BHu56LyQ.js",revision:null},{url:"assets/ollama-CbGvZQLV.js",revision:null},{url:"assets/openai-audio-speech-CQnlHz-h.js",revision:null},{url:"assets/openai-audio-transcription-COj7c5f3.js",revision:null},{url:"assets/openai-CFrJH41X.js",revision:null},{url:"assets/openrouter-ai-B3LA44lL.js",revision:null},{url:"assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",revision:null},{url:"assets/pages-BohMTnhi.js",revision:null},{url:"assets/plain-0ecyFzXQ.js",revision:null},{url:"assets/player2-D0DMNaQM.js",revision:null},{url:"assets/player2-speech-D3f8DqIF.js",revision:null},{url:"assets/polaroid-HVdbjIQr.js",revision:null},{url:"assets/process.worklet-CF6Ao8XG.js",revision:null},{url:"assets/providers-BQTY_iJ9.js",revision:null},{url:"assets/queue-Bp4D1cP3.js",revision:null},{url:"assets/queue-DrZb4pfX.js",revision:null},{url:"assets/queues-DD1Fxfss.js",revision:null},{url:"assets/route-block--T8TG4is.js",revision:null},{url:"assets/scene-BMgC1HoG.js",revision:null},{url:"assets/settings-D244O10q.js",revision:null},{url:"assets/settings-Nn2AwpUk.js",revision:null},{url:"assets/sleep-CvjNLutj.js",revision:null},{url:"assets/speech-D4NcUzWM.js",revision:null},{url:"assets/src-B8Pazang.css",revision:null},{url:"assets/src-B9Iy8991.js",revision:null},{url:"assets/stage-DU1LZDda.js",revision:null},{url:"assets/stage-wnk7RoUv.js",revision:null},{url:"assets/stores-BW_6w_OI.js",revision:null},{url:"assets/sury-DmrZ3_Oj-B-4he_YB.js",revision:null},{url:"assets/Textarea-SRGnauY5.js",revision:null},{url:"assets/together-ai-DLS8TUdj.js",revision:null},{url:"assets/transformers.web-DB6EOtf2.js",revision:null},{url:"assets/types-AwjH7X1C.js",revision:null},{url:"assets/valibot-CQk-M5rL-CwVUpuNO.js",revision:null},{url:"assets/vibrant-GPCtw0rY.js",revision:null},{url:"assets/volcengine-B-dG8mwz.js",revision:null},{url:"assets/webgpu-aYTuek9b.js",revision:null},{url:"assets/worker-eKZGDR4a.js",revision:null},{url:"assets/xai-5DuPupy5.js",revision:null},{url:"assets/zod-Db63SLXj-BvllDf1x.js",revision:null},{url:"index.html",revision:"d8b7a9f541ff8a1f5c1a370ab5d7f788"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"apple-touch-icon.png",revision:"b41f3c1ba3c98364c640fe2b7348bd39"},{url:"favicon.svg",revision:"47d50a7bc31b26d14f3895982906935f"},{url:"maskable_icon_x192.png",revision:"a6ed025fb1491e8b498c9f4c0064d190"},{url:"maskable_icon_x512.png",revision:"b7b2c2d9bda88c74a295695c8a0e7468"},{url:"web-app-manifest-192x192.png",revision:"c9731148ea6befa78a495f63536c82eb"},{url:"web-app-manifest-512x512.png",revision:"bcae855d5ff588b682314fe1c6e530f0"},{url:"manifest.webmanifest",revision:"13ac96785e6c03e0cb109d13086bf9b2"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/docs\//,/^\/ui\//,/^\/remote-assets\//,/^\/api\//]}))});